aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@bunny.garden>2025-03-06 10:42:44 +0000
committerLibravatar cel 🌸 <cel@bunny.garden>2025-03-06 10:42:44 +0000
commit9bfb143c323b86d07f25c9aa22859f0223df79eb (patch)
treefedbb2f453d32a658aa2db6d5bf6db420eece03e
parentd0e122655926504cc2a29e7239cb88fddaed9c76 (diff)
downloadmacaw-9bfb143c323b86d07f25c9aa22859f0223df79eb.tar.gz
macaw-9bfb143c323b86d07f25c9aa22859f0223df79eb.tar.bz2
macaw-9bfb143c323b86d07f25c9aa22859f0223df79eb.zip
feat: message view
-rw-r--r--Cargo.lock778
-rw-r--r--Cargo.toml4
-rw-r--r--ideas.md2
-rw-r--r--src/main.rs291
-rw-r--r--src/message_view.rs169
5 files changed, 803 insertions, 441 deletions
diff --git a/Cargo.lock b/Cargo.lock
index bf79759..b485ded 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -35,17 +35,6 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
[[package]]
name = "ahash"
-version = "0.7.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9"
-dependencies = [
- "getrandom 0.2.15",
- "once_cell",
- "version_check",
-]
-
-[[package]]
-name = "ahash"
version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
@@ -91,6 +80,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04"
[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -128,11 +123,29 @@ checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"
[[package]]
name = "ash"
-version = "0.37.3+1.3.251"
+version = "0.38.0+1.3.281"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a"
+checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f"
dependencies = [
- "libloading 0.7.4",
+ "libloading",
+]
+
+[[package]]
+name = "ashpd"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e9c39d707614dbcc6bed00015539f488d8e3fe3e66ed60961efc0c90f4b380b3"
+dependencies = [
+ "async-fs",
+ "async-net",
+ "enumflags2",
+ "futures-channel",
+ "futures-util",
+ "rand",
+ "serde",
+ "serde_repr",
+ "url",
+ "zbus",
]
[[package]]
@@ -141,7 +154,7 @@ version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532"
dependencies = [
- "event-listener",
+ "event-listener 5.4.0",
"event-listener-strategy",
"futures-core",
"pin-project-lite",
@@ -149,6 +162,17 @@ dependencies = [
[[package]]
name = "async-channel"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35"
+dependencies = [
+ "concurrent-queue",
+ "event-listener 2.5.3",
+ "futures-core",
+]
+
+[[package]]
+name = "async-channel"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a"
@@ -184,6 +208,21 @@ dependencies = [
]
[[package]]
+name = "async-global-executor"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c"
+dependencies = [
+ "async-channel 2.3.1",
+ "async-executor",
+ "async-io",
+ "async-lock",
+ "blocking",
+ "futures-lite",
+ "once_cell",
+]
+
+[[package]]
name = "async-io"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -208,25 +247,36 @@ version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18"
dependencies = [
- "event-listener",
+ "event-listener 5.4.0",
"event-listener-strategy",
"pin-project-lite",
]
[[package]]
+name = "async-net"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7"
+dependencies = [
+ "async-io",
+ "blocking",
+ "futures-lite",
+]
+
+[[package]]
name = "async-process"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb"
dependencies = [
- "async-channel",
+ "async-channel 2.3.1",
"async-io",
"async-lock",
"async-signal",
"async-task",
"blocking",
"cfg-if",
- "event-listener",
+ "event-listener 5.4.0",
"futures-lite",
"rustix",
"tracing",
@@ -262,6 +312,32 @@ dependencies = [
]
[[package]]
+name = "async-std"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615"
+dependencies = [
+ "async-channel 1.9.0",
+ "async-global-executor",
+ "async-io",
+ "async-lock",
+ "crossbeam-utils",
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-lite",
+ "gloo-timers",
+ "kv-log-macro",
+ "log",
+ "memchr",
+ "once_cell",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+ "wasm-bindgen-futures",
+]
+
+[[package]]
name = "async-task"
version = "4.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -328,18 +404,18 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
[[package]]
name = "bit-set"
-version = "0.5.3"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
dependencies = [
"bit-vec",
]
[[package]]
name = "bit-vec"
-version = "0.6.3"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
[[package]]
name = "bitflags"
@@ -386,7 +462,7 @@ version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea"
dependencies = [
- "async-channel",
+ "async-channel 2.3.1",
"async-task",
"futures-io",
"futures-lite",
@@ -499,6 +575,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
+name = "chrono"
+version = "0.4.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "wasm-bindgen",
+ "windows-link",
+]
+
+[[package]]
+name = "chrono-humanize"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b"
+dependencies = [
+ "chrono",
+]
+
+[[package]]
name = "circular"
version = "0.3.0"
dependencies = [
@@ -555,37 +654,6 @@ dependencies = [
]
[[package]]
-name = "com"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6"
-dependencies = [
- "com_macros",
-]
-
-[[package]]
-name = "com_macros"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5"
-dependencies = [
- "com_macros_support",
- "proc-macro2",
- "syn 1.0.109",
-]
-
-[[package]]
-name = "com_macros_support"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.109",
-]
-
-[[package]]
name = "combine"
version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -824,30 +892,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991"
[[package]]
-name = "d3d12"
-version = "0.19.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307"
-dependencies = [
- "bitflags 2.8.0",
- "libloading 0.8.6",
- "winapi",
-]
-
-[[package]]
name = "dark-light"
-version = "1.1.1"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a76fa97167fa740dcdbfe18e8895601e1bc36525f09b044e00916e717c03a3c"
+checksum = "18e1a09f280e29a8b00bc7e81eca5ac87dca0575639c9422a5fa25a07bb884b8"
dependencies = [
- "dconf_rs",
- "detect-desktop-environment",
- "dirs 4.0.0",
- "objc",
- "rust-ini",
+ "ashpd",
+ "async-std",
+ "objc2",
+ "objc2-foundation",
"web-sys",
- "winreg 0.10.1",
- "zbus",
+ "winreg 0.52.0",
]
[[package]]
@@ -881,12 +936,6 @@ dependencies = [
]
[[package]]
-name = "dconf_rs"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7046468a81e6a002061c01e6a7c83139daf91b11c30e66795b13217c2d885c8b"
-
-[[package]]
name = "der"
version = "0.7.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -898,12 +947,6 @@ dependencies = [
]
[[package]]
-name = "detect-desktop-environment"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21d8ad60dd5b13a4ee6bd8fa2d5d88965c597c67bce32b5fc49c94f55cb50810"
-
-[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -926,15 +969,6 @@ dependencies = [
[[package]]
name = "dirs"
-version = "4.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
-dependencies = [
- "dirs-sys 0.3.7",
-]
-
-[[package]]
-name = "dirs"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"
@@ -944,17 +978,6 @@ dependencies = [
[[package]]
name = "dirs-sys"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
-dependencies = [
- "libc",
- "redox_users 0.4.6",
- "winapi",
-]
-
-[[package]]
-name = "dirs-sys"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
@@ -1000,14 +1023,17 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
dependencies = [
- "libloading 0.8.6",
+ "libloading",
]
[[package]]
-name = "dlv-list"
-version = "0.3.0"
+name = "document-features"
+version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257"
+checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d"
+dependencies = [
+ "litrs",
+]
[[package]]
name = "dotenvy"
@@ -1024,8 +1050,7 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
[[package]]
name = "dpi"
version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53"
+source = "git+https://github.com/iced-rs/winit.git?rev=11414b6aa45699f038114e61b4ddf5102b2d3b4b#11414b6aa45699f038114e61b4ddf5102b2d3b4b"
[[package]]
name = "drm"
@@ -1168,6 +1193,12 @@ dependencies = [
[[package]]
name = "event-listener"
+version = "2.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
+
+[[package]]
+name = "event-listener"
version = "5.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae"
@@ -1183,7 +1214,7 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2"
dependencies = [
- "event-listener",
+ "event-listener 5.4.0",
"pin-project-lite",
]
@@ -1369,7 +1400,7 @@ checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f"
dependencies = [
"futures-core",
"lock_api",
- "parking_lot 0.12.3",
+ "parking_lot",
]
[[package]]
@@ -1499,10 +1530,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3"
[[package]]
+name = "gloo-timers"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
name = "glow"
-version = "0.13.1"
+version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1"
+checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483"
dependencies = [
"js-sys",
"slotmap",
@@ -1512,14 +1555,26 @@ dependencies = [
[[package]]
name = "glutin_wgl_sys"
-version = "0.5.0"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead"
+checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e"
dependencies = [
"gl_generator",
]
[[package]]
+name = "glyphon"
+version = "0.5.0"
+source = "git+https://github.com/hecrj/glyphon.git?rev=09712a70df7431e9a3b1ac1bbd4fb634096cb3b4#09712a70df7431e9a3b1ac1bbd4fb634096cb3b4"
+dependencies = [
+ "cosmic-text",
+ "etagere",
+ "lru",
+ "rustc-hash 2.1.1",
+ "wgpu",
+]
+
+[[package]]
name = "gpu-alloc"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1540,33 +1595,32 @@ dependencies = [
[[package]]
name = "gpu-allocator"
-version = "0.25.0"
+version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884"
+checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd"
dependencies = [
"log",
"presser",
"thiserror 1.0.69",
- "winapi",
"windows",
]
[[package]]
name = "gpu-descriptor"
-version = "0.2.4"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c"
+checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca"
dependencies = [
"bitflags 2.8.0",
"gpu-descriptor-types",
- "hashbrown 0.14.5",
+ "hashbrown",
]
[[package]]
name = "gpu-descriptor-types"
-version = "0.1.2"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c"
+checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91"
dependencies = [
"bitflags 2.8.0",
]
@@ -1593,25 +1647,6 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.12.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
-dependencies = [
- "ahash 0.7.8",
-]
-
-[[package]]
-name = "hashbrown"
-version = "0.14.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
-dependencies = [
- "ahash 0.8.11",
- "allocator-api2",
-]
-
-[[package]]
-name = "hashbrown"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
@@ -1627,22 +1662,7 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1"
dependencies = [
- "hashbrown 0.15.2",
-]
-
-[[package]]
-name = "hassle-rs"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890"
-dependencies = [
- "bitflags 2.8.0",
- "com",
- "libc",
- "libloading 0.8.6",
- "thiserror 1.0.69",
- "widestring",
- "winapi",
+ "hashbrown",
]
[[package]]
@@ -1720,10 +1740,32 @@ dependencies = [
]
[[package]]
-name = "iced"
-version = "0.13.1"
+name = "iana-time-zone"
+version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88acfabc84ec077eaf9ede3457ffa3a104626d79022a9bf7f296093b1d60c73f"
+checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows-core 0.52.0",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "iced"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
dependencies = [
"iced_core",
"iced_futures",
@@ -1735,17 +1777,16 @@ dependencies = [
[[package]]
name = "iced_core"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0013a238275494641bf8f1732a23a808196540dc67b22ff97099c044ae4c8a1c"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
dependencies = [
"bitflags 2.8.0",
"bytes",
"dark-light",
"glam",
+ "lilt",
"log",
"num-traits",
- "once_cell",
"palette",
"rustc-hash 2.1.1",
"smol_str",
@@ -1755,9 +1796,8 @@ dependencies = [
[[package]]
name = "iced_futures"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c04a6745ba2e80f32cf01e034fd00d853aa4f4cd8b91888099cb7aaee0d5d7c"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
dependencies = [
"futures",
"iced_core",
@@ -1765,27 +1805,13 @@ dependencies = [
"rustc-hash 2.1.1",
"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.1.1",
- "wgpu",
+ "wasmtimer",
]
[[package]]
name = "iced_graphics"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba25a18cfa6d5cc160aca7e1b34f73ccdff21680fa8702168c09739767b6c66f"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
dependencies = [
"bitflags 2.8.0",
"bytemuck",
@@ -1794,7 +1820,6 @@ dependencies = [
"iced_core",
"iced_futures",
"log",
- "once_cell",
"raw-window-handle",
"rustc-hash 2.1.1",
"thiserror 1.0.69",
@@ -1803,9 +1828,8 @@ dependencies = [
[[package]]
name = "iced_renderer"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73558208059f9e622df2bf434e044ee2f838ce75201a023cf0ca3e1244f46c2a"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
dependencies = [
"iced_graphics",
"iced_tiny_skia",
@@ -1816,22 +1840,21 @@ dependencies = [
[[package]]
name = "iced_runtime"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "348b5b2c61c934d88ca3b0ed1ed913291e923d086a66fa288ce9669da9ef62b5"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
dependencies = [
"bytes",
"iced_core",
"iced_futures",
"raw-window-handle",
+ "sipper",
"thiserror 1.0.69",
]
[[package]]
name = "iced_tiny_skia"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c625d368284fcc43b0b36b176f76eff1abebe7959dd58bd8ce6897d641962a50"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
dependencies = [
"bytemuck",
"cosmic-text",
@@ -1845,19 +1868,17 @@ dependencies = [
[[package]]
name = "iced_wgpu"
-version = "0.13.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15708887133671d2bcc6c1d01d1f176f43a64d6cdc3b2bf893396c3ee498295f"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
dependencies = [
"bitflags 2.8.0",
"bytemuck",
"futures",
"glam",
+ "glyphon",
"guillotiere",
- "iced_glyphon",
"iced_graphics",
"log",
- "once_cell",
"rustc-hash 2.1.1",
"thiserror 1.0.69",
"wgpu",
@@ -1865,14 +1886,13 @@ dependencies = [
[[package]]
name = "iced_widget"
-version = "0.13.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81429e1b950b0e4bca65be4c4278fea6678ea782030a411778f26fa9f8983e1d"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
dependencies = [
"iced_renderer",
"iced_runtime",
+ "log",
"num-traits",
- "once_cell",
"rustc-hash 2.1.1",
"thiserror 1.0.69",
"unicode-segmentation",
@@ -1880,9 +1900,8 @@ dependencies = [
[[package]]
name = "iced_winit"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f44cd4e1c594b6334f409282937bf972ba14d31fedf03c23aa595d982a2fda28"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
dependencies = [
"iced_futures",
"iced_graphics",
@@ -1893,7 +1912,6 @@ dependencies = [
"tracing",
"wasm-bindgen-futures",
"web-sys",
- "winapi",
"window_clipboard",
"winit",
]
@@ -2055,16 +2073,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652"
dependencies = [
"equivalent",
- "hashbrown 0.15.2",
-]
-
-[[package]]
-name = "instant"
-version = "0.1.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
-dependencies = [
- "cfg-if",
+ "hashbrown",
]
[[package]]
@@ -2184,7 +2193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76"
dependencies = [
"libc",
- "libloading 0.8.6",
+ "libloading",
"pkg-config",
]
@@ -2205,6 +2214,15 @@ dependencies = [
]
[[package]]
+name = "kv-log-macro"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
+dependencies = [
+ "log",
+]
+
+[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2230,16 +2248,6 @@ dependencies = [
[[package]]
name = "libloading"
-version = "0.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
-dependencies = [
- "cfg-if",
- "winapi",
-]
-
-[[package]]
-name = "libloading"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
@@ -2277,6 +2285,15 @@ dependencies = [
]
[[package]]
+name = "lilt"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ab94c7e69044511f79ce4b4201a49324b7f5b35410f862264e044690b950a67"
+dependencies = [
+ "web-time",
+]
+
+[[package]]
name = "linked-hash-map"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2301,6 +2318,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
[[package]]
+name = "litrs"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5"
+
+[[package]]
name = "lock_api"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2315,6 +2338,9 @@ name = "log"
version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
+dependencies = [
+ "value-bag",
+]
[[package]]
name = "lru"
@@ -2335,6 +2361,7 @@ dependencies = [
name = "luz"
version = "0.1.0"
dependencies = [
+ "chrono",
"futures",
"jabber",
"jid",
@@ -2354,8 +2381,10 @@ dependencies = [
name = "macaw"
version = "0.1.0"
dependencies = [
+ "chrono",
+ "chrono-humanize",
"confy",
- "dirs 6.0.0",
+ "dirs",
"iced",
"indexmap",
"jid",
@@ -2428,9 +2457,9 @@ dependencies = [
[[package]]
name = "metal"
-version = "0.27.0"
+version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25"
+checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21"
dependencies = [
"bitflags 2.8.0",
"block",
@@ -2470,17 +2499,18 @@ dependencies = [
[[package]]
name = "naga"
-version = "0.19.2"
+version = "23.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50e3524642f53d9af419ab5e8dd29d3ba155708267667c2f3f06c88c9e130843"
+checksum = "364f94bc34f61332abebe8cad6f6cd82a5b65cff22c828d05d0968911462ca4f"
dependencies = [
+ "arrayvec",
"bit-set",
"bitflags 2.8.0",
+ "cfg_aliases 0.1.1",
"codespan-reporting",
"hexf-parse",
"indexmap",
"log",
- "num-traits",
"rustc-hash 1.1.0",
"spirv",
"termcolor",
@@ -2715,7 +2745,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
dependencies = [
"malloc_buf",
- "objc_exception",
]
[[package]]
@@ -2922,15 +2951,6 @@ dependencies = [
]
[[package]]
-name = "objc_exception"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4"
-dependencies = [
- "cc",
-]
-
-[[package]]
name = "object"
version = "0.36.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3005,16 +3025,6 @@ dependencies = [
]
[[package]]
-name = "ordered-multimap"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a"
-dependencies = [
- "dlv-list",
- "hashbrown 0.12.3",
-]
-
-[[package]]
name = "ordered-stream"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3071,37 +3081,12 @@ checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
[[package]]
name = "parking_lot"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
-dependencies = [
- "instant",
- "lock_api",
- "parking_lot_core 0.8.6",
-]
-
-[[package]]
-name = "parking_lot"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
dependencies = [
"lock_api",
- "parking_lot_core 0.9.10",
-]
-
-[[package]]
-name = "parking_lot_core"
-version = "0.8.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"
-dependencies = [
- "cfg-if",
- "instant",
- "libc",
- "redox_syscall 0.2.16",
- "smallvec",
- "winapi",
+ "parking_lot_core",
]
[[package]]
@@ -3444,15 +3429,6 @@ dependencies = [
[[package]]
name = "redox_syscall"
-version = "0.2.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
-dependencies = [
- "bitflags 1.3.2",
-]
-
-[[package]]
-name = "redox_syscall"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
@@ -3552,16 +3528,6 @@ dependencies = [
]
[[package]]
-name = "rust-ini"
-version = "0.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df"
-dependencies = [
- "cfg-if",
- "ordered-multimap",
-]
-
-[[package]]
name = "rustc-demangle"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3839,6 +3805,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
[[package]]
+name = "sipper"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bccb4192828b3d9a08e0b5a73f17795080dfb278b50190216e3ae2132cf4f95"
+dependencies = [
+ "futures",
+ "pin-project-lite",
+]
+
+[[package]]
name = "skrifa"
version = "0.22.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4010,15 +3986,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a007b6936676aa9ab40207cde35daab0a04b823be8ae004368c0793b96a61e0"
dependencies = [
"bytes",
+ "chrono",
"crc",
"crossbeam-queue",
"either",
- "event-listener",
+ "event-listener 5.4.0",
"futures-core",
"futures-intrusive",
"futures-io",
"futures-util",
- "hashbrown 0.15.2",
+ "hashbrown",
"hashlink",
"indexmap",
"log",
@@ -4087,6 +4064,7 @@ dependencies = [
"bitflags 2.8.0",
"byteorder",
"bytes",
+ "chrono",
"crc",
"digest",
"dotenvy",
@@ -4129,6 +4107,7 @@ dependencies = [
"base64",
"bitflags 2.8.0",
"byteorder",
+ "chrono",
"crc",
"dotenvy",
"etcetera",
@@ -4164,6 +4143,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f85ca71d3a5b24e64e1d08dd8fe36c6c95c339a896cc33068148906784620540"
dependencies = [
"atoi",
+ "chrono",
"flume",
"futures-channel",
"futures-core",
@@ -4397,7 +4377,7 @@ checksum = "0324504befd01cab6e0c994f34b2ffa257849ee019d3fb3b64fb2c858887d89e"
dependencies = [
"as-raw-xcb-connection",
"ctor-lite",
- "libloading 0.8.6",
+ "libloading",
"pkg-config",
"tracing",
]
@@ -4437,7 +4417,7 @@ dependencies = [
"bytes",
"libc",
"mio",
- "parking_lot 0.12.3",
+ "parking_lot",
"pin-project-lite",
"signal-hook-registry",
"socket2",
@@ -4618,7 +4598,7 @@ dependencies = [
"ipconfig",
"lazy_static",
"lru-cache",
- "parking_lot 0.12.3",
+ "parking_lot",
"resolv-conf",
"smallvec",
"thiserror 1.0.69",
@@ -4746,6 +4726,7 @@ dependencies = [
"form_urlencoded",
"idna 1.0.3",
"percent-encoding",
+ "serde",
]
[[package]]
@@ -4776,6 +4757,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
[[package]]
+name = "value-bag"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2"
+
+[[package]]
name = "vcpkg"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4890,18 +4877,17 @@ dependencies = [
]
[[package]]
-name = "wasm-timer"
-version = "0.2.5"
+name = "wasmtimer"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
+checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23"
dependencies = [
"futures",
"js-sys",
- "parking_lot 0.11.2",
+ "parking_lot",
"pin-utils",
+ "slab",
"wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
]
[[package]]
@@ -5035,17 +5021,17 @@ dependencies = [
[[package]]
name = "wgpu"
-version = "0.19.4"
+version = "23.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbd7311dbd2abcfebaabf1841a2824ed7c8be443a0f29166e5d3c6a53a762c01"
+checksum = "80f70000db37c469ea9d67defdc13024ddf9a5f1b89cb2941b812ad7cde1735a"
dependencies = [
"arrayvec",
- "cfg-if",
"cfg_aliases 0.1.1",
+ "document-features",
"js-sys",
"log",
"naga",
- "parking_lot 0.12.3",
+ "parking_lot",
"profiling",
"raw-window-handle",
"smallvec",
@@ -5060,35 +5046,34 @@ dependencies = [
[[package]]
name = "wgpu-core"
-version = "0.19.4"
+version = "23.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28b94525fc99ba9e5c9a9e24764f2bc29bad0911a7446c12f446a8277369bf3a"
+checksum = "d63c3c478de8e7e01786479919c8769f62a22eec16788d8c2ac77ce2c132778a"
dependencies = [
"arrayvec",
"bit-vec",
"bitflags 2.8.0",
"cfg_aliases 0.1.1",
- "codespan-reporting",
+ "document-features",
"indexmap",
"log",
"naga",
"once_cell",
- "parking_lot 0.12.3",
+ "parking_lot",
"profiling",
"raw-window-handle",
"rustc-hash 1.1.0",
"smallvec",
"thiserror 1.0.69",
- "web-sys",
"wgpu-hal",
"wgpu-types",
]
[[package]]
name = "wgpu-hal"
-version = "0.19.5"
+version = "23.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfabcfc55fd86611a855816326b2d54c3b2fd7972c27ce414291562650552703"
+checksum = "89364b8a0b211adc7b16aeaf1bd5ad4a919c1154b44c9ce27838213ba05fd821"
dependencies = [
"android_system_properties",
"arrayvec",
@@ -5096,26 +5081,25 @@ dependencies = [
"bit-set",
"bitflags 2.8.0",
"block",
+ "bytemuck",
"cfg_aliases 0.1.1",
"core-graphics-types 0.1.3",
- "d3d12",
"glow",
"glutin_wgl_sys",
"gpu-alloc",
"gpu-allocator",
"gpu-descriptor",
- "hassle-rs",
"js-sys",
"khronos-egl",
"libc",
- "libloading 0.8.6",
+ "libloading",
"log",
"metal",
"naga",
"ndk-sys 0.5.0+25.2.9519653",
"objc",
"once_cell",
- "parking_lot 0.12.3",
+ "parking_lot",
"profiling",
"range-alloc",
"raw-window-handle",
@@ -5126,14 +5110,15 @@ dependencies = [
"wasm-bindgen",
"web-sys",
"wgpu-types",
- "winapi",
+ "windows",
+ "windows-core 0.58.0",
]
[[package]]
name = "wgpu-types"
-version = "0.19.2"
+version = "23.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b671ff9fb03f78b46ff176494ee1ebe7d603393f42664be55b64dc8d53969805"
+checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068"
dependencies = [
"bitflags 2.8.0",
"js-sys",
@@ -5203,11 +5188,11 @@ dependencies = [
[[package]]
name = "windows"
-version = "0.52.0"
+version = "0.58.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
+checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
dependencies = [
- "windows-core",
+ "windows-core 0.58.0",
"windows-targets 0.52.6",
]
@@ -5221,6 +5206,66 @@ dependencies = [
]
[[package]]
+name = "windows-core"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-result",
+ "windows-strings",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.98",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.98",
+]
+
+[[package]]
+name = "windows-link"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3"
+
+[[package]]
+name = "windows-result"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
+dependencies = [
+ "windows-result",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
name = "windows-sys"
version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5436,11 +5481,10 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winit"
-version = "0.30.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a809eacf18c8eca8b6635091543f02a5a06ddf3dad846398795460e6e0ae3cc0"
+version = "0.30.8"
+source = "git+https://github.com/iced-rs/winit.git?rev=11414b6aa45699f038114e61b4ddf5102b2d3b4b#11414b6aa45699f038114e61b4ddf5102b2d3b4b"
dependencies = [
- "ahash 0.8.11",
+ "ahash",
"android-activity",
"atomic-waker",
"bitflags 2.8.0",
@@ -5497,18 +5541,19 @@ dependencies = [
[[package]]
name = "winreg"
-version = "0.10.1"
+version = "0.50.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
+checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
dependencies = [
- "winapi",
+ "cfg-if",
+ "windows-sys 0.48.0",
]
[[package]]
name = "winreg"
-version = "0.50.0"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
+checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5"
dependencies = [
"cfg-if",
"windows-sys 0.48.0",
@@ -5555,7 +5600,7 @@ dependencies = [
"as-raw-xcb-connection",
"gethostname",
"libc",
- "libloading 0.8.6",
+ "libloading",
"once_cell",
"rustix",
"x11rb-protocol",
@@ -5640,9 +5685,9 @@ dependencies = [
[[package]]
name = "zbus"
-version = "4.4.0"
+version = "5.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725"
+checksum = "59c333f648ea1b647bc95dc1d34807c8e25ed7a6feff3394034dc4776054b236"
dependencies = [
"async-broadcast",
"async-executor",
@@ -5655,21 +5700,19 @@ dependencies = [
"async-trait",
"blocking",
"enumflags2",
- "event-listener",
+ "event-listener 5.4.0",
"futures-core",
- "futures-sink",
- "futures-util",
+ "futures-lite",
"hex",
"nix",
"ordered-stream",
- "rand",
"serde",
"serde_repr",
- "sha1",
"static_assertions",
"tracing",
"uds_windows",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
+ "winnow",
"xdg-home",
"zbus_macros",
"zbus_names",
@@ -5678,25 +5721,28 @@ dependencies = [
[[package]]
name = "zbus_macros"
-version = "4.4.0"
+version = "5.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e"
+checksum = "f325ad10eb0d0a3eb060203494c3b7ec3162a01a59db75d2deee100339709fc0"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn 2.0.98",
+ "zbus_names",
+ "zvariant",
"zvariant_utils",
]
[[package]]
name = "zbus_names"
-version = "3.0.0"
+version = "4.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c"
+checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97"
dependencies = [
"serde",
"static_assertions",
+ "winnow",
"zvariant",
]
@@ -5778,22 +5824,25 @@ dependencies = [
[[package]]
name = "zvariant"
-version = "4.2.0"
+version = "5.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe"
+checksum = "b2df9ee044893fcffbdc25de30546edef3e32341466811ca18421e3cd6c5a3ac"
dependencies = [
"endi",
"enumflags2",
"serde",
"static_assertions",
+ "url",
+ "winnow",
"zvariant_derive",
+ "zvariant_utils",
]
[[package]]
name = "zvariant_derive"
-version = "4.2.0"
+version = "5.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449"
+checksum = "74170caa85b8b84cc4935f2d56a57c7a15ea6185ccdd7eadb57e6edd90f94b2f"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -5804,11 +5853,14 @@ dependencies = [
[[package]]
name = "zvariant_utils"
-version = "2.1.0"
+version = "3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340"
+checksum = "e16edfee43e5d7b553b77872d99bc36afdda75c223ca7ad5e3fbecd82ca5fc34"
dependencies = [
"proc-macro2",
"quote",
+ "serde",
+ "static_assertions",
"syn 2.0.98",
+ "winnow",
]
diff --git a/Cargo.toml b/Cargo.toml
index 50bbf16..b66da70 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
-iced = { version = "0.13.1", features = ["tokio"] }
+iced = { git = "https://github.com/iced-rs/iced", features = ["tokio"] }
luz = { version = "0.1.0", path = "../luz/luz" }
jid = { version = "0.1.0", path = "../luz/jid" }
tokio = "1.43.0"
@@ -19,3 +19,5 @@ serde = { version = "1.0.218", features = ["derive"] }
thiserror = "2.0.11"
toml = "0.8"
dirs = "6.0.0"
+chrono-humanize = "0.2.3"
+chrono = "0.4.40"
diff --git a/ideas.md b/ideas.md
index 4c176d5..a351cf4 100644
--- a/ideas.md
+++ b/ideas.md
@@ -5,6 +5,8 @@
- the default is omemo 2, but can also choose worse omemo for contacts who do not use the client
- intention to either implement mls or omemo post quantum for later
- moving of xmpp accounts, download of account data from server
+- threads in different windows, threads menu, select thread separately under person in chat list
+ - configure if threaded messages come under the main chat or not
- proper oauth
- guilds
- voice channels
diff --git a/src/main.rs b/src/main.rs
index 27314ae..ed6ce1b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -7,6 +7,10 @@ use std::str::FromStr;
use std::sync::Arc;
use iced::futures::{SinkExt, Stream, StreamExt};
+use iced::theme::palette::{
+ Background, Danger, Extended, Pair, Primary, Secondary, Success, Warning,
+};
+use iced::theme::{Custom, Palette};
use iced::widget::button::Status;
use iced::widget::text::{Fragment, IntoFragment};
use iced::widget::{
@@ -14,15 +18,17 @@ use iced::widget::{
text_input, Column, Text, Toggler,
};
use iced::Length::Fill;
-use iced::{stream, Color, Element, Subscription, Task, Theme};
+use iced::{color, stream, Color, Element, Subscription, Task, Theme};
use indexmap::{indexmap, IndexMap};
use jid::JID;
use keyring::Entry;
use login_modal::{Creds, LoginModal};
use luz::chat::{Chat, Message as ChatMessage};
+use luz::error::CommandError;
use luz::presence::{Offline, Presence};
use luz::CommandMessage;
use luz::{roster::Contact, user::User, LuzHandle, UpdateMessage};
+use message_view::MessageView;
use serde::{Deserialize, Serialize};
use thiserror::Error;
use tokio::sync::{mpsc, oneshot};
@@ -31,6 +37,7 @@ use tracing::{error, info};
use uuid::Uuid;
mod login_modal;
+mod message_view;
#[derive(Serialize, Deserialize, Clone)]
pub struct Config {
@@ -55,17 +62,12 @@ pub struct Macaw {
roster: HashMap<JID, Contact>,
users: HashMap<JID, User>,
presences: HashMap<JID, Presence>,
- chats: IndexMap<JID, (Chat, IndexMap<Uuid, ChatMessage>)>,
+ chats: IndexMap<JID, (Chat, ChatMessage)>,
subscription_requests: HashSet<JID>,
- open_chat: Option<OpenChat>,
+ open_chat: Option<MessageView>,
new_chat: Option<NewChat>,
}
-pub struct OpenChat {
- jid: JID,
- new_message: String,
-}
-
pub struct NewChat;
impl Macaw {
@@ -157,7 +159,7 @@ async fn luz(jid: &JID, creds: &Creds, cfg: &Config) -> (LuzHandle, mpsc::Receiv
async fn main() -> iced::Result {
tracing_subscriber::fmt::init();
- let cfg: Config = confy::load("macaw", None).unwrap();
+ let cfg: Config = confy::load("macaw", None).unwrap_or_default();
let entry = Entry::new("macaw", "macaw");
let mut client_creation_error: Option<Error> = None;
let mut creds: Option<Creds> = None;
@@ -213,21 +215,23 @@ async fn main() -> iced::Result {
let luz_handle2 = luz_handle.clone();
if cfg.auto_connect {
Task::batch([
- Task::perform(async move { luz_handle1.get_roster().await }, |result| {
- let roster = result.unwrap();
- let mut macaw_roster = HashMap::new();
- for contact in roster {
- macaw_roster.insert(contact.user_jid.clone(), contact);
- }
- Message::Roster(macaw_roster)
- }),
- Task::perform(async move { luz_handle2.get_chats().await }, |chats| {
- let chats = chats.unwrap();
- info!("got chats: {:?}", chats);
- Message::GotChats(chats)
- }),
+ Task::batch([
+ Task::perform(async move { luz_handle1.get_roster().await }, |result| {
+ let roster = result.unwrap();
+ let mut macaw_roster = HashMap::new();
+ for contact in roster {
+ macaw_roster.insert(contact.user_jid.clone(), contact);
+ }
+ Message::Roster(macaw_roster)
+ }),
+ Task::perform(async move { luz_handle2.get_chats().await }, |chats| {
+ let chats = chats.unwrap();
+ info!("got chats: {:?}", chats);
+ Message::GotChats(chats)
+ }),
+ ])
+ .chain(Task::done(Message::Connect)),
Task::stream(stream),
- Task::done(Message::Connect),
])
} else {
Task::batch([
@@ -248,20 +252,22 @@ async fn main() -> iced::Result {
])
}
};
- iced::application("Macaw", Macaw::update, Macaw::view).run_with(|| {
- (
- Macaw::new(
- Some(Client {
- client: luz_handle,
- // TODO:
- jid,
- connection_status: Presence::Offline(Offline::default()),
- }),
- cfg,
- ),
- task,
- )
- })
+ iced::application("Macaw", Macaw::update, Macaw::view)
+ .theme(Macaw::theme)
+ .run_with(|| {
+ (
+ Macaw::new(
+ Some(Client {
+ client: luz_handle,
+ // TODO:
+ jid,
+ connection_status: Presence::Offline(Offline::default()),
+ }),
+ cfg,
+ ),
+ task,
+ )
+ })
} else {
if let Some(e) = client_creation_error {
iced::application("Macaw", Macaw::update, Macaw::view)
@@ -288,6 +294,7 @@ pub enum Message {
MessageCompose(String),
SendMessage(JID, String),
Error(Error),
+ MessageView(message_view::Message),
}
#[derive(Debug, Error, Clone)]
@@ -298,6 +305,8 @@ pub enum Error {
CredentialsSave(CredentialsSaveError),
#[error("failed to load credentials: {0}")]
CredentialsLoad(CredentialsLoadError),
+ #[error("failed to retreive messages for chat {0}")]
+ MessageHistory(JID, CommandError<luz::error::DatabaseError>),
}
#[derive(Debug, Error, Clone)]
@@ -381,14 +390,22 @@ impl Macaw {
Task::none()
}
UpdateMessage::Message { to, message } => {
- if let Some((_chat, message_history)) = self.chats.get_mut(&to) {
- message_history.insert(message.id, message);
+ if let Some((chat_jid, (chat, old_message))) =
+ self.chats.shift_remove_entry(&to)
+ {
+ self.chats
+ .insert_before(0, chat_jid, (chat, message.clone()));
+ if let Some(open_chat) = &mut self.open_chat {
+ if open_chat.jid == to {
+ open_chat.update(message_view::Message::Message(message));
+ }
+ }
} else {
let chat = Chat {
correspondent: to.clone(),
};
- let message_history = indexmap! {message.id => message};
- self.chats.insert(to, (chat, message_history));
+ let message_history = indexmap! {message.id => message.clone()};
+ self.chats.insert_before(0, to, (chat, message));
}
Task::none()
}
@@ -421,8 +438,8 @@ impl Macaw {
info!("got chats: {:?}", chats);
Message::GotChats(chats)
}),
- Task::done(Message::Connect),
])
+ .chain(Task::done(Message::Connect))
} else {
Task::batch([
Task::perform(async move { client1.client.get_roster().await }, |result| {
@@ -472,11 +489,23 @@ impl Macaw {
Account::LoggedOut(login_modal) => Task::none(),
},
Message::OpenChat(jid) => {
- self.open_chat = Some(OpenChat {
- jid,
- new_message: String::new(),
- });
- Task::none()
+ self.open_chat = Some(MessageView::new(jid.clone()));
+ let jid1 = jid.clone();
+ match &self.client {
+ Account::LoggedIn(client) => {
+ let client = client.clone();
+ Task::perform(
+ async move { client.get_messages(jid1).await },
+ move |result| match result {
+ Ok(h) => {
+ Message::MessageView(message_view::Message::MessageHistory(h))
+ }
+ Err(e) => Message::Error(Error::MessageHistory(jid.clone(), e)),
+ },
+ )
+ }
+ Account::LoggedOut(login_modal) => Task::none(),
+ }
}
Message::LoginModal(login_modal_message) => match &mut self.client {
Account::LoggedIn(_client) => Task::none(),
@@ -567,6 +596,7 @@ impl Macaw {
let client = client.clone();
let correspondent = chat.correspondent.clone();
tasks.push(Task::perform(
+ // TODO: don't get the entire message history LOL
async move { (chat, client.get_messages(correspondent).await) },
|result| {
let messages: IndexMap<Uuid, ChatMessage> = result
@@ -591,9 +621,12 @@ impl Macaw {
// Task::batch(tasks)
// }),
}
- Message::GotMessageHistory(chat, message_history) => {
- self.chats
- .insert(chat.correspondent.clone(), (chat, message_history));
+ Message::GotMessageHistory(chat, mut message_history) => {
+ // TODO: don't get the entire message history LOL
+ if let Some((_id, message)) = message_history.pop() {
+ self.chats
+ .insert(chat.correspondent.clone(), (chat, message));
+ }
Task::none()
}
Message::CloseChat(jid) => {
@@ -619,7 +652,23 @@ impl Macaw {
)
.discard()
}
- Message::Error(error) => todo!("error notification toasts, logging?"),
+ Message::Error(error) => {
+ error!("{}", error);
+ Task::none()
+ }
+ Message::MessageView(message) => {
+ if let Some(message_view) = &mut self.open_chat {
+ let action = message_view.update(message);
+ match action {
+ message_view::Action::None => Task::none(),
+ message_view::Action::SendMessage(m) => {
+ Task::done(Message::SendMessage(message_view.jid.clone(), m))
+ }
+ }
+ } else {
+ Task::none()
+ }
+ }
}
}
@@ -670,34 +719,12 @@ impl Macaw {
let message_view;
if let Some(open_chat) = &self.open_chat {
- let (chat, messages) = self.chats.get(&open_chat.jid).unwrap();
- let mut messages_view = column![];
- for (_id, message) in messages {
- let from: Cow<'_, str> = (&message.from).into();
- let message: Column<Message> =
- column![text(from).size(12), text(&message.body.body)].into();
- messages_view = messages_view.push(message);
- }
- let message_send_input = row![
- text_input("new message", &open_chat.new_message)
- .on_input(Message::MessageCompose),
- button("send").on_press(Message::SendMessage(
- chat.correspondent.clone(),
- open_chat.new_message.clone()
- ))
- ];
- message_view = column![
- scrollable(messages_view)
- .height(Fill)
- .width(Fill)
- .anchor_bottom(),
- message_send_input
- ];
+ message_view = open_chat.view().map(Message::MessageView)
} else {
- message_view = column![];
+ message_view = column![].into();
}
- row![sidebar, message_view.width(Fill)]
+ row![sidebar, container(message_view).width(Fill)]
// old
@@ -731,7 +758,117 @@ impl Macaw {
}
fn theme(&self) -> Theme {
- Theme::Dark
+ let extended = Extended {
+ background: Background {
+ base: Pair {
+ color: color!(0x392c25),
+ text: color!(0xdcdcdc),
+ },
+ weakest: Pair {
+ color: color!(0xdcdcdc),
+ text: color!(0x392c25),
+ },
+ weak: Pair {
+ color: color!(0xdcdcdc),
+ text: color!(0x392c25),
+ },
+ strong: Pair {
+ color: color!(0x364b3b),
+ text: color!(0xdcdcdc),
+ },
+ strongest: Pair {
+ color: color!(0x364b3b),
+ text: color!(0xdcdcdc),
+ },
+ },
+ primary: Primary {
+ base: Pair {
+ color: color!(0x2b33b4),
+ text: color!(0xdcdcdc),
+ },
+ weak: Pair {
+ color: color!(0x4D4A5E),
+ text: color!(0xdcdcdc),
+ },
+ strong: Pair {
+ color: color!(0x2b33b4),
+ text: color!(0xdcdcdc),
+ },
+ },
+ secondary: Secondary {
+ base: Pair {
+ color: color!(0xffce07),
+ text: color!(0x000000),
+ },
+ weak: Pair {
+ color: color!(0xffce07),
+ text: color!(0x000000),
+ },
+ strong: Pair {
+ color: color!(0xffce07),
+ text: color!(0x000000),
+ },
+ },
+ success: Success {
+ base: Pair {
+ color: color!(0x14802E),
+ text: color!(0xdcdcdc),
+ },
+ weak: Pair {
+ color: color!(0x14802E),
+ text: color!(0xdcdcdc),
+ },
+ strong: Pair {
+ color: color!(0x14802E),
+ text: color!(0xdcdcdc),
+ },
+ },
+ warning: Warning {
+ base: Pair {
+ color: color!(0xFF9D00),
+ text: color!(0x000000),
+ },
+ weak: Pair {
+ color: color!(0xFF9D00),
+ text: color!(0x000000),
+ },
+ strong: Pair {
+ color: color!(0xFF9D00),
+ text: color!(0x000000),
+ },
+ },
+ danger: Danger {
+ base: Pair {
+ color: color!(0xC1173C),
+ text: color!(0xdcdcdc),
+ },
+ weak: Pair {
+ color: color!(0xC1173C),
+ text: color!(0xdcdcdc),
+ },
+ strong: Pair {
+ color: color!(0xC1173C),
+ text: color!(0xdcdcdc),
+ },
+ },
+ is_dark: true,
+ };
+ Theme::Custom(Arc::new(Custom::with_fn(
+ "macaw".to_string(),
+ Palette::DARK,
+ |_| extended,
+ )))
+ // Theme::Custom(Arc::new(Custom::new(
+ // "macaw".to_string(),
+ // Palette {
+ // background: color!(0x392c25),
+ // text: color!(0xdcdcdc),
+ // primary: color!(0x2b33b4),
+ // success: color!(0x14802e),
+ // warning: color!(0xffce07),
+ // danger: color!(0xc1173c),
+ // },
+ // )))
}
}
diff --git a/src/message_view.rs b/src/message_view.rs
new file mode 100644
index 0000000..4709dd6
--- /dev/null
+++ b/src/message_view.rs
@@ -0,0 +1,169 @@
+use std::borrow::Cow;
+
+use chrono::NaiveDate;
+use iced::{
+ alignment::Horizontal::{self, Right},
+ border::Radius,
+ color,
+ theme::Palette,
+ widget::{button, column, container, row, scrollable, text, text_input, Column},
+ Border, Color, Element,
+ Length::{Fill, Shrink},
+ Theme,
+};
+use indexmap::IndexMap;
+use jid::JID;
+use luz::chat::Message as ChatMessage;
+use uuid::Uuid;
+
+pub struct MessageView {
+ pub jid: JID,
+ pub message_history: IndexMap<Uuid, ChatMessage>,
+ pub new_message: String,
+}
+
+#[derive(Debug, Clone)]
+pub enum Message {
+ MessageHistory(Vec<ChatMessage>),
+ Message(ChatMessage),
+ MessageCompose(String),
+ SendMessage(String),
+}
+
+pub enum Action {
+ None,
+ SendMessage(String),
+}
+
+impl MessageView {
+ pub fn new(jid: JID) -> Self {
+ Self {
+ jid,
+ // TODO: save position in message history
+ message_history: IndexMap::new(),
+ // TODO: save draft (as part of chat struct?)
+ new_message: String::new(),
+ }
+ }
+ pub fn update(&mut self, message: Message) -> Action {
+ match message {
+ Message::MessageHistory(messages) => {
+ if self.message_history.is_empty() {
+ self.message_history = messages
+ .into_iter()
+ .map(|message| (message.id.clone(), message))
+ .collect();
+ }
+ Action::None
+ }
+ Message::Message(message) => {
+ let i = self
+ .message_history
+ .iter()
+ .position(|(_id, m)| m.timestamp > message.timestamp);
+ if let Some(i) = i {
+ self.message_history.insert_before(i, message.id, message);
+ } else {
+ self.message_history.insert(message.id, message);
+ }
+ Action::None
+ }
+ Message::MessageCompose(s) => {
+ self.new_message = s;
+ Action::None
+ }
+ Message::SendMessage(m) => {
+ self.new_message = String::new();
+ Action::SendMessage(m)
+ }
+ }
+ }
+ pub fn view(&self) -> Element<Message> {
+ let mut messages_view = column![].spacing(8);
+ let mut latest_date = NaiveDate::MIN;
+ for (_id, message) in &self.message_history {
+ let message_date = message.timestamp.naive_local().date();
+ if message_date > latest_date {
+ latest_date = message_date;
+ messages_view = messages_view.push(date(latest_date));
+ }
+ messages_view = messages_view.push(self.message(message));
+ }
+ let message_send_input = row![
+ text_input("new message", &self.new_message).on_input(Message::MessageCompose),
+ button("send").on_press(Message::SendMessage(self.new_message.clone()))
+ ];
+ column![
+ scrollable(messages_view)
+ .height(Fill)
+ .width(Fill)
+ .spacing(1)
+ .anchor_bottom(),
+ message_send_input
+ ]
+ .into()
+ }
+
+ pub fn message<'a>(&'a self, message: &'a ChatMessage) -> Element<'a, Message> {
+ let timestamp = message.timestamp.naive_local();
+ let timestamp = timestamp.time().format("%H:%M").to_string();
+
+ if self.jid == message.from.as_bare() {
+ container(
+ container(
+ column![
+ text(message.body.body.as_str()),
+ container(text(timestamp).wrapping(text::Wrapping::None).size(12))
+ .align_right(Fill)
+ ]
+ .width(Shrink)
+ .max_width(500),
+ )
+ .padding(16)
+ .style(|theme: &Theme| {
+ let palette = theme.extended_palette();
+ container::Style::default()
+ .background(palette.primary.weak.color)
+ .border(Border {
+ color: Color::BLACK,
+ width: 4.,
+ radius: Radius::new(16),
+ })
+ }),
+ )
+ .align_left(Fill)
+ .into()
+ } else {
+ let element: Element<Message> = container(
+ container(
+ column![
+ text(message.body.body.as_str()),
+ container(text(timestamp).wrapping(text::Wrapping::None).size(12))
+ .align_right(Fill)
+ ]
+ .width(Shrink)
+ .max_width(500),
+ )
+ .padding(16)
+ .style(|theme: &Theme| {
+ let palette = theme.extended_palette();
+ container::Style::default()
+ .background(palette.primary.base.color)
+ .border(Border {
+ color: Color::BLACK,
+ width: 4.,
+ radius: Radius::new(16),
+ })
+ }),
+ )
+ .align_right(Fill)
+ .into();
+ // element.explain(Color::BLACK)
+ element
+ }
+ }
+}
+
+pub fn date(date: NaiveDate) -> Element<'static, Message> {
+ container(text(date.to_string())).center_x(Fill).into()
+}