🐛 修复主题切换响应异常

This commit is contained in:
目棃
2024-12-11 23:10:31 +08:00
parent 7108741400
commit bb217cf7a8
6 changed files with 1314 additions and 1385 deletions

View File

@@ -3,7 +3,7 @@
"version": "0.6.5", "version": "0.6.5",
"description": "Game Tool for GenshinImpact player", "description": "Game Tool for GenshinImpact player",
"private": true, "private": true,
"packageManager": "pnpm@9.14.4", "packageManager": "pnpm@9.15.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "tauri build", "build": "tauri build",
@@ -68,15 +68,15 @@
"dependencies": { "dependencies": {
"@mdi/font": "7.4.47", "@mdi/font": "7.4.47",
"@tauri-apps/api": "^2.1.1", "@tauri-apps/api": "^2.1.1",
"@tauri-apps/plugin-deep-link": "^2.0.1", "@tauri-apps/plugin-deep-link": "^2.2.0",
"@tauri-apps/plugin-dialog": "^2.0.1", "@tauri-apps/plugin-dialog": "^2.2.0",
"@tauri-apps/plugin-fs": "^2.0.3", "@tauri-apps/plugin-fs": "^2.2.0",
"@tauri-apps/plugin-http": "^2.0.1", "@tauri-apps/plugin-http": "^2.2.0",
"@tauri-apps/plugin-log": "^2.0.1", "@tauri-apps/plugin-log": "^2.2.0",
"@tauri-apps/plugin-os": "^2.0.0", "@tauri-apps/plugin-os": "^2.2.0",
"@tauri-apps/plugin-process": "^2.0.0", "@tauri-apps/plugin-process": "^2.2.0",
"@tauri-apps/plugin-shell": "^2.0.1", "@tauri-apps/plugin-shell": "^2.2.0",
"@tauri-apps/plugin-sql": "^2.0.2", "@tauri-apps/plugin-sql": "^2.2.0",
"ajv": "^8.17.1", "ajv": "^8.17.1",
"artplayer": "^5.2.1", "artplayer": "^5.2.1",
"clipboard": "^2.0.11", "clipboard": "^2.0.11",
@@ -85,7 +85,7 @@
"html2canvas": "^1.4.1", "html2canvas": "^1.4.1",
"js-md5": "^0.8.3", "js-md5": "^0.8.3",
"jsencrypt": "^3.3.2", "jsencrypt": "^3.3.2",
"pinia": "^2.2.8", "pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^4.1.3", "pinia-plugin-persistedstate": "^4.1.3",
"uuid": "^11.0.3", "uuid": "^11.0.3",
"vue": "^3.5.13", "vue": "^3.5.13",
@@ -102,9 +102,9 @@
"@tauri-apps/cli": "2.1.0", "@tauri-apps/cli": "2.1.0",
"@types/color-convert": "^2.0.4", "@types/color-convert": "^2.0.4",
"@types/js-md5": "^0.7.2", "@types/js-md5": "^0.7.2",
"@types/node": "^22.10.1", "@types/node": "^22.10.2",
"@types/uuid": "^10.0.0", "@types/uuid": "^10.0.0",
"@typescript-eslint/parser": "^8.17.0", "@typescript-eslint/parser": "^8.18.0",
"@vitejs/plugin-vue": "^5.2.1", "@vitejs/plugin-vue": "^5.2.1",
"concurrently": "^9.1.0", "concurrently": "^9.1.0",
"eslint": "^9.16.0", "eslint": "^9.16.0",
@@ -116,9 +116,9 @@
"globals": "^15.13.0", "globals": "^15.13.0",
"husky": "^9.1.7", "husky": "^9.1.7",
"jsonc-eslint-parser": "^2.4.0", "jsonc-eslint-parser": "^2.4.0",
"lint-staged": "^15.2.10", "lint-staged": "^15.2.11",
"oxlint": "^0.14.0", "oxlint": "^0.15.0",
"prettier": "3.4.1", "prettier": "3.4.2",
"stylelint": "^16.11.0", "stylelint": "^16.11.0",
"stylelint-config-idiomatic-order": "^10.0.0", "stylelint-config-idiomatic-order": "^10.0.0",
"stylelint-config-standard-vue": "^1.0.0", "stylelint-config-standard-vue": "^1.0.0",
@@ -127,9 +127,9 @@
"stylelint-order": "^6.0.4", "stylelint-order": "^6.0.4",
"stylelint-prettier": "^5.0.2", "stylelint-prettier": "^5.0.2",
"typescript": "^5.7.2", "typescript": "^5.7.2",
"typescript-eslint": "^8.17.0", "typescript-eslint": "^8.18.0",
"vite": "^6.0.2", "vite": "^6.0.3",
"vite-plugin-vue-devtools": "^7.6.7", "vite-plugin-vue-devtools": "^7.6.8",
"vite-plugin-vuetify": "^2.0.4", "vite-plugin-vuetify": "^2.0.4",
"vue-eslint-parser": "^9.4.3", "vue-eslint-parser": "^9.4.3",
"yaml-eslint-parser": "^1.2.3" "yaml-eslint-parser": "^1.2.3"

2344
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

212
src-tauri/Cargo.lock generated
View File

@@ -305,9 +305,9 @@ dependencies = [
[[package]] [[package]]
name = "atk" name = "atk"
version = "0.18.0" version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b"
dependencies = [ dependencies = [
"atk-sys", "atk-sys",
"glib", "glib",
@@ -316,9 +316,9 @@ dependencies = [
[[package]] [[package]]
name = "atk-sys" name = "atk-sys"
version = "0.18.0" version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086"
dependencies = [ dependencies = [
"glib-sys", "glib-sys",
"gobject-sys", "gobject-sys",
@@ -617,9 +617,9 @@ dependencies = [
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.2.2" version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d"
dependencies = [ dependencies = [
"shlex", "shlex",
] ]
@@ -665,9 +665,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]] [[package]]
name = "chrono" name = "chrono"
version = "0.4.38" version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [ dependencies = [
"android-tzdata", "android-tzdata",
"iana-time-zone", "iana-time-zone",
@@ -1306,15 +1306,15 @@ dependencies = [
[[package]] [[package]]
name = "fastrand" name = "fastrand"
version = "2.2.0" version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]] [[package]]
name = "fdeflate" name = "fdeflate"
version = "0.3.6" version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07c6f4c64c1d33a3111c4466f7365ebdcc37c5bd1ea0d62aae2e3d722aacbedb" checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
dependencies = [ dependencies = [
"simd-adler32", "simd-adler32",
] ]
@@ -1525,9 +1525,9 @@ dependencies = [
[[package]] [[package]]
name = "gdk" name = "gdk"
version = "0.18.0" version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646" checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691"
dependencies = [ dependencies = [
"cairo-rs", "cairo-rs",
"gdk-pixbuf", "gdk-pixbuf",
@@ -1566,9 +1566,9 @@ dependencies = [
[[package]] [[package]]
name = "gdk-sys" name = "gdk-sys"
version = "0.18.0" version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7"
dependencies = [ dependencies = [
"cairo-sys-rs", "cairo-sys-rs",
"gdk-pixbuf-sys", "gdk-pixbuf-sys",
@@ -1583,9 +1583,9 @@ dependencies = [
[[package]] [[package]]
name = "gdkwayland-sys" name = "gdkwayland-sys"
version = "0.18.0" version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a" checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69"
dependencies = [ dependencies = [
"gdk-sys", "gdk-sys",
"glib-sys", "glib-sys",
@@ -1597,9 +1597,9 @@ dependencies = [
[[package]] [[package]]
name = "gdkx11" name = "gdkx11"
version = "0.18.0" version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce" checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe"
dependencies = [ dependencies = [
"gdk", "gdk",
"gdkx11-sys", "gdkx11-sys",
@@ -1611,9 +1611,9 @@ dependencies = [
[[package]] [[package]]
name = "gdkx11-sys" name = "gdkx11-sys"
version = "0.18.0" version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043" checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d"
dependencies = [ dependencies = [
"gdk-sys", "gdk-sys",
"glib-sys", "glib-sys",
@@ -1770,9 +1770,9 @@ dependencies = [
[[package]] [[package]]
name = "gtk" name = "gtk"
version = "0.18.1" version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c" checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a"
dependencies = [ dependencies = [
"atk", "atk",
"cairo-rs", "cairo-rs",
@@ -1791,9 +1791,9 @@ dependencies = [
[[package]] [[package]]
name = "gtk-sys" name = "gtk-sys"
version = "0.18.0" version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414"
dependencies = [ dependencies = [
"atk-sys", "atk-sys",
"cairo-sys-rs", "cairo-sys-rs",
@@ -1809,9 +1809,9 @@ dependencies = [
[[package]] [[package]]
name = "gtk3-macros" name = "gtk3-macros"
version = "0.18.0" version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e" checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d"
dependencies = [ dependencies = [
"proc-macro-crate 1.3.1", "proc-macro-crate 1.3.1",
"proc-macro-error", "proc-macro-error",
@@ -2337,9 +2337,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
[[package]] [[package]]
name = "js-sys" name = "js-sys"
version = "0.3.74" version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"wasm-bindgen", "wasm-bindgen",
@@ -2426,9 +2426,9 @@ dependencies = [
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.167" version = "0.2.168"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
[[package]] [[package]]
name = "libloading" name = "libloading"
@@ -3356,9 +3356,9 @@ dependencies = [
[[package]] [[package]]
name = "png" name = "png"
version = "0.17.14" version = "0.17.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52f9d46a34a05a6a57566bc2bfae066ef07585a6e3fa30fbbdff5936380623f0" checksum = "b67582bd5b65bdff614270e2ea89a1cf15bef71245cc1e5f7ea126977144211d"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"crc32fast", "crc32fast",
@@ -3537,7 +3537,7 @@ dependencies = [
"rustc-hash", "rustc-hash",
"rustls", "rustls",
"socket2", "socket2",
"thiserror 2.0.4", "thiserror 2.0.6",
"tokio", "tokio",
"tracing", "tracing",
] ]
@@ -3556,7 +3556,7 @@ dependencies = [
"rustls", "rustls",
"rustls-pki-types", "rustls-pki-types",
"slab", "slab",
"thiserror 2.0.4", "thiserror 2.0.6",
"tinyvec", "tinyvec",
"tracing", "tracing",
"web-time", "web-time",
@@ -3564,9 +3564,9 @@ dependencies = [
[[package]] [[package]]
name = "quinn-udp" name = "quinn-udp"
version = "0.5.7" version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" checksum = "52cd4b1eff68bf27940dd39811292c49e007f4d0b4c357358dc9b0197be6b527"
dependencies = [ dependencies = [
"cfg_aliases", "cfg_aliases",
"libc", "libc",
@@ -3680,9 +3680,9 @@ checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.5.7" version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
] ]
@@ -3922,15 +3922,15 @@ dependencies = [
[[package]] [[package]]
name = "rustix" name = "rustix"
version = "0.38.41" version = "0.38.42"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"errno", "errno",
"libc", "libc",
"linux-raw-sys", "linux-raw-sys",
"windows-sys 0.52.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
@@ -4067,9 +4067,9 @@ dependencies = [
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.215" version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
@@ -4087,9 +4087,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.215" version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -4849,7 +4849,7 @@ dependencies = [
"tauri-runtime", "tauri-runtime",
"tauri-runtime-wry", "tauri-runtime-wry",
"tauri-utils", "tauri-utils",
"thiserror 2.0.4", "thiserror 2.0.6",
"tokio", "tokio",
"tray-icon", "tray-icon",
"url", "url",
@@ -4902,7 +4902,7 @@ dependencies = [
"sha2", "sha2",
"syn 2.0.90", "syn 2.0.90",
"tauri-utils", "tauri-utils",
"thiserror 2.0.4", "thiserror 2.0.6",
"time", "time",
"url", "url",
"uuid", "uuid",
@@ -4942,8 +4942,8 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-deep-link" name = "tauri-plugin-deep-link"
version = "2.0.2" version = "2.2.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#715a0477be8f6f77af0377f4eca2b649554446be" source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#c9acff99c6632884f475642bb060c4499a017c73"
dependencies = [ dependencies = [
"dunce", "dunce",
"rust-ini", "rust-ini",
@@ -4952,7 +4952,7 @@ dependencies = [
"tauri", "tauri",
"tauri-plugin", "tauri-plugin",
"tauri-utils", "tauri-utils",
"thiserror 2.0.4", "thiserror 2.0.6",
"tracing", "tracing",
"url", "url",
"windows-registry 0.3.0", "windows-registry 0.3.0",
@@ -4961,8 +4961,8 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-dialog" name = "tauri-plugin-dialog"
version = "2.0.4" version = "2.2.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#715a0477be8f6f77af0377f4eca2b649554446be" source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#c9acff99c6632884f475642bb060c4499a017c73"
dependencies = [ dependencies = [
"log", "log",
"raw-window-handle", "raw-window-handle",
@@ -4972,14 +4972,14 @@ dependencies = [
"tauri", "tauri",
"tauri-plugin", "tauri-plugin",
"tauri-plugin-fs", "tauri-plugin-fs",
"thiserror 2.0.4", "thiserror 2.0.6",
"url", "url",
] ]
[[package]] [[package]]
name = "tauri-plugin-fs" name = "tauri-plugin-fs"
version = "2.1.0" version = "2.2.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#715a0477be8f6f77af0377f4eca2b649554446be" source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#c9acff99c6632884f475642bb060c4499a017c73"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"dunce", "dunce",
@@ -4992,7 +4992,7 @@ dependencies = [
"tauri", "tauri",
"tauri-plugin", "tauri-plugin",
"tauri-utils", "tauri-utils",
"thiserror 2.0.4", "thiserror 2.0.6",
"toml 0.8.19", "toml 0.8.19",
"url", "url",
"uuid", "uuid",
@@ -5000,8 +5000,8 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-http" name = "tauri-plugin-http"
version = "2.0.4" version = "2.2.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#715a0477be8f6f77af0377f4eca2b649554446be" source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#c9acff99c6632884f475642bb060c4499a017c73"
dependencies = [ dependencies = [
"data-url", "data-url",
"http", "http",
@@ -5013,7 +5013,7 @@ dependencies = [
"tauri", "tauri",
"tauri-plugin", "tauri-plugin",
"tauri-plugin-fs", "tauri-plugin-fs",
"thiserror 2.0.4", "thiserror 2.0.6",
"tokio", "tokio",
"url", "url",
"urlpattern", "urlpattern",
@@ -5021,8 +5021,8 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-log" name = "tauri-plugin-log"
version = "2.0.3" version = "2.2.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#715a0477be8f6f77af0377f4eca2b649554446be" source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#c9acff99c6632884f475642bb060c4499a017c73"
dependencies = [ dependencies = [
"android_logger", "android_logger",
"byte-unit", "byte-unit",
@@ -5036,14 +5036,14 @@ dependencies = [
"swift-rs", "swift-rs",
"tauri", "tauri",
"tauri-plugin", "tauri-plugin",
"thiserror 2.0.4", "thiserror 2.0.6",
"time", "time",
] ]
[[package]] [[package]]
name = "tauri-plugin-os" name = "tauri-plugin-os"
version = "2.0.1" version = "2.2.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#715a0477be8f6f77af0377f4eca2b649554446be" source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#c9acff99c6632884f475642bb060c4499a017c73"
dependencies = [ dependencies = [
"gethostname", "gethostname",
"log", "log",
@@ -5054,13 +5054,13 @@ dependencies = [
"sys-locale", "sys-locale",
"tauri", "tauri",
"tauri-plugin", "tauri-plugin",
"thiserror 2.0.4", "thiserror 2.0.6",
] ]
[[package]] [[package]]
name = "tauri-plugin-process" name = "tauri-plugin-process"
version = "2.0.1" version = "2.2.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#715a0477be8f6f77af0377f4eca2b649554446be" source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#c9acff99c6632884f475642bb060c4499a017c73"
dependencies = [ dependencies = [
"tauri", "tauri",
"tauri-plugin", "tauri-plugin",
@@ -5068,8 +5068,8 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-shell" name = "tauri-plugin-shell"
version = "2.0.2" version = "2.2.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#715a0477be8f6f77af0377f4eca2b649554446be" source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#c9acff99c6632884f475642bb060c4499a017c73"
dependencies = [ dependencies = [
"encoding_rs", "encoding_rs",
"log", "log",
@@ -5082,19 +5082,19 @@ dependencies = [
"shared_child", "shared_child",
"tauri", "tauri",
"tauri-plugin", "tauri-plugin",
"thiserror 2.0.4", "thiserror 2.0.6",
"tokio", "tokio",
] ]
[[package]] [[package]]
name = "tauri-plugin-single-instance" name = "tauri-plugin-single-instance"
version = "2.0.2" version = "2.2.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#715a0477be8f6f77af0377f4eca2b649554446be" source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#c9acff99c6632884f475642bb060c4499a017c73"
dependencies = [ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"tauri", "tauri",
"thiserror 2.0.4", "thiserror 2.0.6",
"tracing", "tracing",
"windows-sys 0.59.0", "windows-sys 0.59.0",
"zbus 4.4.0", "zbus 4.4.0",
@@ -5102,8 +5102,8 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-sql" name = "tauri-plugin-sql"
version = "2.0.3" version = "2.2.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#715a0477be8f6f77af0377f4eca2b649554446be" source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#c9acff99c6632884f475642bb060c4499a017c73"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"indexmap 2.7.0", "indexmap 2.7.0",
@@ -5113,7 +5113,7 @@ dependencies = [
"sqlx", "sqlx",
"tauri", "tauri",
"tauri-plugin", "tauri-plugin",
"thiserror 2.0.4", "thiserror 2.0.6",
"time", "time",
"tokio", "tokio",
] ]
@@ -5132,7 +5132,7 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"tauri-utils", "tauri-utils",
"thiserror 2.0.4", "thiserror 2.0.6",
"url", "url",
"windows", "windows",
] ]
@@ -5192,7 +5192,7 @@ dependencies = [
"serde_json", "serde_json",
"serde_with", "serde_with",
"swift-rs", "swift-rs",
"thiserror 2.0.4", "thiserror 2.0.6",
"toml 0.8.19", "toml 0.8.19",
"url", "url",
"urlpattern", "urlpattern",
@@ -5251,11 +5251,11 @@ dependencies = [
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "2.0.4" version = "2.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47"
dependencies = [ dependencies = [
"thiserror-impl 2.0.4", "thiserror-impl 2.0.6",
] ]
[[package]] [[package]]
@@ -5271,9 +5271,9 @@ dependencies = [
[[package]] [[package]]
name = "thiserror-impl" name = "thiserror-impl"
version = "2.0.4" version = "2.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -5378,20 +5378,19 @@ dependencies = [
[[package]] [[package]]
name = "tokio-rustls" name = "tokio-rustls"
version = "0.26.0" version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37"
dependencies = [ dependencies = [
"rustls", "rustls",
"rustls-pki-types",
"tokio", "tokio",
] ]
[[package]] [[package]]
name = "tokio-stream" name = "tokio-stream"
version = "0.1.16" version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"pin-project-lite", "pin-project-lite",
@@ -5400,9 +5399,9 @@ dependencies = [
[[package]] [[package]]
name = "tokio-util" name = "tokio-util"
version = "0.7.12" version = "0.7.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078"
dependencies = [ dependencies = [
"bytes", "bytes",
"futures-core", "futures-core",
@@ -5802,9 +5801,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b"
[[package]] [[package]]
name = "wasm-bindgen" name = "wasm-bindgen"
version = "0.2.97" version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"once_cell", "once_cell",
@@ -5813,13 +5812,12 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-backend" name = "wasm-bindgen-backend"
version = "0.2.97" version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"log", "log",
"once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.90", "syn 2.0.90",
@@ -5828,9 +5826,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-futures" name = "wasm-bindgen-futures"
version = "0.4.47" version = "0.4.49"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"js-sys", "js-sys",
@@ -5841,9 +5839,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro" name = "wasm-bindgen-macro"
version = "0.2.97" version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe"
dependencies = [ dependencies = [
"quote", "quote",
"wasm-bindgen-macro-support", "wasm-bindgen-macro-support",
@@ -5851,9 +5849,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro-support" name = "wasm-bindgen-macro-support"
version = "0.2.97" version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -5864,9 +5862,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-shared" name = "wasm-bindgen-shared"
version = "0.2.97" version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6"
[[package]] [[package]]
name = "wasm-streams" name = "wasm-streams"
@@ -5943,9 +5941,9 @@ dependencies = [
[[package]] [[package]]
name = "web-sys" name = "web-sys"
version = "0.3.74" version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc"
dependencies = [ dependencies = [
"js-sys", "js-sys",
"wasm-bindgen", "wasm-bindgen",

View File

@@ -13,9 +13,9 @@ edition = "2021"
tauri-build = { version = "2.0.3", features = [] } tauri-build = { version = "2.0.3", features = [] }
[dependencies] [dependencies]
chrono = "0.4.38" chrono = "0.4.39"
log = "0.4.22" log = "0.4.22"
serde = { version = "1.0.215", features = ["derive"] } serde = { version = "1.0.216", features = ["derive"] }
serde_json = "1.0.133" serde_json = "1.0.133"
tauri = { version = "2.1.1", features = [] } tauri = { version = "2.1.1", features = [] }
tauri-utils = "2.1.0" tauri-utils = "2.1.0"
@@ -24,63 +24,63 @@ walkdir = "2.5.0"
# deep link 插件 # deep link 插件
[dependencies.tauri-plugin-deep-link] [dependencies.tauri-plugin-deep-link]
#git = "ssh://git@github.com/tauri-apps/plugins-workspace.git" git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
git = "https://github.com/tauri-apps/plugins-workspace.git" #git = "https://github.com/tauri-apps/plugins-workspace.git"
branch = "v2" branch = "v2"
# dialog 插件 # dialog 插件
[dependencies.tauri-plugin-dialog] [dependencies.tauri-plugin-dialog]
#git = "ssh://git@github.com/tauri-apps/plugins-workspace.git" git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
git = "https://github.com/tauri-apps/plugins-workspace.git" #git = "https://github.com/tauri-apps/plugins-workspace.git"
branch = "v2" branch = "v2"
# fs 插件 # fs 插件
[dependencies.tauri-plugin-fs] [dependencies.tauri-plugin-fs]
#git = "ssh://git@github.com/tauri-apps/plugins-workspace.git" git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
git = "https://github.com/tauri-apps/plugins-workspace.git" #git = "https://github.com/tauri-apps/plugins-workspace.git"
branch = "v2" branch = "v2"
# http 插件 # http 插件
[dependencies.tauri-plugin-http] [dependencies.tauri-plugin-http]
#git = "ssh://git@github.com/tauri-apps/plugins-workspace.git" git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
git = "https://github.com/tauri-apps/plugins-workspace.git" #git = "https://github.com/tauri-apps/plugins-workspace.git"
branch = "v2" branch = "v2"
features = ["unsafe-headers"] features = ["unsafe-headers"]
# log 插件 # log 插件
[dependencies.tauri-plugin-log] [dependencies.tauri-plugin-log]
#git = "ssh://git@github.com/tauri-apps/plugins-workspace.git" git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
git = "https://github.com/tauri-apps/plugins-workspace.git" #git = "https://github.com/tauri-apps/plugins-workspace.git"
branch = "v2" branch = "v2"
# os 插件 # os 插件
[dependencies.tauri-plugin-os] [dependencies.tauri-plugin-os]
#git = "ssh://git@github.com/tauri-apps/plugins-workspace.git" git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
git = "https://github.com/tauri-apps/plugins-workspace.git" #git = "https://github.com/tauri-apps/plugins-workspace.git"
branch = "v2" branch = "v2"
# process 插件 # process 插件
[dependencies.tauri-plugin-process] [dependencies.tauri-plugin-process]
#git = "ssh://git@github.com/tauri-apps/plugins-workspace.git" git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
git = "https://github.com/tauri-apps/plugins-workspace.git" #git = "https://github.com/tauri-apps/plugins-workspace.git"
branch = "v2" branch = "v2"
# shell 插件 # shell 插件
[dependencies.tauri-plugin-shell] [dependencies.tauri-plugin-shell]
#git = "ssh://git@github.com/tauri-apps/plugins-workspace.git" git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
git = "https://github.com/tauri-apps/plugins-workspace.git" #git = "https://github.com/tauri-apps/plugins-workspace.git"
branch = "v2" branch = "v2"
# single-instance 插件 # single-instance 插件
[dependencies.tauri-plugin-single-instance] [dependencies.tauri-plugin-single-instance]
#git = "ssh://git@github.com/tauri-apps/plugins-workspace.git" git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
git = "https://github.com/tauri-apps/plugins-workspace.git" #git = "https://github.com/tauri-apps/plugins-workspace.git"
branch = "v2" branch = "v2"
# sqlite 插件 # sqlite 插件
[dependencies.tauri-plugin-sql] [dependencies.tauri-plugin-sql]
#git = "ssh://git@github.com/tauri-apps/plugins-workspace.git" git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
git = "https://github.com/tauri-apps/plugins-workspace.git" #git = "https://github.com/tauri-apps/plugins-workspace.git"
branch = "v2" branch = "v2"
features = ["sqlite"] features = ["sqlite"]

View File

@@ -1,5 +1,5 @@
<template> <template>
<v-app :theme="vuetifyTheme"> <v-app v-model:theme="vuetifyTheme">
<TSidebar v-if="isMain" /> <TSidebar v-if="isMain" />
<v-main> <v-main>
<v-container :fluid="true" class="app-container"> <v-container :fluid="true" class="app-container">
@@ -17,7 +17,7 @@ import { Event, UnlistenFn } from "@tauri-apps/api/event";
import { currentMonitor, getCurrentWindow } from "@tauri-apps/api/window"; import { currentMonitor, getCurrentWindow } from "@tauri-apps/api/window";
import { mkdir } from "@tauri-apps/plugin-fs"; import { mkdir } from "@tauri-apps/plugin-fs";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import { computed, onBeforeMount, onMounted, onUnmounted, ref } from "vue"; import { computed, onMounted, onUnmounted, ref } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import TBackTop from "./components/app/t-backTop.vue"; import TBackTop from "./components/app/t-backTop.vue";
@@ -41,29 +41,23 @@ const vuetifyTheme = computed<string>(() => (theme.value === "dark" ? "dark" : "
let themeListener: UnlistenFn | null = null; let themeListener: UnlistenFn | null = null;
let urlListener: UnlistenFn | null = null; let urlListener: UnlistenFn | null = null;
onBeforeMount(async () => { onMounted(async () => {
const win = getCurrentWindow(); const win = getCurrentWindow();
isMain.value = win.label === "TeyvatGuide"; isMain.value = win.label === "TeyvatGuide";
if (isMain.value) { if (isMain.value) {
const title = "Teyvat Guide v" + (await app.getVersion()) + " Beta"; const title = "Teyvat Guide v" + (await app.getVersion()) + " Beta";
await win.setTitle(title); await win.setTitle(title);
listenOnInit(); await listenOnInit();
await core.invoke("init_app"); await core.invoke("init_app");
urlListener = await getDeepLink(); urlListener = await getDeepLink();
} }
if (needResize.value !== "false") await checkResize(); if (needResize.value !== "false") await checkResize();
document.documentElement.className = theme.value; document.documentElement.className = theme.value;
}); themeListener = await event.listen<string>("readTheme", (e: Event<string>) => {
theme.value = e.payload;
onMounted(async () => { document.documentElement.className = theme.value;
await getCurrentWindow().show();
themeListener = await event.listen("readTheme", async (e: Event<string>) => {
const themeGet = e.payload;
if (theme.value !== themeGet) {
theme.value = themeGet;
document.documentElement.className = theme.value;
}
}); });
await getCurrentWindow().show();
}); });
async function checkResize(): Promise<void> { async function checkResize(): Promise<void> {
@@ -95,9 +89,9 @@ function getSize(label: string): PhysicalSize {
} }
// 启动后只执行一次的监听 // 启动后只执行一次的监听
function listenOnInit(): void { async function listenOnInit(): Promise<void> {
console.info("[App][listenOnInit] 监听初始化事件!"); console.info("[App][listenOnInit] 监听初始化事件!");
event.listen("initApp", async () => { await event.listen<void>("initApp", async () => {
await checkAppLoad(); await checkAppLoad();
await checkDeviceFp(); await checkDeviceFp();
try { try {

View File

@@ -1,8 +1,8 @@
<template> <template>
<div class="switch-box" :title="themeGet === 'default' ? '切换到深色模式' : '切换到浅色模式'"> <div class="switch-box" :title="theme === 'default' ? '切换到深色模式' : '切换到浅色模式'">
<div class="switch-btn" @click="switchTheme()"> <div class="switch-btn" @click="switchTheme()">
<v-icon> <v-icon>
{{ themeGet === "default" ? "mdi-weather-night" : "mdi-weather-sunny" }} {{ theme === "default" ? "mdi-weather-night" : "mdi-weather-sunny" }}
</v-icon> </v-icon>
</div> </div>
</div> </div>
@@ -10,35 +10,30 @@
<script lang="ts" setup> <script lang="ts" setup>
import { event } from "@tauri-apps/api"; import { event } from "@tauri-apps/api";
import { Event, UnlistenFn } from "@tauri-apps/api/event"; import { Event, UnlistenFn } from "@tauri-apps/api/event";
import { computed, onMounted, onUnmounted, shallowRef } from "vue"; import { storeToRefs } from "pinia";
import { onMounted, onUnmounted } from "vue";
import { useAppStore } from "../../store/modules/app.js"; import { useAppStore } from "../../store/modules/app.js";
const { theme } = storeToRefs(useAppStore());
const appStore = useAppStore(); const appStore = useAppStore();
const themeGet = computed<string>({ let themeListener: UnlistenFn | null = null;
get: () => appStore.theme,
set: (v: string) => (appStore.theme = v),
});
const themeListener = shallowRef<UnlistenFn | null>(null);
onMounted(async () => (themeListener.value = await listenOnTheme())); onMounted(async () => {
themeListener = event.listen("readTheme", (e: Event<string>) => {
theme.value = e.payload === "default" ? "default" : "dark";
});
});
async function switchTheme(): Promise<void> { async function switchTheme(): Promise<void> {
appStore.changeTheme(); appStore.changeTheme();
await event.emit("readTheme", themeGet.value); await event.emit("readTheme", theme.value);
}
async function listenOnTheme(): Promise<UnlistenFn> {
return await event.listen("readTheme", (e: Event<string>) => {
const theme = e.payload;
themeGet.value = theme === "default" ? "default" : "dark";
});
} }
onUnmounted(() => { onUnmounted(() => {
if (themeListener.value !== null) { if (themeListener !== null) {
themeListener.value(); themeListener();
themeListener.value = null; themeListener = null;
} }
}); });
</script> </script>