diff --git a/bun.lockb b/bun.lockb index 57b6939..23afcc9 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index d987158..4037b1a 100644 --- a/package.json +++ b/package.json @@ -14,38 +14,40 @@ "dependencies": { "@codemirror/lang-liquid": "^6.2.1", "@codemirror/state": "^6.4.1", - "@codemirror/view": "^6.28.2", + "@codemirror/view": "^6.28.6", "@solid-primitives/context": "^0.2.3", "@solid-primitives/i18n": "^2.1.1", - "@solid-primitives/storage": "^3.7.1", - "@solidjs/router": "^0.13.6", - "@tanstack/solid-form": "^0.25.0", - "@tanstack/zod-form-adapter": "^0.25.0", - "@tauri-apps/api": "2.0.0-beta.13", + "@solid-primitives/storage": "3.8.0", + "@solidjs/router": "0.14.1", + "@tanstack/solid-form": "^0.26.4", + "@tanstack/zod-form-adapter": "^0.26.4", + "@tauri-apps/api": "2.0.0-beta.15", "@tauri-apps/plugin-os": "github:tauri-apps/tauri-plugin-os#v2", "@tauri-apps/plugin-shell": "github:tauri-apps/tauri-plugin-shell#v2", - "@uiw/codemirror-theme-material": "^4.22.2", - "@unocss/reset": "^0.61.0", - "apexcharts": "^3.49.2", - "liquidjs": "^10.14.0", + "@uiw/codemirror-theme-material": "4.23.0", + "@unocss/reset": "0.61.5", + "apexcharts": "3.51.0", + "date-fns": "^3.6.0", + "liquidjs": "^10.15.0", "solid-apexcharts": "^0.3.4", "solid-codemirror": "^2.3.1", "solid-icons": "^1.1.0", "solid-js": "^1.8.18", "solid-motionone": "^1.0.0", "solid-toast": "^0.5.0", + "tailwind-merge": "^2.4.0", "terracotta": "^1.0.5", "zod": "^3.23.8" }, "devDependencies": { "@types/xml2js": "^0.4.14", "@biomejs/biome": "1.8.3", - "@tauri-apps/cli": "2.0.0-beta.20", - "@types/node": "^20.14.9", - "@unocss/preset-uno": "^0.61.0", - "@unocss/transformer-variant-group": "^0.61.0", - "@unocss/vite": "^0.61.0", - "typescript": "^5.5.2", + "@tauri-apps/cli": "2.0.0-beta.22", + "@types/node": "20.14.11", + "@unocss/preset-uno": "0.61.5", + "@unocss/transformer-variant-group": "0.61.5", + "@unocss/vite": "0.61.5", + "typescript": "^5.5.3", "vite": "5.3.2", "vite-plugin-solid": "^2.10.2" } diff --git a/src-tauri/.DS_Store b/src-tauri/.DS_Store index b0b0e7d..4d865a9 100644 Binary files a/src-tauri/.DS_Store and b/src-tauri/.DS_Store differ diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 663560d..4c18ba0 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -157,9 +157,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" +checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" dependencies = [ "async-task", "concurrent-queue", @@ -249,14 +249,14 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] name = "async-signal" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d" +checksum = "dfb3634b73397aa844481f814fad23bbf07fdb0eabec10f2eb95e58944b1ec32" dependencies = [ "async-io", "async-lock", @@ -278,13 +278,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -529,7 +529,7 @@ dependencies = [ "proc-macro-crate 2.0.2", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", "syn_derive", ] @@ -633,9 +633,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" dependencies = [ "serde", ] @@ -709,9 +709,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.102" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779e6b7d17797c0b42023d417228c02889300190e700cb074c3438d9c541d332" +checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" [[package]] name = "cesu8" @@ -779,7 +779,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -790,7 +790,7 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", - "libloading 0.8.4", + "libloading 0.8.5", ] [[package]] @@ -1058,7 +1058,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1068,7 +1068,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1116,12 +1116,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.9", - "darling_macro 0.20.9", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1140,16 +1140,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1165,13 +1165,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.9", + "darling_core 0.20.10", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1222,7 +1222,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1283,16 +1283,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.3.7" @@ -1353,7 +1343,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1439,9 +1429,9 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "embed-resource" -version = "2.4.2" +version = "2.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6985554d0688b687c5cb73898a34fbe3ad6c24c58c238a4d91d5e840670ee9d" +checksum = "4edcacde9351c33139a41e3c97eb2334351a81a2791bebb0b243df837128f602" dependencies = [ "cc", "memchr", @@ -1572,7 +1562,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1594,6 +1584,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" +dependencies = [ + "serde", + "typeid", +] + [[package]] name = "errno" version = "0.3.9" @@ -1734,7 +1734,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1783,7 +1783,7 @@ checksum = "b0fa992f1656e1707946bbba340ad244f0814009ef8c0118eb7b658395f19a2e" dependencies = [ "frunk_proc_macro_helpers", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1795,7 +1795,7 @@ dependencies = [ "frunk_core", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1807,7 +1807,7 @@ dependencies = [ "frunk_core", "frunk_proc_macro_helpers", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1901,7 +1901,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -2175,7 +2175,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -2264,7 +2264,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -2427,9 +2427,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http 1.1.0", @@ -2444,7 +2444,7 @@ dependencies = [ "bytes", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -2468,9 +2468,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.29" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -2492,15 +2492,15 @@ dependencies = [ [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "httparse", "itoa 1.0.11", "pin-project-lite", @@ -2516,7 +2516,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.29", + "hyper 0.14.30", "native-tls", "tokio", "tokio-native-tls 0.3.1", @@ -2524,16 +2524,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", + "http-body 1.0.1", + "hyper 1.4.1", "pin-project-lite", "socket2 0.5.7", "tokio", @@ -3002,12 +3002,12 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3042,12 +3042,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "line-wrap" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd1bc4d24ad230d21fb898d1116b1801d7adfc449d42026475862ab48b11e70e" - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -3238,7 +3232,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953cbbb6f9ba4b9304f4df79b98cdc9d14071ed93065a9fca11c00c5d9181b66" dependencies = [ - "hyper 0.14.29", + "hyper 0.14.30", "indexmap 1.9.3", "ipnet", "metrics 0.19.0", @@ -3927,9 +3921,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "open" -version = "5.1.4" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5ca541f22b1c46d4bb9801014f234758ab4297e7870b904b6a8415b980a7388" +checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" dependencies = [ "is-wsl", "libc", @@ -3938,9 +3932,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "c2823eb4c6453ed64055057ea8bd416eda38c71018723869dd043a3b1186115e" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -3959,7 +3953,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -3979,9 +3973,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -4156,9 +4150,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall 0.5.3", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -4217,9 +4211,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", "thiserror", @@ -4228,9 +4222,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" +checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" dependencies = [ "pest", "pest_generator", @@ -4238,22 +4232,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" +checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] name = "pest_meta" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" +checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" dependencies = [ "once_cell", "pest", @@ -4374,7 +4368,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -4421,7 +4415,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -4459,18 +4453,17 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e188d043c1a692985f78b5464853a263f1a27e5bd6322bad3a4078ee3c998a38" dependencies = [ - "dirs-next 1.0.2", + "dirs-next", ] [[package]] name = "plist" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d34169e64b3c7a80c8621a48adaf44e0cf62c78a9b25dd9dd35f1881a17cf9" +checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "indexmap 2.2.6", - "line-wrap", "quick-xml", "serde", "time", @@ -4963,9 +4956,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" dependencies = [ "memchr", ] @@ -5145,9 +5138,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] @@ -5261,7 +5254,7 @@ dependencies = [ "h2", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.29", + "hyper 0.14.30", "hyper-tls", "ipnet", "js-sys", @@ -5298,9 +5291,9 @@ dependencies = [ "futures-core", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "ipnet", "js-sys", @@ -5586,7 +5579,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -5619,9 +5612,9 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -5632,9 +5625,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -5686,13 +5679,24 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] +[[package]] +name = "serde-untagged" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2676ba99bd82f75cae5cbd2c8eda6fa0b8760f18978ea840e980dd5567b5c5b6" +dependencies = [ + "erased-serde", + "serde", + "typeid", +] + [[package]] name = "serde-value" version = "0.7.0" @@ -5714,13 +5718,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -5731,14 +5735,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] name = "serde_json" -version = "1.0.118" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "indexmap 2.2.6", "itoa 1.0.11", @@ -5764,7 +5768,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -5800,9 +5804,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.8.1" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" dependencies = [ "base64 0.22.1", "chrono", @@ -5812,7 +5816,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "serde_with_macros 3.8.1", + "serde_with_macros 3.9.0", "time", ] @@ -5830,14 +5834,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.8.1" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" dependencies = [ - "darling 0.20.9", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -6038,7 +6042,7 @@ dependencies = [ "objc2-foundation", "objc2-quartz-core", "raw-window-handle 0.6.2", - "redox_syscall 0.5.2", + "redox_syscall 0.5.3", "wasm-bindgen", "web-sys", "windows-sys 0.52.0", @@ -6304,9 +6308,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.68" +version = "2.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" dependencies = [ "proc-macro2", "quote", @@ -6322,7 +6326,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -6456,20 +6460,20 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2" [[package]] name = "tauri" -version = "2.0.0-beta.22" +version = "2.0.0-beta.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a258ecc5ac7ddade525f512c4962fd01cd0f5265e917b4572579c32c027bb31" +checksum = "3eab508aad4ae86e23865e294b20a7bb89bd7afea523897b7478329b841d4295" dependencies = [ "anyhow", "bytes", "cocoa", - "dirs-next 2.0.0", + "dirs", "dunce", "embed_plist", "futures-util", @@ -6506,18 +6510,18 @@ dependencies = [ "webkit2gtk", "webview2-com", "window-vibrancy 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "windows 0.56.0", + "windows 0.57.0", ] [[package]] name = "tauri-build" -version = "2.0.0-beta.17" +version = "2.0.0-beta.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b964bb6d03d97e24e12f896aab463b02a3c2ff76a60f728cc37b5548eb470e" +checksum = "498f587026501e4bbc5d6273b63f8956b03c37b3d3b2027f9c756fcd468e9c62" dependencies = [ "anyhow", "cargo_toml", - "dirs-next 2.0.0", + "dirs", "glob", "heck 0.5.0", "json-patch", @@ -6533,9 +6537,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-beta.17" +version = "2.0.0-beta.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3529cfa977ed7c097f2a5e8da19ecffbe61982450a6c819e6165b6d0cfd3dd3a" +checksum = "43bbc731067e319ef60601bf5716d1e706ee9ae28e38c0587f7165c7d6824cdf" dependencies = [ "base64 0.22.1", "brotli", @@ -6549,7 +6553,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", - "syn 2.0.68", + "syn 2.0.71", "tauri-utils", "thiserror", "time", @@ -6560,23 +6564,23 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-beta.17" +version = "2.0.0-beta.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f97dd80334f29314aa5f40b5fad10cb9feffd08e5a5324fd728613841e5d33" +checksum = "36b4a44346577ccde75a24c62405a4c3b4f7a3a76614ee6cf1ed14a0b756795c" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", "tauri-codegen", "tauri-utils", ] [[package]] name = "tauri-plugin" -version = "2.0.0-beta.17" +version = "2.0.0-beta.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c8385fd0a4f661f5652b0d9e2d7256187d553bb174f88564d10ebcfa6a3af53" +checksum = "1abe0b85472516d1033ba251ac81b9f18f02725aadcaad697c8b727e6505a6ad" dependencies = [ "anyhow", "glob", @@ -6591,8 +6595,8 @@ dependencies = [ [[package]] name = "tauri-plugin-fs" -version = "2.0.0-beta.9" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#6dedb3fa6d4a592f3a5f4d9a4ffb9732449ddc2d" +version = "2.0.0-beta.11" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#93bdb6d133b89d990ddd5470536edfe4cb617e89" dependencies = [ "anyhow", "glob", @@ -6609,8 +6613,8 @@ dependencies = [ [[package]] name = "tauri-plugin-os" -version = "2.0.0-beta.6" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#6dedb3fa6d4a592f3a5f4d9a4ffb9732449ddc2d" +version = "2.0.0-beta.8" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#93bdb6d133b89d990ddd5470536edfe4cb617e89" dependencies = [ "gethostname", "log", @@ -6626,8 +6630,8 @@ dependencies = [ [[package]] name = "tauri-plugin-shell" -version = "2.0.0-beta.7" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#6dedb3fa6d4a592f3a5f4d9a4ffb9732449ddc2d" +version = "2.0.0-beta.9" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#93bdb6d133b89d990ddd5470536edfe4cb617e89" dependencies = [ "encoding_rs", "log", @@ -6646,8 +6650,8 @@ dependencies = [ [[package]] name = "tauri-plugin-single-instance" -version = "2.0.0-beta.9" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#6dedb3fa6d4a592f3a5f4d9a4ffb9732449ddc2d" +version = "2.0.0-beta.11" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#93bdb6d133b89d990ddd5470536edfe4cb617e89" dependencies = [ "log", "serde", @@ -6660,9 +6664,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.0.0-beta.18" +version = "2.0.0-beta.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7dc96172a43536236ab55b7da7b8461bf75810985e668589e2395cb476937cb" +checksum = "fe978df03966febbebc608931dc2cf26ef94df70855a18b05f07134cf474de09" dependencies = [ "dpi", "gtk", @@ -6674,14 +6678,14 @@ dependencies = [ "tauri-utils", "thiserror", "url", - "windows 0.56.0", + "windows 0.57.0", ] [[package]] name = "tauri-runtime-wry" -version = "2.0.0-beta.18" +version = "2.0.0-beta.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4fd913b1f14a9b618c7f3ae35656d3aa759767fcb95b72006357c12b9d0b09" +checksum = "11e4d568f61095f507b3fc4254dfbfff3b20de2a1d66167ffca3f6d90b14db8f" dependencies = [ "cocoa", "gtk", @@ -6697,15 +6701,15 @@ dependencies = [ "url", "webkit2gtk", "webview2-com", - "windows 0.56.0", + "windows 0.57.0", "wry", ] [[package]] name = "tauri-utils" -version = "2.0.0-beta.17" +version = "2.0.0-beta.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f24a9c20d676a3f025331cc1c3841256ba88c9f25fb7fae709d2b3089c50d90" +checksum = "e20e51856f343c503892749b27d34042e6ca83a0369a12de3c5552d9874d04e8" dependencies = [ "brotli", "cargo_metadata", @@ -6725,8 +6729,9 @@ dependencies = [ "schemars", "semver 1.0.23", "serde", + "serde-untagged", "serde_json", - "serde_with 3.8.1", + "serde_with 3.9.0", "swift-rs", "thiserror", "toml 0.8.2", @@ -6795,22 +6800,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -6825,9 +6830,9 @@ dependencies = [ [[package]] name = "tiberius" -version = "0.11.7" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66303a42b7c5daffb95c10cd8f3007a9c29b3e90128cf42b3738f58102aa2516" +checksum = "091052ba8f20c1e14f85913a5242a663a09d17ff4c0137b9b1f0735cb3c5dabc" dependencies = [ "async-native-tls", "async-trait", @@ -6888,9 +6893,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -6903,9 +6908,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" dependencies = [ "backtrace", "bytes", @@ -6928,7 +6933,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -7127,7 +7132,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -7307,6 +7312,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "typeid" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "059d83cc991e7a42fc37bd50941885db0888e34209f8cfd9aab07ddec03bc9cf" + [[package]] name = "typenum" version = "1.17.0" @@ -7488,9 +7499,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "uuid" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "getrandom 0.2.15", "serde", @@ -7604,7 +7615,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", "wasm-bindgen-shared", ] @@ -7638,7 +7649,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -7724,16 +7735,16 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webview2-com" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c914dd492a52f0377bef56fd1b6e74a79090f9ee631d625d5b505a00e4538b6" +checksum = "6516cfa64c6b3212686080eeec378e662c2af54bb2a5b2a22749673f5cb2226f" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows 0.56.0", - "windows-core 0.56.0", - "windows-implement 0.56.0", - "windows-interface 0.56.0", + "windows 0.57.0", + "windows-core 0.57.0", + "windows-implement", + "windows-interface", ] [[package]] @@ -7744,18 +7755,18 @@ checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] name = "webview2-com-sys" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a46bcf03482ec28eeb764ca788f67998cde4213adfbbfa90462622058530f5e" +checksum = "c76d5b77320ff155660be1df3e6588bc85c75f1a9feef938cc4dc4dd60d1d7cf" dependencies = [ "thiserror", - "windows 0.56.0", - "windows-core 0.56.0", + "windows 0.57.0", + "windows-core 0.57.0", ] [[package]] @@ -7842,16 +7853,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows" -version = "0.56.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" -dependencies = [ - "windows-core 0.56.0", - "windows-targets 0.52.5", -] - [[package]] name = "windows" version = "0.57.0" @@ -7859,7 +7860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" dependencies = [ "windows-core 0.57.0", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -7868,19 +7869,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-core" -version = "0.56.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" -dependencies = [ - "windows-implement 0.56.0", - "windows-interface 0.56.0", - "windows-result", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -7889,21 +7878,10 @@ version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" dependencies = [ - "windows-implement 0.57.0", - "windows-interface 0.57.0", + "windows-implement", + "windows-interface", "windows-result", - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-implement" -version = "0.56.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.68", + "windows-targets 0.52.6", ] [[package]] @@ -7914,18 +7892,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", -] - -[[package]] -name = "windows-interface" -version = "0.56.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -7936,7 +7903,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -7945,7 +7912,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -7972,7 +7939,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -8007,18 +7974,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -8027,7 +7994,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -8044,9 +8011,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -8062,9 +8029,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -8080,15 +8047,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -8104,9 +8071,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -8122,9 +8089,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -8140,9 +8107,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -8158,9 +8125,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -8193,9 +8160,9 @@ dependencies = [ [[package]] name = "wry" -version = "0.40.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa597526af53f310a8e6218630c5024fdde8271f229e70d7d2fc70b52b8fb1e" +checksum = "68b00c945786b02d7805d09a969fa36d0eee4e0bd4fb3ec2a79d2bf45a1b44cd" dependencies = [ "base64 0.22.1", "block", @@ -8227,8 +8194,8 @@ dependencies = [ "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows 0.56.0", - "windows-core 0.56.0", + "windows 0.57.0", + "windows-core 0.57.0", "windows-version", "x11-dl", ] @@ -8339,22 +8306,22 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] diff --git a/src-tauri/prisma/schema.prisma b/src-tauri/prisma/schema.prisma index 0ed79c2..4801fac 100644 --- a/src-tauri/prisma/schema.prisma +++ b/src-tauri/prisma/schema.prisma @@ -65,7 +65,7 @@ model Client { model Document { id Int @id @default(autoincrement()) - number String @unique + number String documentType String // ENUM = INVOICE, PROFORMA, RECEIVE client Client @relation(fields: [clientId], references: [id]) diff --git a/src-tauri/src/commands/document.rs b/src-tauri/src/commands/document.rs index 303ba35..e003da9 100644 --- a/src-tauri/src/commands/document.rs +++ b/src-tauri/src/commands/document.rs @@ -147,29 +147,36 @@ pub async fn create_document(client: DbState<'_>, data: document::Data) -> Resul .exec() .await; - if let Some(items) = data.items { - for item in items.iter() { - let _ = client - .document_item() - .create( - document::id::equals(res.as_ref().unwrap().company_id), - item.description.clone(), - item.quantity, - item.price, - vec![], - ) - .exec() - .await - .unwrap(); - } - } - match res { - Ok(_) => { + Ok(created_document) => { + if let Some(items) = data.items { + for item in items.iter() { + let item_res = client + .document_item() + .create( + document::id::equals(created_document.id), + item.description.clone(), + item.quantity, + item.price, + vec![], + ) + .exec() + .await; + + if let Err(e) = item_res { + error!("Error creating document item: {}", e); + return Err(format!("Error creating document item: {}", e)); + } + } + } + update_count(client, data.company_id, "Invoice").await; Ok(()) } - Err(e) => Err(e.to_string()), + Err(e) => { + error!("Error creating document: {}", e); + Err(e.to_string()) + } } } diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 06949db..9878105 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -26,7 +26,7 @@ mod util; use migrator::new_client; use prisma::*; use std::sync::Arc; -use tauri::{Manager, State}; +use tauri::{Emitter, Manager, State}; #[cfg(target_os = "macos")] use window_ext::{ToolbarThickness, WindowExt}; @@ -34,7 +34,7 @@ use window_ext::{ToolbarThickness, WindowExt}; use window_vibrancy::NSVisualEffectMaterial; #[cfg(target_os = "windows")] -use window_vibrancy::apply_mica; +use window_vibrancy::apply_acrylic; #[cfg(target_os = "macos")] use window_vibrancy::apply_vibrancy; @@ -85,8 +85,8 @@ async fn main() { .expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS"); #[cfg(target_os = "windows")] - apply_mica(&window, Some(true)) - .expect("Unsupported platform! 'apply_mica' is only supported on Windows"); + apply_acrylic(&window) + .expect("Unsupported platform! 'apply_acrylic' is only supported on Windows"); Ok(()) }) diff --git a/src/screens/.DS_Store b/src/screens/.DS_Store index 960069d..e5d256a 100644 Binary files a/src/screens/.DS_Store and b/src/screens/.DS_Store differ diff --git a/src/screens/Dashboard/index.tsx b/src/screens/Dashboard/index.tsx index bcaceef..6b56381 100644 --- a/src/screens/Dashboard/index.tsx +++ b/src/screens/Dashboard/index.tsx @@ -40,10 +40,11 @@ const Dashboard: ParentComponent = (props) => { }> - {props.children} diff --git a/src/screens/Dashboard/pages/Other/Clients/ManageClient.tsx b/src/screens/Dashboard/pages/Other/Clients/ManageClient.tsx index f8fb630..8b98bdf 100644 --- a/src/screens/Dashboard/pages/Other/Clients/ManageClient.tsx +++ b/src/screens/Dashboard/pages/Other/Clients/ManageClient.tsx @@ -34,7 +34,7 @@ const ManageClient: Component = () => { bankAccount: undefined, bankIban: undefined, } as Client, - validatorAdapter: zodValidator, + validatorAdapter: zodValidator(), onSubmitInvalid: (e) => { console.log("invalid", e.formApi.state.errors); }, @@ -99,7 +99,7 @@ const ManageClient: Component = () => { label={t("pages.other.clients.form.name")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -116,7 +116,7 @@ const ManageClient: Component = () => { label={t("pages.other.clients.form.email")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -141,7 +141,7 @@ const ManageClient: Component = () => { label={t("pages.other.clients.form.cin")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -152,7 +152,7 @@ const ManageClient: Component = () => { label={t("pages.other.clients.form.vatId")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -165,7 +165,7 @@ const ManageClient: Component = () => { label={t("pages.other.clients.form.address")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -176,7 +176,7 @@ const ManageClient: Component = () => { label={t("pages.other.clients.form.city")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -187,7 +187,7 @@ const ManageClient: Component = () => { label={t("pages.other.clients.form.zip")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -198,7 +198,7 @@ const ManageClient: Component = () => { label={t("pages.other.clients.form.phone")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -211,7 +211,7 @@ const ManageClient: Component = () => { label={t("pages.other.clients.form.bankAccount")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -222,7 +222,7 @@ const ManageClient: Component = () => { label={t("pages.other.clients.form.bankIban")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} diff --git a/src/screens/Dashboard/pages/Other/Currencies/ManageCurrency.tsx b/src/screens/Dashboard/pages/Other/Currencies/ManageCurrency.tsx index 9a9a0ca..d844f89 100644 --- a/src/screens/Dashboard/pages/Other/Currencies/ManageCurrency.tsx +++ b/src/screens/Dashboard/pages/Other/Currencies/ManageCurrency.tsx @@ -26,7 +26,7 @@ const ManageCurrency: Component = () => { code: "", rate: 1, } as Currency, - validatorAdapter: zodValidator, + validatorAdapter: zodValidator(), onSubmitInvalid: (e) => { console.log("invalid", e.formApi.state.errors); }, @@ -95,7 +95,7 @@ const ManageCurrency: Component = () => { label={t("pages.other.currencies.form.name")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -106,7 +106,7 @@ const ManageCurrency: Component = () => { label={t("pages.other.currencies.form.code")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -118,7 +118,7 @@ const ManageCurrency: Component = () => { label={t("pages.other.currencies.form.rate")} defaultValue={field().state.value} onChange={(data) => field().handleChange(Number(data))} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} diff --git a/src/screens/Dashboard/pages/Sales/ManageDocument.tsx b/src/screens/Dashboard/pages/Sales/ManageDocument.tsx index 92bc490..80c4bb9 100644 --- a/src/screens/Dashboard/pages/Sales/ManageDocument.tsx +++ b/src/screens/Dashboard/pages/Sales/ManageDocument.tsx @@ -41,25 +41,40 @@ const ManageDocument: Component = (props) => { const navigate = useNavigate(); const settingsService = useSelector((state) => state.settingsService); - const [templates] = createResource(async () => await getTemplates({ skip: 0, take: 1000 }, props.type)); - const [clients] = createResource({ skip: 0, take: 1000 }, getClients); - const [currencies] = createResource({ skip: 0, take: 1000 }, getCurrencies); + const [templates] = createResource(() => getTemplates({ skip: 0, take: 1000 }, props.type)); + const [clients] = createResource(() => getClients({ skip: 0, take: 1000 })); + const [currencies] = createResource(() => getCurrencies({ skip: 0, take: 1000 })); + + const getDocumentPrefix = () => { + switch (props.type) { + case DocumentType.INVOICE: + return settingsService.settings.invoicePrefix; + case DocumentType.PROFORMA: + return settingsService.settings.proformaPrefix; + case DocumentType.RECEIVE: + return settingsService.settings.receivePrefix; + default: + return ""; + } + }; + + const getDocumentCounter = () => { + switch (props.type) { + case DocumentType.INVOICE: + return settingsService.settings.invoiceCounter + 1; + case DocumentType.PROFORMA: + return settingsService.settings.proformaCounter + 1; + case DocumentType.RECEIVE: + return settingsService.settings.receiveCounter + 1; + default: + return 1; + } + }; const form = createForm(() => ({ defaultValues: { id: 0, - number: generateDocumentNumber( - props.type === DocumentType.INVOICE - ? settingsService.settings.invoicePrefix - : props.type === DocumentType.PROFORMA - ? settingsService.settings.proformaPrefix - : settingsService.settings.receivePrefix, - props.type === DocumentType.INVOICE - ? settingsService.settings.invoiceCounter + 1 - : props.type === DocumentType.RECEIVE - ? settingsService.settings.proformaCounter + 1 - : settingsService.settings.receiveCounter + 1, - ), + number: generateDocumentNumber(getDocumentPrefix(), getDocumentCounter()), clientId: undefined as number | undefined, templateId: settingsService.settings.defaultTemplate.id, documentType: props.type, @@ -69,9 +84,8 @@ const ManageDocument: Component = (props) => { status: "DRAFT", items: [], } as ManageDocumentData, - validatorAdapter: zodValidator, + validatorAdapter: zodValidator(), onSubmit: async (document) => { - console.log(document.value); try { if (props.id) { await updateDocument({ @@ -95,7 +109,6 @@ const ManageDocument: Component = (props) => { onMount(async () => { if (props.id) { const document = await getDocument(Number.parseInt(props.id)); - console.log(document); form.update({ ...form.options, defaultValues: { @@ -108,16 +121,187 @@ const ManageDocument: Component = (props) => { } }); + const handleDeleteDocument = async () => { + if (!props.id) return; + try { + await deleteDocument(Number.parseInt(props.id)); + toast.success(t("pages.sales.document.toast.deleted")); + navigate(props.url); + } catch (e) { + toast.error(e as string); + } + }; + + const renderFormFields = () => ( + <> + + + {(field) => ( + field().handleChange(data)} + errors={field().state.meta.errors} + /> + )} + + + {(field) => ( + + ({ id: client.id, label: client.name })) ?? []} + label={t("pages.sales.document.client")} + defaultValueId={field().state.value} + onSelect={(data) => field().handleChange(data.id as number)} + errors={field().state.meta.errors} + /> + + )} + + + {(field) => ( + + ({ id: template.id, label: template.name })) ?? []} + defaultValueId={field().state.value} + label={t("pages.sales.document.template")} + onSelect={(data) => field().handleChange(data.id as number)} + /> + + )} + + + {(field) => ( + + ({ id: currency.id, label: currency.name })) ?? []} + defaultValueId={field().state.value} + label={t("pages.sales.document.currency")} + onSelect={(data) => field().handleChange(data.id as string)} + /> + + )} + + + {(field) => ( + field().handleChange(data.id as "DRAFT" | "SENT" | "PAID" | "CANCELLED" | "OVERDUE")} + /> + )} + + + + + {(field) => ( + field().handleChange(new Date(data))} + errors={field().state.meta.errors} + /> + )} + + + {(field) => ( + field().handleChange(new Date(data))} + errors={field().state.meta.errors} + /> + )} + + + + + {(field) => ( + <> + + {(_item, i) => ( + + + {(subField) => ( + subField().handleChange(data)} + /> + )} + + + {(subField) => ( + subField().handleChange(Number(data))} + /> + )} + + + {(subField) => ( + subField().handleChange(Number(data))} + errors={subField().state.meta.errors} + /> + )} + + field().removeValue(i)} class="text-danger w-5 h-5 cursor-pointer mb-2" /> + + )} + + field().pushValue({ id: 0, description: "", quantity: 1, price: 0, documentId: 0 })} + > + {t("pages.sales.document.addItem")} + + > + )} + + + > + ); + return ( = (props) => { {t("other.save")} , - { - try { - await deleteDocument(Number.parseInt(props.id as string)); - toast.success(t("pages.sales.document.toast.deleted")); - navigate(props.url); - } catch (e) { - toast.error(e as string); - } - }} - buttonType="secondary" - > + , - { - getInitializedPrintWindow(props.id as unknown as number); - }} - buttonType="secondary" - > + getInitializedPrintWindow(Number(props.id))} buttonType="secondary"> , ]} /> - - - - {(field) => ( - field().handleChange(data)} - errors={field().state.meta.touchedErrors} - /> - )} - - - {(field) => ( - - ({ id: client.id, label: client.name })) ?? []} - label={t("pages.sales.document.client")} - defaultValueId={field().state.value} - onSelect={(data) => field().handleChange(data.id as number)} - errors={field().state.meta.touchedErrors} - /> - - )} - - - {(field) => ( - - ({ id: template.id, label: template.name })) ?? []} - defaultValueId={field().state.value} - label={t("pages.sales.document.template")} - onSelect={(data) => field().handleChange(data.id as number)} - /> - - )} - - - - {(field) => ( - - ({ id: currency.id, label: currency.name })) ?? []} - defaultValueId={field().state.value} - label={t("pages.sales.document.currency")} - onSelect={(data) => field().handleChange(data.id as string)} - /> - - )} - - - - {(field) => ( - - field().handleChange(data.id as "DRAFT" | "SENT" | "PAID" | "CANCELLED" | "OVERDUE") - } - /> - )} - - - - - {(field) => ( - field().handleChange(new Date(data))} - errors={field().state.meta.touchedErrors} - /> - )} - - - {(field) => ( - field().handleChange(new Date(data))} - errors={field().state.meta.touchedErrors} - /> - )} - - - - - {(field) => ( - <> - - {(_item, i) => ( - - - {(subField) => ( - subField().handleChange(data)} - /> - )} - - - {(subField) => ( - subField().handleChange(Number(data))} - /> - )} - - - {(subField) => ( - subField().handleChange(Number(data))} - errors={subField().state.meta.touchedErrors} - /> - )} - - - field().removeValue(i)} class="text-danger w-5 h-5 cursor-pointer mb-2" /> - - )} - - - field().pushValue({ id: 0, description: "", quantity: 1, price: 0, documentId: 0 })} - > - {t("pages.sales.document.addItem")} - - > - )} - - - + {renderFormFields()} ); }; diff --git a/src/screens/Setup/index.tsx b/src/screens/Setup/index.tsx index e35c18e..1d6a8f4 100644 --- a/src/screens/Setup/index.tsx +++ b/src/screens/Setup/index.tsx @@ -36,7 +36,7 @@ const SetupWizard: Component = () => { bankAccount: undefined, bankIban: undefined, } as ManageCompanyData, - validatorAdapter: zodValidator, + validatorAdapter: zodValidator(), onSubmitInvalid: (e) => { console.log("invalid", e.formApi.state.errors); }, @@ -64,13 +64,13 @@ const SetupWizard: Component = () => { - + - + {t("setup.welcome")} - {t("setup.welcome_message")} + {t("setup.welcome_message")} setCurrentStep(1)} @@ -119,7 +119,7 @@ const SetupWizard: Component = () => { label={t("setup.step2.company_name")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -131,7 +131,7 @@ const SetupWizard: Component = () => { label={t("setup.step2.CIN")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -143,7 +143,7 @@ const SetupWizard: Component = () => { label={t("setup.step2.vatID")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -160,7 +160,7 @@ const SetupWizard: Component = () => { label={t("setup.step2.account")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -174,7 +174,7 @@ const SetupWizard: Component = () => { label={t("setup.step2.iban")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -191,7 +191,7 @@ const SetupWizard: Component = () => { label={t("setup.step2.street")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -203,7 +203,7 @@ const SetupWizard: Component = () => { label={t("setup.step2.city")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -215,7 +215,7 @@ const SetupWizard: Component = () => { label={t("setup.step2.zip")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -233,7 +233,7 @@ const SetupWizard: Component = () => { label={t("setup.step2.email")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} @@ -245,7 +245,7 @@ const SetupWizard: Component = () => { label={t("setup.step2.phone")} defaultValue={field().state.value} onChange={(data) => field().handleChange(data)} - errors={field().state.meta.touchedErrors} + errors={field().state.meta.errors} /> )} diff --git a/src/shared/components/PdfRenderer.tsx b/src/shared/components/PdfRenderer.tsx index c1756a2..9349cf3 100644 --- a/src/shared/components/PdfRenderer.tsx +++ b/src/shared/components/PdfRenderer.tsx @@ -1,6 +1,7 @@ import { type Component, createSignal, onMount } from "solid-js"; import { Liquid } from "liquidjs"; import type { GetPrintDocumentResult } from "@/bindings"; +import { format } from "date-fns"; interface PdfRendererProps { data: GetPrintDocumentResult | undefined; @@ -16,13 +17,19 @@ const PdfRenderer: Component = (props) => { return; } - const engine = new Liquid(); - const renderedContent = await engine.parseAndRender(data.template.html, data); + // Format dates to DD.MM.YYYY + const formattedData = { + ...data, + issueDate: format(new Date(data.issueDate), "dd.MM.yyyy"), + dueDate: format(new Date(data.dueDate), "dd.MM.yyyy"), + }; + const engine = new Liquid(); + const renderedContent = await engine.parseAndRender(data.template.html, formattedData); setPdfContent(renderedContent); }); - return ; + return ; }; export default PdfRenderer; diff --git a/src/styles/index.css b/src/styles/index.css index bbead7d..2decb53 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -101,20 +101,12 @@ tr td:last-child { border-bottom-right-radius: 6px; } */ -@media print { - body { - width: 21cm !important; - height: 20cm !important; - margin: 0; - color: black; - background-color: white; - print-color-adjust: exact !important; - } -} .print { - width: 21cm !important; - margin: 0; - color: black; - background-color: white; - print-color-adjust: exact !important; + width: 21cm !important; + height: 296mm !important; + padding: 2rem; + margin: 0; + color: black; + background-color: white; + print-color-adjust: exact !important; } \ No newline at end of file
{t("setup.welcome_message")}