mirror of
https://github.com/hulthe/inkopslista.git
synced 2026-09-18 18:03:39 +02:00
Compare commits
3
Commits
master
..
4315ed07cc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4315ed07cc | ||
|
|
495b0de7a7 | ||
|
|
b3dd373403 |
Generated
+114
-113
@@ -690,9 +690,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.4.2"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d262e149917187838d5b42777c8253bcb64500067342904e7d429499a6f277e"
|
||||
checksum = "509591b7bcd67f4ef775afad7662703b4935daaa6ec0e5605cfb1090b32a2b6d"
|
||||
dependencies = [
|
||||
"find-msvc-tools",
|
||||
"jobserver",
|
||||
@@ -1286,9 +1286,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "error-code"
|
||||
version = "3.3.2"
|
||||
version = "3.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59"
|
||||
checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7"
|
||||
|
||||
[[package]]
|
||||
name = "euclid"
|
||||
@@ -1413,9 +1413,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "find-msvc-tools"
|
||||
version = "0.1.10"
|
||||
version = "0.1.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26b73573e6edcd2af0cdf47bd6cb58f0b3839491263c314eaad1ccf24430e1de"
|
||||
checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890"
|
||||
|
||||
[[package]]
|
||||
name = "fixed_decimal"
|
||||
@@ -1467,9 +1467,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "font-types"
|
||||
version = "0.12.2"
|
||||
version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a7299a780854a6d391be2ae1c8521c9368471b559dbfd6a8dbd9f407eaff100"
|
||||
checksum = "75382bc7392ef10aad10935f92fc3db36d2d4dad0e5d96d8d65e04f89a07ec39"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
]
|
||||
@@ -1546,9 +1546,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures"
|
||||
version = "0.3.33"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a88cf1f829d945f548cf8fec32c61b1f202b6d93b45848602fc02af4b12ad218"
|
||||
checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
@@ -1561,9 +1561,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-channel"
|
||||
version = "0.3.33"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae"
|
||||
checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
@@ -1571,15 +1571,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.33"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7"
|
||||
checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
|
||||
|
||||
[[package]]
|
||||
name = "futures-executor"
|
||||
version = "0.3.33"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458"
|
||||
checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-task",
|
||||
@@ -1588,9 +1588,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-io"
|
||||
version = "0.3.33"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a"
|
||||
checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"
|
||||
|
||||
[[package]]
|
||||
name = "futures-lite"
|
||||
@@ -1607,32 +1607,32 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-macro"
|
||||
version = "0.3.33"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b"
|
||||
checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
"syn 3.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-sink"
|
||||
version = "0.3.33"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307"
|
||||
checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.33"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109"
|
||||
checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.33"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa"
|
||||
checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
@@ -1975,9 +1975,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "http-body-util"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2"
|
||||
checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"futures-core",
|
||||
@@ -2419,9 +2419,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "icu_collections"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c"
|
||||
checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"potential_utf",
|
||||
@@ -2433,15 +2433,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "icu_decimal"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "288247df2e32aa776ac54fdd64de552149ac43cb840f2761811f0e8d09719dd4"
|
||||
checksum = "9eb8f655bba2d0c0459e43a5b0e6cd3cd388109898fb3d85d048165e8b0abd08"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"fixed_decimal",
|
||||
"icu_decimal_data",
|
||||
"icu_locale",
|
||||
"icu_locale_core",
|
||||
"icu_locale_fallback",
|
||||
"icu_plurals",
|
||||
"icu_provider",
|
||||
"writeable",
|
||||
@@ -2450,30 +2450,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "icu_decimal_data"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f14a5ca9e8af29eef62064f269078424283d90dbaffeac5225addf62aaabc22"
|
||||
|
||||
[[package]]
|
||||
name = "icu_locale"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5a396343c7208121dc86e35623d3dfe19814a7613cfd14964994cdc9c9a2e26"
|
||||
dependencies = [
|
||||
"icu_collections",
|
||||
"icu_locale_core",
|
||||
"icu_locale_data",
|
||||
"icu_provider",
|
||||
"potential_utf",
|
||||
"tinystr",
|
||||
"zerovec",
|
||||
]
|
||||
checksum = "e4c887fc7d4c297cf3f9436864af9e3dba7f8be9415a6c2a7f392f3b1636298c"
|
||||
|
||||
[[package]]
|
||||
name = "icu_locale_core"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29"
|
||||
checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"litemap",
|
||||
@@ -2484,16 +2469,30 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_locale_data"
|
||||
version = "2.2.0"
|
||||
name = "icu_locale_fallback"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5fdcc9ac77c6d74ff5cf6e65ef3181d6af32003b16fce3a77fb451d2f695993"
|
||||
checksum = "251af8e57c9400e3eb58242fe5b8b1152b2a64fdf4cf632f923c38ccee6f2fa9"
|
||||
dependencies = [
|
||||
"icu_locale_core",
|
||||
"icu_locale_fallback_data",
|
||||
"icu_provider",
|
||||
"potential_utf",
|
||||
"tinystr",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_locale_fallback_data"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "decf2a22ec8fa68f1a0c1129a3f8583f8f8bc24e8b9ccbe98ead99f62a4dc3a8"
|
||||
|
||||
[[package]]
|
||||
name = "icu_normalizer"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4"
|
||||
checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f"
|
||||
dependencies = [
|
||||
"icu_collections",
|
||||
"icu_normalizer_data",
|
||||
@@ -2505,18 +2504,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "icu_normalizer_data"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38"
|
||||
checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0"
|
||||
|
||||
[[package]]
|
||||
name = "icu_plurals"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a50023f1d49ad5c4333380328a0d4a19e4b9d6d842ec06639affd5ba47c8103"
|
||||
checksum = "e475e6766ef87b1d3c1f97be6363995b0bfaeddbc789671615df598a97ff0593"
|
||||
dependencies = [
|
||||
"fixed_decimal",
|
||||
"icu_locale",
|
||||
"icu_locale_fallback",
|
||||
"icu_plurals_data",
|
||||
"icu_provider",
|
||||
"zerovec",
|
||||
@@ -2524,16 +2523,17 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "icu_plurals_data"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8485497155dc865f901decb93ecc20d3e467df67bfeceb91e3ba34e2b11e8e1d"
|
||||
checksum = "1251aa39a95e1333888e499b1263e1c196447a28948acf5bdabd82c046f153bf"
|
||||
|
||||
[[package]]
|
||||
name = "icu_properties"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de"
|
||||
checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_collections",
|
||||
"icu_locale_core",
|
||||
"icu_properties_data",
|
||||
@@ -2544,15 +2544,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "icu_properties_data"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14"
|
||||
checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa"
|
||||
|
||||
[[package]]
|
||||
name = "icu_provider"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421"
|
||||
checksum = "92a7ed671a6aad807a8651a2e1782a6598fda9ce5185dd8158549e95a91c6428"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_locale_core",
|
||||
@@ -2567,24 +2567,25 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "icu_segmenter"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c0794db0b1a86193ac9c48768d0e6c52c54448e0870ad87907d456ee0dac964"
|
||||
checksum = "82d07aafccd67af15d02512a6adf5896fbc5ed00f2e99b471d2efa14016db3db"
|
||||
dependencies = [
|
||||
"icu_collections",
|
||||
"icu_locale",
|
||||
"icu_locale_fallback",
|
||||
"icu_provider",
|
||||
"icu_segmenter_data",
|
||||
"potential_utf",
|
||||
"smallvec",
|
||||
"utf8_iter",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_segmenter_data"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e4a2c462a4d927d512f5f882a033ddd62f33a05bb9f230d98f736ac3dc85938f"
|
||||
checksum = "ae293c039020f9ec10710af98d29ce6aa2051486638b49c9a6409f3b4a9e98ad"
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
@@ -2710,9 +2711,9 @@ checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb"
|
||||
|
||||
[[package]]
|
||||
name = "inotify"
|
||||
version = "0.11.4"
|
||||
version = "0.11.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "153be1941a183ec9ccd095ddbe17a8b8d435ef6c76e9e02451b933c3999af2c8"
|
||||
checksum = "4cc00ea907cab49550b7da656f80ebb97be1b997d931fbcd28d39734e17ce592"
|
||||
dependencies = [
|
||||
"bitflags 2.13.1",
|
||||
"inotify-sys",
|
||||
@@ -3015,14 +3016,14 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
|
||||
|
||||
[[package]]
|
||||
name = "libredox"
|
||||
version = "0.1.19"
|
||||
version = "0.1.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2026a5056764a10b2bf5d56488cba40da507f5493a6a429340e2004d9ed085fa"
|
||||
checksum = "28d0a00925a9f930d679b6789b721e3a7f9ed110f41b86d2497caa780c3a070a"
|
||||
dependencies = [
|
||||
"bitflags 2.13.1",
|
||||
"libc",
|
||||
"plain",
|
||||
"redox_syscall 0.9.1",
|
||||
"redox_syscall 0.9.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3076,9 +3077,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
||||
|
||||
[[package]]
|
||||
name = "litemap"
|
||||
version = "0.8.2"
|
||||
version = "0.8.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
|
||||
checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
@@ -3476,9 +3477,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
version = "0.1.46"
|
||||
version = "0.1.47"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
|
||||
checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
@@ -4116,9 +4117,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.33"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
|
||||
checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
|
||||
|
||||
[[package]]
|
||||
name = "plain"
|
||||
@@ -4173,9 +4174,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "potential_utf"
|
||||
version = "0.1.5"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564"
|
||||
checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661"
|
||||
dependencies = [
|
||||
"serde_core",
|
||||
"writeable",
|
||||
@@ -4351,9 +4352,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "quinn-proto"
|
||||
version = "0.11.16"
|
||||
version = "0.11.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560"
|
||||
checksum = "04759210543be93709136e28212294a659ef5001836ff4eab4d663e4529bba83"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"getrandom 0.4.3",
|
||||
@@ -4605,7 +4606,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "046a7d674daf459825b32f5062056d6882db0d2f5a479fbd76ccfc870ac18709"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"font-types 0.12.2",
|
||||
"font-types 0.12.3",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
@@ -4635,9 +4636,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.9.1"
|
||||
version = "0.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07507be7b4a5f9f26eeb41eeaebb1f5a7ff29dfb29739facc21d35bf8b11c21e"
|
||||
checksum = "f1c93da5bb2c5d4e6c0ef7abeead62c89169a0a4882bfb83ac892f2423aea2fe"
|
||||
dependencies = [
|
||||
"bitflags 2.13.1",
|
||||
]
|
||||
@@ -4958,9 +4959,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
version = "0.103.13"
|
||||
version = "0.103.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e"
|
||||
checksum = "0527518605e68109d875e248ea259b6758801cf165e4b2c2733ae3b51f12535a"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"rustls-pki-types",
|
||||
@@ -5867,9 +5868,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tinystr"
|
||||
version = "0.8.3"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d"
|
||||
checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"serde_core",
|
||||
@@ -6358,9 +6359,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "1.24.0"
|
||||
version = "1.24.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239"
|
||||
checksum = "2cefc03fd367c0c6d4305de1b312cf00248c4114f4a0418ce6a6af769e3b0bd9"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"serde_core",
|
||||
@@ -6504,9 +6505,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wayland-backend"
|
||||
version = "0.3.16"
|
||||
version = "0.3.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "016ccf01d1c58b6f8999612813e17c9b2390f7d70671428869913310f83f54b8"
|
||||
checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"downcast-rs",
|
||||
@@ -7200,9 +7201,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "writeable"
|
||||
version = "0.6.3"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"
|
||||
checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc"
|
||||
|
||||
[[package]]
|
||||
name = "xattr"
|
||||
@@ -7448,9 +7449,9 @@ checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e"
|
||||
|
||||
[[package]]
|
||||
name = "zerotrie"
|
||||
version = "0.2.4"
|
||||
version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf"
|
||||
checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"yoke",
|
||||
@@ -7460,9 +7461,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zerovec"
|
||||
version = "0.11.6"
|
||||
version = "0.11.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239"
|
||||
checksum = "94b5c6b5976d66c1d703c4fd17d3f5e43c8cedaacf604961b171adc7130896d8"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"yoke",
|
||||
@@ -7472,13 +7473,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zerovec-derive"
|
||||
version = "0.11.3"
|
||||
version = "0.11.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555"
|
||||
checksum = "47402523226a02bfe5230160dc3ccc089aa6f6f19e7fcbb4e6f824bbb1b4aa62"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
"syn 3.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -7541,9 +7542,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zvariant_utils"
|
||||
version = "4.0.0"
|
||||
version = "4.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "629d80ece222cad20fe0e8741be493c4ab166acf3b85341bdc2cdbcfd8f3c2d6"
|
||||
checksum = "6b84ebb462416c27cdb97f2e7f5f0ccc844da1fe2ecc7121e1b690b41318bf42"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
##################
|
||||
### BASE STAGE ###
|
||||
##################
|
||||
FROM rust:1.94.0 AS base
|
||||
FROM rust:1.92.0 AS base
|
||||
|
||||
RUN rustup target add wasm32-unknown-unknown
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
|
||||
+38
-39
@@ -3,6 +3,44 @@ name = "inkopslista"
|
||||
version = "0.0.0"
|
||||
edition = "2024"
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
crate-type = ["cdylib", "lib"]
|
||||
|
||||
[dependencies]
|
||||
reqwest = { version = "0.12.26", features = ["json", "rustls-tls"], default-features = false }
|
||||
inkopslista-lib = { path = "../lib" }
|
||||
tokio = { version = "1.48.0", default-features = false, features = ["rt", "macros", "sync"] }
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = "1.0.148"
|
||||
anyhow = "1.0.100"
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
tokio = { version = "1.48.0", default-features = false, features = ["fs", "rt-multi-thread"] }
|
||||
xdg = "3.0.0"
|
||||
|
||||
[target.'cfg(target_os = "android")'.dependencies]
|
||||
tokio = { version = "1.48.0", default-features = false, features = ["rt-multi-thread"] }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
wasm-bindgen = "0.2.106"
|
||||
wasm-bindgen-futures = "0.4.56"
|
||||
web-sys = "0.3.83"
|
||||
|
||||
[dependencies.slint]
|
||||
version = "1.14.1"
|
||||
default-features = false
|
||||
features = [
|
||||
"live-preview",
|
||||
"backend-winit-wayland",
|
||||
"renderer-femtovg",
|
||||
"compat-1-2",
|
||||
"backend-android-activity-06",
|
||||
]
|
||||
|
||||
[build-dependencies]
|
||||
slint-build = "1.14.1"
|
||||
|
||||
# See https://github.com/rust-mobile/cargo-apk?tab=readme-ov-file#manifest
|
||||
[package.metadata.android]
|
||||
package = "sh.nubo.Inkopslista"
|
||||
@@ -25,42 +63,3 @@ name = "android.permission.INTERNET"
|
||||
|
||||
[[package.metadata.android.uses_permission]]
|
||||
name = "android.permission.ACCESS_NETWORK_STATE"
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
crate-type = ["cdylib", "lib"]
|
||||
|
||||
[dependencies]
|
||||
reqwest = { version = "0.12.26", features = ["json", "rustls-tls"], default-features = false }
|
||||
inkopslista-lib = { path = "../lib" }
|
||||
tokio = { version = "1.48.0", default-features = false, features = ["rt", "macros", "sync"] }
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = "1.0.148"
|
||||
anyhow = "1.0.100"
|
||||
|
||||
[dependencies.slint]
|
||||
version = "1.17.1"
|
||||
default-features = false
|
||||
features = [
|
||||
"live-preview",
|
||||
"backend-winit-wayland",
|
||||
"renderer-femtovg",
|
||||
"compat-1-2",
|
||||
"backend-android-activity-06",
|
||||
]
|
||||
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
tokio = { version = "1.48.0", default-features = false, features = ["fs", "rt-multi-thread"] }
|
||||
xdg = "3.0.0"
|
||||
|
||||
[target.'cfg(target_os = "android")'.dependencies]
|
||||
tokio = { version = "1.48.0", default-features = false, features = ["rt-multi-thread"] }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
wasm-bindgen = "0.2.106"
|
||||
wasm-bindgen-futures = "0.4.56"
|
||||
web-sys = "0.3.83"
|
||||
|
||||
[build-dependencies]
|
||||
slint-build = "1.17.1"
|
||||
|
||||
+1
-11
@@ -1,14 +1,4 @@
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").expect("target arch env");
|
||||
let style = match target_arch.as_str() {
|
||||
// For web, rely on dark mod detection based on browser settings.
|
||||
"wasm32" => "cosmic",
|
||||
|
||||
// For any other target, force dark mode.
|
||||
_ => "cosmic-dark",
|
||||
};
|
||||
let config = slint_build::CompilerConfiguration::new().with_style(style.into());
|
||||
let config = slint_build::CompilerConfiguration::new().with_style("cosmic-dark".into());
|
||||
slint_build::compile_with_config("ui/app.slint", config).expect("Slint build failed");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
cd "$(dirname 0)"
|
||||
CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-../../target}"
|
||||
|
||||
# TODO: cross compilation with cross --target=aarch64-unknown-linux-gnu
|
||||
cargo b -r
|
||||
|
||||
cp "$CARGO_TARGET_DIR/release/inkopslista" inköpslista
|
||||
|
||||
# TODO: cross compilation with --arch=aarch64
|
||||
flatpak-builder -v --force-clean --user --install-deps-from=flathub --repo=repo --install builddir sh.nubo.Inkopslista.yml
|
||||
@@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Name=Inköpslista
|
||||
Exec=inkopslista %U
|
||||
Exec=inköpslista %U
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=sh.nubo.Inkopslista
|
||||
|
||||
@@ -2,34 +2,43 @@ id: sh.nubo.Inkopslista
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: '25.08'
|
||||
sdk: org.freedesktop.Sdk
|
||||
sdk-extensions:
|
||||
- org.freedesktop.Sdk.Extension.rust-stable
|
||||
|
||||
build-options:
|
||||
append-path: /usr/lib/sdk/rust-stable/bin
|
||||
build-args:
|
||||
- --share=network
|
||||
|
||||
command: 'inkopslista'
|
||||
command: 'inköpslista'
|
||||
|
||||
modules:
|
||||
- name: inköpslista
|
||||
buildsystem: simple
|
||||
sources:
|
||||
- type: dir
|
||||
path: ../..
|
||||
# - type: script
|
||||
# dest-filename: gui
|
||||
# commands:
|
||||
# - echo "hello there"
|
||||
- type: file
|
||||
path: ./sh.nubo.Inkopslista.desktop
|
||||
- type: file
|
||||
path: ./inköpslista
|
||||
- type: file
|
||||
path: ../images/icon.svg
|
||||
- type: file
|
||||
path: ../images/icon_x512.png
|
||||
- type: file
|
||||
path: ../images/icon_x192.png
|
||||
- type: file
|
||||
path: ../images/icon_x144.png
|
||||
- type: file
|
||||
path: ../images/icon_x128.png
|
||||
- type: file
|
||||
path: ../images/icon_x72.png
|
||||
build-commands:
|
||||
- cargo build --release --locked
|
||||
- install -Dm755 target/release/inkopslista $FLATPAK_DEST/bin/inkopslista
|
||||
- install -Dm755 inköpslista $FLATPAK_DEST/bin/inköpslista
|
||||
- install -Dm644 sh.nubo.Inkopslista.desktop $FLATPAK_DEST/share/applications/sh.nubo.Inkopslista.desktop
|
||||
|
||||
- install -Dm644 gui/flatpak/sh.nubo.Inkopslista.desktop $FLATPAK_DEST/share/applications/sh.nubo.Inkopslista.desktop
|
||||
|
||||
- install -Dm644 gui/images/icon.svg $FLATPAK_DEST/share/icons/hicolor/scalable/apps/sh.nubo.Inkopslista.svg
|
||||
- install -Dm644 gui/images/icon_x512.png $FLATPAK_DEST/share/icons/hicolor/512x512/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 gui/images/icon_x192.png $FLATPAK_DEST/share/icons/hicolor/192x192/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 gui/images/icon_x144.png $FLATPAK_DEST/share/icons/hicolor/144x144/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 gui/images/icon_x128.png $FLATPAK_DEST/share/icons/hicolor/128x128/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 gui/images/icon_x72.png $FLATPAK_DEST/share/icons/hicolor/72x72/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 icon.svg $FLATPAK_DEST/share/icons/hicolor/scalable/apps/sh.nubo.Inkopslista.svg
|
||||
- install -Dm644 icon_x512.png $FLATPAK_DEST/share/icons/hicolor/512x512/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 icon_x192.png $FLATPAK_DEST/share/icons/hicolor/192x192/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 icon_x144.png $FLATPAK_DEST/share/icons/hicolor/144x144/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 icon_x128.png $FLATPAK_DEST/share/icons/hicolor/128x128/apps/sh.nubo.Inkopslista.png
|
||||
- install -Dm644 icon_x72.png $FLATPAK_DEST/share/icons/hicolor/72x72/apps/sh.nubo.Inkopslista.png
|
||||
|
||||
finish-args:
|
||||
# Wayland access
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="Arrow / Arrow_Down_Up">
|
||||
<path id="Vector" d="M11 16L8 19M8 19L5 16M8 19V5M13 8L16 5M16 5L19 8M16 5V19" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 350 B |
+4
-3
@@ -22,13 +22,14 @@ mod fs {
|
||||
|
||||
use super::Config;
|
||||
use anyhow::{Context, Ok};
|
||||
use serde_json;
|
||||
|
||||
const CONFIG_FILE_NAME: &str = "config.json";
|
||||
const XDG_PREFIX: &str = "inköpslista";
|
||||
const CONFIG_FILE_NAME: &'static str = "config.json";
|
||||
const XDG_PREFIX: &'static str = "inköpslista";
|
||||
|
||||
pub fn save_config(address: String) -> Result<(), anyhow::Error> {
|
||||
let xdg_dirs = xdg::BaseDirectories::with_prefix(XDG_PREFIX);
|
||||
let conf = Config { address };
|
||||
let conf = Config { address: address };
|
||||
let conf = serde_json::to_string(&conf).context("unable to serialize config")?;
|
||||
|
||||
let path = xdg_dirs
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use slint::ComponentHandle;
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
use crate::{runtime::spawn, ui};
|
||||
|
||||
/// A thing for spawning I/O-tasks and updating the GUI `ConnectionStatus` with the result.
|
||||
#[derive(Clone)]
|
||||
pub struct Io {
|
||||
state: Arc<State>,
|
||||
}
|
||||
|
||||
struct State {
|
||||
status: mpsc::Sender<ui::ConnectionStatus>,
|
||||
}
|
||||
|
||||
impl Io {
|
||||
pub fn new(app: &ui::App) -> Self {
|
||||
let (tx, mut rx) = mpsc::channel(10);
|
||||
let app_weak = app.as_weak();
|
||||
|
||||
spawn(async move {
|
||||
loop {
|
||||
let Some(status) = rx.recv().await else {
|
||||
return;
|
||||
};
|
||||
|
||||
let _ = app_weak.upgrade_in_event_loop(move |app| {
|
||||
app.global::<ui::State>().set_connection_status(status);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Io {
|
||||
state: Arc::new(State { status: tx }),
|
||||
}
|
||||
}
|
||||
|
||||
/// Spawn a fallible async function.
|
||||
///
|
||||
/// Update the `ConnectionStatus` in the GUI depending on whether the result is an error.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn spawn<Fut>(&self, f: impl FnOnce() -> Fut + Send + 'static)
|
||||
where
|
||||
Fut: Future<Output = anyhow::Result<()>>,
|
||||
Fut: Send + 'static,
|
||||
{
|
||||
let io = self.clone();
|
||||
spawn(async move {
|
||||
let _ = io.state.status.send(ui::ConnectionStatus::Syncing).await;
|
||||
let result = f().await;
|
||||
let was_error = result.is_err();
|
||||
if let Err(e) = result {
|
||||
eprintln!("{e:?}");
|
||||
}
|
||||
let _ = io
|
||||
.state
|
||||
.status
|
||||
.send(if was_error {
|
||||
ui::ConnectionStatus::Error
|
||||
} else {
|
||||
ui::ConnectionStatus::Idle
|
||||
})
|
||||
.await;
|
||||
});
|
||||
}
|
||||
|
||||
/// Spawn a fallible async function.
|
||||
///
|
||||
/// Update the `ConnectionStatus` in the GUI depending on whether the result is an error.
|
||||
// FIXME: this function is duplicated from the one above, but without the `Send` requirement on the future.
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub fn spawn<Fut>(&self, f: impl FnOnce() -> Fut + Send + 'static)
|
||||
where
|
||||
Fut: Future<Output = anyhow::Result<()>>,
|
||||
Fut: 'static,
|
||||
{
|
||||
let io = self.clone();
|
||||
spawn(async move {
|
||||
let _ = io.state.status.send(ui::ConnectionStatus::Syncing).await;
|
||||
let result = f().await;
|
||||
let was_error = result.is_err();
|
||||
if let Err(e) = result {
|
||||
eprintln!("{e:?}");
|
||||
}
|
||||
let _ = io
|
||||
.state
|
||||
.status
|
||||
.send(if was_error {
|
||||
ui::ConnectionStatus::Error
|
||||
} else {
|
||||
ui::ConnectionStatus::Idle
|
||||
})
|
||||
.await;
|
||||
});
|
||||
}
|
||||
}
|
||||
+87
-64
@@ -2,7 +2,6 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
mod config;
|
||||
mod io;
|
||||
mod runtime;
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
@@ -18,14 +17,11 @@ use std::{
|
||||
|
||||
use inkopslista_lib::{ButtonItem, Item, ItemData};
|
||||
use reqwest::Url;
|
||||
use slint::{ComponentHandle, Model, ModelRc, ToSharedString, VecModel};
|
||||
use slint::{Model, ModelRc, ToSharedString, VecModel};
|
||||
|
||||
use crate::{config::Config, io::Io};
|
||||
use crate::{config::Config, runtime::spawn};
|
||||
|
||||
/// Exported slint types
|
||||
mod ui {
|
||||
slint::include_modules!();
|
||||
}
|
||||
slint::include_modules!();
|
||||
|
||||
/// GET "/api/list" from the server
|
||||
async fn get_list(conf: &Mutex<Config>) -> Result<Vec<Item>, anyhow::Error> {
|
||||
@@ -85,11 +81,11 @@ async fn put_category(
|
||||
}
|
||||
|
||||
/// Convert shopping list to slint types
|
||||
fn update_slint_list(new_list: Vec<Item>, list: &VecModel<ui::SItem>) {
|
||||
fn update_slint_list(new_list: Vec<Item>, list: &VecModel<SItem>) {
|
||||
list.clear();
|
||||
new_list
|
||||
.iter()
|
||||
.map(|item| ui::SItem {
|
||||
.map(|item| SItem {
|
||||
name: item.name.to_shared_string(),
|
||||
checked: item.data.checked,
|
||||
amount: item.data.amount as i32,
|
||||
@@ -97,43 +93,52 @@ fn update_slint_list(new_list: Vec<Item>, list: &VecModel<ui::SItem>) {
|
||||
.for_each(|item| list.push(item));
|
||||
}
|
||||
|
||||
fn update_slint_favs(new_favs: Vec<ButtonItem>, favs: &VecModel<ui::SButtonItem>) {
|
||||
fn update_slint_favs(new_favs: Vec<ButtonItem>, favs: &VecModel<SButtonItem>) {
|
||||
favs.clear();
|
||||
new_favs
|
||||
.into_iter()
|
||||
.map(|item| ui::SButtonItem {
|
||||
.map(|item| SButtonItem {
|
||||
name: item.name.into(),
|
||||
category: item.category.unwrap_or_default().to_shared_string(),
|
||||
})
|
||||
.for_each(|item| favs.push(item));
|
||||
}
|
||||
|
||||
fn refresh_list(conf: &Arc<Mutex<Config>>, app_weak: &slint::Weak<ui::App>, io: &Io) {
|
||||
fn refresh_list(conf: &Arc<Mutex<Config>>, app_weak: &slint::Weak<App>) {
|
||||
let conf = conf.clone();
|
||||
let app_weak = app_weak.clone();
|
||||
io.spawn(async move || {
|
||||
let new_list = get_list(&conf).await?;
|
||||
spawn(async move {
|
||||
let new_list = match get_list(&conf).await {
|
||||
Ok(new_list) => new_list,
|
||||
Err(e) => {
|
||||
eprintln!("{e:?}");
|
||||
return;
|
||||
}
|
||||
};
|
||||
let _ = app_weak.upgrade_in_event_loop(|app| {
|
||||
let list: ModelRc<ui::SItem> = app.global::<ui::State>().get_list();
|
||||
let list: &VecModel<ui::SItem> =
|
||||
list.as_any().downcast_ref().expect("list is a VecModel");
|
||||
update_slint_list(new_list, list);
|
||||
let list: ModelRc<SItem> = app.global::<State>().get_list();
|
||||
let list: &VecModel<SItem> = list.as_any().downcast_ref().expect("list is a VecModel");
|
||||
update_slint_list(new_list, &list);
|
||||
});
|
||||
let new_favs = get_favorites(&conf).await?;
|
||||
let new_favs = match get_favorites(&conf).await {
|
||||
Ok(new_favs) => new_favs,
|
||||
Err(e) => {
|
||||
eprintln!("{e:?}");
|
||||
return;
|
||||
}
|
||||
};
|
||||
let _ = app_weak.upgrade_in_event_loop(|app| {
|
||||
let favs: ModelRc<ui::SButtonItem> = app.global::<ui::State>().get_favorites();
|
||||
let favs: &VecModel<ui::SButtonItem> =
|
||||
let favs: ModelRc<SButtonItem> = app.global::<State>().get_favorites();
|
||||
let favs: &VecModel<SButtonItem> =
|
||||
favs.as_any().downcast_ref().expect("favs is a vec model");
|
||||
update_slint_favs(new_favs, favs);
|
||||
});
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
|
||||
pub fn run() -> Result<(), anyhow::Error> {
|
||||
let app = ui::App::new()?;
|
||||
let io_ = Io::new(&app);
|
||||
let state = app.global::<ui::State>();
|
||||
let app = App::new()?;
|
||||
let state = app.global::<State>();
|
||||
let list_shared = Rc::new(VecModel::default());
|
||||
let fav_shared = Rc::new(VecModel::default());
|
||||
state.set_list(ModelRc::new(list_shared.clone()));
|
||||
@@ -163,24 +168,22 @@ pub fn run() -> Result<(), anyhow::Error> {
|
||||
let conf = conf_shared.clone();
|
||||
let app_weak = app.as_weak();
|
||||
// load shopping list from server on start
|
||||
refresh_list(&conf, &app_weak, &io_);
|
||||
let io = io_.clone();
|
||||
refresh_list(&conf, &app_weak);
|
||||
state.on_refresh_list(move || {
|
||||
refresh_list(&conf, &app_weak, &io);
|
||||
refresh_list(&conf, &app_weak);
|
||||
});
|
||||
|
||||
let conf = conf_shared.clone();
|
||||
let list = list_shared.clone();
|
||||
let io = io_.clone();
|
||||
state.on_add_to_list(move |item| {
|
||||
if let Some(index) = list.iter().position(|item2| item2.name == item) {
|
||||
let mut item2 = list.row_data(index).unwrap();
|
||||
item2.amount += 1;
|
||||
item2.amount = item2.amount + 1;
|
||||
let item3 = item2.clone();
|
||||
list.set_row_data(index, item2);
|
||||
let conf = conf.clone();
|
||||
io.spawn(async move || {
|
||||
put_list(
|
||||
spawn(async move {
|
||||
let res = put_list(
|
||||
&item,
|
||||
&ItemData {
|
||||
checked: item3.checked,
|
||||
@@ -188,19 +191,22 @@ pub fn run() -> Result<(), anyhow::Error> {
|
||||
},
|
||||
&conf,
|
||||
)
|
||||
.await
|
||||
.await;
|
||||
if let Err(err) = res {
|
||||
eprintln!("{err:?}");
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
list.push(ui::SItem {
|
||||
list.push(SItem {
|
||||
checked: false,
|
||||
name: item.clone(),
|
||||
amount: 1,
|
||||
});
|
||||
let conf = conf.clone();
|
||||
io.spawn(async move || {
|
||||
spawn(async move {
|
||||
// TODO: add number to increment
|
||||
put_list(
|
||||
let res = put_list(
|
||||
&item,
|
||||
&ItemData {
|
||||
checked: false,
|
||||
@@ -208,27 +214,30 @@ pub fn run() -> Result<(), anyhow::Error> {
|
||||
},
|
||||
&conf,
|
||||
)
|
||||
.await
|
||||
.await;
|
||||
if let Err(err) = res {
|
||||
eprintln!("{err:?}");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
let conf = conf_shared.clone();
|
||||
let list = list_shared.clone();
|
||||
let io = io_.clone();
|
||||
state.on_check_item(move |item| {
|
||||
let positem = list
|
||||
.iter()
|
||||
.enumerate()
|
||||
.find(|(_, item2)| item2.name == item);
|
||||
let Some((pos, mut item)) = positem else {
|
||||
return;
|
||||
let (pos, mut item) = match positem {
|
||||
Some(positem) => positem,
|
||||
None => return,
|
||||
};
|
||||
item.checked = !item.checked;
|
||||
list.set_row_data(pos, item.clone());
|
||||
let conf = conf.clone();
|
||||
|
||||
io.spawn(async move || {
|
||||
put_list(
|
||||
spawn(async move {
|
||||
let res = put_list(
|
||||
&item.name,
|
||||
&ItemData {
|
||||
checked: item.checked,
|
||||
@@ -236,13 +245,15 @@ pub fn run() -> Result<(), anyhow::Error> {
|
||||
},
|
||||
&conf,
|
||||
)
|
||||
.await
|
||||
.await;
|
||||
if let Err(err) = res {
|
||||
eprintln!("{err:?}");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
let conf = conf_shared.clone();
|
||||
let list = list_shared.clone();
|
||||
let io = io_.clone();
|
||||
state.on_delete_checked(move || {
|
||||
let poss: Vec<_> = list
|
||||
.iter()
|
||||
@@ -256,30 +267,27 @@ pub fn run() -> Result<(), anyhow::Error> {
|
||||
|
||||
let conf = conf.clone();
|
||||
|
||||
io.spawn(async move || {
|
||||
let mut result = Ok(());
|
||||
spawn(async move {
|
||||
for (_, name) in poss {
|
||||
let r = delete_item(&name, &conf).await;
|
||||
if r.is_err() {
|
||||
result = r;
|
||||
let res = delete_item(&name, &conf).await;
|
||||
if let Err(err) = res {
|
||||
eprintln!("{err:?}");
|
||||
}
|
||||
}
|
||||
result
|
||||
});
|
||||
});
|
||||
|
||||
let conf = conf_shared.clone();
|
||||
let list = list_shared.clone();
|
||||
let io = io_.clone();
|
||||
state.on_inc_amount(move |item| {
|
||||
if let Some(index) = list.iter().position(|item2| item2.name == item) {
|
||||
let mut item2 = list.row_data(index).unwrap();
|
||||
item2.amount += 1;
|
||||
item2.amount = item2.amount + 1;
|
||||
let item3 = item2.clone();
|
||||
list.set_row_data(index, item2);
|
||||
let conf = conf.clone();
|
||||
io.spawn(async move || {
|
||||
put_list(
|
||||
spawn(async move {
|
||||
let res = put_list(
|
||||
&item,
|
||||
&ItemData {
|
||||
checked: item3.checked,
|
||||
@@ -287,28 +295,36 @@ pub fn run() -> Result<(), anyhow::Error> {
|
||||
},
|
||||
&conf,
|
||||
)
|
||||
.await
|
||||
.await;
|
||||
if let Err(err) = res {
|
||||
eprintln!("{err:?}");
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
let conf = conf_shared.clone();
|
||||
let list = list_shared.clone();
|
||||
let io = io_.clone();
|
||||
state.on_dec_amount(move |item| {
|
||||
if let Some(index) = list.iter().position(|item2| item2.name == item) {
|
||||
let mut item2 = list.row_data(index).unwrap();
|
||||
item2.amount -= 1;
|
||||
item2.amount = item2.amount - 1;
|
||||
let item3 = item2.clone();
|
||||
list.set_row_data(index, item2);
|
||||
let conf = conf.clone();
|
||||
if item3.amount < 1 {
|
||||
list.remove(index);
|
||||
io.spawn(async move || delete_item(&item3.name, &conf).await);
|
||||
spawn(async move {
|
||||
let res = delete_item(&item3.name, &conf).await;
|
||||
if let Err(err) = res {
|
||||
eprintln!("{err:?}");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
io.spawn(async move || {
|
||||
spawn(async move {
|
||||
// TODO: add number to increment
|
||||
put_list(
|
||||
let res = put_list(
|
||||
&item,
|
||||
&ItemData {
|
||||
checked: item3.checked,
|
||||
@@ -316,19 +332,26 @@ pub fn run() -> Result<(), anyhow::Error> {
|
||||
},
|
||||
&conf,
|
||||
)
|
||||
.await
|
||||
.await;
|
||||
if let Err(err) = res {
|
||||
eprintln!("{err:?}");
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
let conf = conf_shared.clone();
|
||||
let io = io_.clone();
|
||||
|
||||
state.on_set_cat(move |itemname, cat| {
|
||||
let conf = conf.clone();
|
||||
|
||||
io.spawn(async move || put_category(&itemname, &cat, &conf).await);
|
||||
spawn(async move {
|
||||
let res = put_category(&itemname, &cat, &conf).await;
|
||||
if let Err(err) = res {
|
||||
eprintln!("{err:?}");
|
||||
}
|
||||
});
|
||||
return;
|
||||
});
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
+14
-45
@@ -9,15 +9,13 @@ import {
|
||||
GridBox,
|
||||
HorizontalBox,
|
||||
ComboBox,
|
||||
Palette, Spinner, SpinBox,
|
||||
} from "std-widgets.slint";
|
||||
import { SettingsView } from "settings.slint";
|
||||
import { ConnectionStatus, State, SItem, SButtonItem } from "state.slint";
|
||||
export { ConnectionStatus, State, SItem }
|
||||
|
||||
import { State, SItem, SButtonItem } from "state.slint";
|
||||
export { State, SItem }
|
||||
component GoodListItem inherits Rectangle {
|
||||
in-out property <SItem> item;
|
||||
background: Palette.alternate-background;
|
||||
background: #ffffff10;
|
||||
border-radius: 8pt;
|
||||
border-width: 10pt;
|
||||
HorizontalLayout {
|
||||
@@ -112,7 +110,7 @@ component PlusMinus inherits HorizontalLayout {
|
||||
|
||||
component GoodListItemAdd inherits Rectangle {
|
||||
in-out property <SItem> item;
|
||||
background: Palette.alternate-background;
|
||||
background: #ffffff10;
|
||||
border-radius: 8pt;
|
||||
border-width: 10pt;
|
||||
HorizontalLayout {
|
||||
@@ -179,22 +177,21 @@ component GoodsListAdd {
|
||||
}
|
||||
|
||||
component GoodButtons inherits ScrollView {
|
||||
in property <length> button-min-width: 100pt;
|
||||
in property <length> button-height: 60pt;
|
||||
in property <length> button-spacing: 10pt;
|
||||
in property <int> button-width: 100;
|
||||
in property <int> button-height: 60;
|
||||
in property <int> button-spacing: 10;
|
||||
|
||||
property <int> count-x: floor(root.width / (button-min-width + button-spacing));
|
||||
property <int> count-x: floor(root.width / 1pt / (button-width + button-spacing));
|
||||
property <int> count-y: ceil(State.favorites.length / count-x);
|
||||
property <length> button-width: ((self.width + button-spacing ) / count-x) - button-spacing;
|
||||
|
||||
viewport-height: (count-y * (button-height + button-spacing));
|
||||
viewport-height: (count-y * (button-height + button-spacing)) * 1pt;
|
||||
mouse-drag-pan-enabled: true;
|
||||
|
||||
for item[idx] in State.favorites: Button {
|
||||
x: floor(mod(idx, count-x)) * (root.button-width + root.button-spacing);
|
||||
y: floor(idx / count-x) * (root.button-height + root.button-spacing);
|
||||
width: root.button-width;
|
||||
height: root.button-height;
|
||||
x: floor(mod(idx, count-x)) * (root.button-width + root.button-spacing) * 1pt;
|
||||
y: floor(idx / count-x) * (root.button-height + root.button-spacing) * 1pt;
|
||||
width: root.button-width * 1pt;
|
||||
height: root.button-height * 1pt;
|
||||
text: item.name;
|
||||
clicked => {
|
||||
State.add-to-list(item.name);
|
||||
@@ -202,30 +199,7 @@ component GoodButtons inherits ScrollView {
|
||||
}
|
||||
}
|
||||
|
||||
component ConnStatusIndicator inherits Rectangle {
|
||||
width: 18px;
|
||||
Image {
|
||||
states [
|
||||
idle when State.connection-status == ConnectionStatus.Idle: {
|
||||
opacity: 0%;
|
||||
}
|
||||
syncing when State.connection-status == ConnectionStatus.Syncing: {
|
||||
colorize: green;
|
||||
opacity: 75% + 25% * sin(360deg * animation-tick() / 1s);
|
||||
}
|
||||
error when State.connection-status == ConnectionStatus.Error: {
|
||||
colorize: red;
|
||||
opacity: 100%;
|
||||
}
|
||||
]
|
||||
source: @image-url("../images/arrow-down-up.svg");
|
||||
width: 24px;
|
||||
height: self.width;
|
||||
}
|
||||
}
|
||||
|
||||
component RefreshButton inherits HorizontalLayout {
|
||||
spacing: 8px;
|
||||
alignment: center;
|
||||
Button {
|
||||
text: "Refresh";
|
||||
@@ -234,7 +208,6 @@ component RefreshButton inherits HorizontalLayout {
|
||||
State.refresh-list();
|
||||
}
|
||||
}
|
||||
ConnStatusIndicator { }
|
||||
}
|
||||
|
||||
component AddView inherits VerticalLayout {
|
||||
@@ -243,7 +216,7 @@ component AddView inherits VerticalLayout {
|
||||
padding: 8px;
|
||||
spacing: 8px;
|
||||
|
||||
RefreshButton {}
|
||||
RefreshButton { }
|
||||
|
||||
goods := GoodsListAdd {
|
||||
items <=> list;
|
||||
@@ -332,12 +305,8 @@ component CatView inherits VerticalLayout {
|
||||
|
||||
export component App inherits Window {
|
||||
|
||||
title: "Inköpslista";
|
||||
icon: @image-url("../images/icon.svg");
|
||||
|
||||
preferred-height: 700px;
|
||||
preferred-width: 480px;
|
||||
|
||||
TabWidget {
|
||||
Tab {
|
||||
title: "Add";
|
||||
|
||||
+1
-11
@@ -4,16 +4,7 @@ export struct SItem {
|
||||
amount: int,
|
||||
}
|
||||
|
||||
export struct SButtonItem{
|
||||
name: string,
|
||||
category: string,
|
||||
}
|
||||
|
||||
export enum ConnectionStatus {
|
||||
Idle,
|
||||
Syncing,
|
||||
Error,
|
||||
}
|
||||
export struct SButtonItem { name: string, category: string }
|
||||
|
||||
export global State {
|
||||
in-out property <[SItem]> list: [
|
||||
@@ -38,5 +29,4 @@ export global State {
|
||||
set-server-address(address) => {
|
||||
server-address = address;
|
||||
}
|
||||
in-out property <ConnectionStatus> connection-status: ConnectionStatus.Syncing;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "inkopslista-srv"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
rocket = { version = "0.5.1", features = ["json"] }
|
||||
|
||||
+1
-1
@@ -4,10 +4,10 @@ extern crate rocket;
|
||||
use clap::Parser;
|
||||
use inkopslista_lib::{ButtonItem, Item, ItemData};
|
||||
use rocket::{
|
||||
State,
|
||||
fs::{FileServer, NamedFile},
|
||||
serde::json::Json,
|
||||
shield::Shield,
|
||||
State,
|
||||
};
|
||||
use sqlite::ConnectionThreadSafe;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
Reference in New Issue
Block a user