diff --git a/Cargo.lock b/Cargo.lock index 17d60bf..d30d296 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -139,9 +139,9 @@ checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "approx" @@ -186,9 +186,9 @@ checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "as-raw-xcb-connection" @@ -653,9 +653,9 @@ dependencies = [ [[package]] name = "block2" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43ff7d91d3c1d568065b06c899777d1e48dcf76103a672a0adbc238a7f247f1e" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ "objc2", ] @@ -752,13 +752,39 @@ dependencies = [ "thiserror", ] +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.5.0", + "log", + "polling", + "rustix", + "slab", + "thiserror", +] + [[package]] name = "calloop-wayland-source" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ - "calloop", + "calloop 0.12.4", + "rustix", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop 0.13.0", "rustix", "wayland-backend", "wayland-client", @@ -804,9 +830,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "cfg_aliases" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" @@ -1106,19 +1132,21 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.10.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75acbfb314aeb4f5210d379af45ed1ec2c98c7f1790bf57b8a4c562ac0c51b71" +checksum = "59fd57d82eb4bfe7ffa9b1cec0c05e2fd378155b47f255a67983cb4afe0e80c2" dependencies = [ - "fontdb", - "libm", + "bitflags 2.5.0", + "fontdb 0.16.2", "log", "rangemap", + "rayon", "rustc-hash 1.1.0", - "rustybuzz 0.11.0", + "rustybuzz", "self_cell", "swash", "sys-locale", + "ttf-parser 0.21.1", "unicode-bidi", "unicode-linebreak", "unicode-script", @@ -1143,6 +1171,25 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.19" @@ -1350,7 +1397,8 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dpi" version = "0.1.1" -source = "git+https://github.com/iced-rs/winit.git?rev=8affa522bc6dcc497d332a28c03491d22a22f5a7#8affa522bc6dcc497d332a28c03491d22a22f5a7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" [[package]] name = "drm" @@ -2033,9 +2081,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "font-types" -version = "0.5.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf6aa1de86490d8e39e04589bd04eb5953cc2a5ef0c25e389e807f44fd24e41" +checksum = "8f0189ccb084f77c5523e08288d418cbaa09c451a08515678a0aa265df9a8b60" dependencies = [ "bytemuck", ] @@ -2051,16 +2099,30 @@ dependencies = [ [[package]] name = "fontdb" -version = "0.15.0" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2", + "slotmap", + "tinyvec", + "ttf-parser 0.20.0", +] + +[[package]] +name = "fontdb" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020e203f177c0fb250fb19455a252e838d2bbbce1f80f25ecc42402aafa8cd38" +checksum = "e32eac81c1135c1df01d4e6d4233c47ba11f6a6d07f33e0bba09d18797077770" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.8.0", + "memmap2", "slotmap", "tinyvec", - "ttf-parser 0.19.2", + "ttf-parser 0.21.1", ] [[package]] @@ -2259,9 +2321,9 @@ dependencies = [ [[package]] name = "gif" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" dependencies = [ "color_quant", "weezl", @@ -2369,18 +2431,6 @@ dependencies = [ "gl_generator", ] -[[package]] -name = "glyphon" -version = "0.5.0" -source = "git+https://github.com/hecrj/glyphon.git?rev=f07e7bab705e69d39a5e6e52c73039a93c4552f8#f07e7bab705e69d39a5e6e52c73039a93c4552f8" -dependencies = [ - "cosmic-text", - "etagere", - "lru", - "rustc-hash 1.1.0", - "wgpu", -] - [[package]] name = "gpu-alloc" version = "0.6.0" @@ -2822,8 +2872,9 @@ dependencies = [ [[package]] name = "iced" -version = "0.13.0-dev" -source = "git+https://github.com/iced-rs/iced?rev=b30d34f#b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88acfabc84ec077eaf9ede3457ffa3a104626d79022a9bf7f296093b1d60c73f" dependencies = [ "iced_core", "iced_futures", @@ -2835,8 +2886,9 @@ dependencies = [ [[package]] name = "iced_core" -version = "0.13.0-dev" -source = "git+https://github.com/iced-rs/iced?rev=b30d34f#b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa341b914c93e1afc651c8b5c5b6c88aa68aa92e7d9923366b97a85a7f2ba46" dependencies = [ "bitflags 2.5.0", "bytes", @@ -2846,8 +2898,7 @@ dependencies = [ "num-traits", "once_cell", "palette", - "raw-window-handle", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "smol_str", "thiserror", "web-time", @@ -2855,22 +2906,37 @@ dependencies = [ [[package]] name = "iced_futures" -version = "0.13.0-dev" -source = "git+https://github.com/iced-rs/iced?rev=b30d34f#b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b9b08fd632f5131344702869eea35fdebef9e548ab504942ac6b44fb42c90e2" dependencies = [ "futures", "iced_core", "log", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "tokio", "wasm-bindgen-futures", "wasm-timer", ] +[[package]] +name = "iced_glyphon" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c3bb56f1820ca252bc1d0994ece33d233a55657c0c263ea7cb16895adbde82" +dependencies = [ + "cosmic-text", + "etagere", + "lru", + "rustc-hash 2.0.0", + "wgpu", +] + [[package]] name = "iced_graphics" -version = "0.13.0-dev" -source = "git+https://github.com/iced-rs/iced?rev=b30d34f#b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba25a18cfa6d5cc160aca7e1b34f73ccdff21680fa8702168c09739767b6c66f" dependencies = [ "bitflags 2.5.0", "bytemuck", @@ -2882,15 +2948,16 @@ dependencies = [ "lyon_path", "once_cell", "raw-window-handle", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "thiserror", "unicode-segmentation", ] [[package]] name = "iced_renderer" -version = "0.13.0-dev" -source = "git+https://github.com/iced-rs/iced?rev=b30d34f#b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73558208059f9e622df2bf434e044ee2f838ce75201a023cf0ca3e1244f46c2a" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2901,8 +2968,9 @@ dependencies = [ [[package]] name = "iced_runtime" -version = "0.13.0-dev" -source = "git+https://github.com/iced-rs/iced?rev=b30d34f#b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f72474ab379b1c53f4ec5e468c66f8e307f8db13c865c2714d2c4a4a5b38c9a1" dependencies = [ "bytes", "iced_core", @@ -2913,8 +2981,9 @@ dependencies = [ [[package]] name = "iced_tiny_skia" -version = "0.13.0-dev" -source = "git+https://github.com/iced-rs/iced?rev=b30d34f#b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c625d368284fcc43b0b36b176f76eff1abebe7959dd58bd8ce6897d641962a50" dependencies = [ "bytemuck", "cosmic-text", @@ -2922,56 +2991,60 @@ dependencies = [ "kurbo 0.10.4", "log", "resvg", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "softbuffer", "tiny-skia", ] [[package]] name = "iced_wgpu" -version = "0.13.0-dev" -source = "git+https://github.com/iced-rs/iced?rev=b30d34f#b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8194d7666004b8e947f89ab7446d323ab0b882971226c1913ef98764c9e4bbc4" dependencies = [ "bitflags 2.5.0", "bytemuck", "futures", "glam", - "glyphon", "guillotiere", + "iced_glyphon", "iced_graphics", "log", "lyon", "once_cell", "resvg", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "thiserror", "wgpu", ] [[package]] name = "iced_widget" -version = "0.13.0-dev" -source = "git+https://github.com/iced-rs/iced?rev=b30d34f#b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23eef161bcd216f3472916570919dc3542647285da9cc81085b8d5cb434dc870" dependencies = [ "iced_renderer", "iced_runtime", "num-traits", + "once_cell", "qrcode", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "thiserror", "unicode-segmentation", ] [[package]] name = "iced_winit" -version = "0.13.0-dev" -source = "git+https://github.com/iced-rs/iced?rev=b30d34f#b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f44cd4e1c594b6334f409282937bf972ba14d31fedf03c23aa595d982a2fda28" dependencies = [ "iced_futures", "iced_graphics", "iced_runtime", "log", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "thiserror", "tracing", "wasm-bindgen-futures", @@ -3320,18 +3393,19 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "kurbo" -version = "0.9.5" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" +checksum = "1618d4ebd923e97d67e7cd363d80aef35fe961005cbbbb3d2dad8bdd1bc63440" dependencies = [ "arrayvec", + "smallvec", ] [[package]] name = "kurbo" -version = "0.10.4" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1618d4ebd923e97d67e7cd363d80aef35fe961005cbbbb3d2dad8bdd1bc63440" +checksum = "89234b2cc610a7dd927ebde6b41dd1a5d4214cffaef4cf1fb2195d592f92518f" dependencies = [ "arrayvec", "smallvec", @@ -3366,7 +3440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -3484,9 +3558,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" @@ -3589,15 +3663,6 @@ version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" -[[package]] -name = "memmap2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" -dependencies = [ - "libc", -] - [[package]] name = "memmap2" version = "0.9.4" @@ -3868,15 +3933,15 @@ dependencies = [ [[package]] name = "objc-sys" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da284c198fb9b7b0603f8635185e85fbd5b64ee154b1ed406d489077de2d6d60" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" [[package]] name = "objc2" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b25e1034d0e636cd84707ccdaa9f81243d399196b8a773946dcffec0401659" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ "objc-sys", "objc2-encode", @@ -3884,42 +3949,189 @@ dependencies = [ [[package]] name = "objc2-app-kit" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb79768a710a9a1798848179edb186d1af7e8a8679f369e4b8d201dd2a034047" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ + "bitflags 2.5.0", "block2", + "libc", "objc2", "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", "objc2-foundation", ] [[package]] name = "objc2-core-data" -version = "0.2.0" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e092bc42eaf30a08844e6a076938c60751225ec81431ab89f5d1ccd9f958d6c" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" dependencies = [ "block2", "objc2", + "objc2-contacts", "objc2-foundation", ] [[package]] name = "objc2-encode" -version = "4.0.1" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88658da63e4cc2c8adb1262902cd6af51094df0488b760d6fd27194269c0950a" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" [[package]] name = "objc2-foundation" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfaefe14254871ea16c7d88968c0ff14ba554712a20d76421eec52f0a7fb8904" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ + "bitflags 2.5.0", "block2", "dispatch", + "libc", + "objc2", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.5.0", + "block2", "objc2", + "objc2-core-location", + "objc2-foundation", ] [[package]] @@ -4257,7 +4469,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -4436,9 +4648,9 @@ checksum = "166f136dfdb199f98186f3649cf7a0536534a61417a1a30221b492b4fb60ce3f" [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "96a05e2e8efddfa51a84ca47cec303fac86c8541b686d37cac5efc0e094417bc" dependencies = [ "memchr", ] @@ -4603,10 +4815,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cc3bcbdb1ddfc11e700e62968e6b4cc9c75bb466464ad28fb61c5b2c964418b" [[package]] -name = "rctree" -version = "0.5.0" +name = "rayon" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] [[package]] name = "rdrand" @@ -4619,9 +4845,9 @@ dependencies = [ [[package]] name = "read-fonts" -version = "0.19.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4749db2bd1c853db31a7ae5ee2fc6c30bbddce353ea8fedf673fed187c68c7" +checksum = "8c141b9980e1150201b2a3a32879001c8f975fe313ec3df5471a9b5c79a880cd" dependencies = [ "bytemuck", "font-types", @@ -4811,15 +5037,14 @@ dependencies = [ [[package]] name = "resvg" -version = "0.36.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7980f653f9a7db31acff916a262c3b78c562919263edea29bf41a056e20497" +checksum = "944d052815156ac8fa77eaac055220e95ba0b01fa8887108ca710c03805d9051" dependencies = [ "gif", "jpeg-decoder", "log", "pico-args", - "png", "rgb", "svgtypes", "tiny-skia", @@ -4864,18 +5089,15 @@ dependencies = [ [[package]] name = "roxmltree" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862340e351ce1b271a378ec53f304a5558f7db87f3769dc655a8f6ecbb68b302" -dependencies = [ - "xmlparser", -] +checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" [[package]] name = "roxmltree" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" +checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] name = "rusqlite" @@ -5023,31 +5245,15 @@ checksum = "092474d1a01ea8278f69e6a358998405fae5b8b963ddaeb2b0b04a128bf1dfb0" [[package]] name = "rustybuzz" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71cd15fef9112a1f94ac64b58d1e4628192631ad6af4dc69997f995459c874e7" -dependencies = [ - "bitflags 1.3.2", - "bytemuck", - "smallvec", - "ttf-parser 0.19.2", - "unicode-bidi-mirroring", - "unicode-ccc", - "unicode-properties", - "unicode-script", -] - -[[package]] -name = "rustybuzz" -version = "0.11.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee8fe2a8461a0854a37101fe7a1b13998d0cfa987e43248e81d2a5f4570f6fa" +checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "bytemuck", "libm", "smallvec", - "ttf-parser 0.20.0", + "ttf-parser 0.21.1", "unicode-bidi-mirroring", "unicode-ccc", "unicode-properties", @@ -5102,14 +5308,14 @@ dependencies = [ [[package]] name = "sctk-adwaita" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de61fa7334ee8ee1f5c3c58dcc414fb9361e7e8f5bff9d45f4d69eeb89a7169" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" dependencies = [ "ab_glyph", "log", - "memmap2 0.9.4", - "smithay-client-toolkit", + "memmap2", + "smithay-client-toolkit 0.19.2", "tiny-skia", ] @@ -5344,6 +5550,22 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "skrifa" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abea4738067b1e628c6ce28b2c216c19e9ea95715cdb332680e821c3bec2ef23" +dependencies = [ + "bytemuck", + "read-fonts", +] + [[package]] name = "slab" version = "0.4.9" @@ -5375,20 +5597,45 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" dependencies = [ "bitflags 2.5.0", - "calloop", - "calloop-wayland-source", + "calloop 0.12.4", + "calloop-wayland-source 0.2.0", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix", + "thiserror", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols 0.31.2", + "wayland-protocols-wlr 0.2.0", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.5.0", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", "cursor-icon", "libc", "log", - "memmap2 0.9.4", + "memmap2", "rustix", "thiserror", "wayland-backend", "wayland-client", "wayland-csd-frame", "wayland-cursor", - "wayland-protocols", - "wayland-protocols-wlr", + "wayland-protocols 0.32.4", + "wayland-protocols-wlr 0.3.4", "wayland-scanner", "xkeysym", ] @@ -5400,7 +5647,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c091e7354ea8059d6ad99eace06dd13ddeedbb0ac72d40a9a6e7ff790525882d" dependencies = [ "libc", - "smithay-client-toolkit", + "smithay-client-toolkit 0.18.1", "wayland-backend", ] @@ -5431,7 +5678,7 @@ checksum = "61d5d17f23326fe0d9b0af282f73f3af666699420fd5f42629efd9c6e7dc166f" dependencies = [ "as-raw-xcb-connection", "bytemuck", - "cfg_aliases 0.2.0", + "cfg_aliases 0.2.1", "cocoa", "core-graphics", "drm", @@ -5439,7 +5686,7 @@ dependencies = [ "foreign-types", "js-sys", "log", - "memmap2 0.9.4", + "memmap2", "objc", "raw-window-handle", "redox_syscall 0.5.1", @@ -5538,21 +5785,21 @@ checksum = "f83ba502a3265efb76efb89b0a2f7782ad6f2675015d4ce37e4b547dda42b499" [[package]] name = "svgtypes" -version = "0.12.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71499ff2d42f59d26edb21369a308ede691421f79ebc0f001e2b1fd3a7c9e52" +checksum = "794de53cc48eaabeed0ab6a3404a65f40b3e38c067e4435883a65d2aa4ca000e" dependencies = [ - "kurbo 0.9.5", - "siphasher", + "kurbo 0.11.1", + "siphasher 1.0.1", ] [[package]] name = "swash" -version = "0.1.15" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ec889a8e0a6fcb91041996c8f1f6be0fe1a09e94478785e07c32ce2bca2d2b" +checksum = "93cdc334a50fcc2aa3f04761af3b28196280a6aaadb1ef11215c478ae32615ac" dependencies = [ - "read-fonts", + "skrifa", "yazi", "zeno", ] @@ -6041,15 +6288,15 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "ttf-parser" -version = "0.19.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49d64318d8311fc2668e48b63969f4343e0a85c4a109aa8460d6672e364b8bd1" +checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" [[package]] name = "ttf-parser" -version = "0.20.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" +checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" [[package]] name = "typenum" @@ -6082,15 +6329,15 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-bidi-mirroring" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d12260fb92d52f9008be7e4bca09f584780eb2266dc8fecc6a192bec561694" +checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" [[package]] name = "unicode-ccc" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" +checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" [[package]] name = "unicode-ident" @@ -6169,63 +6416,29 @@ dependencies = [ [[package]] name = "usvg" -version = "0.36.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51daa774fe9ee5efcf7b4fec13019b8119cda764d9a8b5b06df02bb1445c656" -dependencies = [ - "base64 0.21.7", - "log", - "pico-args", - "usvg-parser", - "usvg-text-layout", - "usvg-tree", - "xmlwriter", -] - -[[package]] -name = "usvg-parser" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c88a5ffaa338f0e978ecf3d4e00d8f9f493e29bed0752e1a808a1db16afc40" +checksum = "b84ea542ae85c715f07b082438a4231c3760539d902e11d093847a0b22963032" dependencies = [ + "base64 0.22.1", "data-url", "flate2", + "fontdb 0.18.0", "imagesize", - "kurbo 0.9.5", + "kurbo 0.11.1", "log", - "roxmltree 0.18.1", + "pico-args", + "roxmltree 0.20.0", + "rustybuzz", "simplecss", - "siphasher", + "siphasher 1.0.1", + "strict-num", "svgtypes", - "usvg-tree", -] - -[[package]] -name = "usvg-text-layout" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d2374378cb7a3fb8f33894e0fdb8625e1bbc4f25312db8d91f862130b541593" -dependencies = [ - "fontdb", - "kurbo 0.9.5", - "log", - "rustybuzz 0.10.0", + "tiny-skia-path", "unicode-bidi", "unicode-script", "unicode-vo", - "usvg-tree", -] - -[[package]] -name = "usvg-tree" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cacb0c5edeaf3e80e5afcf5b0d4004cc1d36318befc9a7c6606507e5d0f4062" -dependencies = [ - "rctree", - "strict-num", - "svgtypes", - "tiny-skia-path", + "xmlwriter", ] [[package]] @@ -6363,9 +6576,9 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.3" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ "cc", "downcast-rs", @@ -6377,9 +6590,9 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.2" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" +checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" dependencies = [ "bitflags 2.5.0", "rustix", @@ -6421,16 +6634,28 @@ dependencies = [ "wayland-scanner", ] +[[package]] +name = "wayland-protocols" +version = "0.32.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b5755d77ae9040bb872a25026555ce4cb0ae75fd923e90d25fba07d81057de0" +dependencies = [ + "bitflags 2.5.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + [[package]] name = "wayland-protocols-plasma" -version = "0.2.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" +checksum = "8a0a41a6875e585172495f7a96dfa42ca7e0213868f4f15c313f7c33221a7eff" dependencies = [ "bitflags 2.5.0", "wayland-backend", "wayland-client", - "wayland-protocols", + "wayland-protocols 0.32.4", "wayland-scanner", ] @@ -6443,15 +6668,28 @@ dependencies = [ "bitflags 2.5.0", "wayland-backend", "wayland-client", - "wayland-protocols", + "wayland-protocols 0.31.2", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad87b5fd1b1d3ca2f792df8f686a2a11e3fe1077b71096f7a175ab699f89109" +dependencies = [ + "bitflags 2.5.0", + "wayland-backend", + "wayland-client", + "wayland-protocols 0.32.4", "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.31.1" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ "proc-macro2", "quick-xml", @@ -6460,9 +6698,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.1" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" dependencies = [ "dlib", "log", @@ -6472,9 +6710,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -6934,16 +7172,18 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" -version = "0.30.0" -source = "git+https://github.com/iced-rs/winit.git?rev=8affa522bc6dcc497d332a28c03491d22a22f5a7#8affa522bc6dcc497d332a28c03491d22a22f5a7" +version = "0.30.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0be9e76a1f1077e04a411f0b989cbd3c93339e1771cb41e71ac4aee95bfd2c67" dependencies = [ "ahash 0.8.11", "android-activity", "atomic-waker", "bitflags 2.5.0", + "block2", "bytemuck", - "calloop", - "cfg_aliases 0.2.0", + "calloop 0.13.0", + "cfg_aliases 0.2.1", "concurrent-queue", "core-foundation", "core-graphics", @@ -6951,11 +7191,12 @@ dependencies = [ "dpi", "js-sys", "libc", - "memmap2 0.9.4", + "memmap2", "ndk", "objc2", "objc2-app-kit", "objc2-foundation", + "objc2-ui-kit", "orbclient", "percent-encoding", "pin-project", @@ -6963,7 +7204,7 @@ dependencies = [ "redox_syscall 0.4.1", "rustix", "sctk-adwaita", - "smithay-client-toolkit", + "smithay-client-toolkit 0.19.2", "smol_str", "tracing", "unicode-segmentation", @@ -6971,7 +7212,7 @@ dependencies = [ "wasm-bindgen-futures", "wayland-backend", "wayland-client", - "wayland-protocols", + "wayland-protocols 0.32.4", "wayland-protocols-plasma", "web-sys", "web-time", @@ -7100,12 +7341,6 @@ version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" -[[package]] -name = "xmlparser" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" - [[package]] name = "xmlwriter" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 28df72c..de6f1e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,10 +8,10 @@ default = [] vendored = ["rusqlite/bundled-sqlcipher-vendored-openssl"] [dependencies] -anyhow = "1.0.86" +anyhow = "1.0.89" log = "0.4" pretty_env_logger = "0.5" # todo swap to a file logger -iced = { git = "https://github.com/iced-rs/iced", rev = "b30d34f", features = ["debug", "tokio", "svg", "qr_code", "advanced"] } +iced = { version = "0.13.1", features = ["debug", "tokio", "svg", "qr_code", "advanced"] } lyon_algorithms = "1.0" once_cell = "1.0" tokio = { version = "1", features = ["full"] } diff --git a/src/components/button.rs b/src/components/button.rs index d14c7bc..5393878 100644 --- a/src/components/button.rs +++ b/src/components/button.rs @@ -14,10 +14,10 @@ pub fn h_button(text_str: &str, icon: SvgIcon, loading: bool) -> Button<'_, Mess let spinner: Element<'static, Message, Theme> = the_spinner(); let svg = map_icon(icon, 24., 24.); let content = if loading { - row![spinner].align_items(iced::Alignment::Center) + row![spinner].align_y(iced::Alignment::Center) } else { row![svg, text(text_str).size(24.)] - .align_items(iced::Alignment::Center) + .align_y(iced::Alignment::Center) .spacing(16) }; @@ -61,9 +61,9 @@ pub fn sidebar_button( let is_active = self_route == active_route; let svg = map_icon(icon, 24., 24.); let content = row!(svg, text(text_str).size(24.), horizontal_space(),) - .align_items(iced::Alignment::Center) + .align_y(iced::Alignment::Center) .spacing(16) - .padding(16); + .padding(8); Button::new(content) .style(move |theme, status| { diff --git a/src/components/federation_item.rs b/src/components/federation_item.rs index c4724a9..453f21a 100644 --- a/src/components/federation_item.rs +++ b/src/components/federation_item.rs @@ -28,7 +28,7 @@ pub fn h_federation_item(item: &FederationItem) -> Element { } = item; let name_row = row![map_icon(SvgIcon::People, 24., 24.), text(name).size(24)] - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(16); let balance_row = text(format_amount(*balance)).size(24); diff --git a/src/components/input.rs b/src/components/input.rs index 05bc903..9608215 100644 --- a/src/components/input.rs +++ b/src/components/input.rs @@ -3,15 +3,14 @@ use iced::{ column, row, text, text_input::{self, focus, Id}, TextInput, - }, - Background, Border, Color, Command, Element, Theme, + }, Background, Border, Color, Element, Task, Theme }; use crate::Message; use super::{darken, lighten}; -pub fn focus_input_id(id: &'static str) -> Command { +pub fn focus_input_id(id: &'static str) -> Task { let id = Id::new(id); focus(id) } @@ -73,7 +72,7 @@ pub fn h_input<'a>( let suffix_text = text(suffix).size(24); row![input, suffix_text] .spacing(8) - .align_items(iced::Alignment::Center) + .align_y(iced::Alignment::Center) } else { row![input] }; diff --git a/src/components/screen_header.rs b/src/components/screen_header.rs index ef34ee2..0016d4a 100644 --- a/src/components/screen_header.rs +++ b/src/components/screen_header.rs @@ -18,7 +18,7 @@ pub fn h_screen_header(harbor: &HarborWallet, show_balance: bool) -> Element Element Element { .on_press(Message::Navigate(Route::Donate)), ] .spacing(8) - .align_items(Alignment::Start), + .align_x(Alignment::Start), ) .padding(8) .style(|theme| -> Style { diff --git a/src/components/spinner.rs b/src/components/spinner.rs index 195737c..ea77f7e 100644 --- a/src/components/spinner.rs +++ b/src/components/spinner.rs @@ -272,7 +272,7 @@ where ) -> event::Status { let state = tree.state.downcast_mut::(); - if let Event::Window(_, window::Event::RedrawRequested(now)) = event { + if let Event::Window(window::Event::RedrawRequested(now)) = event { state.animation = state .animation diff --git a/src/components/toast.rs b/src/components/toast.rs index 270d070..5c6f81e 100644 --- a/src/components/toast.rs +++ b/src/components/toast.rs @@ -106,7 +106,7 @@ impl<'a> ToastManager<'a> { horizontal_space(), close_button.on_press((on_close)(index)) ] - .align_items(Alignment::Center), + .align_y(Alignment::Center), text(toast.body.as_str()) ]) .width(Length::Fill) @@ -198,7 +198,7 @@ impl<'a> Widget for ToastManager<'a> { state: &mut Tree, layout: Layout<'_>, renderer: &Renderer, - operation: &mut dyn Operation, + operation: &mut dyn Operation, ) { operation.container(None, layout.bounds(), &mut |operation| { self.content @@ -339,7 +339,7 @@ impl<'a, 'b, Message> overlay::Overlay for Overlay<'a, clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, Message>, ) -> event::Status { - if let Event::Window(_, window::Event::RedrawRequested(now)) = &event { + if let Event::Window(window::Event::RedrawRequested(now)) = &event { let mut next_redraw: Option = None; self.instants @@ -427,7 +427,7 @@ impl<'a, 'b, Message> overlay::Overlay for Overlay<'a, &mut self, layout: Layout<'_>, renderer: &Renderer, - operation: &mut dyn widget::Operation, + operation: &mut dyn widget::Operation, ) { operation.container(None, layout.bounds(), &mut |operation| { self.toasts diff --git a/src/components/transaction_item.rs b/src/components/transaction_item.rs index 71d761c..a24cc7d 100644 --- a/src/components/transaction_item.rs +++ b/src/components/transaction_item.rs @@ -75,7 +75,7 @@ pub fn h_transaction_item(item: &TransactionItem) -> Element { let formatted_amount = text(format_amount(*amount)).size(24); let row = row![direction_icon, kind_icon, formatted_amount,] - .align_items(iced::Alignment::Center) + .align_y(iced::Alignment::Center) .spacing(16); let timestamp = text(format_timestamp(timestamp)).size(18).style(subtitle); diff --git a/src/core.rs b/src/core.rs index b461b68..80fb952 100644 --- a/src/core.rs +++ b/src/core.rs @@ -9,6 +9,7 @@ use fedimint_ln_client::{LightningClientModule, PayType}; use fedimint_ln_common::config::FeeToAmount; use fedimint_ln_common::lightning_invoice::{Bolt11Invoice, Bolt11InvoiceDescription, Description}; use fedimint_wallet_client::WalletClientModule; +use iced::futures::Stream; use std::collections::HashMap; use std::path::PathBuf; use std::str::FromStr; @@ -16,10 +17,7 @@ use std::sync::atomic::AtomicBool; use std::sync::Arc; use std::time::{Duration, Instant}; -use iced::{ - futures::{channel::mpsc::Sender, SinkExt}, - subscription::{self, Subscription}, -}; +use iced::futures::{channel::mpsc::Sender, SinkExt}; use log::{error, trace, warn}; use tokio::sync::RwLock; use tokio::task::spawn_blocking; @@ -359,194 +357,188 @@ impl HarborCore { } } -pub fn run_core() -> Subscription { - struct Connect; - subscription::channel( - std::any::TypeId::of::(), - 100, - |mut tx: Sender| async move { - // Setup UI Handle - let (ui_handle, mut core_handle) = bridge::create_handles(); - let arc_ui_handle = Arc::new(ui_handle); - tx.send(Message::UIHandlerLoaded(arc_ui_handle)) - .await - .expect("should send"); - - let network = Network::Signet; - - // Create the datadir if it doesn't exist - let path = PathBuf::from(&conf::data_dir(network)); - std::fs::create_dir_all(path.clone()).expect("Could not create datadir"); - log::info!("Using datadir: {path:?}"); - - // FIXME: Artificial sleep because it loads too fast - tokio::time::sleep(Duration::from_secs(1)).await; - - // Check if the database file exists already, if so tell UI to unlock - if std::fs::metadata(path.join(HARBOR_FILE_NAME)).is_ok() { - tx.send(Message::core_msg(None, CoreUIMsg::Locked)) - .await - .expect("should send"); - } else { - tx.send(Message::core_msg(None, CoreUIMsg::NeedsInit)) - .await - .expect("should send"); - } - - loop { - let msg = core_handle.recv().await; - - let id = msg.as_ref().map(|m| m.id); - - // Watch for either Unlock or Init, ignore everything else until started - match msg.map(|m| m.msg) { - Some(UICoreMsg::Unlock(password)) => { - log::info!("Sending unlock message"); - tx.send(Message::core_msg(id, CoreUIMsg::Unlocking)) - .await - .expect("should send"); - - // attempting to unlock - let db_path = path.join(HARBOR_FILE_NAME); - let db_path = db_path.to_str().unwrap().to_string(); +pub fn run_core() -> impl Stream { + iced::stream::channel(100, |mut tx: Sender| async move { + // Setup UI Handle + let (ui_handle, mut core_handle) = bridge::create_handles(); + let arc_ui_handle = Arc::new(ui_handle); + tx.send(Message::UIHandlerLoaded(arc_ui_handle)) + .await + .expect("should send"); - // if the db file doesn't exist, error out to go through init flow - if !std::path::Path::new(&db_path).exists() { - error!("Database does not exist, new wallet is required"); + let network = Network::Signet; - tx.send(Message::core_msg( - id, - CoreUIMsg::UnlockFailed( - "Database does not exist, new wallet is required".to_string(), - ), - )) - .await - .expect("should send"); + // Create the datadir if it doesn't exist + let path = PathBuf::from(&conf::data_dir(network)); + std::fs::create_dir_all(path.clone()).expect("Could not create datadir"); + log::info!("Using datadir: {path:?}"); - continue; - } + // FIXME: Artificial sleep because it loads too fast + tokio::time::sleep(Duration::from_secs(1)).await; - if let Err(e) = check_password(&db_path, &password) { - // probably invalid password - error!("error using password: {e}"); + // Check if the database file exists already, if so tell UI to unlock + if std::fs::metadata(path.join(HARBOR_FILE_NAME)).is_ok() { + tx.send(Message::core_msg(None, CoreUIMsg::Locked)) + .await + .expect("should send"); + } else { + tx.send(Message::core_msg(None, CoreUIMsg::NeedsInit)) + .await + .expect("should send"); + } - tx.send(Message::core_msg( - id, - CoreUIMsg::UnlockFailed(e.to_string()), - )) - .await - .expect("should send"); + loop { + let msg = core_handle.recv().await; + + let id = msg.as_ref().map(|m| m.id); + + // Watch for either Unlock or Init, ignore everything else until started + match msg.map(|m| m.msg) { + Some(UICoreMsg::Unlock(password)) => { + log::info!("Sending unlock message"); + tx.send(Message::core_msg(id, CoreUIMsg::Unlocking)) + .await + .expect("should send"); + + // attempting to unlock + let db_path = path.join(HARBOR_FILE_NAME); + let db_path = db_path.to_str().unwrap().to_string(); + + // if the db file doesn't exist, error out to go through init flow + if !std::path::Path::new(&db_path).exists() { + error!("Database does not exist, new wallet is required"); + + tx.send(Message::core_msg( + id, + CoreUIMsg::UnlockFailed( + "Database does not exist, new wallet is required".to_string(), + ), + )) + .await + .expect("should send"); + + continue; + } - continue; - } + if let Err(e) = check_password(&db_path, &password) { + // probably invalid password + error!("error using password: {e}"); - log::info!("Correct password"); + tx.send(Message::core_msg( + id, + CoreUIMsg::UnlockFailed(e.to_string()), + )) + .await + .expect("should send"); - let db = spawn_blocking(move || setup_db(&db_path, password)) - .await - .expect("Could not create join handle"); + continue; + } - if let Err(e) = db { - error!("error opening database: {e}"); + log::info!("Correct password"); - tx.send(Message::core_msg( - id, - CoreUIMsg::UnlockFailed(e.to_string()), - )) - .await - .expect("should send"); - continue; - } - let db = db.expect("no error"); - - let mnemonic = retrieve_mnemonic(db.clone()).expect("should get seed"); - - let stop = Arc::new(AtomicBool::new(false)); - - // check db for fedimints - let mut clients = HashMap::new(); - let federation_ids = db - .list_federations() - .expect("should load initial fedimints"); - for f in federation_ids { - let client = FedimintClient::new( - db.clone(), - FederationInviteOrId::Id( - FederationId::from_str(&f).expect("should parse federation id"), - ), - &mnemonic, - network, - stop.clone(), - ) - .await - .expect("Could not create fedimint client"); + let db = spawn_blocking(move || setup_db(&db_path, password)) + .await + .expect("Could not create join handle"); - clients.insert(client.fedimint_client.federation_id(), client); - } + if let Err(e) = db { + error!("error opening database: {e}"); - let core = HarborCore { - storage: db.clone(), - tx: tx.clone(), - mnemonic, + tx.send(Message::core_msg( + id, + CoreUIMsg::UnlockFailed(e.to_string()), + )) + .await + .expect("should send"); + continue; + } + let db = db.expect("no error"); + + let mnemonic = retrieve_mnemonic(db.clone()).expect("should get seed"); + + let stop = Arc::new(AtomicBool::new(false)); + + // check db for fedimints + let mut clients = HashMap::new(); + let federation_ids = db + .list_federations() + .expect("should load initial fedimints"); + for f in federation_ids { + let client = FedimintClient::new( + db.clone(), + FederationInviteOrId::Id( + FederationId::from_str(&f).expect("should parse federation id"), + ), + &mnemonic, network, - clients: Arc::new(RwLock::new(clients)), - stop, - }; - - tx.send(Message::core_msg(id, CoreUIMsg::UnlockSuccess)) - .await - .expect("should send"); + stop.clone(), + ) + .await + .expect("Could not create fedimint client"); - process_core(&mut core_handle, &core).await; + clients.insert(client.fedimint_client.federation_id(), client); } - Some(UICoreMsg::Init { password, seed }) => { - log::info!("Sending init message"); - tx.send(Message::core_msg(id, CoreUIMsg::Initing)) - .await - .expect("should send"); - - // set up the DB with the provided password - let db_path = path.join(HARBOR_FILE_NAME); - let db = - spawn_blocking(move || setup_db(db_path.to_str().unwrap(), password)) - .await - .expect("Could not create join handle"); - - if let Err(e) = db { - error!("error creating DB: {e}"); - - tx.send(Message::core_msg(id, CoreUIMsg::InitFailed(e.to_string()))) - .await - .expect("should send"); - continue; - } - let db = db.expect("no error"); + let core = HarborCore { + storage: db.clone(), + tx: tx.clone(), + mnemonic, + network, + clients: Arc::new(RwLock::new(clients)), + stop, + }; - let core = HarborCore { - storage: db.clone(), - tx: tx.clone(), - mnemonic: generate_mnemonic(db.clone(), seed) - .expect("should generate words"), - network, - clients: Arc::new(RwLock::new(HashMap::new())), - stop: Arc::new(AtomicBool::new(false)), - }; + tx.send(Message::core_msg(id, CoreUIMsg::UnlockSuccess)) + .await + .expect("should send"); - tx.send(Message::core_msg(id, CoreUIMsg::InitSuccess)) + process_core(&mut core_handle, &core).await; + } + Some(UICoreMsg::Init { password, seed }) => { + log::info!("Sending init message"); + tx.send(Message::core_msg(id, CoreUIMsg::Initing)) + .await + .expect("should send"); + + // set up the DB with the provided password + let db_path = path.join(HARBOR_FILE_NAME); + let db = spawn_blocking(move || setup_db(db_path.to_str().unwrap(), password)) + .await + .expect("Could not create join handle"); + + if let Err(e) = db { + error!("error creating DB: {e}"); + + tx.send(Message::core_msg(id, CoreUIMsg::InitFailed(e.to_string()))) .await .expect("should send"); - process_core(&mut core_handle, &core).await; + continue; } + let db = db.expect("no error"); + + let core = HarborCore { + storage: db.clone(), + tx: tx.clone(), + mnemonic: generate_mnemonic(db.clone(), seed) + .expect("should generate words"), + network, + clients: Arc::new(RwLock::new(HashMap::new())), + stop: Arc::new(AtomicBool::new(false)), + }; + + tx.send(Message::core_msg(id, CoreUIMsg::InitSuccess)) + .await + .expect("should send"); + + process_core(&mut core_handle, &core).await; + } - _ => { - warn!("Ignoring unrelated message to locked core") - } + _ => { + warn!("Ignoring unrelated message to locked core") } } - }, - ) + } + }) } async fn process_core(core_handle: &mut bridge::CoreHandle, core: &HarborCore) { diff --git a/src/main.rs b/src/main.rs index 52c1db0..4fb2e96 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,8 @@ use bitcoin::address::NetworkUnchecked; use bitcoin::Address; use components::{FederationItem, Toast, ToastManager, ToastStatus, TransactionItem}; +use iced::Subscription; +use iced::Task; use core::run_core; use fedimint_core::core::ModuleKind; use fedimint_core::invite_code::InviteCode; @@ -11,11 +13,10 @@ use std::str::FromStr; use std::sync::Arc; use bridge::{CoreUIMsg, CoreUIMsgPacket, ReceiveSuccessMsg, SendSuccessMsg}; -use iced::subscription::Subscription; use iced::widget::row; use iced::Element; -use iced::{clipboard, program, Color}; -use iced::{Command, Font}; +use iced::Font; +use iced::{clipboard, Color}; use log::{error, info}; use uuid::Uuid; @@ -34,7 +35,7 @@ pub mod routes; // We can also run logic during load if we need to. pub fn main() -> iced::Result { pretty_env_logger::init(); - program("Harbor", HarborWallet::update, HarborWallet::view) + iced::application("Harbor", HarborWallet::update, HarborWallet::view) .font(include_bytes!("../assets/fonts/Inter-Regular.ttf").as_slice()) .font(include_bytes!("../assets/fonts/Inter-Bold.ttf").as_slice()) .theme(HarborWallet::theme) @@ -180,7 +181,7 @@ pub struct HarborWallet { impl HarborWallet { fn subscription(&self) -> Subscription { - run_core() + Subscription::run(run_core) } async fn async_send_lightning( @@ -280,13 +281,13 @@ impl HarborWallet { self.mint_invite_code_str = String::new(); } - fn update(&mut self, message: Message) -> Command { + fn update(&mut self, message: Message) -> Task { match message { // Setup Message::UIHandlerLoaded(ui_handle) => { self.ui_handle = Some(ui_handle); println!("Core loaded"); - Command::none() + Task::none() } // Internal app state stuff like navigation and text inputs Message::Navigate(route) => { @@ -309,39 +310,39 @@ impl HarborWallet { }, _ => self.active_route = route, } - Command::none() + Task::none() } Message::ReceiveAmountChanged(amount) => { self.receive_amount_str = amount; - Command::none() + Task::none() } Message::SendDestInputChanged(input) => { self.send_dest_input_str = input; - Command::none() + Task::none() } Message::SendAmountInputChanged(input) => { self.send_amount_input_str = input; - Command::none() + Task::none() } Message::SetIsMax(is_max) => { self.is_max = is_max; - Command::none() + Task::none() } Message::PasswordInputChanged(input) => { self.password_input_str = input; - Command::none() + Task::none() } Message::SeedInputChanged(input) => { self.seed_input_str = input; - Command::none() + Task::none() } Message::MintInviteCodeInputChanged(input) => { self.mint_invite_code_str = input; - Command::none() + Task::none() } Message::DonateAmountChanged(input) => { self.donate_amount_str = input; - Command::none() + Task::none() } Message::SendStateReset => { self.send_failure_reason = None; @@ -350,7 +351,7 @@ impl HarborWallet { self.send_amount_input_str = String::new(); self.is_max = false; self.send_status = SendStatus::Idle; - Command::none() + Task::none() } Message::ReceiveStateReset => { self.receive_failure_reason = None; @@ -360,36 +361,36 @@ impl HarborWallet { self.receive_address = None; self.receive_qr_data = None; self.receive_status = ReceiveStatus::Idle; - Command::none() + Task::none() } Message::ReceiveMethodChanged(method) => { self.receive_method = method; - Command::none() + Task::none() } Message::AddToast(toast) => { self.toasts.push(toast); - Command::none() + Task::none() } Message::CloseToast(index) => { self.toasts.remove(index); - Command::none() + Task::none() } Message::CancelAddFederation => { self.clear_add_federation_state(); self.active_route = Route::Mints(routes::MintSubroute::List); - Command::none() + Task::none() } // Async commands we fire from the UI to core - Message::Noop => Command::none(), + Message::Noop => Task::none(), Message::Send(invoice_str) => match self.send_status { - SendStatus::Sending => Command::none(), + SendStatus::Sending => Task::none(), _ => { self.send_failure_reason = None; let id = Uuid::new_v4(); self.current_send_id = Some(id); if let Ok(invoice) = Bolt11Invoice::from_str(&invoice_str) { - Command::perform( + Task::perform( Self::async_send_lightning(self.ui_handle.clone(), id, invoice), |_| Message::Noop, ) @@ -400,43 +401,43 @@ impl HarborWallet { // TODO: error handling Some(self.send_amount_input_str.parse::().unwrap()) }; - Command::perform( + Task::perform( Self::async_send_onchain(self.ui_handle.clone(), id, address, amount), |_| Message::Noop, ) } else { error!("Invalid invoice or address"); self.current_send_id = None; - Command::none() + Task::none() } } }, Message::GenerateInvoice => match self.receive_status { - ReceiveStatus::Generating => Command::none(), + ReceiveStatus::Generating => Task::none(), _ => { let id = Uuid::new_v4(); self.current_receive_id = Some(id); self.receive_failure_reason = None; match self.receive_amount_str.parse::() { - Ok(amount) => Command::perform( + Ok(amount) => Task::perform( Self::async_receive(self.ui_handle.clone(), id, amount), |_| Message::Noop, ), Err(e) => { self.receive_amount_str = String::new(); eprintln!("Error parsing amount: {e}"); - Command::none() + Task::none() } } } }, Message::GenerateAddress => match self.receive_status { - ReceiveStatus::Generating => Command::none(), + ReceiveStatus::Generating => Task::none(), _ => { let id = Uuid::new_v4(); self.current_receive_id = Some(id); self.receive_failure_reason = None; - Command::perform( + Task::perform( Self::async_receive_onchain(self.ui_handle.clone(), id), |_| Message::Noop, ) @@ -450,7 +451,7 @@ impl HarborWallet { let id = Uuid::new_v4(); self.current_send_id = Some(id); - Command::perform( + Task::perform( Self::async_send_onchain(self.ui_handle.clone(), id, address, Some(amount)), |_| Message::Noop, ) @@ -458,26 +459,26 @@ impl HarborWallet { Err(e) => { self.receive_amount_str = String::new(); eprintln!("Error parsing amount: {e}"); - Command::none() + Task::none() } }, Message::Unlock(password) => match self.unlock_status { - UnlockStatus::Unlocking => Command::none(), + UnlockStatus::Unlocking => Task::none(), _ => { self.unlock_failure_reason = None; let id = Uuid::new_v4(); // todo use this id somewhere - Command::perform( + Task::perform( Self::async_unlock(self.ui_handle.clone(), id, password), |_| Message::Noop, ) } }, Message::Init(password) => match self.unlock_status { - UnlockStatus::Unlocking => Command::none(), + UnlockStatus::Unlocking => Task::none(), _ => { self.unlock_failure_reason = None; let id = Uuid::new_v4(); // todo use this id somewhere - Command::perform( + Task::perform( Self::async_init(self.ui_handle.clone(), id, password), |_| Message::Noop, ) @@ -487,13 +488,13 @@ impl HarborWallet { let invite = InviteCode::from_str(&invite_code); if let Ok(invite) = invite { let id = Uuid::new_v4(); // todo use this id somewhere - Command::perform( + Task::perform( Self::async_add_federation(self.ui_handle.clone(), id, invite), |_| Message::Noop, ) } else { self.add_federation_failure_reason = Some("Invalid invite code".to_string()); - Command::none() + Task::none() } } Message::PeekFederation(invite_code) => { @@ -501,18 +502,18 @@ impl HarborWallet { if let Ok(invite) = invite { self.add_federation_failure_reason = None; let id = Uuid::new_v4(); // todo use this id somewhere - Command::perform( + Task::perform( Self::async_peek_federation(self.ui_handle.clone(), id, invite), |_| Message::Noop, ) } else { self.peek_federation_failure_reason = Some("Invalid invite code".to_string()); - Command::none() + Task::none() } } - Message::CopyToClipboard(s) => Command::batch([ + Message::CopyToClipboard(s) => Task::batch([ clipboard::write(s), - Command::perform(async {}, |_| { + Task::perform(async {}, |_| { Message::AddToast(Toast { title: "Copied to clipboard".to_string(), body: "...".to_string(), @@ -523,13 +524,13 @@ impl HarborWallet { Message::ShowSeedWords(show) => { if show { let id = Uuid::new_v4(); // todo use this id somewhere - Command::perform( + Task::perform( Self::async_get_seed_words(self.ui_handle.clone(), id), |_| Message::Noop, ) } else { self.settings_show_seed_words = false; - Command::none() + Task::none() } } // Handle any messages we get from core @@ -538,7 +539,7 @@ impl HarborWallet { if self.current_send_id == msg.id { self.send_status = SendStatus::Sending; } - Command::none() + Task::none() } CoreUIMsg::SendSuccess(params) => { info!("Send success: {params:?}"); @@ -546,7 +547,7 @@ impl HarborWallet { self.send_success_msg = Some(params); self.current_send_id = None; } - Command::none() + Task::none() } CoreUIMsg::SendFailure(reason) => { if self.current_send_id == msg.id { @@ -554,7 +555,7 @@ impl HarborWallet { self.send_failure_reason = Some(reason); self.current_send_id = None; } - Command::none() + Task::none() } CoreUIMsg::ReceiveSuccess(params) => { info!("Receive success: {params:?}"); @@ -562,7 +563,7 @@ impl HarborWallet { self.receive_success_msg = Some(params); self.current_receive_id = None; } - Command::none() + Task::none() } CoreUIMsg::ReceiveFailed(reason) => { if self.current_receive_id == msg.id { @@ -570,19 +571,19 @@ impl HarborWallet { self.receive_failure_reason = Some(reason); self.current_receive_id = None; } - Command::none() + Task::none() } CoreUIMsg::BalanceUpdated(balance) => { self.balance_sats = balance.sats_round_down(); - Command::none() + Task::none() } CoreUIMsg::TransactionHistoryUpdated(history) => { self.transaction_history = history; - Command::none() + Task::none() } CoreUIMsg::ReceiveGenerating => { self.receive_status = ReceiveStatus::Generating; - Command::none() + Task::none() } CoreUIMsg::ReceiveInvoiceGenerated(invoice) => { self.receive_status = ReceiveStatus::WaitingToReceive; @@ -595,12 +596,12 @@ impl HarborWallet { .unwrap(), ); self.receive_invoice = Some(invoice); - Command::none() + Task::none() } CoreUIMsg::AddFederationFailed(reason) => { self.add_federation_failure_reason = Some(reason); self.peek_federation_item = None; - Command::none() + Task::none() } CoreUIMsg::FederationInfo(config) => { // todo update the UI with the new config @@ -635,17 +636,17 @@ impl HarborWallet { self.peek_federation_item = Some(item); - Command::none() + Task::none() } CoreUIMsg::AddFederationSuccess => { self.mint_invite_code_str = String::new(); self.active_route = Route::Mints(routes::MintSubroute::List); self.peek_federation_item = None; - Command::none() + Task::none() } CoreUIMsg::FederationListUpdated(list) => { self.federation_list = list; - Command::none() + Task::none() } CoreUIMsg::ReceiveAddressGenerated(address) => { self.receive_status = ReceiveStatus::WaitingToReceive; @@ -658,7 +659,7 @@ impl HarborWallet { .unwrap(), ); self.receive_address = Some(address); - Command::none() + Task::none() } CoreUIMsg::NeedsInit => { info!("Got init message"); @@ -667,17 +668,17 @@ impl HarborWallet { } CoreUIMsg::Initing => { self.init_status = WelcomeStatus::Initing; - Command::none() + Task::none() } CoreUIMsg::InitSuccess => { self.init_status = WelcomeStatus::Inited; self.active_route = Route::Home; - Command::none() + Task::none() } CoreUIMsg::InitFailed(reason) => { self.init_status = WelcomeStatus::NeedsInit; self.init_failure_reason = Some(reason); - Command::none() + Task::none() } CoreUIMsg::Locked => { info!("Got locked message"); @@ -687,22 +688,22 @@ impl HarborWallet { CoreUIMsg::Unlocking => { info!("Got unlocking message"); self.unlock_status = UnlockStatus::Unlocking; - Command::none() + Task::none() } CoreUIMsg::UnlockSuccess => { self.unlock_status = UnlockStatus::Unlocked; self.active_route = Route::Home; - Command::none() + Task::none() } CoreUIMsg::UnlockFailed(reason) => { self.unlock_status = UnlockStatus::Locked; self.unlock_failure_reason = Some(reason); - Command::none() + Task::none() } CoreUIMsg::SeedWords(words) => { self.seed_words = Some(words); self.settings_show_seed_words = true; - Command::none() + Task::none() } }, } diff --git a/src/routes/home.rs b/src/routes/home.rs index 9ac5047..2c40a55 100644 --- a/src/routes/home.rs +++ b/src/routes/home.rs @@ -20,7 +20,7 @@ pub fn home(harbor: &HarborWallet) -> Element { container(center( column![balance, buttons] .spacing(32) - .align_items(Alignment::Center) + .align_x(Alignment::Center) .max_width(512) )) .height(Length::Fill) diff --git a/src/routes/receive.rs b/src/routes/receive.rs index 5d41047..baf481e 100644 --- a/src/routes/receive.rs +++ b/src/routes/receive.rs @@ -152,7 +152,7 @@ pub fn receive(harbor: &HarborWallet) -> Element { text(txid_str_shortened).font(mono_font), mini_copy(txid_str) ] - .align_items(iced::Alignment::Center) + .align_y(iced::Alignment::Center) .spacing(8); column![header, txid, reset_button] diff --git a/src/routes/unlock.rs b/src/routes/unlock.rs index eac5361..8f6e6d7 100644 --- a/src/routes/unlock.rs +++ b/src/routes/unlock.rs @@ -38,7 +38,7 @@ pub fn unlock(harbor: &HarborWallet) -> Element { let page_column = column![harbor_logo(), password_input, unlock_button,] .spacing(32) - .align_items(Alignment::Center) + .align_x(Alignment::Center) .width(Length::Fixed(256.)); let page_column = page_column.push_maybe(harbor.unlock_failure_reason.as_ref().map(|r| { diff --git a/src/routes/welcome.rs b/src/routes/welcome.rs index 1ed79bf..49db48a 100644 --- a/src/routes/welcome.rs +++ b/src/routes/welcome.rs @@ -19,7 +19,7 @@ pub fn welcome(harbor: &HarborWallet) -> Element { column![harbor_logo(), welcome_message, spinner] .spacing(32) - .align_items(Alignment::Center) + .align_x(Alignment::Center) .width(Length::Fixed(350.)) } WelcomeStatus::NeedsInit => { @@ -52,7 +52,7 @@ pub fn welcome(harbor: &HarborWallet) -> Element { column![harbor_logo(), welcome_message, password_input, new_wallet] .spacing(32) - .align_items(Alignment::Center) + .align_x(Alignment::Center) .width(Length::Fixed(350.)) } };