Commit ae8150d78f

ae8150d78fe7e6326f8b2ee329eabe9fde100eac

parent: caa4bca5df

Unsigned

Siriusmart <71584876+Siriusmart@users.noreply.github.com> · 2023-07-08 14:22 UTC

fixed loading page resulting in a blank screen if there is no items in the text list

Layout: unified · split

Cargo.lock +146 −180
@@ -8,6 +8,12 @@ version = "1.0.2"
88source = "registry+https://github.com/rust-lang/crates.io-index"
99checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
1010
11[[package]]
12name = "android-tzdata"
13version = "0.1.1"
14source = "registry+https://github.com/rust-lang/crates.io-index"
15checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
16
1117[[package]]
1218name = "android_system_properties"
1319version = "0.1.5"
@@ -58,9 +64,9 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
5864
5965[[package]]
6066name = "bumpalo"
61version = "3.12.2"
67version = "3.13.0"
6268source = "registry+https://github.com/rust-lang/crates.io-index"
63checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b"
69checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
6470
6571[[package]]
6672name = "bytemuck"
@@ -94,12 +100,12 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
94100
95101[[package]]
96102name = "chrono"
97version = "0.4.24"
103version = "0.4.26"
98104source = "registry+https://github.com/rust-lang/crates.io-index"
99checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b"
105checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
100106dependencies = [
107 "android-tzdata",
101108 "iana-time-zone",
102 "num-integer",
103109 "num-traits",
104110 "winapi",
105111]
@@ -134,14 +140,14 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
134140
135141[[package]]
136142name = "console"
137version = "0.15.5"
143version = "0.15.7"
138144source = "registry+https://github.com/rust-lang/crates.io-index"
139checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60"
145checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8"
140146dependencies = [
141147 "encode_unicode",
142148 "lazy_static",
143149 "libc",
144 "windows-sys 0.42.0",
150 "windows-sys 0.45.0",
145151]
146152
147153[[package]]
@@ -192,9 +198,9 @@ dependencies = [
192198
193199[[package]]
194200name = "crossbeam-epoch"
195version = "0.9.14"
201version = "0.9.15"
196202source = "registry+https://github.com/rust-lang/crates.io-index"
197checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695"
203checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
198204dependencies = [
199205 "autocfg",
200206 "cfg-if",
@@ -205,9 +211,9 @@ dependencies = [
205211
206212[[package]]
207213name = "crossbeam-utils"
208version = "0.8.15"
214version = "0.8.16"
209215source = "registry+https://github.com/rust-lang/crates.io-index"
210checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b"
216checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
211217dependencies = [
212218 "cfg-if",
213219]
@@ -247,9 +253,9 @@ dependencies = [
247253
248254[[package]]
249255name = "crossterm_winapi"
250version = "0.9.0"
256version = "0.9.1"
251257source = "registry+https://github.com/rust-lang/crates.io-index"
252checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c"
258checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
253259dependencies = [
254260 "winapi",
255261]
@@ -278,6 +284,12 @@ version = "0.3.6"
278284source = "registry+https://github.com/rust-lang/crates.io-index"
279285checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
280286
287[[package]]
288name = "equivalent"
289version = "1.0.0"
290source = "registry+https://github.com/rust-lang/crates.io-index"
291checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1"
292
281293[[package]]
282294name = "errno"
283295version = "0.3.1"
@@ -301,15 +313,15 @@ dependencies = [
301313
302314[[package]]
303315name = "exr"
304version = "1.6.3"
316version = "1.7.0"
305317source = "registry+https://github.com/rust-lang/crates.io-index"
306checksum = "bdd2162b720141a91a054640662d3edce3d50a944a50ffca5313cd951abb35b4"
318checksum = "d1e481eb11a482815d3e9d618db8c42a93207134662873809335a92327440c18"
307319dependencies = [
308320 "bit_field",
309321 "flume",
310322 "half",
311323 "lebe",
312 "miniz_oxide 0.6.2",
324 "miniz_oxide",
313325 "rayon-core",
314326 "smallvec",
315327 "zune-inflate",
@@ -340,7 +352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
340352checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743"
341353dependencies = [
342354 "crc32fast",
343 "miniz_oxide 0.7.1",
355 "miniz_oxide",
344356]
345357
346358[[package]]
@@ -385,9 +397,9 @@ checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
385397
386398[[package]]
387399name = "getrandom"
388version = "0.2.9"
400version = "0.2.10"
389401source = "registry+https://github.com/rust-lang/crates.io-index"
390checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4"
402checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
391403dependencies = [
392404 "cfg-if",
393405 "js-sys",
@@ -417,24 +429,15 @@ dependencies = [
417429
418430[[package]]
419431name = "hashbrown"
420version = "0.12.3"
432version = "0.14.0"
421433source = "registry+https://github.com/rust-lang/crates.io-index"
422checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
434checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
423435
424436[[package]]
425437name = "hermit-abi"
426version = "0.2.6"
427source = "registry+https://github.com/rust-lang/crates.io-index"
428checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
429dependencies = [
430 "libc",
431]
432
433[[package]]
434name = "hermit-abi"
435version = "0.3.1"
438version = "0.3.2"
436439source = "registry+https://github.com/rust-lang/crates.io-index"
437checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
440checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b"
438441
439442[[package]]
440443name = "home"
@@ -447,9 +450,9 @@ dependencies = [
447450
448451[[package]]
449452name = "http_req"
450version = "0.9.1"
453version = "0.9.2"
451454source = "registry+https://github.com/rust-lang/crates.io-index"
452checksum = "5825a38a94c3aff23ea7f60572726829ef055ca02fc64899c3e2e7db2ce4f03f"
455checksum = "9f680177f2ebe4aabd573d07b322d15a5e0fbc97cd739fd627b08043c89041f8"
453456dependencies = [
454457 "native-tls",
455458 "unicase",
@@ -457,9 +460,9 @@ dependencies = [
457460
458461[[package]]
459462name = "iana-time-zone"
460version = "0.1.56"
463version = "0.1.57"
461464source = "registry+https://github.com/rust-lang/crates.io-index"
462checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c"
465checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
463466dependencies = [
464467 "android_system_properties",
465468 "core-foundation-sys",
@@ -499,11 +502,11 @@ dependencies = [
499502
500503[[package]]
501504name = "indexmap"
502version = "1.9.3"
505version = "2.0.0"
503506source = "registry+https://github.com/rust-lang/crates.io-index"
504checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
507checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d"
505508dependencies = [
506 "autocfg",
509 "equivalent",
507510 "hashbrown",
508511]
509512
@@ -529,20 +532,20 @@ dependencies = [
529532
530533[[package]]
531534name = "io-lifetimes"
532version = "1.0.10"
535version = "1.0.11"
533536source = "registry+https://github.com/rust-lang/crates.io-index"
534checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220"
537checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
535538dependencies = [
536 "hermit-abi 0.3.1",
539 "hermit-abi",
537540 "libc",
538541 "windows-sys 0.48.0",
539542]
540543
541544[[package]]
542545name = "itoa"
543version = "1.0.6"
546version = "1.0.8"
544547source = "registry+https://github.com/rust-lang/crates.io-index"
545checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
548checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a"
546549
547550[[package]]
548551name = "jpeg-decoder"
@@ -555,9 +558,9 @@ dependencies = [
555558
556559[[package]]
557560name = "js-sys"
558version = "0.3.63"
561version = "0.3.64"
559562source = "registry+https://github.com/rust-lang/crates.io-index"
560checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790"
563checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
561564dependencies = [
562565 "wasm-bindgen",
563566]
@@ -576,21 +579,21 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
576579
577580[[package]]
578581name = "libc"
579version = "0.2.144"
582version = "0.2.147"
580583source = "registry+https://github.com/rust-lang/crates.io-index"
581checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1"
584checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
582585
583586[[package]]
584587name = "linux-raw-sys"
585version = "0.3.7"
588version = "0.3.8"
586589source = "registry+https://github.com/rust-lang/crates.io-index"
587checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f"
590checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
588591
589592[[package]]
590593name = "lock_api"
591version = "0.4.9"
594version = "0.4.10"
592595source = "registry+https://github.com/rust-lang/crates.io-index"
593checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
596checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
594597dependencies = [
595598 "autocfg",
596599 "scopeguard",
@@ -598,12 +601,9 @@ dependencies = [
598601
599602[[package]]
600603name = "log"
601version = "0.4.17"
604version = "0.4.19"
602605source = "registry+https://github.com/rust-lang/crates.io-index"
603checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
604dependencies = [
605 "cfg-if",
606]
606checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
607607
608608[[package]]
609609name = "make-cmd"
@@ -622,22 +622,13 @@ dependencies = [
622622
623623[[package]]
624624name = "memoffset"
625version = "0.8.0"
625version = "0.9.0"
626626source = "registry+https://github.com/rust-lang/crates.io-index"
627checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
627checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
628628dependencies = [
629629 "autocfg",
630630]
631631
632[[package]]
633name = "miniz_oxide"
634version = "0.6.2"
635source = "registry+https://github.com/rust-lang/crates.io-index"
636checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
637dependencies = [
638 "adler",
639]
640
641632[[package]]
642633name = "miniz_oxide"
643634version = "0.7.1"
@@ -650,14 +641,14 @@ dependencies = [
650641
651642[[package]]
652643name = "mio"
653version = "0.8.6"
644version = "0.8.8"
654645source = "registry+https://github.com/rust-lang/crates.io-index"
655checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
646checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
656647dependencies = [
657648 "libc",
658649 "log",
659650 "wasi",
660 "windows-sys 0.45.0",
651 "windows-sys 0.48.0",
661652]
662653
663654[[package]]
@@ -719,11 +710,11 @@ dependencies = [
719710
720711[[package]]
721712name = "num_cpus"
722version = "1.15.0"
713version = "1.16.0"
723714source = "registry+https://github.com/rust-lang/crates.io-index"
724checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
715checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
725716dependencies = [
726 "hermit-abi 0.2.6",
717 "hermit-abi",
727718 "libc",
728719]
729720
@@ -758,15 +749,15 @@ dependencies = [
758749
759750[[package]]
760751name = "once_cell"
761version = "1.17.1"
752version = "1.18.0"
762753source = "registry+https://github.com/rust-lang/crates.io-index"
763checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
754checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
764755
765756[[package]]
766757name = "openssl"
767version = "0.10.52"
758version = "0.10.55"
768759source = "registry+https://github.com/rust-lang/crates.io-index"
769checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56"
760checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d"
770761dependencies = [
771762 "bitflags",
772763 "cfg-if",
@@ -796,9 +787,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
796787
797788[[package]]
798789name = "openssl-sys"
799version = "0.9.87"
790version = "0.9.90"
800791source = "registry+https://github.com/rust-lang/crates.io-index"
801checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e"
792checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6"
802793dependencies = [
803794 "cc",
804795 "libc",
@@ -818,31 +809,31 @@ dependencies = [
818809
819810[[package]]
820811name = "parking_lot_core"
821version = "0.9.7"
812version = "0.9.8"
822813source = "registry+https://github.com/rust-lang/crates.io-index"
823checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
814checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
824815dependencies = [
825816 "cfg-if",
826817 "libc",
827 "redox_syscall 0.2.16",
818 "redox_syscall",
828819 "smallvec",
829 "windows-sys 0.45.0",
820 "windows-targets 0.48.1",
830821]
831822
832823[[package]]
833824name = "pin-project"
834version = "1.1.0"
825version = "1.1.2"
835826source = "registry+https://github.com/rust-lang/crates.io-index"
836checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead"
827checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842"
837828dependencies = [
838829 "pin-project-internal",
839830]
840831
841832[[package]]
842833name = "pin-project-internal"
843version = "1.1.0"
834version = "1.1.2"
844835source = "registry+https://github.com/rust-lang/crates.io-index"
845checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07"
836checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c"
846837dependencies = [
847838 "proc-macro2",
848839 "quote",
@@ -857,22 +848,22 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
857848
858849[[package]]
859850name = "png"
860version = "0.17.8"
851version = "0.17.9"
861852source = "registry+https://github.com/rust-lang/crates.io-index"
862checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa"
853checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11"
863854dependencies = [
864855 "bitflags",
865856 "crc32fast",
866857 "fdeflate",
867858 "flate2",
868 "miniz_oxide 0.7.1",
859 "miniz_oxide",
869860]
870861
871862[[package]]
872863name = "proc-macro2"
873version = "1.0.58"
864version = "1.0.63"
874865source = "registry+https://github.com/rust-lang/crates.io-index"
875checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8"
866checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb"
876867dependencies = [
877868 "unicode-ident",
878869]
@@ -888,13 +879,27 @@ dependencies = [
888879
889880[[package]]
890881name = "quote"
891version = "1.0.27"
882version = "1.0.29"
892883source = "registry+https://github.com/rust-lang/crates.io-index"
893checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500"
884checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105"
894885dependencies = [
895886 "proc-macro2",
896887]
897888
889[[package]]
890name = "ratatui"
891version = "0.21.0"
892source = "registry+https://github.com/rust-lang/crates.io-index"
893checksum = "ce841e0486e7c2412c3740168ede33adeba8e154a15107b879d8162d77c7174e"
894dependencies = [
895 "bitflags",
896 "cassowary",
897 "crossterm 0.26.1",
898 "serde",
899 "unicode-segmentation",
900 "unicode-width",
901]
902
898903[[package]]
899904name = "rayon"
900905version = "1.7.0"
@@ -917,15 +922,6 @@ dependencies = [
917922 "num_cpus",
918923]
919924
920[[package]]
921name = "redox_syscall"
922version = "0.2.16"
923source = "registry+https://github.com/rust-lang/crates.io-index"
924checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
925dependencies = [
926 "bitflags",
927]
928
929925[[package]]
930926name = "redox_syscall"
931927version = "0.3.5"
@@ -946,9 +942,9 @@ dependencies = [
946942
947943[[package]]
948944name = "rustix"
949version = "0.37.19"
945version = "0.37.23"
950946source = "registry+https://github.com/rust-lang/crates.io-index"
951checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d"
947checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06"
952948dependencies = [
953949 "bitflags",
954950 "errno",
@@ -960,17 +956,17 @@ dependencies = [
960956
961957[[package]]
962958name = "ryu"
963version = "1.0.13"
959version = "1.0.14"
964960source = "registry+https://github.com/rust-lang/crates.io-index"
965checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
961checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9"
966962
967963[[package]]
968964name = "schannel"
969version = "0.1.21"
965version = "0.1.22"
970966source = "registry+https://github.com/rust-lang/crates.io-index"
971checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3"
967checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88"
972968dependencies = [
973 "windows-sys 0.42.0",
969 "windows-sys 0.48.0",
974970]
975971
976972[[package]]
@@ -981,9 +977,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
981977
982978[[package]]
983979name = "security-framework"
984version = "2.9.0"
980version = "2.9.1"
985981source = "registry+https://github.com/rust-lang/crates.io-index"
986checksum = "ca2855b3715770894e67cbfa3df957790aa0c9edc3bf06efa1a84d77fa0839d1"
982checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8"
987983dependencies = [
988984 "bitflags",
989985 "core-foundation",
@@ -1004,18 +1000,18 @@ dependencies = [
10041000
10051001[[package]]
10061002name = "serde"
1007version = "1.0.163"
1003version = "1.0.167"
10081004source = "registry+https://github.com/rust-lang/crates.io-index"
1009checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2"
1005checksum = "7daf513456463b42aa1d94cff7e0c24d682b429f020b9afa4f5ba5c40a22b237"
10101006dependencies = [
10111007 "serde_derive",
10121008]
10131009
10141010[[package]]
10151011name = "serde_derive"
1016version = "1.0.163"
1012version = "1.0.167"
10171013source = "registry+https://github.com/rust-lang/crates.io-index"
1018checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e"
1014checksum = "b69b106b68bc8054f0e974e70d19984040f8a5cf9215ca82626ea4853f82c4b9"
10191015dependencies = [
10201016 "proc-macro2",
10211017 "quote",
@@ -1024,9 +1020,9 @@ dependencies = [
10241020
10251021[[package]]
10261022name = "serde_json"
1027version = "1.0.96"
1023version = "1.0.100"
10281024source = "registry+https://github.com/rust-lang/crates.io-index"
1029checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
1025checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c"
10301026dependencies = [
10311027 "itoa",
10321028 "ryu",
@@ -1035,9 +1031,9 @@ dependencies = [
10351031
10361032[[package]]
10371033name = "serde_yaml"
1038version = "0.9.21"
1034version = "0.9.22"
10391035source = "registry+https://github.com/rust-lang/crates.io-index"
1040checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c"
1036checksum = "452e67b9c20c37fa79df53201dc03839651086ed9bbe92b3ca585ca9fdaa7d85"
10411037dependencies = [
10421038 "indexmap",
10431039 "itoa",
@@ -1102,9 +1098,9 @@ dependencies = [
11021098
11031099[[package]]
11041100name = "smallvec"
1105version = "1.10.0"
1101version = "1.11.0"
11061102source = "registry+https://github.com/rust-lang/crates.io-index"
1107checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
1103checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9"
11081104
11091105[[package]]
11101106name = "spin"
@@ -1117,9 +1113,9 @@ dependencies = [
11171113
11181114[[package]]
11191115name = "syn"
1120version = "2.0.16"
1116version = "2.0.23"
11211117source = "registry+https://github.com/rust-lang/crates.io-index"
1122checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01"
1118checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737"
11231119dependencies = [
11241120 "proc-macro2",
11251121 "quote",
@@ -1128,15 +1124,16 @@ dependencies = [
11281124
11291125[[package]]
11301126name = "tempfile"
1131version = "3.5.0"
1127version = "3.6.0"
11321128source = "registry+https://github.com/rust-lang/crates.io-index"
1133checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998"
1129checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6"
11341130dependencies = [
1131 "autocfg",
11351132 "cfg-if",
11361133 "fastrand",
1137 "redox_syscall 0.3.5",
1134 "redox_syscall",
11381135 "rustix",
1139 "windows-sys 0.45.0",
1136 "windows-sys 0.48.0",
11401137]
11411138
11421139[[package]]
@@ -1165,29 +1162,13 @@ version = "0.1.0"
11651162source = "registry+https://github.com/rust-lang/crates.io-index"
11661163checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079"
11671164
1168[[package]]
1169name = "tui"
1170version = "0.19.0"
1171source = "registry+https://github.com/rust-lang/crates.io-index"
1172checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1"
1173dependencies = [
1174 "bitflags",
1175 "cassowary",
1176 "crossterm 0.25.0",
1177 "serde",
1178 "unicode-segmentation",
1179 "unicode-width",
1180]
1181
11821165[[package]]
11831166name = "tui-additions"
1184version = "0.1.13"
1185source = "registry+https://github.com/rust-lang/crates.io-index"
1186checksum = "37ad46291f8753853eb83c3e47c34c67a59f61129a13a93ba11907ca458bd72b"
1167version = "0.1.12"
11871168dependencies = [
11881169 "crossterm 0.26.1",
11891170 "dyn-clone",
1190 "tui",
1171 "ratatui",
11911172 "typemap",
11921173 "unicode-segmentation",
11931174]
@@ -1212,9 +1193,9 @@ dependencies = [
12121193
12131194[[package]]
12141195name = "unicode-ident"
1215version = "1.0.8"
1196version = "1.0.10"
12161197source = "registry+https://github.com/rust-lang/crates.io-index"
1217checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
1198checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73"
12181199
12191200[[package]]
12201201name = "unicode-segmentation"
@@ -1286,9 +1267,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
12861267
12871268[[package]]
12881269name = "wasm-bindgen"
1289version = "0.2.86"
1270version = "0.2.87"
12901271source = "registry+https://github.com/rust-lang/crates.io-index"
1291checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73"
1272checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
12921273dependencies = [
12931274 "cfg-if",
12941275 "wasm-bindgen-macro",
@@ -1296,9 +1277,9 @@ dependencies = [
12961277
12971278[[package]]
12981279name = "wasm-bindgen-backend"
1299version = "0.2.86"
1280version = "0.2.87"
13001281source = "registry+https://github.com/rust-lang/crates.io-index"
1301checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb"
1282checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
13021283dependencies = [
13031284 "bumpalo",
13041285 "log",
@@ -1311,9 +1292,9 @@ dependencies = [
13111292
13121293[[package]]
13131294name = "wasm-bindgen-macro"
1314version = "0.2.86"
1295version = "0.2.87"
13151296source = "registry+https://github.com/rust-lang/crates.io-index"
1316checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258"
1297checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
13171298dependencies = [
13181299 "quote",
13191300 "wasm-bindgen-macro-support",
@@ -1321,9 +1302,9 @@ dependencies = [
13211302
13221303[[package]]
13231304name = "wasm-bindgen-macro-support"
1324version = "0.2.86"
1305version = "0.2.87"
13251306source = "registry+https://github.com/rust-lang/crates.io-index"
1326checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8"
1307checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
13271308dependencies = [
13281309 "proc-macro2",
13291310 "quote",
@@ -1334,9 +1315,9 @@ dependencies = [
13341315
13351316[[package]]
13361317name = "wasm-bindgen-shared"
1337version = "0.2.86"
1318version = "0.2.87"
13381319source = "registry+https://github.com/rust-lang/crates.io-index"
1339checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93"
1320checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
13401321
13411322[[package]]
13421323name = "weezl"
@@ -1381,22 +1362,7 @@ version = "0.48.0"
13811362source = "registry+https://github.com/rust-lang/crates.io-index"
13821363checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
13831364dependencies = [
1384 "windows-targets 0.48.0",
1385]
1386
1387[[package]]
1388name = "windows-sys"
1389version = "0.42.0"
1390source = "registry+https://github.com/rust-lang/crates.io-index"
1391checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
1392dependencies = [
1393 "windows_aarch64_gnullvm 0.42.2",
1394 "windows_aarch64_msvc 0.42.2",
1395 "windows_i686_gnu 0.42.2",
1396 "windows_i686_msvc 0.42.2",
1397 "windows_x86_64_gnu 0.42.2",
1398 "windows_x86_64_gnullvm 0.42.2",
1399 "windows_x86_64_msvc 0.42.2",
1365 "windows-targets 0.48.1",
14001366]
14011367
14021368[[package]]
@@ -1414,7 +1380,7 @@ version = "0.48.0"
14141380source = "registry+https://github.com/rust-lang/crates.io-index"
14151381checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
14161382dependencies = [
1417 "windows-targets 0.48.0",
1383 "windows-targets 0.48.1",
14181384]
14191385
14201386[[package]]
@@ -1434,9 +1400,9 @@ dependencies = [
14341400
14351401[[package]]
14361402name = "windows-targets"
1437version = "0.48.0"
1403version = "0.48.1"
14381404source = "registry+https://github.com/rust-lang/crates.io-index"
1439checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
1405checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
14401406dependencies = [
14411407 "windows_aarch64_gnullvm 0.48.0",
14421408 "windows_aarch64_msvc 0.48.0",
@@ -1560,10 +1526,10 @@ dependencies = [
15601526 "dyn-clone",
15611527 "home",
15621528 "invidious",
1529 "ratatui",
15631530 "serde",
15641531 "serde_json",
15651532 "serde_yaml",
1566 "tui",
15671533 "tui-additions",
15681534 "typemap",
15691535 "urlencoding",
Cargo.toml +4 −3
@@ -23,21 +23,22 @@ clipboard = ["dep:clipboard"]
2323
2424[dependencies]
2525serde = {version = "1.0", default-features = false, features = ["derive"]}
26tui = {version = "0.19", default-features = false, features = ["serde"]}
26# tui = {version = "0.19", default-features = false, features = ["serde"]}
2727crossterm = {version = "0.26", default-features = false, features = ["serde"]}
2828viuer = {version = "0.6", default-features = false, optional = true}
2929home = "0.5"
3030chrono = {version = "0.4", default-features = false, features = ["clock"]}
3131typemap = {version = "0.3", default-features = false}
32tui-additions = {version = "0.1.13", default-features = false, features = ["framework", "widgets"]}
32# tui-additions = {version = "0.1.13", default-features = false, features = ["framework", "widgets"]}
3333invidious = {version = "0.5"}
3434serde_yaml = {version = "0.9", default-features = false}
3535dyn-clone = {version = "1.0", default-features = false}
3636serde_json = {version = "1.0", default-features = false}
3737clipboard = {version = "0.5", optional = true}
3838urlencoding = "2.1"
39ratatui = {version = "0.21", default-features = false, features = ["serde"]}
3940
40# tui-additions = {path = "../../Rust/Packages/tui-additions", default-features = false, features = ["framework", "widgets"]}
41tui-additions = {path = "../../Rust/Packages/tui-additions", default-features = false, features = ["framework", "widgets"]}
4142# invidious = {path = "../../Rust/Packages/invidious"}
4243
4344[package.metadata.docs.rs]
docs/src/changelogs.md +6 −6
@@ -1,17 +1,17 @@
11# Changelogs
22
33### v0.7.3 (latest unstable on git)
4
4
55#### Added
6
7- Lazy feed syncing (configurable), so you are not actively ddosing the Invidious instance.
8
6
7- Lazy feed syncing (configurable), so you are not actively ddosing the Invidious instance as badly.
8
99#### Fixed
10
10
1111- Search bar no longer shows escaped search query: the original text string is displayed instead.
1212- Fixed something about labeling channels with * although no new video is published.
1313
14## v0.7.2 (latest stable crates.io)
14## v0.7.2 (latest stable on crates.io)
1515
1616### Added
1717
src/config/appearance.rs +1 −1
@@ -1,12 +1,12 @@
11use crate::{config::serde::*, global::traits::*};
22use home::home_dir;
3use ratatui::{style::Color, widgets::BorderType};
34use serde::{Deserialize, Serialize};
45use std::{
56 error::Error,
67 fs::{self, OpenOptions},
78 io::Write,
89};
9use tui::{style::Color, widgets::BorderType};
1010use typemap::Key;
1111
1212use super::WriteConfig;
src/config/main.rs +6 −1
@@ -79,7 +79,12 @@ pub struct SyncConfig {
7979}
8080
8181const fn sync_config_default() -> SyncConfig {
82 SyncConfig { download_images: download_images_default(), sync_channel_info: sync_channel_info_default(), sync_channel_cooldown_secs: sync_channel_cooldown_secs_default(), sync_videos_cooldown_secs: sync_videos_cooldown_secs_default() }
82 SyncConfig {
83 download_images: download_images_default(),
84 sync_channel_info: sync_channel_info_default(),
85 sync_channel_cooldown_secs: sync_channel_cooldown_secs_default(),
86 sync_videos_cooldown_secs: sync_videos_cooldown_secs_default(),
87 }
8388}
8489
8590/// how images are handled/displayed
src/config/pages.rs +1 −1
@@ -1,7 +1,7 @@
11use crate::{global::traits::ConfigTrait, items::*};
2use ratatui::layout::Constraint;
23use serde::{Deserialize, Serialize};
34use std::slice;
4use tui::layout::Constraint;
55use tui_additions::framework::*;
66use typemap::Key;
77
src/config/serde.rs +1 −1
@@ -1,7 +1,7 @@
11//! Structs that impl `Into<T>` because `T` does not impl Serde but is used in config files
22use crossterm::event::KeyCode;
3use ratatui::{style::Color, widgets::BorderType};
34use serde::{Deserialize, Serialize};
4use tui::{style::Color, widgets::BorderType};
55
66/// `BorderType` but impl `serde`
77#[derive(Serialize, Deserialize, Clone, Copy)]
src/global/functions/popup_area.rs +1 −1
@@ -1,4 +1,4 @@
1use tui::layout::Rect;
1use ratatui::layout::Rect;
22
33/// Tries to create a centered area for popup, returns `Err` if not enough space is given
44pub fn popup_area(
src/global/functions/run_command.rs +1 −1
@@ -4,6 +4,7 @@ use crate::{
44 load_configs,
55};
66use home::home_dir;
7use ratatui::{backend::CrosstermBackend, Terminal};
78use std::{
89 env,
910 error::Error,
@@ -11,7 +12,6 @@ use std::{
1112 io::Stdout,
1213 process::{Command, Stdio},
1314};
14use tui::{backend::CrosstermBackend, Terminal};
1515use tui_additions::framework::Framework;
1616
1717/// runs text command - command from the command line (not TUI) which response is just a string
src/global/structs/status.rs +1 −1
@@ -1,4 +1,4 @@
1use tui::layout::Rect;
1use ratatui::layout::Rect;
22use tui_additions::widgets::TextField;
33use typemap::{CloneMap, Key, TypeMap};
44
src/global/structs/subscriptions.rs +63 −39
@@ -1,8 +1,11 @@
11use super::*;
2use crate::{global::{
3 functions::{download_all_images, DownloadRequest},
4 traits::{Collection, CollectionItem},
5}, config::SyncConfig};
2use crate::{
3 config::SyncConfig,
4 global::{
5 functions::{download_all_images, DownloadRequest},
6 traits::{Collection, CollectionItem},
7 },
8};
69use chrono::Utc;
710use home::home_dir;
811use serde::*;
@@ -31,7 +34,7 @@ impl Subscriptions {
3134 client: &InvidiousClient,
3235 image_index: usize,
3336 download_thumbnails: bool,
34 syncconfig: SyncConfig
37 syncconfig: SyncConfig,
3538 ) -> (u32, u32, u32, u32) {
3639 let failed = Arc::new(AtomicU32::new(0));
3740 let success = Arc::new(AtomicU32::new(0));
@@ -56,7 +59,14 @@ impl Subscriptions {
5659 let failed = failed.clone();
5760 let empty = empty.clone();
5861 thread::spawn(move || {
59 let res = sync_one(&item.channel.id, &client, image_index, download_thumbnails, syncconfig.sync_channel_info && syncconfig.sync_channel_cooldown_secs + item.last_sync_channel < now);
62 let res = sync_one(
63 &item.channel.id,
64 &client,
65 image_index,
66 download_thumbnails,
67 syncconfig.sync_channel_info
68 && syncconfig.sync_channel_cooldown_secs + item.last_sync_channel < now,
69 );
6070 match res {
6171 Ok((videos, _channel)) if videos.is_empty() => {
6272 empty.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
@@ -66,8 +76,9 @@ impl Subscriptions {
6676 // cannot just compare video publish timestamp to sync timestamp
6777 // because publish timestamp is hugely inaccurate seen here
6878 // https://github.com/iv-org/invidious/issues/570
69 item.has_new = !videos.is_empty() && (item.videos.is_empty() || videos[0].id != item.videos[0].id);
70 item.videos = item.videos;
79 item.has_new = !videos.is_empty()
80 && (item.videos.is_empty() || videos[0].id != item.videos[0].id);
81 item.videos = videos;
7182 item.last_sync = now;
7283
7384 if let Some(channel) = channel {
@@ -105,14 +116,22 @@ impl Subscriptions {
105116 client: &InvidiousClient,
106117 image_index: usize,
107118 download_thumbnails: bool,
108 syncconfig: &SyncConfig
119 syncconfig: &SyncConfig,
109120 ) -> Result<(), Box<dyn Error>> {
110121 let now = Utc::now().timestamp() as u64;
111 match self.0.iter_mut().find(|item| &item.channel.id == id) {
122 match self.0.iter_mut().find(|item| item.channel.id == id) {
112123 Some(item) => {
113 let (videos, channel) = sync_one(&id, &client, image_index, download_thumbnails, syncconfig.sync_channel_info && syncconfig.sync_channel_cooldown_secs + item.last_sync_channel < now)?;
114
115 item.has_new = !videos.is_empty() && (item.videos.is_empty() || videos[0].id != item.videos[0].id);
124 let (videos, channel) = sync_one(
125 id,
126 client,
127 image_index,
128 download_thumbnails,
129 syncconfig.sync_channel_info
130 && syncconfig.sync_channel_cooldown_secs + item.last_sync_channel < now,
131 )?;
132
133 item.has_new = !videos.is_empty()
134 && (item.videos.is_empty() || videos[0].id != item.videos[0].id);
116135 item.videos = videos;
117136 item.last_sync = now;
118137 if let Some(channel) = channel {
@@ -121,9 +140,15 @@ impl Subscriptions {
121140 }
122141 }
123142 None => {
124 let (videos, channel) = sync_one(&id, &client, image_index, download_thumbnails, true)?;
125 self.0.push(SubItem { channel: channel.unwrap(), videos, last_sync: now, last_sync_channel: now, has_new: true })
126
143 let (videos, channel) =
144 sync_one(id, client, image_index, download_thumbnails, true)?;
145 self.0.push(SubItem {
146 channel: channel.unwrap(),
147 videos,
148 last_sync: now,
149 last_sync_channel: now,
150 has_new: true,
151 })
127152 }
128153 }
129154
@@ -167,17 +192,17 @@ fn sync_one(
167192 let (tx, rx) = mpsc::channel();
168193
169194 if sync_channel_info {
170 let client2 = client.clone();
171 let id2 = id.to_string();
172 thread::spawn(move || {
173 tx.send(
174 client2
175 .0
176 .channel(&id2, None)
177 .map(|channel| Item::from_full_channel(channel, image_index).into_fullchannel())
178 .ok(),
179 )
180 });
195 let client2 = client.clone();
196 let id2 = id.to_string();
197 thread::spawn(move || {
198 tx.send(
199 client2
200 .0
201 .channel(&id2, None)
202 .map(|channel| Item::from_full_channel(channel, image_index).into_fullchannel())
203 .ok(),
204 )
205 });
181206 }
182207 let mut videos = client
183208 .0
@@ -192,13 +217,12 @@ fn sync_one(
192217 .collect::<Vec<_>>();
193218 videos.sort();
194219
195 let channel =
196
197 if sync_channel_info {
198 Some(rx
199 .recv()
200 .unwrap()
201 .ok_or(Errors::StrError("failed to get channel info {id}"))??)
220 let channel = if sync_channel_info {
221 Some(
222 rx.recv()
223 .unwrap()
224 .ok_or(Errors::StrError("failed to get channel info {id}"))??,
225 )
202226 } else {
203227 None
204228 };
@@ -217,14 +241,14 @@ fn sync_one(
217241 download_all_images(thumbnails);
218242 });
219243 if let Some(channel) = &channel {
220 download_all_images(vec![Some(DownloadRequest { url: channel.thumbnail_url.clone(), id: channel.id.clone()})]);
244 download_all_images(vec![Some(DownloadRequest {
245 url: channel.thumbnail_url.clone(),
246 id: channel.id.clone(),
247 })]);
221248 }
222249 }
223250
224 Ok((
225 videos,
226 channel
227 ))
251 Ok((videos, channel))
228252}
229253
230254#[derive(Clone, Serialize, Deserialize)]
src/global/structs/tasks.rs +4 −4
@@ -3,15 +3,15 @@ use crate::{
33 global::{functions::*, structs::*},
44};
55
6use std::{error::Error, io::Stdout, mem};
7use tui::{
6use ratatui::{
87 backend::CrosstermBackend, layout::Alignment, style::Style, widgets::Paragraph, Frame, Terminal,
98};
9use std::{error::Error, io::Stdout, mem};
1010use tui_additions::framework::{CursorState, Framework};
1111use typemap::Key;
1212
1313/// tasks to be put on taskqueues
14#[derive(Clone)]
14#[derive(Clone, Debug)]
1515pub enum Task {
1616 RenderAll,
1717 Reload,
@@ -23,7 +23,7 @@ pub enum Task {
2323}
2424
2525/// multiple tasks joined together, with duplicates removed
26#[derive(Clone, PartialEq, Eq)]
26#[derive(Clone, PartialEq, Eq, Debug)]
2727pub struct TaskQueue {
2828 pub render: RenderTask,
2929 pub reload: bool,
src/init.rs +1 −1
@@ -3,8 +3,8 @@ use crate::{
33 global::{functions::*, structs::*, traits::*},
44};
55use home::home_dir;
6use ratatui::{backend::CrosstermBackend, Terminal};
67use std::{error::Error, fs, io::Stdout};
7use tui::{backend::CrosstermBackend, Terminal};
88use tui_additions::framework::{Framework, FrameworkClean};
99
1010/// app to run before the app starts
src/items/channeldisplay.rs +3 −3
@@ -3,7 +3,7 @@ use crate::{
33 config::*,
44 global::{functions::*, structs::*},
55};
6use tui::{
6use ratatui::{
77 layout::{Constraint, Rect},
88 style::Style,
99 widgets::{Block, Borders},
@@ -213,9 +213,9 @@ impl ChannelDisplay {
213213impl FrameworkItem for ChannelDisplay {
214214 fn render(
215215 &mut self,
216 frame: &mut tui::Frame<tui::backend::CrosstermBackend<std::io::Stdout>>,
216 frame: &mut ratatui::Frame<ratatui::backend::CrosstermBackend<std::io::Stdout>>,
217217 framework: &mut tui_additions::framework::FrameworkClean,
218 area: tui::layout::Rect,
218 area: ratatui::layout::Rect,
219219 popup_render: bool,
220220 info: tui_additions::framework::ItemInfo,
221221 ) {
src/items/channellist.rs +4 −4
@@ -1,5 +1,5 @@
11use crossterm::event::KeyCode;
2use tui::{
2use ratatui::{
33 layout::{Constraint, Rect},
44 style::Style,
55 widgets::Paragraph,
@@ -147,9 +147,9 @@ impl FrameworkItem for ChannelList {
147147
148148 fn render(
149149 &mut self,
150 frame: &mut tui::Frame<tui::backend::CrosstermBackend<std::io::Stdout>>,
150 frame: &mut ratatui::Frame<ratatui::backend::CrosstermBackend<std::io::Stdout>>,
151151 framework: &mut tui_additions::framework::FrameworkClean,
152 area: tui::layout::Rect,
152 area: ratatui::layout::Rect,
153153 popup_render: bool,
154154 info: tui_additions::framework::ItemInfo,
155155 ) {
@@ -167,7 +167,7 @@ impl FrameworkItem for ChannelList {
167167
168168 if self.selector.items.len() == 1 {
169169 frame.render_widget(
170 Paragraph::new("Subscribe to some channels first, come back later\n\nHey, Siriusmart here. I originally planned to add a commands textlist at channel main pages so that you can subscribe to channels, but the complexity of this update is starting to get out of hand, as it requires the two items (channel and video list) to communicate with each other somehow. So for now the only ways you can subscribe to channels in single item page (videos or playlists), or run `youtube-tui help` to check out the related commands.\n\nThe rest will come in a few git commits.").wrap(tui::widgets::Wrap { trim: true }),
170 Paragraph::new("Subscribe to some channels first, come back later\n\nHey, Siriusmart here. I originally planned to add a commands textlist at channel main pages so that you can subscribe to channels, but the complexity of this update is starting to get out of hand, as it requires the two items (channel and video list) to communicate with each other somehow. So for now the only ways you can subscribe to channels in single item page (videos or playlists), or run `youtube-tui help` to check out the related commands.\n\nThe rest will come in a few git commits.").wrap(ratatui::widgets::Wrap { trim: true }),
171171 chunks[0],
172172 );
173173 return;
src/items/iteminfo.rs +3 −3
@@ -1,4 +1,4 @@
1use tui::{
1use ratatui::{
22 layout::Rect,
33 style::Style,
44 widgets::{Paragraph, Wrap},
@@ -19,9 +19,9 @@ pub struct ItemInfo {
1919impl FrameworkItem for ItemInfo {
2020 fn render(
2121 &mut self,
22 frame: &mut tui::Frame<tui::backend::CrosstermBackend<std::io::Stdout>>,
22 frame: &mut ratatui::Frame<ratatui::backend::CrosstermBackend<std::io::Stdout>>,
2323 framework: &mut tui_additions::framework::FrameworkClean,
24 area: tui::layout::Rect,
24 area: ratatui::layout::Rect,
2525 popup_render: bool,
2626 _info: tui_additions::framework::ItemInfo,
2727 ) {
src/items/itemlist.rs +11 −4
@@ -6,7 +6,7 @@ use crate::{
66 items::ItemInfo,
77};
88use home::home_dir;
9use tui::{
9use ratatui::{
1010 layout::{Constraint, Rect},
1111 style::Style,
1212};
@@ -225,9 +225,9 @@ impl Default for ItemList {
225225impl FrameworkItem for ItemList {
226226 fn render(
227227 &mut self,
228 frame: &mut tui::Frame<tui::backend::CrosstermBackend<std::io::Stdout>>,
228 frame: &mut ratatui::Frame<ratatui::backend::CrosstermBackend<std::io::Stdout>>,
229229 framework: &mut tui_additions::framework::FrameworkClean,
230 area: tui::layout::Rect,
230 area: ratatui::layout::Rect,
231231 popup_render: bool,
232232 info: tui_additions::framework::ItemInfo,
233233 ) {
@@ -389,6 +389,7 @@ impl FrameworkItem for ItemList {
389389
390390 // only create a render task if the key event actually changed something
391391 if updated {
392 self.update(framework);
392393 set_envs(
393394 self.infalte_item_update(
394395 framework.data.global.get::<MainConfig>().unwrap(),
@@ -496,7 +497,13 @@ impl FrameworkItem for ItemList {
496497impl ItemList {
497498 // change `self.item` to the currently selected item
498499 pub fn update(&mut self, framework: &mut FrameworkClean) {
499 if self.items.get(self.textlist.selected).is_none() {
500 let selected = self.items.get(self.textlist.selected);
501
502 if selected.is_none() {
503 return;
504 }
505
506 if matches!(selected, Some(Item::Page(_)) | Some(Item::Unknown(_))) {
500507 framework
501508 .data
502509 .global
src/items/messagebar.rs +3 −3
@@ -1,5 +1,5 @@
11use crate::{config::*, global::structs::*};
2use tui::{
2use ratatui::{
33 layout::Rect,
44 style::Style,
55 widgets::{Block, Borders, Paragraph},
@@ -13,9 +13,9 @@ pub struct MessageBar;
1313impl FrameworkItem for MessageBar {
1414 fn render(
1515 &mut self,
16 frame: &mut tui::Frame<tui::backend::CrosstermBackend<std::io::Stdout>>,
16 frame: &mut ratatui::Frame<ratatui::backend::CrosstermBackend<std::io::Stdout>>,
1717 framework: &mut tui_additions::framework::FrameworkClean,
18 area: tui::layout::Rect,
18 area: ratatui::layout::Rect,
1919 popup_render: bool,
2020 _info: tui_additions::framework::ItemInfo,
2121 ) {
src/items/pagebutton.rs +3 −3
@@ -1,5 +1,5 @@
11use crate::{config::AppearanceConfig, global::structs::*};
2use tui::{
2use ratatui::{
33 layout::Alignment,
44 style::Style,
55 widgets::{Block, Borders, Paragraph},
@@ -81,9 +81,9 @@ impl FrameworkItem for PageButton {
8181 // it is basically a paragraph (text) with borders
8282 fn render(
8383 &mut self,
84 frame: &mut tui::Frame<tui::backend::CrosstermBackend<std::io::Stdout>>,
84 frame: &mut ratatui::Frame<ratatui::backend::CrosstermBackend<std::io::Stdout>>,
8585 framework: &mut tui_additions::framework::FrameworkClean,
86 area: tui::layout::Rect,
86 area: ratatui::layout::Rect,
8787 popup_render: bool,
8888 info: tui_additions::framework::ItemInfo,
8989 ) {
src/items/searchbar.rs +3 −3
@@ -6,7 +6,7 @@ use crate::{config::*, global::structs::*};
66use crate::global::functions::*;
77
88use crossterm::event::KeyCode;
9use tui::{
9use ratatui::{
1010 layout::Alignment,
1111 style::Style,
1212 widgets::{Block, Borders},
@@ -23,9 +23,9 @@ impl FrameworkItem for SearchBar {
2323 // basically is a TextField with borders
2424 fn render(
2525 &mut self,
26 frame: &mut tui::Frame<tui::backend::CrosstermBackend<std::io::Stdout>>,
26 frame: &mut ratatui::Frame<ratatui::backend::CrosstermBackend<std::io::Stdout>>,
2727 framework: &mut tui_additions::framework::FrameworkClean,
28 area: tui::layout::Rect,
28 area: ratatui::layout::Rect,
2929 popup_render: bool,
3030 info: tui_additions::framework::ItemInfo,
3131 ) {
src/items/searchfilters.rs +3 −3
@@ -2,7 +2,7 @@ use crate::{
22 config::*,
33 global::{functions::popup_area, structs::*},
44};
5use tui::{
5use ratatui::{
66 layout::{Alignment, Constraint, Rect},
77 style::Style,
88 widgets::{Block, Borders, Clear, Paragraph},
@@ -82,9 +82,9 @@ impl SearchFilter {
8282impl FrameworkItem for SearchFilter {
8383 fn render(
8484 &mut self,
85 frame: &mut tui::Frame<tui::backend::CrosstermBackend<std::io::Stdout>>,
85 frame: &mut ratatui::Frame<ratatui::backend::CrosstermBackend<std::io::Stdout>>,
8686 framework: &mut tui_additions::framework::FrameworkClean,
87 area: tui::layout::Rect,
87 area: ratatui::layout::Rect,
8888 popup_render: bool,
8989 info: tui_additions::framework::ItemInfo,
9090 ) {
src/items/singleitem.rs +3 −3
@@ -6,7 +6,7 @@ use crate::{
66 global::{functions::*, structs::*, traits::Collection},
77};
88use home::home_dir;
9use tui::{
9use ratatui::{
1010 layout::{Constraint, Rect},
1111 style::Style,
1212 widgets::{Block, Borders},
@@ -540,9 +540,9 @@ impl SingleItem {
540540impl FrameworkItem for SingleItem {
541541 fn render(
542542 &mut self,
543 frame: &mut tui::Frame<tui::backend::CrosstermBackend<std::io::Stdout>>,
543 frame: &mut ratatui::Frame<ratatui::backend::CrosstermBackend<std::io::Stdout>>,
544544 framework: &mut tui_additions::framework::FrameworkClean,
545 area: tui::layout::Rect,
545 area: ratatui::layout::Rect,
546546 popup_render: bool,
547547 info: tui_additions::framework::ItemInfo,
548548 ) {
src/items/videolist.rs +3 −3
@@ -1,5 +1,5 @@
11use crossterm::event::KeyCode;
2use tui::{
2use ratatui::{
33 layout::{Constraint, Rect},
44 style::Style,
55};
@@ -245,9 +245,9 @@ impl FrameworkItem for VideoList {
245245
246246 fn render(
247247 &mut self,
248 frame: &mut tui::Frame<tui::backend::CrosstermBackend<std::io::Stdout>>,
248 frame: &mut ratatui::Frame<ratatui::backend::CrosstermBackend<std::io::Stdout>>,
249249 framework: &mut tui_additions::framework::FrameworkClean,
250 area: tui::layout::Rect,
250 area: ratatui::layout::Rect,
251251 popup_render: bool,
252252 info: tui_additions::framework::ItemInfo,
253253 ) {
src/main.rs +1 −1
@@ -3,8 +3,8 @@ use crossterm::{
33 execute,
44 terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
55};
6use ratatui::{backend::CrosstermBackend, Terminal};
67use std::{env, error::Error, io};
7use tui::{backend::CrosstermBackend, Terminal};
88use tui_additions::framework::{Framework, State};
99use youtube_tui::{exit, global::functions::text_command, init, run};
1010
src/run.rs +2 −2
@@ -1,6 +1,6 @@
11use crossterm::event::{self, Event, MouseButton, MouseEventKind};
2use ratatui::{backend::CrosstermBackend, Terminal};
23use std::{error::Error, io::Stdout};
3use tui::{backend::CrosstermBackend, Terminal};
44use tui_additions::{
55 framework::{Framework, FrameworkDirection},
66 widgets::TextField,
@@ -62,7 +62,7 @@ pub fn run(
6262 for row in state.0.iter_mut() {
6363 for item in row.items.iter_mut() {
6464 if item.item.r#type()
65 == "youtube_tui::items::searchfilters::SearchFilter"
65 == "youtube_ratatui::items::searchfilters::SearchFilter"
6666 && item.item.mouse_event(
6767 &mut frameworkclean,
6868 0,