Merge pull request #90 from Team-LJY/features/ui-toolbar-native-dialog
시안 기반 툴바와 폴더 탐색 및 운영체제 기본 창 적용
- 작성자
- LeeJunyoung
- 작성 시각
- 커밋
9cc95c3c26c5b65d7442687c3244ead2437e6d3d
변경된 파일 44개
+1,675-320변경 내용이 커서 일부 파일의 Diff를 생략했어요. 생략한 파일은 파일 보기나 Raw로 확인할 수 있어요.
| @@ -205,6 +205,25 @@ version = "1.0.1" | ||
| 205 | 205 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 206 | 206 | checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" |
| 207 | 207 | |
| 208 | 추가: [[package]] | |
| 209 | 추가: name = "ashpd" | |
| 210 | 추가: version = "0.11.1" | |
| 211 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 212 | 추가: checksum = "d2f3f79755c74fd155000314eb349864caa787c6592eace6c6882dad873d9c39" | |
| 213 | 추가: dependencies = [ | |
| 214 | 추가: "async-fs", | |
| 215 | 추가: "async-net", | |
| 216 | 추가: "enumflags2", | |
| 217 | 추가: "futures-channel", | |
| 218 | 추가: "futures-util", | |
| 219 | 추가: "rand", | |
| 220 | 추가: "raw-window-handle", | |
| 221 | 추가: "serde", | |
| 222 | 추가: "serde_repr", | |
| 223 | 추가: "url", | |
| 224 | 추가: "zbus", | |
| 225 | 추가: ] | |
| 226 | 추가: | |
| 208 | 227 | [[package]] |
| 209 | 228 | name = "async-broadcast" |
| 210 | 229 | version = "0.7.2" |
| @@ -243,6 +262,17 @@ dependencies = [ | ||
| 243 | 262 | "slab", |
| 244 | 263 | ] |
| 245 | 264 | |
| 265 | 추가: [[package]] | |
| 266 | 추가: name = "async-fs" | |
| 267 | 추가: version = "2.2.0" | |
| 268 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 269 | 추가: checksum = "8034a681df4aed8b8edbd7fbe472401ecf009251c8b40556b304567052e294c5" | |
| 270 | 추가: dependencies = [ | |
| 271 | 추가: "async-lock", | |
| 272 | 추가: "blocking", | |
| 273 | 추가: "futures-lite", | |
| 274 | 추가: ] | |
| 275 | 추가: | |
| 246 | 276 | [[package]] |
| 247 | 277 | name = "async-io" |
| 248 | 278 | version = "2.6.0" |
| @@ -272,6 +302,17 @@ dependencies = [ | ||
| 272 | 302 | "pin-project-lite", |
| 273 | 303 | ] |
| 274 | 304 | |
| 305 | 추가: [[package]] | |
| 306 | 추가: name = "async-net" | |
| 307 | 추가: version = "2.0.0" | |
| 308 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 309 | 추가: checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" | |
| 310 | 추가: dependencies = [ | |
| 311 | 추가: "async-io", | |
| 312 | 추가: "blocking", | |
| 313 | 추가: "futures-lite", | |
| 314 | 추가: ] | |
| 315 | 추가: | |
| 275 | 316 | [[package]] |
| 276 | 317 | name = "async-process" |
| 277 | 318 | version = "2.5.0" |
| @@ -748,9 +789,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| 748 | 789 | checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" |
| 749 | 790 | dependencies = [ |
| 750 | 791 | "bitflags 2.13.2", |
| 792 | 추가: "block2 0.6.2", | |
| 793 | 추가: "libc", | |
| 751 | 794 | "objc2 0.6.5", |
| 752 | 795 | ] |
| 753 | 796 | |
| 797 | 추가: [[package]] | |
| 798 | 추가: name = "displaydoc" | |
| 799 | 추가: version = "0.2.7" | |
| 800 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 801 | 추가: checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" | |
| 802 | 추가: dependencies = [ | |
| 803 | 추가: "proc-macro2", | |
| 804 | 추가: "quote", | |
| 805 | 추가: "syn 3.0.10", | |
| 806 | 추가: ] | |
| 807 | 추가: | |
| 754 | 808 | [[package]] |
| 755 | 809 | name = "dlib" |
| 756 | 810 | version = "0.5.3" |
| @@ -816,7 +870,7 @@ dependencies = [ | ||
| 816 | 870 | "objc2-foundation 0.3.2", |
| 817 | 871 | "parking_lot", |
| 818 | 872 | "percent-encoding", |
| 819 | 삭제: "pollster", | |
| 873 | 추가: "pollster 1.0.1", | |
| 820 | 874 | "profiling", |
| 821 | 875 | "raw-window-handle", |
| 822 | 876 | "send_wrapper", |
| @@ -1160,6 +1214,24 @@ version = "0.3.1" | ||
| 1160 | 1214 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 1161 | 1215 | checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" |
| 1162 | 1216 | |
| 1217 | 추가: [[package]] | |
| 1218 | 추가: name = "form_urlencoded" | |
| 1219 | 추가: version = "1.2.2" | |
| 1220 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1221 | 추가: checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" | |
| 1222 | 추가: dependencies = [ | |
| 1223 | 추가: "percent-encoding", | |
| 1224 | 추가: ] | |
| 1225 | 추가: | |
| 1226 | 추가: [[package]] | |
| 1227 | 추가: name = "futures-channel" | |
| 1228 | 추가: version = "0.3.34" | |
| 1229 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1230 | 추가: checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" | |
| 1231 | 추가: dependencies = [ | |
| 1232 | 추가: "futures-core", | |
| 1233 | 추가: ] | |
| 1234 | 추가: | |
| 1163 | 1235 | [[package]] |
| 1164 | 1236 | name = "futures-core" |
| 1165 | 1237 | version = "0.3.34" |
| @@ -1209,8 +1281,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| 1209 | 1281 | checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" |
| 1210 | 1282 | dependencies = [ |
| 1211 | 1283 | "futures-core", |
| 1284 | 추가: "futures-io", | |
| 1212 | 1285 | "futures-macro", |
| 1213 | 1286 | "futures-task", |
| 1287 | 추가: "memchr", | |
| 1214 | 1288 | "pin-project-lite", |
| 1215 | 1289 | "slab", |
| 1216 | 1290 | ] |
| @@ -1462,6 +1536,110 @@ dependencies = [ | ||
| 1462 | 1536 | "digest", |
| 1463 | 1537 | ] |
| 1464 | 1538 | |
| 1539 | 추가: [[package]] | |
| 1540 | 추가: name = "icu_collections" | |
| 1541 | 추가: version = "2.4.0" | |
| 1542 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1543 | 추가: checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd" | |
| 1544 | 추가: dependencies = [ | |
| 1545 | 추가: "displaydoc", | |
| 1546 | 추가: "potential_utf", | |
| 1547 | 추가: "utf8_iter", | |
| 1548 | 추가: "yoke", | |
| 1549 | 추가: "zerofrom", | |
| 1550 | 추가: "zerovec", | |
| 1551 | 추가: ] | |
| 1552 | 추가: | |
| 1553 | 추가: [[package]] | |
| 1554 | 추가: name = "icu_locale_core" | |
| 1555 | 추가: version = "2.4.0" | |
| 1556 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1557 | 추가: checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" | |
| 1558 | 추가: dependencies = [ | |
| 1559 | 추가: "displaydoc", | |
| 1560 | 추가: "litemap", | |
| 1561 | 추가: "tinystr", | |
| 1562 | 추가: "writeable", | |
| 1563 | 추가: "zerovec", | |
| 1564 | 추가: ] | |
| 1565 | 추가: | |
| 1566 | 추가: [[package]] | |
| 1567 | 추가: name = "icu_normalizer" | |
| 1568 | 추가: version = "2.4.0" | |
| 1569 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1570 | 추가: checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599" | |
| 1571 | 추가: dependencies = [ | |
| 1572 | 추가: "icu_collections", | |
| 1573 | 추가: "icu_normalizer_data", | |
| 1574 | 추가: "icu_properties", | |
| 1575 | 추가: "icu_provider", | |
| 1576 | 추가: "smallvec", | |
| 1577 | 추가: "zerovec", | |
| 1578 | 추가: ] | |
| 1579 | 추가: | |
| 1580 | 추가: [[package]] | |
| 1581 | 추가: name = "icu_normalizer_data" | |
| 1582 | 추가: version = "2.4.0" | |
| 1583 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1584 | 추가: checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc" | |
| 1585 | 추가: | |
| 1586 | 추가: [[package]] | |
| 1587 | 추가: name = "icu_properties" | |
| 1588 | 추가: version = "2.4.0" | |
| 1589 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1590 | 추가: checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f" | |
| 1591 | 추가: dependencies = [ | |
| 1592 | 추가: "displaydoc", | |
| 1593 | 추가: "icu_collections", | |
| 1594 | 추가: "icu_locale_core", | |
| 1595 | 추가: "icu_properties_data", | |
| 1596 | 추가: "icu_provider", | |
| 1597 | 추가: "zerotrie", | |
| 1598 | 추가: "zerovec", | |
| 1599 | 추가: ] | |
| 1600 | 추가: | |
| 1601 | 추가: [[package]] | |
| 1602 | 추가: name = "icu_properties_data" | |
| 1603 | 추가: version = "2.4.0" | |
| 1604 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1605 | 추가: checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf" | |
| 1606 | 추가: | |
| 1607 | 추가: [[package]] | |
| 1608 | 추가: name = "icu_provider" | |
| 1609 | 추가: version = "2.4.0" | |
| 1610 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1611 | 추가: checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" | |
| 1612 | 추가: dependencies = [ | |
| 1613 | 추가: "displaydoc", | |
| 1614 | 추가: "icu_locale_core", | |
| 1615 | 추가: "writeable", | |
| 1616 | 추가: "yoke", | |
| 1617 | 추가: "zerofrom", | |
| 1618 | 추가: "zerotrie", | |
| 1619 | 추가: "zerovec", | |
| 1620 | 추가: ] | |
| 1621 | 추가: | |
| 1622 | 추가: [[package]] | |
| 1623 | 추가: name = "idna" | |
| 1624 | 추가: version = "1.1.0" | |
| 1625 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1626 | 추가: checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" | |
| 1627 | 추가: dependencies = [ | |
| 1628 | 추가: "idna_adapter", | |
| 1629 | 추가: "smallvec", | |
| 1630 | 추가: "utf8_iter", | |
| 1631 | 추가: ] | |
| 1632 | 추가: | |
| 1633 | 추가: [[package]] | |
| 1634 | 추가: name = "idna_adapter" | |
| 1635 | 추가: version = "1.2.2" | |
| 1636 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1637 | 추가: checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" | |
| 1638 | 추가: dependencies = [ | |
| 1639 | 추가: "icu_normalizer", | |
| 1640 | 추가: "icu_properties", | |
| 1641 | 추가: ] | |
| 1642 | 추가: | |
| 1465 | 1643 | [[package]] |
| 1466 | 1644 | name = "image" |
| 1467 | 1645 | version = "0.25.10" |
| @@ -1653,6 +1831,12 @@ version = "0.12.1" | ||
| 1653 | 1831 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 1654 | 1832 | checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" |
| 1655 | 1833 | |
| 1834 | 추가: [[package]] | |
| 1835 | 추가: name = "litemap" | |
| 1836 | 추가: version = "0.8.3" | |
| 1837 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1838 | 추가: checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" | |
| 1839 | 추가: | |
| 1656 | 1840 | [[package]] |
| 1657 | 1841 | name = "litrs" |
| 1658 | 1842 | version = "1.0.1" |
| @@ -2398,6 +2582,12 @@ dependencies = [ | ||
| 2398 | 2582 | "windows-sys 0.61.2", |
| 2399 | 2583 | ] |
| 2400 | 2584 | |
| 2585 | 추가: [[package]] | |
| 2586 | 추가: name = "pollster" | |
| 2587 | 추가: version = "0.4.0" | |
| 2588 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2589 | 추가: checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" | |
| 2590 | 추가: | |
| 2401 | 2591 | [[package]] |
| 2402 | 2592 | name = "pollster" |
| 2403 | 2593 | version = "1.0.1" |
| @@ -2428,6 +2618,24 @@ dependencies = [ | ||
| 2428 | 2618 | "portable-atomic", |
| 2429 | 2619 | ] |
| 2430 | 2620 | |
| 2621 | 추가: [[package]] | |
| 2622 | 추가: name = "potential_utf" | |
| 2623 | 추가: version = "0.1.6" | |
| 2624 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2625 | 추가: checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" | |
| 2626 | 추가: dependencies = [ | |
| 2627 | 추가: "zerovec", | |
| 2628 | 추가: ] | |
| 2629 | 추가: | |
| 2630 | 추가: [[package]] | |
| 2631 | 추가: name = "ppv-lite86" | |
| 2632 | 추가: version = "0.2.21" | |
| 2633 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2634 | 추가: checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" | |
| 2635 | 추가: dependencies = [ | |
| 2636 | 추가: "zerocopy", | |
| 2637 | 추가: ] | |
| 2638 | 추가: | |
| 2431 | 2639 | [[package]] |
| 2432 | 2640 | name = "presser" |
| 2433 | 2641 | version = "0.3.1" |
| @@ -2500,6 +2708,35 @@ version = "6.0.0" | ||
| 2500 | 2708 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 2501 | 2709 | checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" |
| 2502 | 2710 | |
| 2711 | 추가: [[package]] | |
| 2712 | 추가: name = "rand" | |
| 2713 | 추가: version = "0.9.5" | |
| 2714 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2715 | 추가: checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" | |
| 2716 | 추가: dependencies = [ | |
| 2717 | 추가: "rand_chacha", | |
| 2718 | 추가: "rand_core", | |
| 2719 | 추가: ] | |
| 2720 | 추가: | |
| 2721 | 추가: [[package]] | |
| 2722 | 추가: name = "rand_chacha" | |
| 2723 | 추가: version = "0.9.0" | |
| 2724 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2725 | 추가: checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" | |
| 2726 | 추가: dependencies = [ | |
| 2727 | 추가: "ppv-lite86", | |
| 2728 | 추가: "rand_core", | |
| 2729 | 추가: ] | |
| 2730 | 추가: | |
| 2731 | 추가: [[package]] | |
| 2732 | 추가: name = "rand_core" | |
| 2733 | 추가: version = "0.9.5" | |
| 2734 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2735 | 추가: checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" | |
| 2736 | 추가: dependencies = [ | |
| 2737 | 추가: "getrandom 0.3.4", | |
| 2738 | 추가: ] | |
| 2739 | 추가: | |
| 2503 | 2740 | [[package]] |
| 2504 | 2741 | name = "range-alloc" |
| 2505 | 2742 | version = "0.1.5" |
| @@ -2556,6 +2793,30 @@ version = "1.1.0" | ||
| 2556 | 2793 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 2557 | 2794 | checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" |
| 2558 | 2795 | |
| 2796 | 추가: [[package]] | |
| 2797 | 추가: name = "rfd" | |
| 2798 | 추가: version = "0.16.0" | |
| 2799 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2800 | 추가: checksum = "a15ad77d9e70a92437d8f74c35d99b4e4691128df018833e99f90bcd36152672" | |
| 2801 | 추가: dependencies = [ | |
| 2802 | 추가: "ashpd", | |
| 2803 | 추가: "block2 0.6.2", | |
| 2804 | 추가: "dispatch2", | |
| 2805 | 추가: "js-sys", | |
| 2806 | 추가: "log", | |
| 2807 | 추가: "objc2 0.6.5", | |
| 2808 | 추가: "objc2-app-kit 0.3.2", | |
| 2809 | 추가: "objc2-core-foundation", | |
| 2810 | 추가: "objc2-foundation 0.3.2", | |
| 2811 | 추가: "pollster 0.4.0", | |
| 2812 | 추가: "raw-window-handle", | |
| 2813 | 추가: "urlencoding", | |
| 2814 | 추가: "wasm-bindgen", | |
| 2815 | 추가: "wasm-bindgen-futures", | |
| 2816 | 추가: "web-sys", | |
| 2817 | 추가: "windows-sys 0.60.2", | |
| 2818 | 추가: ] | |
| 2819 | 추가: | |
| 2559 | 2820 | [[package]] |
| 2560 | 2821 | name = "roxmltree" |
| 2561 | 2822 | version = "0.21.2" |
| @@ -2867,6 +3128,12 @@ dependencies = [ | ||
| 2867 | 3128 | "serde", |
| 2868 | 3129 | ] |
| 2869 | 3130 | |
| 3131 | 추가: [[package]] | |
| 3132 | 추가: name = "stable_deref_trait" | |
| 3133 | 추가: version = "1.2.1" | |
| 3134 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3135 | 추가: checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" | |
| 3136 | 추가: | |
| 2870 | 3137 | [[package]] |
| 2871 | 3138 | name = "static_assertions" |
| 2872 | 3139 | version = "1.1.0" |
| @@ -2901,6 +3168,17 @@ dependencies = [ | ||
| 2901 | 3168 | "unicode-ident", |
| 2902 | 3169 | ] |
| 2903 | 3170 | |
| 3171 | 추가: [[package]] | |
| 3172 | 추가: name = "synstructure" | |
| 3173 | 추가: version = "0.14.0" | |
| 3174 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3175 | 추가: checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" | |
| 3176 | 추가: dependencies = [ | |
| 3177 | 추가: "proc-macro2", | |
| 3178 | 추가: "quote", | |
| 3179 | 추가: "syn 3.0.10", | |
| 3180 | 추가: ] | |
| 3181 | 추가: | |
| 2904 | 3182 | [[package]] |
| 2905 | 3183 | name = "sys-locale" |
| 2906 | 3184 | version = "0.3.2" |
| @@ -2977,6 +3255,16 @@ dependencies = [ | ||
| 2977 | 3255 | "zune-jpeg", |
| 2978 | 3256 | ] |
| 2979 | 3257 | |
| 3258 | 추가: [[package]] | |
| 3259 | 추가: name = "tinystr" | |
| 3260 | 추가: version = "0.8.5" | |
| 3261 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3262 | 추가: checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" | |
| 3263 | 추가: dependencies = [ | |
| 3264 | 추가: "displaydoc", | |
| 3265 | 추가: "zerovec", | |
| 3266 | 추가: ] | |
| 3267 | 추가: | |
| 2980 | 3268 | [[package]] |
| 2981 | 3269 | name = "tokio" |
| 2982 | 3270 | version = "1.54.1" |
| @@ -3127,6 +3415,40 @@ version = "0.2.3" | ||
| 3127 | 3415 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3128 | 3416 | checksum = "ca718471876992059f251e33aafc334346ada08042b7661dd1fe313a9bced557" |
| 3129 | 3417 | |
| 3418 | 추가: [[package]] | |
| 3419 | 추가: name = "url" | |
| 3420 | 추가: version = "2.5.8" | |
| 3421 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3422 | 추가: checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" | |
| 3423 | 추가: dependencies = [ | |
| 3424 | 추가: "form_urlencoded", | |
| 3425 | 추가: "idna", | |
| 3426 | 추가: "percent-encoding", | |
| 3427 | 추가: "serde", | |
| 3428 | 추가: "serde_derive", | |
| 3429 | 추가: ] | |
| 3430 | 추가: | |
| 3431 | 추가: [[package]] | |
| 3432 | 추가: name = "urlencoding" | |
| 3433 | 추가: version = "2.1.3" | |
| 3434 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3435 | 추가: checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" | |
| 3436 | 추가: | |
| 3437 | 추가: [[package]] | |
| 3438 | 추가: name = "utf8_iter" | |
| 3439 | 추가: version = "1.1.0" | |
| 3440 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3441 | 추가: checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" | |
| 3442 | 추가: dependencies = [ | |
| 3443 | 추가: "utf_types", | |
| 3444 | 추가: ] | |
| 3445 | 추가: | |
| 3446 | 추가: [[package]] | |
| 3447 | 추가: name = "utf_types" | |
| 3448 | 추가: version = "1.0.0" | |
| 3449 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3450 | 추가: checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" | |
| 3451 | 추가: | |
| 3130 | 3452 | [[package]] |
| 3131 | 3453 | name = "uuid" |
| 3132 | 3454 | version = "1.29.2" |
| @@ -3654,7 +3976,7 @@ version = "0.52.0" | ||
| 3654 | 3976 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3655 | 3977 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" |
| 3656 | 3978 | dependencies = [ |
| 3657 | 삭제: "windows-targets", | |
| 3979 | 추가: "windows-targets 0.52.6", | |
| 3658 | 3980 | ] |
| 3659 | 3981 | |
| 3660 | 3982 | [[package]] |
| @@ -3663,7 +3985,16 @@ version = "0.59.0" | ||
| 3663 | 3985 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3664 | 3986 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" |
| 3665 | 3987 | dependencies = [ |
| 3666 | 삭제: "windows-targets", | |
| 3988 | 추가: "windows-targets 0.52.6", | |
| 3989 | 추가: ] | |
| 3990 | 추가: | |
| 3991 | 추가: [[package]] | |
| 3992 | 추가: name = "windows-sys" | |
| 3993 | 추가: version = "0.60.2" | |
| 3994 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 3995 | 추가: checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" | |
| 3996 | 추가: dependencies = [ | |
| 3997 | 추가: "windows-targets 0.53.5", | |
| 3667 | 3998 | ] |
| 3668 | 3999 | |
| 3669 | 4000 | [[package]] |
| @@ -3681,14 +4012,31 @@ version = "0.52.6" | ||
| 3681 | 4012 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3682 | 4013 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" |
| 3683 | 4014 | dependencies = [ |
| 3684 | 삭제: "windows_aarch64_gnullvm", | |
| 3685 | 삭제: "windows_aarch64_msvc", | |
| 3686 | 삭제: "windows_i686_gnu", | |
| 3687 | 삭제: "windows_i686_gnullvm", | |
| 3688 | 삭제: "windows_i686_msvc", | |
| 3689 | 삭제: "windows_x86_64_gnu", | |
| 3690 | 삭제: "windows_x86_64_gnullvm", | |
| 3691 | 삭제: "windows_x86_64_msvc", | |
| 4015 | 추가: "windows_aarch64_gnullvm 0.52.6", | |
| 4016 | 추가: "windows_aarch64_msvc 0.52.6", | |
| 4017 | 추가: "windows_i686_gnu 0.52.6", | |
| 4018 | 추가: "windows_i686_gnullvm 0.52.6", | |
| 4019 | 추가: "windows_i686_msvc 0.52.6", | |
| 4020 | 추가: "windows_x86_64_gnu 0.52.6", | |
| 4021 | 추가: "windows_x86_64_gnullvm 0.52.6", | |
| 4022 | 추가: "windows_x86_64_msvc 0.52.6", | |
| 4023 | 추가: ] | |
| 4024 | 추가: | |
| 4025 | 추가: [[package]] | |
| 4026 | 추가: name = "windows-targets" | |
| 4027 | 추가: version = "0.53.5" | |
| 4028 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4029 | 추가: checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" | |
| 4030 | 추가: dependencies = [ | |
| 4031 | 추가: "windows-link", | |
| 4032 | 추가: "windows_aarch64_gnullvm 0.53.1", | |
| 4033 | 추가: "windows_aarch64_msvc 0.53.1", | |
| 4034 | 추가: "windows_i686_gnu 0.53.1", | |
| 4035 | 추가: "windows_i686_gnullvm 0.53.1", | |
| 4036 | 추가: "windows_i686_msvc 0.53.1", | |
| 4037 | 추가: "windows_x86_64_gnu 0.53.1", | |
| 4038 | 추가: "windows_x86_64_gnullvm 0.53.1", | |
| 4039 | 추가: "windows_x86_64_msvc 0.53.1", | |
| 3692 | 4040 | ] |
| 3693 | 4041 | |
| 3694 | 4042 | [[package]] |
| @@ -3706,48 +4054,96 @@ version = "0.52.6" | ||
| 3706 | 4054 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3707 | 4055 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" |
| 3708 | 4056 | |
| 4057 | 추가: [[package]] | |
| 4058 | 추가: name = "windows_aarch64_gnullvm" | |
| 4059 | 추가: version = "0.53.1" | |
| 4060 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4061 | 추가: checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" | |
| 4062 | 추가: | |
| 3709 | 4063 | [[package]] |
| 3710 | 4064 | name = "windows_aarch64_msvc" |
| 3711 | 4065 | version = "0.52.6" |
| 3712 | 4066 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3713 | 4067 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" |
| 3714 | 4068 | |
| 4069 | 추가: [[package]] | |
| 4070 | 추가: name = "windows_aarch64_msvc" | |
| 4071 | 추가: version = "0.53.1" | |
| 4072 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4073 | 추가: checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" | |
| 4074 | 추가: | |
| 3715 | 4075 | [[package]] |
| 3716 | 4076 | name = "windows_i686_gnu" |
| 3717 | 4077 | version = "0.52.6" |
| 3718 | 4078 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3719 | 4079 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" |
| 3720 | 4080 | |
| 4081 | 추가: [[package]] | |
| 4082 | 추가: name = "windows_i686_gnu" | |
| 4083 | 추가: version = "0.53.1" | |
| 4084 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4085 | 추가: checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" | |
| 4086 | 추가: | |
| 3721 | 4087 | [[package]] |
| 3722 | 4088 | name = "windows_i686_gnullvm" |
| 3723 | 4089 | version = "0.52.6" |
| 3724 | 4090 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3725 | 4091 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" |
| 3726 | 4092 | |
| 4093 | 추가: [[package]] | |
| 4094 | 추가: name = "windows_i686_gnullvm" | |
| 4095 | 추가: version = "0.53.1" | |
| 4096 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4097 | 추가: checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" | |
| 4098 | 추가: | |
| 3727 | 4099 | [[package]] |
| 3728 | 4100 | name = "windows_i686_msvc" |
| 3729 | 4101 | version = "0.52.6" |
| 3730 | 4102 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3731 | 4103 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" |
| 3732 | 4104 | |
| 4105 | 추가: [[package]] | |
| 4106 | 추가: name = "windows_i686_msvc" | |
| 4107 | 추가: version = "0.53.1" | |
| 4108 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4109 | 추가: checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" | |
| 4110 | 추가: | |
| 3733 | 4111 | [[package]] |
| 3734 | 4112 | name = "windows_x86_64_gnu" |
| 3735 | 4113 | version = "0.52.6" |
| 3736 | 4114 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3737 | 4115 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" |
| 3738 | 4116 | |
| 4117 | 추가: [[package]] | |
| 4118 | 추가: name = "windows_x86_64_gnu" | |
| 4119 | 추가: version = "0.53.1" | |
| 4120 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4121 | 추가: checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" | |
| 4122 | 추가: | |
| 3739 | 4123 | [[package]] |
| 3740 | 4124 | name = "windows_x86_64_gnullvm" |
| 3741 | 4125 | version = "0.52.6" |
| 3742 | 4126 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3743 | 4127 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" |
| 3744 | 4128 | |
| 4129 | 추가: [[package]] | |
| 4130 | 추가: name = "windows_x86_64_gnullvm" | |
| 4131 | 추가: version = "0.53.1" | |
| 4132 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4133 | 추가: checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" | |
| 4134 | 추가: | |
| 3745 | 4135 | [[package]] |
| 3746 | 4136 | name = "windows_x86_64_msvc" |
| 3747 | 4137 | version = "0.52.6" |
| 3748 | 4138 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 3749 | 4139 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" |
| 3750 | 4140 | |
| 4141 | 추가: [[package]] | |
| 4142 | 추가: name = "windows_x86_64_msvc" | |
| 4143 | 추가: version = "0.53.1" | |
| 4144 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4145 | 추가: checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" | |
| 4146 | 추가: | |
| 3751 | 4147 | [[package]] |
| 3752 | 4148 | name = "winit" |
| 3753 | 4149 | version = "0.30.13" |
| @@ -3832,6 +4228,12 @@ dependencies = [ | ||
| 3832 | 4228 | "wayland-protocols-wlr", |
| 3833 | 4229 | ] |
| 3834 | 4230 | |
| 4231 | 추가: [[package]] | |
| 4232 | 추가: name = "writeable" | |
| 4233 | 추가: version = "0.6.4" | |
| 4234 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4235 | 추가: checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" | |
| 4236 | 추가: | |
| 3835 | 4237 | [[package]] |
| 3836 | 4238 | name = "x11-dl" |
| 3837 | 4239 | version = "2.21.0" |
| @@ -3906,6 +4308,29 @@ dependencies = [ | ||
| 3906 | 4308 | "pkg-config", |
| 3907 | 4309 | ] |
| 3908 | 4310 | |
| 4311 | 추가: [[package]] | |
| 4312 | 추가: name = "yoke" | |
| 4313 | 추가: version = "0.8.4" | |
| 4314 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4315 | 추가: checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" | |
| 4316 | 추가: dependencies = [ | |
| 4317 | 추가: "stable_deref_trait", | |
| 4318 | 추가: "yoke-derive", | |
| 4319 | 추가: "zerofrom", | |
| 4320 | 추가: ] | |
| 4321 | 추가: | |
| 4322 | 추가: [[package]] | |
| 4323 | 추가: name = "yoke-derive" | |
| 4324 | 추가: version = "0.8.4" | |
| 4325 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4326 | 추가: checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" | |
| 4327 | 추가: dependencies = [ | |
| 4328 | 추가: "proc-macro2", | |
| 4329 | 추가: "quote", | |
| 4330 | 추가: "syn 3.0.10", | |
| 4331 | 추가: "synstructure", | |
| 4332 | 추가: ] | |
| 4333 | 추가: | |
| 3909 | 4334 | [[package]] |
| 3910 | 4335 | name = "zbus" |
| 3911 | 4336 | version = "5.19.0" |
| @@ -4032,6 +4457,27 @@ dependencies = [ | ||
| 4032 | 4457 | "syn 2.0.119", |
| 4033 | 4458 | ] |
| 4034 | 4459 | |
| 4460 | 추가: [[package]] | |
| 4461 | 추가: name = "zerofrom" | |
| 4462 | 추가: version = "0.1.8" | |
| 4463 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4464 | 추가: checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" | |
| 4465 | 추가: dependencies = [ | |
| 4466 | 추가: "zerofrom-derive", | |
| 4467 | 추가: ] | |
| 4468 | 추가: | |
| 4469 | 추가: [[package]] | |
| 4470 | 추가: name = "zerofrom-derive" | |
| 4471 | 추가: version = "0.1.8" | |
| 4472 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4473 | 추가: checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" | |
| 4474 | 추가: dependencies = [ | |
| 4475 | 추가: "proc-macro2", | |
| 4476 | 추가: "quote", | |
| 4477 | 추가: "syn 3.0.10", | |
| 4478 | 추가: "synstructure", | |
| 4479 | 추가: ] | |
| 4480 | 추가: | |
| 4035 | 4481 | [[package]] |
| 4036 | 4482 | name = "zeroize" |
| 4037 | 4483 | version = "1.9.1" |
| @@ -4052,6 +4498,39 @@ dependencies = [ | ||
| 4052 | 4498 | "syn 2.0.119", |
| 4053 | 4499 | ] |
| 4054 | 4500 | |
| 4501 | 추가: [[package]] | |
| 4502 | 추가: name = "zerotrie" | |
| 4503 | 추가: version = "0.2.5" | |
| 4504 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4505 | 추가: checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" | |
| 4506 | 추가: dependencies = [ | |
| 4507 | 추가: "displaydoc", | |
| 4508 | 추가: "yoke", | |
| 4509 | 추가: "zerofrom", | |
| 4510 | 추가: ] | |
| 4511 | 추가: | |
| 4512 | 추가: [[package]] | |
| 4513 | 추가: name = "zerovec" | |
| 4514 | 추가: version = "0.11.9" | |
| 4515 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4516 | 추가: checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" | |
| 4517 | 추가: dependencies = [ | |
| 4518 | 추가: "yoke", | |
| 4519 | 추가: "zerofrom", | |
| 4520 | 추가: "zerovec-derive", | |
| 4521 | 추가: ] | |
| 4522 | 추가: | |
| 4523 | 추가: [[package]] | |
| 4524 | 추가: name = "zerovec-derive" | |
| 4525 | 추가: version = "0.11.7" | |
| 4526 | 추가: source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 4527 | 추가: checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" | |
| 4528 | 추가: dependencies = [ | |
| 4529 | 추가: "proc-macro2", | |
| 4530 | 추가: "quote", | |
| 4531 | 추가: "syn 3.0.10", | |
| 4532 | 추가: ] | |
| 4533 | 추가: | |
| 4055 | 4534 | [[package]] |
| 4056 | 4535 | name = "zip" |
| 4057 | 4536 | version = "9.5.0" |
| @@ -4120,7 +4599,10 @@ dependencies = [ | ||
| 4120 | 4599 | name = "zipelo-ui-memory-app" |
| 4121 | 4600 | version = "0.1.0" |
| 4122 | 4601 | dependencies = [ |
| 4602 | 추가: "ashpd", | |
| 4123 | 4603 | "eframe", |
| 4604 | 추가: "pollster 0.4.0", | |
| 4605 | 추가: "rfd", | |
| 4124 | 4606 | "wgpu", |
| 4125 | 4607 | "zipelo-app-core-memory", |
| 4126 | 4608 | "zipelo-archive-worker", |
| @@ -4156,6 +4638,7 @@ dependencies = [ | ||
| 4156 | 4638 | "endi", |
| 4157 | 4639 | "enumflags2", |
| 4158 | 4640 | "serde", |
| 4641 | 추가: "url", | |
| 4159 | 4642 | "winnow", |
| 4160 | 4643 | "zcheapstr", |
| 4161 | 4644 | "zvariant_derive", |
| @@ -14,7 +14,7 @@ doctest = false | ||
| 14 | 14 | |
| 15 | 15 | [features] |
| 16 | 16 | default = [] |
| 17 | 삭제: ui = ["dep:eframe", "dep:wgpu"] | |
| 17 | 추가: ui = ["dep:eframe", "dep:wgpu", "dep:rfd", "dep:ashpd", "dep:pollster"] | |
| 18 | 18 | ui-fixture = ["ui"] |
| 19 | 19 | |
| 20 | 20 | [dependencies] |
| @@ -43,6 +43,14 @@ path = "../../tests/rust-app-real-worker/flows.rs" | ||
| 43 | 43 | name = "format_contract" |
| 44 | 44 | path = "../../tests/rust-app-real-worker/formats.rs" |
| 45 | 45 | |
| 46 | 추가: [target.'cfg(target_os = "linux")'.dependencies] | |
| 47 | 추가: ashpd = { version = "=0.11.1", optional = true, default-features = false, features = ["async-std"] } | |
| 48 | 추가: pollster = { version = "=0.4.0", optional = true } | |
| 49 | 추가: rfd = { version = "=0.16.0", optional = true, default-features = false, features = ["xdg-portal", "async-std"] } | |
| 50 | 추가: | |
| 51 | 추가: [target.'cfg(not(target_os = "linux"))'.dependencies] | |
| 52 | 추가: rfd = { version = "=0.16.0", optional = true, default-features = false } | |
| 53 | 추가: | |
| 46 | 54 | [target.'cfg(target_os = "windows")'.dependencies] |
| 47 | 55 | wgpu = { version = "=30.0.1", optional = true, default-features = false, features = ["std", "dx12"] } |
| 48 | 56 | eframe = { version = "=0.37.0", optional = true, default-features = false, features = ["wgpu_no_default_features"] } |
| @@ -4,3 +4,4 @@ Zipelo 의존성 고지 생성 안내 | ||
| 4 | 4 | 앱과 작업자의 Cargo.lock 전체 항목을 오프라인 cargo metadata와 대조함. |
| 5 | 5 | 로컬 registry의 원문과 잠금 체크섬을 확인하며 누락 시 패키지 생성을 중단함. |
| 6 | 6 | 이 안내 파일과 과거 시험용 보충 원문은 최종 배포 고지를 대신하지 않음. |
| 7 | 추가: 운영체제 기본 파일 창의 rfd 0.16.0(MIT)과 Linux xdg-portal 전이 의존성도 잠금 파일에서 수집함. |
| @@ -0,0 +1,116 @@ | ||
| 1 | 추가: use crate::archive_ui::{Entry, Kind}; | |
| 2 | 추가: use std::collections::{BTreeMap, BTreeSet}; | |
| 3 | 추가: | |
| 4 | 추가: #[derive(Clone, Debug)] | |
| 5 | 추가: pub struct Row { | |
| 6 | 추가: pub path: String, | |
| 7 | 추가: pub name: String, | |
| 8 | 추가: pub directory: bool, | |
| 9 | 추가: pub ids: BTreeSet<u32>, | |
| 10 | 추가: pub bytes: Option<u64>, | |
| 11 | 추가: pub encrypted: bool, | |
| 12 | 추가: } | |
| 13 | 추가: | |
| 14 | 추가: pub fn normalized(name: &str) -> Option<String> { | |
| 15 | 추가: let name = name.replace('\\', "/"); | |
| 16 | 추가: let name = name.trim_end_matches('/'); | |
| 17 | 추가: if name.is_empty() | |
| 18 | 추가: || name.starts_with('/') | |
| 19 | 추가: || name.contains(':') | |
| 20 | 추가: || name | |
| 21 | 추가: .split('/') | |
| 22 | 추가: .any(|part| part.is_empty() || part == "." || part == ".." || part.contains('\0')) | |
| 23 | 추가: { | |
| 24 | 추가: return None; | |
| 25 | 추가: } | |
| 26 | 추가: Some(name.to_owned()) | |
| 27 | 추가: } | |
| 28 | 추가: | |
| 29 | 추가: pub fn rows(entries: &[Entry], current: &str, query: &str) -> Vec<Row> { | |
| 30 | 추가: let prefix = if current.is_empty() { | |
| 31 | 추가: String::new() | |
| 32 | 추가: } else { | |
| 33 | 추가: format!("{current}/") | |
| 34 | 추가: }; | |
| 35 | 추가: let mut rows = BTreeMap::<String, Row>::new(); | |
| 36 | 추가: for entry in entries { | |
| 37 | 추가: let Some(path) = normalized(&entry.name) else { | |
| 38 | 추가: continue; | |
| 39 | 추가: }; | |
| 40 | 추가: let Some(relative) = path.strip_prefix(&prefix) else { | |
| 41 | 추가: continue; | |
| 42 | 추가: }; | |
| 43 | 추가: if relative.is_empty() { | |
| 44 | 추가: continue; | |
| 45 | 추가: } | |
| 46 | 추가: let (name, implicit) = relative | |
| 47 | 추가: .split_once('/') | |
| 48 | 추가: .map_or((relative, false), |(first, _)| (first, true)); | |
| 49 | 추가: let directory = implicit || entry.kind == Kind::Directory; | |
| 50 | 추가: let row = rows.entry(name.to_owned()).or_insert_with(|| Row { | |
| 51 | 추가: path: format!("{prefix}{name}"), | |
| 52 | 추가: name: name.to_owned(), | |
| 53 | 추가: directory, | |
| 54 | 추가: ids: BTreeSet::new(), | |
| 55 | 추가: bytes: None, | |
| 56 | 추가: encrypted: false, | |
| 57 | 추가: }); | |
| 58 | 추가: row.directory |= directory; | |
| 59 | 추가: if matches!(entry.kind, Kind::File | Kind::Directory) { | |
| 60 | 추가: row.ids.insert(entry.id); | |
| 61 | 추가: } | |
| 62 | 추가: if !directory { | |
| 63 | 추가: row.bytes = entry.bytes; | |
| 64 | 추가: } | |
| 65 | 추가: row.encrypted |= entry.encrypted; | |
| 66 | 추가: } | |
| 67 | 추가: let query = query.to_lowercase(); | |
| 68 | 추가: let mut rows = rows | |
| 69 | 추가: .into_values() | |
| 70 | 추가: .filter(|row| row.name.to_lowercase().contains(&query)) | |
| 71 | 추가: .collect::<Vec<_>>(); | |
| 72 | 추가: rows.sort_by(|a, b| { | |
| 73 | 추가: b.directory | |
| 74 | 추가: .cmp(&a.directory) | |
| 75 | 추가: .then_with(|| a.name.cmp(&b.name)) | |
| 76 | 추가: }); | |
| 77 | 추가: rows | |
| 78 | 추가: } | |
| 79 | 추가: | |
| 80 | 추가: pub fn expand_selection(entries: &[Entry], selected: &BTreeSet<u32>) -> BTreeSet<u32> { | |
| 81 | 추가: let directories = entries | |
| 82 | 추가: .iter() | |
| 83 | 추가: .filter(|entry| entry.kind == Kind::Directory && selected.contains(&entry.id)) | |
| 84 | 추가: .filter_map(|entry| normalized(&entry.name).map(|path| format!("{path}/"))) | |
| 85 | 추가: .collect::<Vec<_>>(); | |
| 86 | 추가: entries | |
| 87 | 추가: .iter() | |
| 88 | 추가: .filter(|entry| { | |
| 89 | 추가: selected.contains(&entry.id) | |
| 90 | 추가: || normalized(&entry.name) | |
| 91 | 추가: .is_some_and(|name| directories.iter().any(|prefix| name.starts_with(prefix))) | |
| 92 | 추가: }) | |
| 93 | 추가: .filter(|entry| matches!(entry.kind, Kind::File | Kind::Directory)) | |
| 94 | 추가: .map(|entry| entry.id) | |
| 95 | 추가: .collect() | |
| 96 | 추가: } | |
| 97 | 추가: | |
| 98 | 추가: pub fn remove_selection(entries: &[Entry], selected: &mut BTreeSet<u32>, removed: &BTreeSet<u32>) { | |
| 99 | 추가: let paths = entries | |
| 100 | 추가: .iter() | |
| 101 | 추가: .filter(|entry| removed.contains(&entry.id)) | |
| 102 | 추가: .filter_map(|entry| normalized(&entry.name)) | |
| 103 | 추가: .collect::<Vec<_>>(); | |
| 104 | 추가: let ancestors = entries | |
| 105 | 추가: .iter() | |
| 106 | 추가: .filter(|entry| entry.kind == Kind::Directory) | |
| 107 | 추가: .filter_map(|entry| { | |
| 108 | 추가: let prefix = format!("{}/", normalized(&entry.name)?); | |
| 109 | 추가: paths | |
| 110 | 추가: .iter() | |
| 111 | 추가: .any(|path| path.starts_with(&prefix)) | |
| 112 | 추가: .then_some(entry.id) | |
| 113 | 추가: }) | |
| 114 | 추가: .collect::<BTreeSet<_>>(); | |
| 115 | 추가: selected.retain(|id| !removed.contains(id) && !ancestors.contains(id)); | |
| 116 | 추가: } |
| @@ -0,0 +1,177 @@ | ||
| 1 | 추가: use std::path::PathBuf; | |
| 2 | 추가: | |
| 3 | 추가: #[derive(Clone, Copy, Debug, Eq, PartialEq)] | |
| 4 | 추가: pub enum Purpose { | |
| 5 | 추가: Open, | |
| 6 | 추가: Files, | |
| 7 | 추가: Folder, | |
| 8 | 추가: Destination, | |
| 9 | 추가: Retry, | |
| 10 | 추가: SaveZip, | |
| 11 | 추가: SaveGzip, | |
| 12 | 추가: RetryGzip, | |
| 13 | 추가: } | |
| 14 | 추가: | |
| 15 | 추가: #[derive(Clone, Debug)] | |
| 16 | 추가: pub struct DialogRequest { | |
| 17 | 추가: pub purpose: Purpose, | |
| 18 | 추가: pub directory: PathBuf, | |
| 19 | 추가: pub file_name: String, | |
| 20 | 추가: } | |
| 21 | 추가: | |
| 22 | 추가: pub trait Dialogs { | |
| 23 | 추가: fn choose(&mut self, request: DialogRequest) -> Result<Option<Vec<PathBuf>>, String>; | |
| 24 | 추가: } | |
| 25 | 추가: | |
| 26 | 추가: pub fn archive_filters() -> Vec<(&'static str, Vec<String>)> { | |
| 27 | 추가: let mut extensions = Vec::new(); | |
| 28 | 추가: for extension in ["zip", "7z", "tar", "gz", "tgz"] { | |
| 29 | 추가: let mut variants = vec![String::new()]; | |
| 30 | 추가: for character in extension.chars() { | |
| 31 | 추가: let mut next = Vec::new(); | |
| 32 | 추가: for prefix in variants { | |
| 33 | 추가: next.push(format!("{prefix}{character}")); | |
| 34 | 추가: if character.is_ascii_alphabetic() { | |
| 35 | 추가: next.push(format!("{prefix}{}", character.to_ascii_uppercase())); | |
| 36 | 추가: } | |
| 37 | 추가: } | |
| 38 | 추가: variants = next; | |
| 39 | 추가: } | |
| 40 | 추가: extensions.extend(variants); | |
| 41 | 추가: } | |
| 42 | 추가: vec![("압축파일", extensions), ("모든 파일", vec!["*".into()])] | |
| 43 | 추가: } | |
| 44 | 추가: | |
| 45 | 추가: #[derive(Default)] | |
| 46 | 추가: pub struct NativeDialogs; | |
| 47 | 추가: | |
| 48 | 추가: pub const DIALOG_UNAVAILABLE: &str = | |
| 49 | 추가: "파일 선택 창을 열 수 없습니다. 파일을 창으로 끌어 놓아 주세요."; | |
| 50 | 추가: | |
| 51 | 추가: impl Dialogs for NativeDialogs { | |
| 52 | 추가: fn choose(&mut self, request: DialogRequest) -> Result<Option<Vec<PathBuf>>, String> { | |
| 53 | 추가: std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { | |
| 54 | 추가: #[cfg(target_os = "linux")] | |
| 55 | 추가: { | |
| 56 | 추가: choose_portal(request) | |
| 57 | 추가: } | |
| 58 | 추가: #[cfg(not(target_os = "linux"))] | |
| 59 | 추가: { | |
| 60 | 추가: choose_native(request) | |
| 61 | 추가: } | |
| 62 | 추가: })) | |
| 63 | 추가: .unwrap_or_else(|_| Err(DIALOG_UNAVAILABLE.into())) | |
| 64 | 추가: } | |
| 65 | 추가: } | |
| 66 | 추가: | |
| 67 | 추가: #[cfg(target_os = "linux")] | |
| 68 | 추가: pub fn portal_response( | |
| 69 | 추가: response: Result<Vec<PathBuf>, ashpd::Error>, | |
| 70 | 추가: ) -> Result<Option<Vec<PathBuf>>, String> { | |
| 71 | 추가: match response { | |
| 72 | 추가: Ok(paths) if !paths.is_empty() => Ok(Some(paths)), | |
| 73 | 추가: Err(ashpd::Error::Response(ashpd::desktop::ResponseError::Cancelled)) | |
| 74 | 추가: | Err(ashpd::Error::Portal(ashpd::PortalError::Cancelled(_))) => Ok(None), | |
| 75 | 추가: _ => Err(DIALOG_UNAVAILABLE.into()), | |
| 76 | 추가: } | |
| 77 | 추가: } | |
| 78 | 추가: | |
| 79 | 추가: #[cfg(target_os = "linux")] | |
| 80 | 추가: fn choose_portal(request: DialogRequest) -> Result<Option<Vec<PathBuf>>, String> { | |
| 81 | 추가: use ashpd::desktop::file_chooser::{FileFilter, OpenFileRequest, SaveFileRequest}; | |
| 82 | 추가: let filters = match request.purpose { | |
| 83 | 추가: Purpose::Open => archive_filters(), | |
| 84 | 추가: Purpose::SaveZip => vec![("ZIP 압축파일", vec!["zip".into()])], | |
| 85 | 추가: _ => Vec::new(), | |
| 86 | 추가: } | |
| 87 | 추가: .into_iter() | |
| 88 | 추가: .map(|(name, extensions)| { | |
| 89 | 추가: extensions | |
| 90 | 추가: .into_iter() | |
| 91 | 추가: .fold(FileFilter::new(name), |filter, extension| { | |
| 92 | 추가: let glob = if extension == "*" { | |
| 93 | 추가: "*".to_owned() | |
| 94 | 추가: } else { | |
| 95 | 추가: format!("*.{extension}") | |
| 96 | 추가: }; | |
| 97 | 추가: filter.glob(&glob) | |
| 98 | 추가: }) | |
| 99 | 추가: }) | |
| 100 | 추가: .collect::<Vec<_>>(); | |
| 101 | 추가: portal_response(pollster::block_on(async move { | |
| 102 | 추가: let selected = match request.purpose { | |
| 103 | 추가: Purpose::SaveZip | Purpose::SaveGzip | Purpose::RetryGzip => SaveFileRequest::default() | |
| 104 | 추가: .title(if request.purpose == Purpose::SaveZip { | |
| 105 | 추가: "ZIP 파일 저장" | |
| 106 | 추가: } else { | |
| 107 | 추가: "압축 해제 파일 저장" | |
| 108 | 추가: }) | |
| 109 | 추가: .current_name(Some(request.file_name.as_str())) | |
| 110 | 추가: .filters(filters) | |
| 111 | 추가: .current_folder::<&PathBuf>(Some(&request.directory))? | |
| 112 | 추가: .send() | |
| 113 | 추가: .await? | |
| 114 | 추가: .response()?, | |
| 115 | 추가: purpose => OpenFileRequest::default() | |
| 116 | 추가: .title(match purpose { | |
| 117 | 추가: Purpose::Open => "압축파일 열기", | |
| 118 | 추가: Purpose::Files => "파일 추가", | |
| 119 | 추가: Purpose::Folder => "폴더 추가", | |
| 120 | 추가: _ => "압축을 풀 폴더 선택", | |
| 121 | 추가: }) | |
| 122 | 추가: .multiple(purpose == Purpose::Files) | |
| 123 | 추가: .directory(matches!( | |
| 124 | 추가: purpose, | |
| 125 | 추가: Purpose::Folder | Purpose::Destination | Purpose::Retry | |
| 126 | 추가: )) | |
| 127 | 추가: .filters(filters) | |
| 128 | 추가: .current_folder::<&PathBuf>(Some(&request.directory))? | |
| 129 | 추가: .send() | |
| 130 | 추가: .await? | |
| 131 | 추가: .response()?, | |
| 132 | 추가: }; | |
| 133 | 추가: selected | |
| 134 | 추가: .uris() | |
| 135 | 추가: .iter() | |
| 136 | 추가: .map(|uri| { | |
| 137 | 추가: uri.to_file_path() | |
| 138 | 추가: .map_err(|_| ashpd::Error::ParseError("파일 경로 응답 오류")) | |
| 139 | 추가: }) | |
| 140 | 추가: .collect::<Result<Vec<_>, _>>() | |
| 141 | 추가: })) | |
| 142 | 추가: } | |
| 143 | 추가: | |
| 144 | 추가: #[cfg(not(target_os = "linux"))] | |
| 145 | 추가: fn choose_native(request: DialogRequest) -> Result<Option<Vec<PathBuf>>, String> { | |
| 146 | 추가: let dialog = rfd::FileDialog::new().set_directory(request.directory); | |
| 147 | 추가: let answer = match request.purpose { | |
| 148 | 추가: Purpose::Open => { | |
| 149 | 추가: let mut dialog = dialog.set_title("압축파일 열기"); | |
| 150 | 추가: for (name, extensions) in archive_filters() { | |
| 151 | 추가: dialog = dialog.add_filter(name, &extensions); | |
| 152 | 추가: } | |
| 153 | 추가: dialog.pick_file().map(|path| vec![path]) | |
| 154 | 추가: } | |
| 155 | 추가: Purpose::Files => dialog.set_title("파일 추가").pick_files(), | |
| 156 | 추가: Purpose::Folder => dialog | |
| 157 | 추가: .set_title("폴더 추가") | |
| 158 | 추가: .pick_folder() | |
| 159 | 추가: .map(|path| vec![path]), | |
| 160 | 추가: Purpose::Destination | Purpose::Retry => dialog | |
| 161 | 추가: .set_title("압축을 풀 폴더 선택") | |
| 162 | 추가: .pick_folder() | |
| 163 | 추가: .map(|path| vec![path]), | |
| 164 | 추가: Purpose::SaveGzip | Purpose::RetryGzip => dialog | |
| 165 | 추가: .set_title("압축 해제 파일 저장") | |
| 166 | 추가: .set_file_name(request.file_name) | |
| 167 | 추가: .save_file() | |
| 168 | 추가: .map(|path| vec![path]), | |
| 169 | 추가: Purpose::SaveZip => dialog | |
| 170 | 추가: .set_title("ZIP 파일 저장") | |
| 171 | 추가: .set_file_name(request.file_name) | |
| 172 | 추가: .add_filter("ZIP 압축파일", &["zip"]) | |
| 173 | 추가: .save_file() | |
| 174 | 추가: .map(|path| vec![path]), | |
| 175 | 추가: }; | |
| 176 | 추가: Ok(answer) | |
| 177 | 추가: } |
| @@ -1,263 +0,0 @@ | ||
| 1 | 삭제: use crate::{archive_present as present, archive_theme as theme}; | |
| 2 | 삭제: use eframe::egui::{self, Align, Layout}; | |
| 3 | 삭제: use std::path::{Path, PathBuf}; | |
| 4 | 삭제: | |
| 5 | 삭제: #[derive(Clone, Copy, PartialEq)] | |
| 6 | 삭제: pub enum Purpose { | |
| 7 | 삭제: Open, | |
| 8 | 삭제: Destination, | |
| 9 | 삭제: Retry, | |
| 10 | 삭제: Files, | |
| 11 | 삭제: Folder, | |
| 12 | 삭제: ZipFolder, | |
| 13 | 삭제: } | |
| 14 | 삭제: | |
| 15 | 삭제: pub enum Choice { | |
| 16 | 삭제: Cancel, | |
| 17 | 삭제: Paths(Vec<PathBuf>), | |
| 18 | 삭제: } | |
| 19 | 삭제: | |
| 20 | 삭제: pub struct Picker { | |
| 21 | 삭제: pub purpose: Purpose, | |
| 22 | 삭제: current: PathBuf, | |
| 23 | 삭제: entries: Vec<present::BrowserEntry>, | |
| 24 | 삭제: selected: Vec<PathBuf>, | |
| 25 | 삭제: error: bool, | |
| 26 | 삭제: } | |
| 27 | 삭제: | |
| 28 | 삭제: impl Picker { | |
| 29 | 삭제: pub fn new(purpose: Purpose, start: &Path) -> Self { | |
| 30 | 삭제: let current = if start.is_dir() { | |
| 31 | 삭제: start.to_path_buf() | |
| 32 | 삭제: } else { | |
| 33 | 삭제: start | |
| 34 | 삭제: .parent() | |
| 35 | 삭제: .filter(|p| p.is_dir()) | |
| 36 | 삭제: .map(Path::to_path_buf) | |
| 37 | 삭제: .unwrap_or_else(present::home_directory) | |
| 38 | 삭제: }; | |
| 39 | 삭제: let mut picker = Self { | |
| 40 | 삭제: purpose, | |
| 41 | 삭제: current, | |
| 42 | 삭제: entries: Vec::new(), | |
| 43 | 삭제: selected: Vec::new(), | |
| 44 | 삭제: error: false, | |
| 45 | 삭제: }; | |
| 46 | 삭제: picker.reload(); | |
| 47 | 삭제: picker | |
| 48 | 삭제: } | |
| 49 | 삭제: | |
| 50 | 삭제: fn reload(&mut self) { | |
| 51 | 삭제: self.selected.clear(); | |
| 52 | 삭제: match present::directory_entries(&self.current) { | |
| 53 | 삭제: Ok(entries) => { | |
| 54 | 삭제: self.entries = entries; | |
| 55 | 삭제: self.error = false; | |
| 56 | 삭제: } | |
| 57 | 삭제: Err(_) => { | |
| 58 | 삭제: self.entries.clear(); | |
| 59 | 삭제: self.error = true; | |
| 60 | 삭제: } | |
| 61 | 삭제: } | |
| 62 | 삭제: } | |
| 63 | 삭제: | |
| 64 | 삭제: fn directory_mode(&self) -> bool { | |
| 65 | 삭제: matches!( | |
| 66 | 삭제: self.purpose, | |
| 67 | 삭제: Purpose::Destination | Purpose::Retry | Purpose::Folder | Purpose::ZipFolder | |
| 68 | 삭제: ) | |
| 69 | 삭제: } | |
| 70 | 삭제: | |
| 71 | 삭제: pub fn show(&mut self, ctx: &egui::Context) -> Option<Choice> { | |
| 72 | 삭제: let mut choice = None; | |
| 73 | 삭제: let mut navigate = None; | |
| 74 | 삭제: let width = (ctx.content_rect().width() - 64.0).min(720.0); | |
| 75 | 삭제: let height = (ctx.content_rect().height() - 280.0).clamp(160.0, 340.0); | |
| 76 | 삭제: let title = match self.purpose { | |
| 77 | 삭제: Purpose::Open => "파일 열기", | |
| 78 | 삭제: Purpose::Destination | Purpose::Retry => "풀 위치 선택", | |
| 79 | 삭제: Purpose::Files => "묶을 파일 선택", | |
| 80 | 삭제: Purpose::Folder => "묶을 폴더 선택", | |
| 81 | 삭제: Purpose::ZipFolder => "ZIP 저장 폴더 선택", | |
| 82 | 삭제: }; | |
| 83 | 삭제: let title = if self.purpose == Purpose::Open { | |
| 84 | 삭제: "파일 열기" | |
| 85 | 삭제: } else { | |
| 86 | 삭제: title | |
| 87 | 삭제: }; | |
| 88 | 삭제: let modal = egui::Modal::new(egui::Id::unique("archive-picker")).show(ctx, |ui| { | |
| 89 | 삭제: ui.set_width(width); | |
| 90 | 삭제: ui.heading(title); | |
| 91 | 삭제: egui::ScrollArea::horizontal() | |
| 92 | 삭제: .id_salt("breadcrumbs") | |
| 93 | 삭제: .show(ui, |ui| { | |
| 94 | 삭제: ui.horizontal(|ui| { | |
| 95 | 삭제: let mut ancestors = self.current.ancestors().collect::<Vec<_>>(); | |
| 96 | 삭제: ancestors.reverse(); | |
| 97 | 삭제: for path in ancestors { | |
| 98 | 삭제: let label = path | |
| 99 | 삭제: .file_name() | |
| 100 | 삭제: .unwrap_or(path.as_os_str()) | |
| 101 | 삭제: .to_string_lossy(); | |
| 102 | 삭제: if ui | |
| 103 | 삭제: .button(label.as_ref()) | |
| 104 | 삭제: .on_hover_text(path.display().to_string()) | |
| 105 | 삭제: .clicked() | |
| 106 | 삭제: { | |
| 107 | 삭제: navigate = Some(path.to_path_buf()); | |
| 108 | 삭제: } | |
| 109 | 삭제: } | |
| 110 | 삭제: }); | |
| 111 | 삭제: }); | |
| 112 | 삭제: ui.separator(); | |
| 113 | 삭제: ui.horizontal_top(|ui| { | |
| 114 | 삭제: ui.allocate_ui_with_layout( | |
| 115 | 삭제: egui::vec2(128.0, height), | |
| 116 | 삭제: Layout::top_down(Align::Min), | |
| 117 | 삭제: |ui| { | |
| 118 | 삭제: ui.set_min_size(egui::vec2(128.0, height)); | |
| 119 | 삭제: for (label, path) in present::shortcuts() { | |
| 120 | 삭제: if theme::action(ui, &label, false, true).clicked() { | |
| 121 | 삭제: navigate = Some(path); | |
| 122 | 삭제: } | |
| 123 | 삭제: } | |
| 124 | 삭제: if let Some(parent) = self.current.parent() { | |
| 125 | 삭제: if theme::action(ui, "상위 폴더", false, true).clicked() { | |
| 126 | 삭제: navigate = Some(parent.to_path_buf()); | |
| 127 | 삭제: } | |
| 128 | 삭제: } | |
| 129 | 삭제: }, | |
| 130 | 삭제: ); | |
| 131 | 삭제: ui.add_space(theme::SPACE); | |
| 132 | 삭제: ui.allocate_ui_with_layout( | |
| 133 | 삭제: egui::vec2((width - 160.0).max(240.0), height), | |
| 134 | 삭제: Layout::top_down(Align::Min), | |
| 135 | 삭제: |ui| { | |
| 136 | 삭제: ui.set_min_size(egui::vec2((width - 160.0).max(240.0), height)); | |
| 137 | 삭제: if self.error { | |
| 138 | 삭제: ui.colored_label( | |
| 139 | 삭제: theme::ERROR, | |
| 140 | 삭제: "이 폴더를 열 수 없습니다. 접근 권한을 확인하세요", | |
| 141 | 삭제: ); | |
| 142 | 삭제: } else if self.entries.is_empty() { | |
| 143 | 삭제: ui.label("이 폴더는 비어 있습니다"); | |
| 144 | 삭제: } | |
| 145 | 삭제: egui::ScrollArea::vertical() | |
| 146 | 삭제: .id_salt("picker-entries") | |
| 147 | 삭제: .max_height(height) | |
| 148 | 삭제: .show_rows(ui, theme::ROW, self.entries.len(), |ui, rows| { | |
| 149 | 삭제: for index in rows { | |
| 150 | 삭제: let entry = &self.entries[index]; | |
| 151 | 삭제: let selected = self.selected.contains(&entry.path); | |
| 152 | 삭제: let response = ui | |
| 153 | 삭제: .horizontal(|ui| { | |
| 154 | 삭제: theme::icon( | |
| 155 | 삭제: ui, | |
| 156 | 삭제: if entry.directory { | |
| 157 | 삭제: theme::Icon::Folder | |
| 158 | 삭제: } else { | |
| 159 | 삭제: theme::Icon::File | |
| 160 | 삭제: }, | |
| 161 | 삭제: 20.0, | |
| 162 | 삭제: ); | |
| 163 | 삭제: let name = if entry.link { | |
| 164 | 삭제: format!("{} (링크)", entry.name) | |
| 165 | 삭제: } else { | |
| 166 | 삭제: entry.name.clone() | |
| 167 | 삭제: }; | |
| 168 | 삭제: ui.add_sized( | |
| 169 | 삭제: [ui.available_width(), theme::ROW], | |
| 170 | 삭제: egui::Button::new("") | |
| 171 | 삭제: .left_text(present::middle_text(&name, 38)) | |
| 172 | 삭제: .selected(selected), | |
| 173 | 삭제: ) | |
| 174 | 삭제: .on_hover_text(entry.path.display().to_string()) | |
| 175 | 삭제: }) | |
| 176 | 삭제: .inner; | |
| 177 | 삭제: theme::focus(&response); | |
| 178 | 삭제: if response.clicked() { | |
| 179 | 삭제: if self.purpose == Purpose::Files | |
| 180 | 삭제: && ui.input(|i| i.modifiers.command || i.modifiers.ctrl) | |
| 181 | 삭제: { | |
| 182 | 삭제: if selected { | |
| 183 | 삭제: self.selected.retain(|p| p != &entry.path); | |
| 184 | 삭제: } else if !entry.directory { | |
| 185 | 삭제: self.selected.push(entry.path.clone()); | |
| 186 | 삭제: } | |
| 187 | 삭제: } else { | |
| 188 | 삭제: self.selected = vec![entry.path.clone()]; | |
| 189 | 삭제: } | |
| 190 | 삭제: } | |
| 191 | 삭제: let keyboard_activation = response.has_focus() | |
| 192 | 삭제: && ui.input(|i| { | |
| 193 | 삭제: i.key_pressed(egui::Key::Enter) | |
| 194 | 삭제: || i.key_pressed(egui::Key::Space) | |
| 195 | 삭제: }); | |
| 196 | 삭제: if response.double_clicked() || keyboard_activation { | |
| 197 | 삭제: if entry.directory && !entry.link { | |
| 198 | 삭제: navigate = Some(entry.path.clone()); | |
| 199 | 삭제: } else if !self.directory_mode() { | |
| 200 | 삭제: choice = Some(Choice::Paths(vec![entry.path.clone()])); | |
| 201 | 삭제: } | |
| 202 | 삭제: } | |
| 203 | 삭제: } | |
| 204 | 삭제: }); | |
| 205 | 삭제: }, | |
| 206 | 삭제: ); | |
| 207 | 삭제: }); | |
| 208 | 삭제: ui.separator(); | |
| 209 | 삭제: ui.horizontal(|ui| { | |
| 210 | 삭제: if self.purpose == Purpose::Files { | |
| 211 | 삭제: ui.label("Ctrl을 누르면 여러 파일을 고를 수 있습니다"); | |
| 212 | 삭제: } | |
| 213 | 삭제: ui.with_layout(Layout::right_to_left(Align::Center), |ui| { | |
| 214 | 삭제: let selected_directory = self.selected.first().filter(|path| { | |
| 215 | 삭제: self.entries | |
| 216 | 삭제: .iter() | |
| 217 | 삭제: .any(|e| &e.path == *path && (e.directory || e.link)) | |
| 218 | 삭제: }); | |
| 219 | 삭제: let paths = if self.directory_mode() { | |
| 220 | 삭제: vec![ | |
| 221 | 삭제: selected_directory | |
| 222 | 삭제: .cloned() | |
| 223 | 삭제: .unwrap_or_else(|| self.current.clone()), | |
| 224 | 삭제: ] | |
| 225 | 삭제: } else { | |
| 226 | 삭제: self.selected | |
| 227 | 삭제: .iter() | |
| 228 | 삭제: .filter(|path| { | |
| 229 | 삭제: self.entries | |
| 230 | 삭제: .iter() | |
| 231 | 삭제: .any(|e| &e.path == *path && !e.directory) | |
| 232 | 삭제: }) | |
| 233 | 삭제: .cloned() | |
| 234 | 삭제: .collect() | |
| 235 | 삭제: }; | |
| 236 | 삭제: let label = if self.directory_mode() { | |
| 237 | 삭제: "이 폴더 선택" | |
| 238 | 삭제: } else if self.purpose == Purpose::Files { | |
| 239 | 삭제: "추가" | |
| 240 | 삭제: } else { | |
| 241 | 삭제: "열기" | |
| 242 | 삭제: }; | |
| 243 | 삭제: let enabled = !paths.is_empty() && !self.error; | |
| 244 | 삭제: let (cancel, confirm) = theme::action_pair(ui, "취소", Some((label, enabled))); | |
| 245 | 삭제: if navigate.is_none() && confirm { | |
| 246 | 삭제: choice = Some(Choice::Paths(paths)); | |
| 247 | 삭제: } | |
| 248 | 삭제: if cancel { | |
| 249 | 삭제: choice = Some(Choice::Cancel); | |
| 250 | 삭제: } | |
| 251 | 삭제: }); | |
| 252 | 삭제: }); | |
| 253 | 삭제: }); | |
| 254 | 삭제: if modal.should_close() { | |
| 255 | 삭제: choice = Some(Choice::Cancel); | |
| 256 | 삭제: } | |
| 257 | 삭제: if let Some(path) = navigate { | |
| 258 | 삭제: self.current = path; | |
| 259 | 삭제: self.reload(); | |
| 260 | 삭제: } | |
| 261 | 삭제: choice | |
| 262 | 삭제: } | |
| 263 | 삭제: } |
| @@ -362,3 +362,23 @@ pub fn activity_text(model: &Model, creating: bool) -> &'static str { | ||
| 362 | 362 | }) |
| 363 | 363 | } |
| 364 | 364 | } |
| 365 | 추가: | |
| 366 | 추가: pub fn valid_output_leaf(name: &str) -> bool { | |
| 367 | 추가: valid_leaf(name) && worker_protocol::archive::valid_name(name, false).is_ok() | |
| 368 | 추가: } | |
| 369 | 추가: | |
| 370 | 추가: pub fn gzip_output_name(archive: &Path) -> String { | |
| 371 | 추가: let file_name = archive | |
| 372 | 추가: .file_name() | |
| 373 | 추가: .and_then(|name| name.to_str()) | |
| 374 | 추가: .unwrap_or(""); | |
| 375 | 추가: let candidate = file_name | |
| 376 | 추가: .rsplit_once('.') | |
| 377 | 추가: .filter(|(_, suffix)| suffix.eq_ignore_ascii_case("gz")) | |
| 378 | 추가: .map_or(file_name, |(stem, _)| stem); | |
| 379 | 추가: if valid_output_leaf(candidate) { | |
| 380 | 추가: candidate.to_owned() | |
| 381 | 추가: } else { | |
| 382 | 추가: "압축 해제 파일".into() | |
| 383 | 추가: } | |
| 384 | 추가: } |
Diff가 표시 한도를 넘어서 생략했어요.
Raw로 열기| @@ -18,7 +18,7 @@ pub const WARNING: Color32 = Color32::from_rgb(180, 83, 9); | ||
| 18 | 18 | pub const WARNING_BG: Color32 = Color32::from_rgb(255, 247, 232); |
| 19 | 19 | pub const ERROR: Color32 = Color32::from_rgb(185, 28, 28); |
| 20 | 20 | pub const ERROR_BG: Color32 = Color32::from_rgb(253, 237, 237); |
| 21 | 삭제: pub const FOLDER: Color32 = Color32::from_rgb(224, 165, 38); | |
| 21 | 추가: pub const FOLDER: Color32 = Color32::from_rgb(240, 160, 0); | |
| 22 | 22 | pub const FILE: Color32 = Color32::from_rgb(123, 135, 148); |
| 23 | 23 | pub const SPACE: f32 = 8.0; |
| 24 | 24 | pub const PAD: i8 = 16; |
| @@ -27,7 +27,7 @@ pub const DROP_HEIGHT: f32 = 280.0; | ||
| 27 | 27 | pub const DROP_RADIUS: u8 = 12; |
| 28 | 28 | pub const ROW: f32 = 32.0; |
| 29 | 29 | pub const BUTTON: f32 = 40.0; |
| 30 | 삭제: pub const BODY: f32 = 15.0; | |
| 30 | 추가: pub const BODY: f32 = 17.0; | |
| 31 | 31 | pub const TITLE: f32 = 22.0; |
| 32 | 32 | |
| 33 | 33 | pub fn apply(ctx: &egui::Context) { |
| @@ -199,6 +199,37 @@ pub fn icon(ui: &mut egui::Ui, kind: Icon, size: f32) { | ||
| 199 | 199 | } |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 추가: pub fn bounded_text(ui: &mut egui::Ui, text: &str, width: f32) -> egui::Response { | |
| 203 | 추가: let width = width.max(0.0); | |
| 204 | 추가: ui.allocate_ui_with_layout( | |
| 205 | 추가: egui::vec2(width, ui.text_style_height(&TextStyle::Body)), | |
| 206 | 추가: ui.layout().clone(), | |
| 207 | 추가: |ui| { | |
| 208 | 추가: ui.set_min_width(width); | |
| 209 | 추가: ui.set_max_width(width); | |
| 210 | 추가: ui.add(egui::Label::new(text).truncate()) | |
| 211 | 추가: }, | |
| 212 | 추가: ) | |
| 213 | 추가: .inner | |
| 214 | 추가: .on_hover_text(text) | |
| 215 | 추가: } | |
| 216 | 추가: | |
| 217 | 추가: pub fn window_title(ui: &egui::Ui, text: &str, width: f32) -> String { | |
| 218 | 추가: let mut job = | |
| 219 | 추가: egui::text::LayoutJob::simple_singleline(text.into(), FontId::proportional(BODY), TEXT); | |
| 220 | 추가: job.wrap = egui::text::TextWrapping { | |
| 221 | 추가: max_width: width.max(0.0), | |
| 222 | 추가: max_rows: 1, | |
| 223 | 추가: break_anywhere: true, | |
| 224 | 추가: ..Default::default() | |
| 225 | 추가: }; | |
| 226 | 추가: ui.fonts_mut(|fonts| fonts.layout_job(job)) | |
| 227 | 추가: .rows | |
| 228 | 추가: .iter() | |
| 229 | 추가: .flat_map(|row| row.glyphs.iter().map(|glyph| glyph.chr)) | |
| 230 | 추가: .collect() | |
| 231 | 추가: } | |
| 232 | 추가: | |
| 202 | 233 | pub fn column_label( |
| 203 | 234 | ui: &mut egui::Ui, |
| 204 | 235 | text: impl Into<egui::WidgetText>, |
| @@ -279,3 +310,93 @@ pub fn indeterminate(ui: &mut egui::Ui) { | ||
| 279 | 310 | ) |
| 280 | 311 | }); |
| 281 | 312 | } |
| 313 | 추가: | |
| 314 | 추가: pub const OPEN: &str = include_str!("assets/icons/open-archive.svg"); | |
| 315 | 추가: pub const CREATE: &str = include_str!("assets/icons/create-zip.svg"); | |
| 316 | 추가: pub const EXTRACT: &str = include_str!("assets/icons/extract-archive.svg"); | |
| 317 | 추가: pub const UP: &str = include_str!("assets/icons/navigate-up.svg"); | |
| 318 | 추가: pub const CLOSE: &str = include_str!("assets/icons/close-dialog.svg"); | |
| 319 | 추가: | |
| 320 | 추가: pub fn svg_icon(painter: &egui::Painter, rect: egui::Rect, asset: &str, color: Color32) { | |
| 321 | 추가: for element in asset.split("points=\"").skip(1) { | |
| 322 | 추가: let points = element | |
| 323 | 추가: .split('"') | |
| 324 | 추가: .next() | |
| 325 | 추가: .unwrap_or_default() | |
| 326 | 추가: .split_whitespace() | |
| 327 | 추가: .filter_map(|pair| { | |
| 328 | 추가: let (x, y) = pair.split_once(',')?; | |
| 329 | 추가: Some( | |
| 330 | 추가: rect.min | |
| 331 | 추가: + egui::vec2(x.parse::<f32>().ok()?, y.parse::<f32>().ok()?) | |
| 332 | 추가: * (rect.width() / 24.0), | |
| 333 | 추가: ) | |
| 334 | 추가: }) | |
| 335 | 추가: .collect::<Vec<_>>(); | |
| 336 | 추가: painter.add(egui::Shape::line( | |
| 337 | 추가: points, | |
| 338 | 추가: Stroke::new(rect.width() / 18.0, color), | |
| 339 | 추가: )); | |
| 340 | 추가: } | |
| 341 | 추가: } | |
| 342 | 추가: | |
| 343 | 추가: pub fn tool( | |
| 344 | 추가: ui: &mut egui::Ui, | |
| 345 | 추가: label: &str, | |
| 346 | 추가: asset: &str, | |
| 347 | 추가: enabled: bool, | |
| 348 | 추가: blue: bool, | |
| 349 | 추가: ) -> egui::Response { | |
| 350 | 추가: let response = ui.add_enabled( | |
| 351 | 추가: enabled, | |
| 352 | 추가: egui::Button::new( | |
| 353 | 추가: egui::RichText::new(label) | |
| 354 | 추가: .size(18.0) | |
| 355 | 추가: .color(Color32::TRANSPARENT), | |
| 356 | 추가: ) | |
| 357 | 추가: .frame(false) | |
| 358 | 추가: .min_size(egui::vec2(108.0, 86.0)), | |
| 359 | 추가: ); | |
| 360 | 추가: let rect = response.rect; | |
| 361 | 추가: let color = if enabled { | |
| 362 | 추가: if blue { BLUE } else { TEXT } | |
| 363 | 추가: } else { | |
| 364 | 추가: MUTED | |
| 365 | 추가: }; | |
| 366 | 추가: let icon_rect = egui::Rect::from_center_size( | |
| 367 | 추가: egui::pos2(rect.center().x, rect.top() + 27.0), | |
| 368 | 추가: egui::vec2(36.0, 36.0), | |
| 369 | 추가: ); | |
| 370 | 추가: ui.painter() | |
| 371 | 추가: .rect_filled(rect.shrink2(egui::vec2(1.0, 27.0)), 0, PANEL); | |
| 372 | 추가: svg_icon(ui.painter(), icon_rect, asset, color); | |
| 373 | 추가: ui.painter().text( | |
| 374 | 추가: egui::pos2(rect.center().x, rect.bottom() - 15.0), | |
| 375 | 추가: egui::Align2::CENTER_CENTER, | |
| 376 | 추가: label, | |
| 377 | 추가: FontId::proportional(18.0), | |
| 378 | 추가: color, | |
| 379 | 추가: ); | |
| 380 | 추가: focus(&response); | |
| 381 | 추가: response | |
| 382 | 추가: } | |
| 383 | 추가: | |
| 384 | 추가: pub const SEARCH: &str = include_str!("assets/icons/search-files.svg"); | |
| 385 | 추가: | |
| 386 | 추가: pub fn icon_button(ui: &mut egui::Ui, name: &str, asset: &str, enabled: bool) -> egui::Response { | |
| 387 | 추가: let response = ui | |
| 388 | 추가: .add_enabled( | |
| 389 | 추가: enabled, | |
| 390 | 추가: egui::Button::new("").min_size(egui::vec2(38.0, 36.0)), | |
| 391 | 추가: ) | |
| 392 | 추가: .on_hover_text(name); | |
| 393 | 추가: response.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, enabled, name)); | |
| 394 | 추가: svg_icon( | |
| 395 | 추가: ui.painter(), | |
| 396 | 추가: egui::Rect::from_center_size(response.rect.center(), egui::vec2(22.0, 22.0)), | |
| 397 | 추가: asset, | |
| 398 | 추가: if enabled { TEXT } else { MUTED }, | |
| 399 | 추가: ); | |
| 400 | 추가: focus(&response); | |
| 401 | 추가: response | |
| 402 | 추가: } |
| @@ -0,0 +1 @@ | ||
| 1 | 추가: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><polyline points="4,4 20,20"/><polyline points="20,4 4,20"/></svg> |
| @@ -0,0 +1 @@ | ||
| 1 | 추가: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><polyline points="14,3 5,3 5,21 16,21"/><polyline points="14,3 20,9 14,9 14,3"/><polyline points="20,14 20,22"/><polyline points="16,18 24,18"/></svg> |
| @@ -0,0 +1 @@ | ||
| 1 | 추가: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><polyline points="12,2 12,16"/><polyline points="6,10 12,16 18,10"/><polyline points="3,16 3,22 21,22 21,16"/></svg> |
| @@ -0,0 +1 @@ | ||
| 1 | 추가: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><polyline points="5,10 12,3 19,10"/><polyline points="12,3 12,22"/></svg> |
| @@ -0,0 +1 @@ | ||
| 1 | 추가: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><polyline points="3,8 3,4 10,4 13,7 21,7 19,20 3,20 3,8 21,8"/></svg> |
| @@ -0,0 +1 @@ | ||
| 1 | 추가: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><polyline points="16,16 23,23"/><polyline points="18,10 17,5 13,2 7,2 3,5 2,10 4,15 9,18 14,17 18,13 18,10"/></svg> |
| @@ -14,7 +14,8 @@ pub mod archive_process; | ||
| 14 | 14 | |
| 15 | 15 | pub mod archive_present; |
| 16 | 16 | |
| 17 | 추가: pub mod archive_browser; | |
| 17 | 18 | #[cfg(feature = "ui")] |
| 18 | 삭제: pub mod archive_picker; | |
| 19 | 추가: pub mod archive_dialog; | |
| 19 | 20 | #[cfg(feature = "ui")] |
| 20 | 21 | pub mod archive_theme; |
바이너리 파일이라 Diff를 표시하지 않아요.
파일 내려받기| @@ -156,19 +156,28 @@ fn completed(model: &Model) { | ||
| 156 | 156 | ); |
| 157 | 157 | } |
| 158 | 158 | #[cfg(feature = "ui")] |
| 159 | 추가: #[path = "../rust-app-ui/dialogs.rs"] | |
| 160 | 추가: mod dialogs; | |
| 161 | 추가: #[cfg(feature = "ui")] | |
| 159 | 162 | mod screen { |
| 163 | 추가: use super::dialogs::TestDialogs; | |
| 160 | 164 | use super::*; |
| 161 | 165 | use eframe::egui::{self, epaint::Shape}; |
| 162 | 166 | use zipelo_ui_memory_app::archive_screen::ArchiveApp; |
| 163 | 167 | struct Screen { |
| 164 | 168 | context: egui::Context, |
| 165 | 169 | app: ArchiveApp, |
| 170 | 추가: dialogs: TestDialogs, | |
| 166 | 171 | } |
| 167 | 172 | impl Screen { |
| 168 | 173 | fn new(factory: ObservedFactory) -> Self { |
| 174 | 추가: let dialogs = TestDialogs::default(); | |
| 175 | 추가: let mut app = ArchiveApp::new(Box::new(factory), None, false); | |
| 176 | 추가: app.set_dialogs(Box::new(dialogs.clone())); | |
| 169 | 177 | Self { |
| 170 | 178 | context: egui::Context::default(), |
| 171 | 삭제: app: ArchiveApp::new(Box::new(factory), None, false), | |
| 179 | 추가: app, | |
| 180 | 추가: dialogs, | |
| 172 | 181 | } |
| 173 | 182 | } |
| 174 | 183 | fn render(&mut self, events: Vec<egui::Event>) -> Vec<(String, egui::Pos2)> { |
| @@ -235,6 +244,10 @@ mod screen { | ||
| 235 | 244 | self.click_at(point); |
| 236 | 245 | } |
| 237 | 246 | fn set_text(&mut self, id: &str, value: &str) { |
| 247 | 추가: if id == "zip-name" { | |
| 248 | 추가: self.dialogs.0.borrow_mut().save_name = Some(value.to_owned()); | |
| 249 | 추가: return; | |
| 250 | 추가: } | |
| 238 | 251 | self.render(vec![]); |
| 239 | 252 | let point = self |
| 240 | 253 | .context |
| @@ -281,7 +294,12 @@ mod screen { | ||
| 281 | 294 | } |
| 282 | 295 | fn extract(&mut self, destination: &Path) { |
| 283 | 296 | self.app.choose_destination(destination.to_path_buf()); |
| 284 | 삭제: self.click("풀기"); | |
| 297 | 추가: self.dialogs | |
| 298 | 추가: .0 | |
| 299 | 추가: .borrow_mut() | |
| 300 | 추가: .answers | |
| 301 | 추가: .push_back(Some(vec![destination.to_path_buf()])); | |
| 302 | 추가: self.click("압축해제"); | |
| 285 | 303 | assert!(self.app.model.busy()); |
| 286 | 304 | self.settle(); |
| 287 | 305 | assert_eq!( |
| @@ -292,6 +310,7 @@ mod screen { | ||
| 292 | 310 | } |
| 293 | 311 | include!("password_flows.rs"); |
| 294 | 312 | include!("selection_flows.rs"); |
| 313 | 추가: include!("native_dialog_flows.rs"); | |
| 295 | 314 | |
| 296 | 315 | fn archive_flow(name: &str, format: Format) { |
| 297 | 316 | let scratch = Scratch::new(); |
| @@ -368,7 +387,7 @@ mod screen { | ||
| 368 | 387 | let mut screen = Screen::new(factory); |
| 369 | 388 | screen.app.add_sources(vec![source]); |
| 370 | 389 | screen.render(vec![]); |
| 371 | 삭제: screen.click("만들기"); | |
| 390 | 추가: screen.click("압축하기"); | |
| 372 | 391 | screen.settle(); |
| 373 | 392 | assert!(archive.is_file()); |
| 374 | 393 | screen.open(&archive); |
| @@ -411,7 +430,7 @@ mod screen { | ||
| 411 | 430 | screen.app.add_sources(vec![source.clone()]); |
| 412 | 431 | screen.render(vec![]); |
| 413 | 432 | screen.set_text("zip-name", archive.file_name().unwrap().to_str().unwrap()); |
| 414 | 삭제: screen.click("만들기"); | |
| 433 | 추가: screen.click("압축하기"); | |
| 415 | 434 | assert!(screen.app.model.busy()); |
| 416 | 435 | screen.settle(); |
| 417 | 436 | assert!(archive.is_file()); |
| @@ -449,12 +468,16 @@ fn broken_or_incomplete_worker_output_is_not_success() { | ||
| 449 | 468 | fs::copy(binary("zipelo-real-worker-probe"), &probe).unwrap(); |
| 450 | 469 | let mut factory = ProcessFactory::new(probe); |
| 451 | 470 | let mut model = Model::default(); |
| 452 | 삭제: assert!(model.begin( | |
| 453 | 삭제: Start::List { | |
| 454 | 삭제: archive: scratch.path("sample.zip") | |
| 455 | 삭제: }, | |
| 456 | 삭제: &mut factory | |
| 457 | 삭제: )); | |
| 471 | 추가: assert!( | |
| 472 | 추가: model.begin( | |
| 473 | 추가: Start::List { | |
| 474 | 추가: archive: scratch.path("sample.zip") | |
| 475 | 추가: }, | |
| 476 | 추가: &mut factory | |
| 477 | 추가: ), | |
| 478 | 추가: "{:?}", | |
| 479 | 추가: model.error | |
| 480 | 추가: ); | |
| 458 | 481 | model.request_close(); |
| 459 | 482 | model.confirm_close(); |
| 460 | 483 | assert_eq!(model.close, Close::Waiting); |
| @@ -474,12 +497,16 @@ fn dropping_live_connection_kills_and_reaps_owned_child() { | ||
| 474 | 497 | fs::copy(binary("zipelo-real-worker-probe"), &probe).unwrap(); |
| 475 | 498 | let mut factory = ProcessFactory::new(probe); |
| 476 | 499 | let mut model = Model::default(); |
| 477 | 삭제: assert!(model.begin( | |
| 478 | 삭제: Start::List { | |
| 479 | 삭제: archive: scratch.path("sample.zip") | |
| 480 | 삭제: }, | |
| 481 | 삭제: &mut factory | |
| 482 | 삭제: )); | |
| 500 | 추가: assert!( | |
| 501 | 추가: model.begin( | |
| 502 | 추가: Start::List { | |
| 503 | 추가: archive: scratch.path("sample.zip") | |
| 504 | 추가: }, | |
| 505 | 추가: &mut factory | |
| 506 | 추가: ), | |
| 507 | 추가: "{:?}", | |
| 508 | 추가: model.error | |
| 509 | 추가: ); | |
| 483 | 510 | let deadline = Instant::now() + Duration::from_secs(5); |
| 484 | 511 | while !scratch.path("probe.pid").exists() { |
| 485 | 512 | assert!(Instant::now() < deadline); |
| @@ -615,12 +642,16 @@ fn cancel_racing_child_exit_preserves_completed_result_before_poll() { | ||
| 615 | 642 | for iteration in 0..100 { |
| 616 | 643 | let mut factory = CompletedFactory(ProcessFactory::new(binary("zipelo-archive-worker"))); |
| 617 | 644 | let mut model = Model::default(); |
| 618 | 삭제: assert!(model.begin( | |
| 619 | 삭제: Start::List { | |
| 620 | 삭제: archive: archive.clone() | |
| 621 | 삭제: }, | |
| 622 | 삭제: &mut factory | |
| 623 | 삭제: )); | |
| 645 | 추가: assert!( | |
| 646 | 추가: model.begin( | |
| 647 | 추가: Start::List { | |
| 648 | 추가: archive: archive.clone() | |
| 649 | 추가: }, | |
| 650 | 추가: &mut factory | |
| 651 | 추가: ), | |
| 652 | 추가: "{:?}", | |
| 653 | 추가: model.error | |
| 654 | 추가: ); | |
| 624 | 655 | assert!(model.terminal.is_none()); |
| 625 | 656 | model.cancel(); |
| 626 | 657 | wait(&mut model); |
| @@ -637,12 +668,16 @@ fn cancel_racing_exit_without_terminal_remains_unconfirmed() { | ||
| 637 | 668 | fs::copy(binary("zipelo-real-worker-probe"), &probe).unwrap(); |
| 638 | 669 | let mut factory = ProcessFactory::new(probe); |
| 639 | 670 | let mut model = Model::default(); |
| 640 | 삭제: assert!(model.begin( | |
| 641 | 삭제: Start::List { | |
| 642 | 삭제: archive: scratch.path("sample.zip") | |
| 643 | 삭제: }, | |
| 644 | 삭제: &mut factory | |
| 645 | 삭제: )); | |
| 671 | 추가: assert!( | |
| 672 | 추가: model.begin( | |
| 673 | 추가: Start::List { | |
| 674 | 추가: archive: scratch.path("sample.zip") | |
| 675 | 추가: }, | |
| 676 | 추가: &mut factory | |
| 677 | 추가: ), | |
| 678 | 추가: "{:?}", | |
| 679 | 추가: model.error | |
| 680 | 추가: ); | |
| 646 | 681 | std::thread::sleep(Duration::from_millis(2)); |
| 647 | 682 | model.cancel(); |
| 648 | 683 | model.request_close(); |
| @@ -0,0 +1,86 @@ | ||
| 1 | 추가: fn native_fixture(scratch: &Scratch, fixture: &str, name: &str) -> PathBuf { | |
| 2 | 추가: let target = scratch.path(name); | |
| 3 | 추가: fs::copy( | |
| 4 | 추가: Path::new(env!("CARGO_MANIFEST_DIR")) | |
| 5 | 추가: .join("../../tests/rust-app-real-worker/fixtures") | |
| 6 | 추가: .join(fixture), | |
| 7 | 추가: &target, | |
| 8 | 추가: ).unwrap(); | |
| 9 | 추가: target | |
| 10 | 추가: } | |
| 11 | 추가: | |
| 12 | 추가: #[test] | |
| 13 | 추가: fn raw_gzip_save_dialog_corrects_names_and_preserves_cancel_and_conflict_retry() { | |
| 14 | 추가: use zipelo_ui_memory_app::archive_dialog::Purpose; | |
| 15 | 추가: let mut names = vec![".gz", "report.GZ", "report.Gz", "report.gz"]; | |
| 16 | 추가: #[cfg(unix)] | |
| 17 | 추가: names.push("report:2026.gz"); | |
| 18 | 추가: for name in names { | |
| 19 | 추가: let scratch = Scratch::new(); | |
| 20 | 추가: let archive = native_fixture(&scratch, "sample.gz", name); | |
| 21 | 추가: let original = fs::read(&archive).unwrap(); | |
| 22 | 추가: let output = make_directory(&scratch.path("output")); | |
| 23 | 추가: let (factory, observed) = observed_factory(); | |
| 24 | 추가: let mut screen = Screen::new(factory); | |
| 25 | 추가: screen.open(&archive); | |
| 26 | 추가: assert_eq!(screen.app.model.list_id.as_ref().unwrap().format, Format::Gzip); | |
| 27 | 추가: screen.click("압축해제"); | |
| 28 | 추가: assert!(!screen.app.model.busy()); | |
| 29 | 추가: assert_eq!(observed.borrow().jobs.len(), 1); | |
| 30 | 추가: let request = screen.dialogs.0.borrow().requests.last().unwrap().clone(); | |
| 31 | 추가: assert_eq!(request.purpose, Purpose::SaveGzip); | |
| 32 | 추가: assert_eq!(request.directory, scratch.0); | |
| 33 | 추가: assert_eq!(request.file_name, if name == ".gz" || name.contains(':') { "압축 해제 파일" } else { "report" }); | |
| 34 | 추가: let existing = output.join("기존 파일.txt"); | |
| 35 | 추가: fs::write(&existing, b"preserve").unwrap(); | |
| 36 | 추가: screen.dialogs.0.borrow_mut().answers.push_back(Some(vec![existing.clone()])); | |
| 37 | 추가: screen.click("압축해제"); | |
| 38 | 추가: let deadline = Instant::now() + Duration::from_secs(10); | |
| 39 | 추가: while screen.app.model.busy() { | |
| 40 | 추가: screen.render(vec![]); | |
| 41 | 추가: assert!(Instant::now() < deadline); | |
| 42 | 추가: std::thread::sleep(Duration::from_millis(2)); | |
| 43 | 추가: } | |
| 44 | 추가: assert_eq!(screen.app.model.terminal.as_ref().unwrap().error, Some(ErrorCode::Conflict)); | |
| 45 | 추가: assert_eq!(fs::read(&existing).unwrap(), b"preserve"); | |
| 46 | 추가: screen.click("다른 이름으로 저장"); | |
| 47 | 추가: assert!(!screen.app.model.busy()); | |
| 48 | 추가: assert_eq!(observed.borrow().jobs.len(), 2); | |
| 49 | 추가: assert_eq!(screen.dialogs.0.borrow().requests.last().unwrap().purpose, Purpose::RetryGzip); | |
| 50 | 추가: let saved = output.join("사용자 이름.txt"); | |
| 51 | 추가: screen.dialogs.0.borrow_mut().answers.push_back(Some(vec![saved.clone()])); | |
| 52 | 추가: screen.click("다른 이름으로 저장"); | |
| 53 | 추가: screen.settle(); | |
| 54 | 추가: assert_eq!(fs::read(saved).unwrap(), b"Zipelo real worker flow\n"); | |
| 55 | 추가: assert_eq!(fs::read(existing).unwrap(), b"preserve"); | |
| 56 | 추가: assert_eq!(fs::read(&archive).unwrap(), original); | |
| 57 | 추가: assert!(matches!( | |
| 58 | 추가: observed.borrow().starts.last(), | |
| 59 | 추가: Some(Start::Extract { destination, gzip_output_name: Some(name), .. }) | |
| 60 | 추가: if destination == &output && name == "사용자 이름.txt" | |
| 61 | 추가: )); | |
| 62 | 추가: assert_reaped(&observed); | |
| 63 | 추가: } | |
| 64 | 추가: } | |
| 65 | 추가: | |
| 66 | 추가: #[test] | |
| 67 | 추가: fn mixed_case_zip_names_open_and_extract_through_native_dialog_responses() { | |
| 68 | 추가: use zipelo_ui_memory_app::archive_dialog::Purpose; | |
| 69 | 추가: for name in ["sample.ZIP", "sample.Zip", "sample.zIp"] { | |
| 70 | 추가: let scratch = Scratch::new(); | |
| 71 | 추가: let archive = native_fixture(&scratch, "sample.zip", name); | |
| 72 | 추가: let original = fs::read(&archive).unwrap(); | |
| 73 | 추가: let output = make_directory(&scratch.path("output")); | |
| 74 | 추가: let (factory, observed) = observed_factory(); | |
| 75 | 추가: let mut screen = Screen::new(factory); | |
| 76 | 추가: screen.dialogs.0.borrow_mut().answers.push_back(Some(vec![archive.clone()])); | |
| 77 | 추가: screen.click("열기"); | |
| 78 | 추가: screen.settle(); | |
| 79 | 추가: assert_eq!(screen.dialogs.0.borrow().requests[0].purpose, Purpose::Open); | |
| 80 | 추가: assert_eq!(screen.app.model.list_id.as_ref().unwrap().format, Format::Zip); | |
| 81 | 추가: screen.extract(&output); | |
| 82 | 추가: assert_eq!(fs::read(output.join("content.txt")).unwrap(), b"Zipelo real worker flow\n"); | |
| 83 | 추가: assert_eq!(fs::read(archive).unwrap(), original); | |
| 84 | 추가: assert_reaped(&observed); | |
| 85 | 추가: } | |
| 86 | 추가: } |
| @@ -48,14 +48,24 @@ impl Screen { | ||
| 48 | 48 | if !text.is_empty() { |
| 49 | 49 | assert!(!rendered.iter().any(|(value, _)| value.contains(text))); |
| 50 | 50 | } |
| 51 | 삭제: if self.app.model.challenge.is_some_and(|(_, _, encrypt)| encrypt) { | |
| 51 | 추가: if self | |
| 52 | 추가: .app | |
| 53 | 추가: .model | |
| 54 | 추가: .challenge | |
| 55 | 추가: .is_some_and(|(_, _, encrypt)| encrypt) | |
| 56 | 추가: { | |
| 52 | 57 | self.set_text("archive-password-confirm", text); |
| 53 | 58 | } |
| 54 | 59 | self.click("확인"); |
| 55 | 60 | } |
| 56 | 61 | fn start_password_extract(&mut self, output: &Path) { |
| 57 | 62 | self.app.choose_destination(output.to_path_buf()); |
| 58 | 삭제: self.click("풀기"); | |
| 63 | 추가: self.dialogs | |
| 64 | 추가: .0 | |
| 65 | 추가: .borrow_mut() | |
| 66 | 추가: .answers | |
| 67 | 추가: .push_back(Some(vec![output.to_path_buf()])); | |
| 68 | 추가: self.click("압축해제"); | |
| 59 | 69 | assert!(self.app.model.busy()); |
| 60 | 70 | } |
| 61 | 71 | fn finish_password_job(&mut self, expected: Outcome) { |
| @@ -74,7 +84,7 @@ impl Screen { | ||
| 74 | 84 | self.render(vec![]); |
| 75 | 85 | self.set_text("zip-name", archive.file_name().unwrap().to_str().unwrap()); |
| 76 | 86 | self.click("암호로 보호하기"); |
| 77 | 삭제: self.click("만들기"); | |
| 87 | 추가: self.click("압축하기"); | |
| 78 | 88 | assert!(self.app.model.busy(), "{}", self.app.model.status()); |
| 79 | 89 | } |
| 80 | 90 | } |
| @@ -245,7 +255,12 @@ fn oversized_utf8_password_stays_in_dialog_then_accepts_valid_input() { | ||
| 245 | 255 | let id = screen.password_request(1, false); |
| 246 | 256 | screen.password_answer(&"가".repeat(342)); |
| 247 | 257 | assert_eq!(screen.app.model.challenge, Some((id, 1, false))); |
| 248 | 삭제: assert!(screen.render(vec![]).iter().any(|(text, _)| text.contains("1~1024바이트"))); | |
| 258 | 추가: assert!( | |
| 259 | 추가: screen | |
| 260 | 추가: .render(vec![]) | |
| 261 | 추가: .iter() | |
| 262 | 추가: .any(|(text, _)| text.contains("1~1024바이트")) | |
| 263 | 추가: ); | |
| 249 | 264 | assert_eq!(fs::read_dir(&output).unwrap().count(), 0); |
| 250 | 265 | screen.password_answer(FIXTURE_PASSWORD); |
| 251 | 266 | screen.finish_password_job(Outcome::Completed); |
| @@ -266,7 +281,12 @@ fn invalid_password_then_cancel(invalid: &str, close: bool) { | ||
| 266 | 281 | if invalid.is_empty() { |
| 267 | 282 | assert!(screen.app.model.input_error.is_none()); |
| 268 | 283 | } else { |
| 269 | 삭제: assert!(screen.render(vec![]).iter().any(|(text, _)| text.contains("1~1024바이트"))); | |
| 284 | 추가: assert!( | |
| 285 | 추가: screen | |
| 286 | 추가: .render(vec![]) | |
| 287 | 추가: .iter() | |
| 288 | 추가: .any(|(text, _)| text.contains("1~1024바이트")) | |
| 289 | 추가: ); | |
| 270 | 290 | } |
| 271 | 291 | if close { |
| 272 | 292 | screen.app.model.request_close(); |
| @@ -36,7 +36,7 @@ fn extraction_completion_matches_actual_worker_selection_matrix() { | ||
| 36 | 36 | screen.app.add_sources(vec![docs, root_file]); |
| 37 | 37 | screen.render(vec![]); |
| 38 | 38 | screen.set_text("zip-name", "selection.zip"); |
| 39 | 삭제: screen.click("만들기"); | |
| 39 | 추가: screen.click("압축하기"); | |
| 40 | 40 | screen.settle(); |
| 41 | 41 | |
| 42 | 42 | let cases: [(&str, Option<&[&str]>, &[&str]); 6] = [ |
| @@ -56,17 +56,21 @@ fn extraction_completion_matches_actual_worker_selection_matrix() { | ||
| 56 | 56 | Some(&["docs/nested/one.txt", "root.txt"]), |
| 57 | 57 | &["docs", "docs/nested", "docs/nested/one.txt", "root.txt"], |
| 58 | 58 | ), |
| 59 | 삭제: ("directory", Some(&["docs"]), &["docs"]), | |
| 59 | 추가: ( | |
| 60 | 추가: "directory", | |
| 61 | 추가: Some(&["docs"]), | |
| 62 | 추가: &["docs", "docs/empty", "docs/nested", "docs/nested/one.txt"], | |
| 63 | 추가: ), | |
| 60 | 64 | ( |
| 61 | 65 | "mixed", |
| 62 | 66 | Some(&["docs", "docs/nested/one.txt"]), |
| 63 | 삭제: &["docs", "docs/nested", "docs/nested/one.txt"], | |
| 67 | 추가: &["docs", "docs/empty", "docs/nested", "docs/nested/one.txt"], | |
| 64 | 68 | ), |
| 65 | 69 | ("empty", Some(&["docs/empty"]), &["docs", "docs/empty"]), |
| 66 | 70 | ( |
| 67 | 71 | "nested-directory", |
| 68 | 72 | Some(&["docs/nested"]), |
| 69 | 삭제: &["docs", "docs/nested"], | |
| 73 | 추가: &["docs", "docs/nested", "docs/nested/one.txt"], | |
| 70 | 74 | ), |
| 71 | 75 | ]; |
| 72 | 76 | for (name, selected, expected) in cases { |
| @@ -88,7 +92,6 @@ fn extraction_completion_matches_actual_worker_selection_matrix() { | ||
| 88 | 92 | }); |
| 89 | 93 | if let Some(ids) = &ids { |
| 90 | 94 | screen.app.model.selected = ids.clone(); |
| 91 | 삭제: screen.click("선택한 항목만 풀기"); | |
| 92 | 95 | } |
| 93 | 96 | let output = make_directory(&scratch.path(name)); |
| 94 | 97 | screen.extract(&output); |
| @@ -125,7 +128,16 @@ fn extraction_completion_matches_actual_worker_selection_matrix() { | ||
| 125 | 128 | Start::Extract { selection, .. } => match (selection, &ids) { |
| 126 | 129 | (Selection::All, None) => {} |
| 127 | 130 | (Selection::EntryIds(actual), Some(ids)) => { |
| 128 | 삭제: assert_eq!(actual, &ids.iter().copied().collect::<Vec<_>>(), "{name}"); | |
| 131 | 추가: assert_eq!( | |
| 132 | 추가: actual, | |
| 133 | 추가: &zipelo_ui_memory_app::archive_browser::expand_selection( | |
| 134 | 추가: &screen.app.model.entries, | |
| 135 | 추가: ids | |
| 136 | 추가: ) | |
| 137 | 추가: .into_iter() | |
| 138 | 추가: .collect::<Vec<_>>(), | |
| 139 | 추가: "{name}" | |
| 140 | 추가: ); | |
| 129 | 141 | } |
| 130 | 142 | _ => panic!("요청 선택 범위 불일치: {name}"), |
| 131 | 143 | }, |
| @@ -193,7 +205,7 @@ fn auto_destination_is_private_under_desktop_umask() { | ||
| 193 | 205 | let (factory, observed) = observed_factory(); |
| 194 | 206 | let mut screen = Screen::new(factory); |
| 195 | 207 | screen.open(&archive); |
| 196 | 삭제: screen.click("풀기"); | |
| 208 | 추가: assert!(screen.app.begin_extract()); | |
| 197 | 209 | assert!(screen.app.model.busy()); |
| 198 | 210 | screen.settle(); |
| 199 | 211 | assert_eq!( |
| @@ -112,6 +112,61 @@ fn entries() -> Vec<Entry> { | ||
| 112 | 112 | }, |
| 113 | 113 | ] |
| 114 | 114 | } |
| 115 | 추가: fn toolbar_entries() -> Vec<Entry> { | |
| 116 | 추가: let mut entries = vec![ | |
| 117 | 추가: Entry { | |
| 118 | 추가: id: 0, | |
| 119 | 추가: name: "Install".into(), | |
| 120 | 추가: kind: Kind::Directory, | |
| 121 | 추가: bytes: Some(0), | |
| 122 | 추가: packed: None, | |
| 123 | 추가: encrypted: false, | |
| 124 | 추가: }, | |
| 125 | 추가: Entry { | |
| 126 | 추가: id: 1, | |
| 127 | 추가: name: "Install.exe".into(), | |
| 128 | 추가: kind: Kind::File, | |
| 129 | 추가: bytes: Some(234_906), | |
| 130 | 추가: packed: None, | |
| 131 | 추가: encrypted: false, | |
| 132 | 추가: }, | |
| 133 | 추가: ]; | |
| 134 | 추가: for (index, name) in [ | |
| 135 | 추가: "cab1.cab", | |
| 136 | 추가: "cab10.cab", | |
| 137 | 추가: "cab11.cab", | |
| 138 | 추가: "cab12.cab", | |
| 139 | 추가: "cab2.cab", | |
| 140 | 추가: "cab3.cab", | |
| 141 | 추가: "cab4.cab", | |
| 142 | 추가: "cab5.cab", | |
| 143 | 추가: ] | |
| 144 | 추가: .iter() | |
| 145 | 추가: .enumerate() | |
| 146 | 추가: { | |
| 147 | 추가: entries.push(Entry { | |
| 148 | 추가: id: index as u32 + 2, | |
| 149 | 추가: name: format!("Install/{name}"), | |
| 150 | 추가: kind: Kind::File, | |
| 151 | 추가: bytes: Some( | |
| 152 | 추가: [ | |
| 153 | 추가: 99_510_272, | |
| 154 | 추가: 77_909_197, | |
| 155 | 추가: 102_236_160, | |
| 156 | 추가: 67_842_867, | |
| 157 | 추가: 103_389_594, | |
| 158 | 추가: 59_454_669, | |
| 159 | 추가: 78_014_054, | |
| 160 | 추가: 81_159_782, | |
| 161 | 추가: ][index], | |
| 162 | 추가: ), | |
| 163 | 추가: packed: None, | |
| 164 | 추가: encrypted: false, | |
| 165 | 추가: }); | |
| 166 | 추가: } | |
| 167 | 추가: entries | |
| 168 | 추가: } | |
| 169 | 추가: | |
| 115 | 170 | impl Factory for CaptureFactory { |
| 116 | 171 | fn connect(&mut self, job: u64) -> Result<Box<dyn Connection>, String> { |
| 117 | 172 | Ok(Box::new(CaptureConnection { |
| @@ -130,11 +185,17 @@ impl Connection for CaptureConnection { | ||
| 130 | 185 | self.event(Event::Accepted { encryption: true }); |
| 131 | 186 | match start { |
| 132 | 187 | Start::List { .. } => { |
| 133 | 삭제: for entry in entries() { | |
| 188 | 추가: let entries = if self.mode.starts_with("toolbar-") { | |
| 189 | 추가: toolbar_entries() | |
| 190 | 추가: } else { | |
| 191 | 추가: entries() | |
| 192 | 추가: }; | |
| 193 | 추가: let count = entries.len() as u32; | |
| 194 | 추가: for entry in entries { | |
| 134 | 195 | self.event(Event::Entry(entry)); |
| 135 | 196 | } |
| 136 | 197 | self.event(Event::ListEnd { |
| 137 | 삭제: entry_count: 3, | |
| 198 | 추가: entry_count: count, | |
| 138 | 199 | list_id: ListId { |
| 139 | 200 | catalog_version: 1, |
| 140 | 201 | format: Format::Zip, |
| @@ -228,6 +289,54 @@ impl eframe::App for Capture { | ||
| 228 | 289 | } |
| 229 | 290 | if !self.triggered && self.app.model.list_id.is_some() { |
| 230 | 291 | self.triggered = true; |
| 292 | 추가: if self.mode.starts_with("long-") { | |
| 293 | 추가: let name = format!("{}.txt", "W".repeat(220)); | |
| 294 | 추가: let folder = "deep-folder/".repeat(30); | |
| 295 | 추가: let base = std::env::current_dir() | |
| 296 | 추가: .unwrap() | |
| 297 | 추가: .join("tests/ui-redesign/runs/fixtures"); | |
| 298 | 추가: self.app.model.archive = Some(base.join(&folder).join(format!("{name}.zip"))); | |
| 299 | 추가: if self.mode == "long-list" || self.mode == "long-folder" { | |
| 300 | 추가: self.app.model.entries = (0..5000) | |
| 301 | 추가: .map(|id| Entry { | |
| 302 | 추가: id, | |
| 303 | 추가: name: format!( | |
| 304 | 추가: "{}{id:04}-{name}", | |
| 305 | 추가: if self.mode == "long-folder" { | |
| 306 | 추가: folder.as_str() | |
| 307 | 추가: } else { | |
| 308 | 추가: "" | |
| 309 | 추가: } | |
| 310 | 추가: ), | |
| 311 | 추가: kind: Kind::File, | |
| 312 | 추가: bytes: Some(31), | |
| 313 | 추가: packed: None, | |
| 314 | 추가: encrypted: true, | |
| 315 | 추가: }) | |
| 316 | 추가: .collect(); | |
| 317 | 추가: if self.mode == "long-folder" { | |
| 318 | 추가: self.app.browse_folder(folder.trim_end_matches('/')); | |
| 319 | 추가: } | |
| 320 | 추가: } | |
| 321 | 추가: if self.mode == "long-create" { | |
| 322 | 추가: let source = base.join(&name); | |
| 323 | 추가: std::fs::write(&source, b"capture source").unwrap(); | |
| 324 | 추가: self.app.add_sources(vec![source]); | |
| 325 | 추가: self.app.show_create(false); | |
| 326 | 추가: } | |
| 327 | 추가: if self.mode == "long-result" { | |
| 328 | 추가: let destination = base.join(&folder); | |
| 329 | 추가: std::fs::create_dir_all(&destination).unwrap(); | |
| 330 | 추가: self.app.choose_destination(destination); | |
| 331 | 추가: self.app.begin_extract(); | |
| 332 | 추가: } | |
| 333 | 추가: } | |
| 334 | 추가: if self.mode == "toolbar-folder" { | |
| 335 | 추가: self.app.browse_folder("Install"); | |
| 336 | 추가: } | |
| 337 | 추가: if self.mode == "toolbar-create" { | |
| 338 | 추가: self.app.show_create(false); | |
| 339 | 추가: } | |
| 231 | 340 | if [ |
| 232 | 341 | "password", |
| 233 | 342 | "password-retry", |
| @@ -0,0 +1,32 @@ | ||
| 1 | 추가: use std::{cell::RefCell, collections::VecDeque, path::PathBuf, rc::Rc}; | |
| 2 | 추가: use zipelo_ui_memory_app::archive_dialog::{DialogRequest, Dialogs, Purpose}; | |
| 3 | 추가: | |
| 4 | 추가: #[derive(Default)] | |
| 5 | 추가: pub struct DialogState { | |
| 6 | 추가: pub requests: Vec<DialogRequest>, | |
| 7 | 추가: pub answers: VecDeque<Option<Vec<PathBuf>>>, | |
| 8 | 추가: pub save_name: Option<String>, | |
| 9 | 추가: pub cancel_save: bool, | |
| 10 | 추가: pub error: Option<String>, | |
| 11 | 추가: } | |
| 12 | 추가: | |
| 13 | 추가: #[derive(Clone, Default)] | |
| 14 | 추가: pub struct TestDialogs(pub Rc<RefCell<DialogState>>); | |
| 15 | 추가: | |
| 16 | 추가: impl Dialogs for TestDialogs { | |
| 17 | 추가: fn choose(&mut self, request: DialogRequest) -> Result<Option<Vec<PathBuf>>, String> { | |
| 18 | 추가: let mut state = self.0.borrow_mut(); | |
| 19 | 추가: state.requests.push(request.clone()); | |
| 20 | 추가: if let Some(error) = &state.error { | |
| 21 | 추가: return Err(error.clone()); | |
| 22 | 추가: } | |
| 23 | 추가: if let Some(answer) = state.answers.pop_front() { | |
| 24 | 추가: return Ok(answer); | |
| 25 | 추가: } | |
| 26 | 추가: if request.purpose == Purpose::SaveZip && !state.cancel_save { | |
| 27 | 추가: let name = state.save_name.take().unwrap_or(request.file_name); | |
| 28 | 추가: return Ok(Some(vec![request.directory.join(name)])); | |
| 29 | 추가: } | |
| 30 | 추가: Ok(None) | |
| 31 | 추가: } | |
| 32 | 추가: } |
| @@ -0,0 +1,211 @@ | ||
| 1 | 추가: fn narrow_frame( | |
| 2 | 추가: ctx: &egui::Context, | |
| 3 | 추가: app: &mut ArchiveApp, | |
| 4 | 추가: time: f64, | |
| 5 | 추가: events: Vec<egui::Event>, | |
| 6 | 추가: ) -> egui::FullOutput { | |
| 7 | 추가: let mut output = ctx.run_ui( | |
| 8 | 추가: egui::RawInput { | |
| 9 | 추가: screen_rect: Some(egui::Rect::from_min_size( | |
| 10 | 추가: egui::Pos2::ZERO, | |
| 11 | 추가: egui::vec2(760.0, 540.0), | |
| 12 | 추가: )), | |
| 13 | 추가: time: Some(time), | |
| 14 | 추가: events, | |
| 15 | 추가: ..Default::default() | |
| 16 | 추가: }, | |
| 17 | 추가: |ui| app.show(ui), | |
| 18 | 추가: ); | |
| 19 | 추가: output.textures_delta.clear(); | |
| 20 | 추가: output | |
| 21 | 추가: } | |
| 22 | 추가: | |
| 23 | 추가: fn layout_text(output: &egui::FullOutput) -> Vec<(String, egui::Rect, bool)> { | |
| 24 | 추가: fn walk(shape: &Shape, result: &mut Vec<(String, egui::Rect, bool)>) { | |
| 25 | 추가: match shape { | |
| 26 | 추가: Shape::Text(text) => result.push(( | |
| 27 | 추가: text.galley.job.text.clone(), | |
| 28 | 추가: text.galley.rect.translate(text.pos.to_vec2()), | |
| 29 | 추가: text.galley.elided, | |
| 30 | 추가: )), | |
| 31 | 추가: Shape::Vec(shapes) => { | |
| 32 | 추가: for shape in shapes { | |
| 33 | 추가: walk(shape, result); | |
| 34 | 추가: } | |
| 35 | 추가: } | |
| 36 | 추가: _ => {} | |
| 37 | 추가: } | |
| 38 | 추가: } | |
| 39 | 추가: let mut result = Vec::new(); | |
| 40 | 추가: for shape in &output.shapes { | |
| 41 | 추가: walk(&shape.shape, &mut result); | |
| 42 | 추가: } | |
| 43 | 추가: result | |
| 44 | 추가: } | |
| 45 | 추가: | |
| 46 | 추가: fn assert_narrow_text(output: &egui::FullOutput) { | |
| 47 | 추가: for (text, rect, _) in layout_text(output) { | |
| 48 | 추가: assert!( | |
| 49 | 추가: rect.left() >= -1.0 && rect.right() <= 761.0, | |
| 50 | 추가: "{text:?}: {rect:?}" | |
| 51 | 추가: ); | |
| 52 | 추가: } | |
| 53 | 추가: } | |
| 54 | 추가: | |
| 55 | 추가: fn assert_full_tooltip(ctx: &egui::Context, app: &mut ArchiveApp, point: egui::Pos2, full: &str) { | |
| 56 | 추가: ctx.style_mut_of(egui::Theme::Light, |style| { | |
| 57 | 추가: style.interaction.tooltip_delay = 0.0 | |
| 58 | 추가: }); | |
| 59 | 추가: let mut output = narrow_frame(ctx, app, 10.0, vec![egui::Event::PointerMoved(point)]); | |
| 60 | 추가: for time in [11.0, 12.0, 13.0] { | |
| 61 | 추가: output = narrow_frame(ctx, app, time, vec![]); | |
| 62 | 추가: } | |
| 63 | 추가: assert!( | |
| 64 | 추가: layout_text(&output) | |
| 65 | 추가: .iter() | |
| 66 | 추가: .any(|(text, _, elided)| text == full && !elided), | |
| 67 | 추가: "전체 툴팁 없음: {full} point={point:?} shown={:?}", | |
| 68 | 추가: layout_text(&output) | |
| 69 | 추가: ); | |
| 70 | 추가: assert_narrow_text(&output); | |
| 71 | 추가: } | |
| 72 | 추가: | |
| 73 | 추가: #[test] | |
| 74 | 추가: fn narrow_archive_keeps_columns_and_virtualizes_thousands_of_long_names() { | |
| 75 | 추가: let scratch = Folder::new(); | |
| 76 | 추가: let factory = FakeFactory::default(); | |
| 77 | 추가: let mut app = loaded(&scratch, &factory); | |
| 78 | 추가: let name = format!("{}.txt", "W".repeat(220)); | |
| 79 | 추가: app.model.entries = (0..5000) | |
| 80 | 추가: .map(|id| Entry { | |
| 81 | 추가: id, | |
| 82 | 추가: name: format!("{id:04}-{name}"), | |
| 83 | 추가: kind: Kind::File, | |
| 84 | 추가: bytes: Some(31), | |
| 85 | 추가: packed: None, | |
| 86 | 추가: encrypted: true, | |
| 87 | 추가: }) | |
| 88 | 추가: .collect(); | |
| 89 | 추가: app.model.selected = (0..5000).collect(); | |
| 90 | 추가: app.model.archive = Some( | |
| 91 | 추가: scratch | |
| 92 | 추가: .0 | |
| 93 | 추가: .join("deep-folder/".repeat(30)) | |
| 94 | 추가: .join(format!("{name}.zip")), | |
| 95 | 추가: ); | |
| 96 | 추가: let full_title = format!("{} — Zipelo", app.model.archive.as_ref().unwrap().display()); | |
| 97 | 추가: let ctx = egui::Context::default(); | |
| 98 | 추가: narrow_frame(&ctx, &mut app, 0.0, vec![]); | |
| 99 | 추가: let output = narrow_frame(&ctx, &mut app, 1.0, vec![]); | |
| 100 | 추가: assert_narrow_text(&output); | |
| 101 | 추가: let text = layout_text(&output); | |
| 102 | 추가: assert!(text.len() < 100); | |
| 103 | 추가: let first = text | |
| 104 | 추가: .iter() | |
| 105 | 추가: .find(|(text, _, _)| text == &format!("0000-{name}")) | |
| 106 | 추가: .unwrap(); | |
| 107 | 추가: assert!(first.2); | |
| 108 | 추가: assert!( | |
| 109 | 추가: text.iter() | |
| 110 | 추가: .any(|(text, rect, _)| text == "31 B" && rect.right() < 720.0) | |
| 111 | 추가: ); | |
| 112 | 추가: for expected in ["크기", "암호", "5000개 항목", "선택 5000개"] { | |
| 113 | 추가: assert!(text.iter().any(|(text, _, _)| text == expected)); | |
| 114 | 추가: } | |
| 115 | 추가: let title = output | |
| 116 | 추가: .viewport_output | |
| 117 | 추가: .values() | |
| 118 | 추가: .flat_map(|v| &v.commands) | |
| 119 | 추가: .find_map(|cmd| match cmd { | |
| 120 | 추가: egui::ViewportCommand::Title(title) => Some(title), | |
| 121 | 추가: _ => None, | |
| 122 | 추가: }) | |
| 123 | 추가: .unwrap(); | |
| 124 | 추가: assert!(title.contains('…') && title.ends_with(" — Zipelo")); | |
| 125 | 추가: assert!(title.chars().count() < full_title.chars().count()); | |
| 126 | 추가: assert_full_tooltip(&ctx, &mut app, first.1.center(), &first.0); | |
| 127 | 추가: let output = narrow_frame(&ctx, &mut app, 14.0, vec![egui::Event::PointerGone]); | |
| 128 | 추가: let point = layout_text(&output) | |
| 129 | 추가: .into_iter() | |
| 130 | 추가: .find(|(text, _, _)| text == "열기") | |
| 131 | 추가: .unwrap() | |
| 132 | 추가: .1 | |
| 133 | 추가: .center(); | |
| 134 | 추가: assert_full_tooltip(&ctx, &mut app, point, &full_title); | |
| 135 | 추가: } | |
| 136 | 추가: | |
| 137 | 추가: #[test] | |
| 138 | 추가: fn narrow_deep_folder_path_is_elided_without_displacing_search() { | |
| 139 | 추가: let scratch = Folder::new(); | |
| 140 | 추가: let factory = FakeFactory::default(); | |
| 141 | 추가: let mut app = loaded(&scratch, &factory); | |
| 142 | 추가: let folder = "deep-folder/".repeat(40).trim_end_matches('/').to_owned(); | |
| 143 | 추가: app.model.entries[0].name = format!("{folder}/file.txt"); | |
| 144 | 추가: app.browse_folder(&folder); | |
| 145 | 추가: let ctx = egui::Context::default(); | |
| 146 | 추가: narrow_frame(&ctx, &mut app, 0.0, vec![]); | |
| 147 | 추가: let output = narrow_frame(&ctx, &mut app, 1.0, vec![]); | |
| 148 | 추가: assert_narrow_text(&output); | |
| 149 | 추가: let text = layout_text(&output); | |
| 150 | 추가: let full = format!("/{folder}"); | |
| 151 | 추가: let path = text.iter().find(|(text, _, _)| text == &full).unwrap(); | |
| 152 | 추가: assert!(path.2); | |
| 153 | 추가: assert!( | |
| 154 | 추가: text.iter() | |
| 155 | 추가: .any(|(text, rect, _)| text == "파일 찾기" && rect.right() < 760.0) | |
| 156 | 추가: ); | |
| 157 | 추가: assert_full_tooltip(&ctx, &mut app, path.1.center(), &full); | |
| 158 | 추가: } | |
| 159 | 추가: | |
| 160 | 추가: #[test] | |
| 161 | 추가: fn narrow_create_sources_keep_remove_and_footer_actions_visible() { | |
| 162 | 추가: let scratch = Folder::new(); | |
| 163 | 추가: let factory = FakeFactory::default(); | |
| 164 | 추가: let mut app = loaded(&scratch, &factory); | |
| 165 | 추가: let name = format!("{}.txt", "W".repeat(220)); | |
| 166 | 추가: let path = scratch.0.join(&name); | |
| 167 | 추가: fs::write(&path, b"source").unwrap(); | |
| 168 | 추가: app.add_sources(vec![path]); | |
| 169 | 추가: app.show_create(false); | |
| 170 | 추가: let ctx = egui::Context::default(); | |
| 171 | 추가: narrow_frame(&ctx, &mut app, 0.0, vec![]); | |
| 172 | 추가: let output = narrow_frame(&ctx, &mut app, 1.0, vec![]); | |
| 173 | 추가: assert_narrow_text(&output); | |
| 174 | 추가: let text = layout_text(&output); | |
| 175 | 추가: assert!( | |
| 176 | 추가: text.iter() | |
| 177 | 추가: .any(|(text, _, elided)| text == &name && *elided) | |
| 178 | 추가: ); | |
| 179 | 추가: for expected in ["빼기", "취소", "압축하기"] { | |
| 180 | 추가: assert!( | |
| 181 | 추가: text.iter() | |
| 182 | 추가: .any(|(text, rect, _)| text == expected && rect.bottom() <= 540.0) | |
| 183 | 추가: ); | |
| 184 | 추가: } | |
| 185 | 추가: } | |
| 186 | 추가: | |
| 187 | 추가: #[test] | |
| 188 | 추가: fn narrow_result_path_is_elided_and_full_path_remains_in_tooltip() { | |
| 189 | 추가: let scratch = Folder::new(); | |
| 190 | 추가: let factory = FakeFactory::default(); | |
| 191 | 추가: let mut app = loaded(&scratch, &factory); | |
| 192 | 추가: let output_path = scratch.0.join("nested-output/".repeat(30)); | |
| 193 | 추가: fs::create_dir_all(&output_path).unwrap(); | |
| 194 | 추가: app.choose_destination(output_path.clone()); | |
| 195 | 추가: assert!(app.begin_extract()); | |
| 196 | 추가: pump(&mut app.model); | |
| 197 | 추가: let ctx = egui::Context::default(); | |
| 198 | 추가: for frame in 0..8 { | |
| 199 | 추가: narrow_frame(&ctx, &mut app, frame as f64 / 10.0, vec![]); | |
| 200 | 추가: } | |
| 201 | 추가: let output = narrow_frame(&ctx, &mut app, 1.0, vec![]); | |
| 202 | 추가: assert_narrow_text(&output); | |
| 203 | 추가: let text = layout_text(&output); | |
| 204 | 추가: let full = format!("{} 폴더에 저장했습니다.", output_path.display()); | |
| 205 | 추가: let path = text.iter().find(|(text, _, _)| text == &full).unwrap(); | |
| 206 | 추가: assert!(path.2); | |
| 207 | 추가: for expected in ["확인", "폴더 열기"] { | |
| 208 | 추가: assert!(text.iter().any(|(text, _, _)| text == expected)); | |
| 209 | 추가: } | |
| 210 | 추가: assert_full_tooltip(&ctx, &mut app, path.1.center(), &full); | |
| 211 | 추가: } |
| @@ -0,0 +1,180 @@ | ||
| 1 | 추가: use std::{collections::BTreeSet, path::Path}; | |
| 2 | 추가: use zipelo_ui_memory_app::{ | |
| 3 | 추가: archive_dialog::archive_filters, | |
| 4 | 추가: archive_present::{gzip_output_name, valid_output_leaf}, | |
| 5 | 추가: }; | |
| 6 | 추가: | |
| 7 | 추가: #[test] | |
| 8 | 추가: fn archive_filter_contains_every_case_variant_and_all_files_option() { | |
| 9 | 추가: let filters = archive_filters(); | |
| 10 | 추가: assert_eq!(filters.len(), 2); | |
| 11 | 추가: assert_eq!(filters[0].0, "압축파일"); | |
| 12 | 추가: let expected = [ | |
| 13 | 추가: "zip", "ziP", "zIp", "zIP", "Zip", "ZiP", "ZIp", "ZIP", "7z", "7Z", "tar", "taR", "tAr", | |
| 14 | 추가: "tAR", "Tar", "TaR", "TAr", "TAR", "gz", "gZ", "Gz", "GZ", "tgz", "tgZ", "tGz", "tGZ", | |
| 15 | 추가: "Tgz", "TgZ", "TGz", "TGZ", | |
| 16 | 추가: ] | |
| 17 | 추가: .into_iter() | |
| 18 | 추가: .map(str::to_owned) | |
| 19 | 추가: .collect::<BTreeSet<_>>(); | |
| 20 | 추가: assert_eq!( | |
| 21 | 추가: filters[0].1.iter().cloned().collect::<BTreeSet<_>>(), | |
| 22 | 추가: expected | |
| 23 | 추가: ); | |
| 24 | 추가: assert_eq!(filters[0].1.len(), expected.len()); | |
| 25 | 추가: assert_eq!(filters[1], ("모든 파일", vec!["*".to_owned()])); | |
| 26 | 추가: } | |
| 27 | 추가: | |
| 28 | 추가: #[test] | |
| 29 | 추가: fn gzip_suggested_names_are_portable_and_preserve_valid_stems() { | |
| 30 | 추가: for name in [ | |
| 31 | 추가: ".gz", | |
| 32 | 추가: ".GZ", | |
| 33 | 추가: "report:2026.gz", | |
| 34 | 추가: "report?2026.gz", | |
| 35 | 추가: "CON.gz", | |
| 36 | 추가: "COM1.gz", | |
| 37 | 추가: "name..gz", | |
| 38 | 추가: "name .gz", | |
| 39 | 추가: ] { | |
| 40 | 추가: assert_eq!( | |
| 41 | 추가: gzip_output_name(Path::new(name)), | |
| 42 | 추가: "압축 해제 파일", | |
| 43 | 추가: "{name}" | |
| 44 | 추가: ); | |
| 45 | 추가: } | |
| 46 | 추가: for (name, expected) in [ | |
| 47 | 추가: ("report.gz", "report"), | |
| 48 | 추가: ("report.GZ", "report"), | |
| 49 | 추가: ("report.Gz", "report"), | |
| 50 | 추가: ("한글.gz", "한글"), | |
| 51 | 추가: ("input.archive", "input.archive"), | |
| 52 | 추가: ] { | |
| 53 | 추가: assert_eq!(gzip_output_name(Path::new(name)), expected); | |
| 54 | 추가: } | |
| 55 | 추가: for name in [ | |
| 56 | 추가: "", | |
| 57 | 추가: ".", | |
| 58 | 추가: "..", | |
| 59 | 추가: "../file", | |
| 60 | 추가: "dir/file", | |
| 61 | 추가: "dir\\file", | |
| 62 | 추가: "a:b", | |
| 63 | 추가: "a*", | |
| 64 | 추가: "a?", | |
| 65 | 추가: "a|b", | |
| 66 | 추가: "a<b", | |
| 67 | 추가: "a>b", | |
| 68 | 추가: "a\"b", | |
| 69 | 추가: "NUL.txt", | |
| 70 | 추가: "name.", | |
| 71 | 추가: "name ", | |
| 72 | 추가: "control\n", | |
| 73 | 추가: ] { | |
| 74 | 추가: assert!(!valid_output_leaf(name), "{name:?}"); | |
| 75 | 추가: } | |
| 76 | 추가: assert!(valid_output_leaf("사용자 이름.txt")); | |
| 77 | 추가: } | |
| 78 | 추가: | |
| 79 | 추가: #[cfg(target_os = "linux")] | |
| 80 | 추가: #[test] | |
| 81 | 추가: fn portal_response_distinguishes_cancellation_from_backend_failure() { | |
| 82 | 추가: use ashpd::{Error, PortalError, desktop::ResponseError}; | |
| 83 | 추가: use zipelo_ui_memory_app::archive_dialog::{DIALOG_UNAVAILABLE, portal_response}; | |
| 84 | 추가: for error in [ | |
| 85 | 추가: Error::Response(ResponseError::Cancelled), | |
| 86 | 추가: Error::Portal(PortalError::Cancelled("cancelled".into())), | |
| 87 | 추가: ] { | |
| 88 | 추가: assert_eq!(portal_response(Err(error)), Ok(None)); | |
| 89 | 추가: } | |
| 90 | 추가: for error in [ | |
| 91 | 추가: Error::Response(ResponseError::Other), | |
| 92 | 추가: Error::Portal(PortalError::Failed("failed".into())), | |
| 93 | 추가: Error::Portal(PortalError::WindowDestroyed("destroyed".into())), | |
| 94 | 추가: Error::NoResponse, | |
| 95 | 추가: Error::PortalNotFound("org.freedesktop.portal.FileChooser".try_into().unwrap()), | |
| 96 | 추가: Error::IO(std::io::Error::other("backend unavailable")), | |
| 97 | 추가: Error::ParseError("invalid URI"), | |
| 98 | 추가: ] { | |
| 99 | 추가: assert_eq!(portal_response(Err(error)), Err(DIALOG_UNAVAILABLE.into())); | |
| 100 | 추가: } | |
| 101 | 추가: assert_eq!(portal_response(Ok(vec![])), Err(DIALOG_UNAVAILABLE.into())); | |
| 102 | 추가: let path = Path::new("/selected/archive.zip").to_path_buf(); | |
| 103 | 추가: assert_eq!( | |
| 104 | 추가: portal_response(Ok(vec![path.clone()])), | |
| 105 | 추가: Ok(Some(vec![path])) | |
| 106 | 추가: ); | |
| 107 | 추가: } | |
| 108 | 추가: | |
| 109 | 추가: #[cfg(target_os = "linux")] | |
| 110 | 추가: #[test] | |
| 111 | 추가: fn missing_portal_returns_errors_for_every_dialog() { | |
| 112 | 추가: use std::{ | |
| 113 | 추가: process::{Command, Stdio}, | |
| 114 | 추가: time::{Duration, Instant}, | |
| 115 | 추가: }; | |
| 116 | 추가: use zipelo_ui_memory_app::archive_dialog::{ | |
| 117 | 추가: DIALOG_UNAVAILABLE, DialogRequest, Dialogs, NativeDialogs, Purpose, | |
| 118 | 추가: }; | |
| 119 | 추가: if std::env::var_os("ZIPELO_NO_PORTAL_CHILD").is_some() { | |
| 120 | 추가: let mut dialogs = NativeDialogs; | |
| 121 | 추가: for purpose in [ | |
| 122 | 추가: Purpose::Open, | |
| 123 | 추가: Purpose::Files, | |
| 124 | 추가: Purpose::Folder, | |
| 125 | 추가: Purpose::Destination, | |
| 126 | 추가: Purpose::Retry, | |
| 127 | 추가: Purpose::SaveZip, | |
| 128 | 추가: Purpose::SaveGzip, | |
| 129 | 추가: Purpose::RetryGzip, | |
| 130 | 추가: ] { | |
| 131 | 추가: let result = dialogs.choose(DialogRequest { | |
| 132 | 추가: purpose, | |
| 133 | 추가: directory: std::env::current_dir().unwrap(), | |
| 134 | 추가: file_name: "output.zip".into(), | |
| 135 | 추가: }); | |
| 136 | 추가: assert_eq!(result, Err(DIALOG_UNAVAILABLE.into()), "{purpose:?}"); | |
| 137 | 추가: } | |
| 138 | 추가: return; | |
| 139 | 추가: } | |
| 140 | 추가: let endpoint = Path::new(env!("CARGO_MANIFEST_DIR")).join(format!( | |
| 141 | 추가: "../../tests/rust-app-ui/runs/no-bus-{}", | |
| 142 | 추가: std::process::id() | |
| 143 | 추가: )); | |
| 144 | 추가: assert!(!endpoint.exists()); | |
| 145 | 추가: let mut child = Command::new(std::env::current_exe().unwrap()) | |
| 146 | 추가: .args([ | |
| 147 | 추가: "--exact", | |
| 148 | 추가: "native_dialogs::missing_portal_returns_errors_for_every_dialog", | |
| 149 | 추가: "--nocapture", | |
| 150 | 추가: ]) | |
| 151 | 추가: .env("ZIPELO_NO_PORTAL_CHILD", "1") | |
| 152 | 추가: .env( | |
| 153 | 추가: "DBUS_SESSION_BUS_ADDRESS", | |
| 154 | 추가: format!("unix:path={}", endpoint.display()), | |
| 155 | 추가: ) | |
| 156 | 추가: .env_remove("DBUS_STARTER_ADDRESS") | |
| 157 | 추가: .stdout(Stdio::piped()) | |
| 158 | 추가: .stderr(Stdio::piped()) | |
| 159 | 추가: .spawn() | |
| 160 | 추가: .unwrap(); | |
| 161 | 추가: let deadline = Instant::now() + Duration::from_secs(15); | |
| 162 | 추가: loop { | |
| 163 | 추가: if child.try_wait().unwrap().is_some() { | |
| 164 | 추가: break; | |
| 165 | 추가: } | |
| 166 | 추가: if Instant::now() >= deadline { | |
| 167 | 추가: child.kill().unwrap(); | |
| 168 | 추가: child.wait().unwrap(); | |
| 169 | 추가: panic!("portal 실패 응답 시간 초과"); | |
| 170 | 추가: } | |
| 171 | 추가: std::thread::sleep(Duration::from_millis(10)); | |
| 172 | 추가: } | |
| 173 | 추가: let output = child.wait_with_output().unwrap(); | |
| 174 | 추가: assert!( | |
| 175 | 추가: output.status.success(), | |
| 176 | 추가: "{}{}", | |
| 177 | 추가: String::from_utf8_lossy(&output.stdout), | |
| 178 | 추가: String::from_utf8_lossy(&output.stderr) | |
| 179 | 추가: ); | |
| 180 | 추가: } |
Diff가 표시 한도를 넘어서 생략했어요.
Raw로 열기Diff가 표시 한도를 넘어서 생략했어요.
Raw로 열기Diff가 표시 한도를 넘어서 생략했어요.
Raw로 열기Diff가 표시 한도를 넘어서 생략했어요.
Raw로 열기Diff가 표시 한도를 넘어서 생략했어요.
Raw로 열기Diff가 표시 한도를 넘어서 생략했어요.
Raw로 열기Diff가 표시 한도를 넘어서 생략했어요.
Raw로 열기바이너리 파일이라 Diff를 표시하지 않아요.
파일 내려받기바이너리 파일이라 Diff를 표시하지 않아요.
파일 내려받기바이너리 파일이라 Diff를 표시하지 않아요.
파일 내려받기바이너리 파일이라 Diff를 표시하지 않아요.
파일 내려받기Diff가 표시 한도를 넘어서 생략했어요.
Raw로 열기바이너리 파일이라 Diff를 표시하지 않아요.
파일 내려받기바이너리 파일이라 Diff를 표시하지 않아요.
파일 내려받기Diff가 표시 한도를 넘어서 생략했어요.
Raw로 열기바이너리 파일이라 Diff를 표시하지 않아요.
파일 내려받기바이너리 파일이라 Diff를 표시하지 않아요.
파일 내려받기바이너리 파일이라 Diff를 표시하지 않아요.
파일 내려받기Diff가 표시 한도를 넘어서 생략했어요.
Raw로 열기