Compare commits

...

8 Commits

Author SHA1 Message Date
BTMuli
77c333383c 🚀 v0.9.4 2026-01-22 01:46:17 +08:00
BTMuli
f62e13a26d 🚸 调整hint 2026-01-22 01:39:01 +08:00
BTMuli
f959b69ea3 🚸 优化处理 2026-01-22 01:37:33 +08:00
BTMuli
68c2d1cfcb 🐛 修复msi版本dll调用异常,捕获dll异常 2026-01-22 01:21:51 +08:00
BTMuli
3cb0c423a5 🥅 尝试修复 forceRefresh not in 2026-01-21 19:04:21 +08:00
BTMuli
a52d573094 🔥 移除 gro-iframe 组件 2026-01-21 18:24:25 +08:00
BTMuli
19b2615d6a 🎨 调整检测逻辑,存在时不复制 2026-01-21 18:20:59 +08:00
BTMuli
88bdccec43 🏷️ 修正描述 2026-01-21 18:15:20 +08:00
18 changed files with 537 additions and 672 deletions

View File

@@ -1,3 +1,3 @@
VITE_SENTRY_RELEASE=TeyvatGuide@0.9.3
VITE_COMMIT_HASH=1eb36bd6
VITE_BUILD_TIME=1768798003
VITE_SENTRY_RELEASE=TeyvatGuide@0.9.4
VITE_COMMIT_HASH=f62e13a2
VITE_BUILD_TIME=1769017229

View File

@@ -45,12 +45,6 @@ jobs:
chmod 644 ~/.ssh/known_hosts
- name: Test SSH connection
run: ssh -T git@github.com || true
- name: Load env.production
id: env
if: matrix.settings.target == 'windows'
run: |
$VITE_SENTRY_RELEASE = Get-Content .env.production | Where-Object { $_ -match '^VITE_SENTRY_RELEASE=' } | ForEach-Object { ($_ -split '=')[1] }
"VITE_SENTRY_RELEASE=$VITE_SENTRY_RELEASE" >> $env:GITHUB_OUTPUT
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
@@ -100,15 +94,3 @@ jobs:
</a>
releaseDraft: true
prerelease: false
- name: Upload Sentry Pdb
if: matrix.settings.target == 'windows'
# TODO调整 script
run: |
echo "Uploading release: $SENTRY_RELEASE"
sentry-cli releases new "$SENTRY_RELEASE"
sentry-cli debug-files upload --include-sources src-tauri/src src-tauri/target/release/TeyvatGuide.pdb
sentry-cli releases finalize "$SENTRY_RELEASE"
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_RELEASE: ${{ steps.env.outputs.VITE_SENTRY_RELEASE }}

View File

@@ -2,12 +2,18 @@
Author: 目棃
Description: CHANGELOG
Date: 2025-09-09
Update: 2026-01-19
Update: 2026-01-22
---
> 本文档 [`Frontmatter`](https://github.com/BTMuli/MuCli#Frontmatter) 由 [MuCli](https://github.com/BTMuli/Mucli) 自动生成于 `2025-09-09 14:30:56`
>
> 更新于 `2026-01-19 12:43:24`
> 更新于 `2026-01-22 01:28:01`
## [0.9.4](https://github.com/BTMuli/TeyvatGuide/releases/v0.9.4) (2025-01-22)
- 🐛 修复`msi`版本导入`dll`调用路径异常,捕获`dll`路径异常错误
- 🎨 调整商店版本`dll`检测逻辑,存在时不复制
- 🚸 调整导入相关提示文本
## [0.9.3](https://github.com/BTMuli/TeyvatGuide/releases/v0.9.3) (2025-01-19)

View File

@@ -1,9 +1,9 @@
{
"name": "teyvatguide",
"version": "0.9.3",
"version": "0.9.4",
"description": "Game Tool for GenshinImpact player",
"private": true,
"packageManager": "pnpm@10.28.0",
"packageManager": "pnpm@10.28.1",
"type": "module",
"scripts": {
"build": "tsx scripts/auto-build.ts",
@@ -72,8 +72,9 @@
"dependencies": {
"@date-fns/tz": "^1.4.1",
"@mdi/font": "7.4.47",
"@sentry/vite-plugin": "^4.6.2",
"@sentry/vue": "^10.34.0",
"@sentry/vite-plugin": "^4.7.0",
"@sentry/vue": "^10.35.0",
"@sentry/core": "^10.35.0",
"@skipperndt/plugin-machine-uid": "^0.1.3",
"@tauri-apps/api": "^2.9.1",
"@tauri-apps/plugin-cli": "^2.4.1",
@@ -103,11 +104,11 @@
"sass-embedded": "^1.97.2",
"swiper": "^12.0.3",
"uuid": "^13.0.0",
"vue": "^3.5.26",
"vue": "^3.5.27",
"vue-echarts": "^8.0.1",
"vue-json-pretty": "^2.6.0",
"vue-router": "^4.6.4",
"vuetify": "^3.11.6",
"vuetify": "^3.11.7",
"wcag-color": "^1.1.1"
},
"devDependencies": {
@@ -115,14 +116,13 @@
"@eslint/eslintrc": "^3.3.3",
"@eslint/js": "^9.39.2",
"@microsoft/tsdoc": "^0.16.0",
"@sentry/core": "^10.34.0",
"@tauri-apps/cli": "2.9.6",
"@types/fs-extra": "^11.0.4",
"@types/js-md5": "^0.8.0",
"@types/json-bigint": "^1.0.4",
"@types/node": "^25.0.9",
"@typescript-eslint/parser": "^8.53.0",
"@typescript/native-preview": "7.0.0-dev.20260118.1",
"@typescript-eslint/parser": "^8.53.1",
"@typescript/native-preview": "7.0.0-dev.20260120.1",
"@vitejs/plugin-vue": "^6.0.3",
"app-root-path": "^3.1.0",
"concurrently": "^9.2.1",
@@ -133,13 +133,13 @@
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-tsdoc": "^0.5.0",
"eslint-plugin-vue": "^10.7.0",
"eslint-plugin-yml": "^2.0.0",
"eslint-plugin-yml": "^3.0.0",
"fs-extra": "^11.3.3",
"globals": "^17.0.0",
"husky": "^9.1.7",
"jsonc-eslint-parser": "^2.4.2",
"lint-staged": "^16.2.7",
"oxlint": "^1.39.0",
"oxlint": "^1.41.0",
"postcss-preset-env": "^11.1.1",
"prettier": "3.8.0",
"stylelint": "^17.0.0",
@@ -153,10 +153,10 @@
"stylelint-scss": "^7.0.0",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.53.0",
"typescript-eslint": "^8.53.1",
"vite": "npm:rolldown-vite@^7.3.1",
"vite-plugin-vue-devtools": "^8.0.5",
"vite-plugin-vuetify": "^2.1.2",
"vite-plugin-vuetify": "^2.1.3",
"vue-eslint-parser": "^10.2.0",
"vue-tsc": "^3.2.2",
"yaml-eslint-parser": "^2.0.0"

794
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
/**
* 本地构建脚本
* @since Beta v0.9.1
* @since Beta v0.9.4
*/
import { resolve } from "path";
import { fileURLToPath } from "node:url";
@@ -25,6 +25,9 @@ console.log(`🍄 SkipUpload:${skipUpload}`);
// 获取提交哈希
const commitHash = execSync("git rev-parse --short HEAD").toString().trim();
// 获取构建平台
const platform = process.platform;
console.log(`🖥️ Build platform: ${platform}`);
// 构建 Release 字符串
const release = `TeyvatGuide@${pkgVersion}`;
@@ -52,7 +55,7 @@ if (isGitHubActions) {
}
process.exit();
}
if (skipUpload || isGitHubActions) process.exit();
if (skipUpload || platform !== "win32") process.exit();
const pdbGlob = "src-tauri/target/release/TeyvatGuide.pdb";
try {
console.log(`📦 Uploading PDBs from ${pdbGlob}...`);
@@ -62,11 +65,13 @@ try {
});
console.log("✅ PDB upload complete!");
const distDir = resolve(__dirname, "../dist");
execSync(
`sentry-cli sourcemaps upload -r "${release}" "${distDir}" --rewrite --url-prefix "~/"`,
{ stdio: "inherit" },
);
console.log("✅ Frontend sourcemaps upload complete!");
if (!isGitHubActions) {
execSync(
`sentry-cli sourcemaps upload -r "${release}" "${distDir}" --rewrite --url-prefix "~/"`,
{ stdio: "inherit" },
);
console.log("✅ Frontend sourcemaps upload complete!");
}
execSync(`sentry-cli releases finalize "${release}"`, { stdio: "inherit" });
console.log("🎉 Sentry release finalized!");
} catch (err) {

133
src-tauri/Cargo.lock generated
View File

@@ -10,7 +10,7 @@ checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
[[package]]
name = "TeyvatGuide"
version = "0.9.2"
version = "0.9.4"
dependencies = [
"chrono",
"image",
@@ -569,7 +569,7 @@ dependencies = [
"num-traits",
"pastey",
"rayon",
"thiserror 2.0.17",
"thiserror 2.0.18",
"v_frame",
"y4m",
]
@@ -883,7 +883,7 @@ dependencies = [
"semver",
"serde",
"serde_json",
"thiserror 2.0.17",
"thiserror 2.0.18",
]
[[package]]
@@ -2761,7 +2761,7 @@ dependencies = [
"rgb",
"tiff",
"zune-core 0.5.1",
"zune-jpeg 0.5.9",
"zune-jpeg 0.5.11",
]
[[package]]
@@ -3301,7 +3301,7 @@ dependencies = [
"once_cell",
"png 0.17.16",
"serde",
"thiserror 2.0.17",
"thiserror 2.0.18",
"windows-sys 0.60.2",
]
@@ -4445,7 +4445,7 @@ dependencies = [
"rustc-hash",
"rustls",
"socket2 0.6.1",
"thiserror 2.0.17",
"thiserror 2.0.18",
"tokio",
"tracing",
"web-time",
@@ -4466,7 +4466,7 @@ dependencies = [
"rustls",
"rustls-pki-types",
"slab",
"thiserror 2.0.17",
"thiserror 2.0.18",
"tinyvec",
"tracing",
"web-time",
@@ -4647,7 +4647,7 @@ dependencies = [
"rand 0.9.2",
"rand_chacha 0.9.0",
"simd_helpers",
"thiserror 2.0.17",
"thiserror 2.0.18",
"v_frame",
"wasm-bindgen",
]
@@ -4719,7 +4719,7 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
dependencies = [
"getrandom 0.2.17",
"libredox",
"thiserror 2.0.17",
"thiserror 2.0.18",
]
[[package]]
@@ -5283,7 +5283,7 @@ dependencies = [
"rand 0.9.2",
"serde",
"serde_json",
"thiserror 2.0.17",
"thiserror 2.0.18",
"time",
"url",
"uuid",
@@ -5726,12 +5726,13 @@ dependencies = [
"serde_json",
"sha2",
"smallvec",
"thiserror 2.0.17",
"thiserror 2.0.18",
"time",
"tokio",
"tokio-stream",
"tracing",
"url",
"uuid",
]
[[package]]
@@ -5809,9 +5810,10 @@ dependencies = [
"smallvec",
"sqlx-core",
"stringprep",
"thiserror 2.0.17",
"thiserror 2.0.18",
"time",
"tracing",
"uuid",
"whoami",
]
@@ -5847,9 +5849,10 @@ dependencies = [
"smallvec",
"sqlx-core",
"stringprep",
"thiserror 2.0.17",
"thiserror 2.0.18",
"time",
"tracing",
"uuid",
"whoami",
]
@@ -5872,10 +5875,11 @@ dependencies = [
"serde",
"serde_urlencoded",
"sqlx-core",
"thiserror 2.0.17",
"thiserror 2.0.18",
"time",
"tracing",
"url",
"uuid",
]
[[package]]
@@ -6133,7 +6137,7 @@ dependencies = [
"tauri-runtime",
"tauri-runtime-wry",
"tauri-utils",
"thiserror 2.0.17",
"thiserror 2.0.18",
"tokio",
"tray-icon",
"url",
@@ -6185,7 +6189,7 @@ dependencies = [
"sha2",
"syn 2.0.114",
"tauri-utils",
"thiserror 2.0.17",
"thiserror 2.0.18",
"time",
"url",
"uuid",
@@ -6226,7 +6230,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-cli"
version = "2.4.1"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"clap",
"log",
@@ -6234,13 +6238,13 @@ dependencies = [
"serde_json",
"tauri",
"tauri-plugin",
"thiserror 2.0.17",
"thiserror 2.0.18",
]
[[package]]
name = "tauri-plugin-deep-link"
version = "2.4.6"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"dunce",
"plist",
@@ -6250,7 +6254,7 @@ dependencies = [
"tauri",
"tauri-plugin",
"tauri-utils",
"thiserror 2.0.17",
"thiserror 2.0.18",
"tracing",
"url",
"windows-registry 0.5.3",
@@ -6260,7 +6264,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-dialog"
version = "2.6.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"log",
"raw-window-handle",
@@ -6270,14 +6274,14 @@ dependencies = [
"tauri",
"tauri-plugin",
"tauri-plugin-fs",
"thiserror 2.0.17",
"thiserror 2.0.18",
"url",
]
[[package]]
name = "tauri-plugin-fs"
version = "2.4.5"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"anyhow",
"dunce",
@@ -6290,7 +6294,7 @@ dependencies = [
"tauri",
"tauri-plugin",
"tauri-utils",
"thiserror 2.0.17",
"thiserror 2.0.18",
"toml 0.9.11+spec-1.1.0",
"url",
]
@@ -6298,7 +6302,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-http"
version = "2.5.6"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"bytes",
"cookie_store 0.21.1",
@@ -6312,7 +6316,7 @@ dependencies = [
"tauri",
"tauri-plugin",
"tauri-plugin-fs",
"thiserror 2.0.17",
"thiserror 2.0.18",
"tokio",
"url",
"urlpattern",
@@ -6321,7 +6325,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-log"
version = "2.8.0"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"android_logger",
"byte-unit",
@@ -6335,7 +6339,7 @@ dependencies = [
"swift-rs",
"tauri",
"tauri-plugin",
"thiserror 2.0.17",
"thiserror 2.0.18",
"time",
]
@@ -6351,13 +6355,13 @@ dependencies = [
"tauri",
"tauri-plugin",
"tauri-specta",
"thiserror 2.0.17",
"thiserror 2.0.18",
]
[[package]]
name = "tauri-plugin-notification"
version = "2.3.3"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"log",
"notify-rust",
@@ -6367,7 +6371,7 @@ dependencies = [
"serde_repr",
"tauri",
"tauri-plugin",
"thiserror 2.0.17",
"thiserror 2.0.18",
"time",
"url",
]
@@ -6375,7 +6379,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-opener"
version = "2.5.3"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"dunce",
"glob",
@@ -6387,7 +6391,7 @@ dependencies = [
"serde_json",
"tauri",
"tauri-plugin",
"thiserror 2.0.17",
"thiserror 2.0.18",
"url",
"windows",
"zbus",
@@ -6396,7 +6400,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-os"
version = "2.3.2"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"gethostname",
"log",
@@ -6407,13 +6411,13 @@ dependencies = [
"sys-locale",
"tauri",
"tauri-plugin",
"thiserror 2.0.17",
"thiserror 2.0.18",
]
[[package]]
name = "tauri-plugin-process"
version = "2.3.1"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"tauri",
"tauri-plugin",
@@ -6422,12 +6426,12 @@ dependencies = [
[[package]]
name = "tauri-plugin-single-instance"
version = "2.3.7"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"serde",
"serde_json",
"tauri",
"thiserror 2.0.17",
"thiserror 2.0.18",
"tracing",
"windows-sys 0.60.2",
"zbus",
@@ -6436,7 +6440,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-sql"
version = "2.3.1"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#734c627084613a2043fcf39dadc3e08eb7ddfe5f"
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#25ad21beff11689cf453df0f6fc7dfd9e2f5e6d0"
dependencies = [
"futures-core",
"indexmap 2.13.0",
@@ -6446,9 +6450,10 @@ dependencies = [
"sqlx",
"tauri",
"tauri-plugin",
"thiserror 2.0.17",
"thiserror 2.0.18",
"time",
"tokio",
"uuid",
]
[[package]]
@@ -6469,7 +6474,7 @@ dependencies = [
"serde",
"serde_json",
"tauri-utils",
"thiserror 2.0.17",
"thiserror 2.0.18",
"url",
"webkit2gtk",
"webview2-com",
@@ -6515,7 +6520,7 @@ dependencies = [
"specta",
"specta-typescript",
"tauri",
"thiserror 2.0.17",
"thiserror 2.0.18",
]
[[package]]
@@ -6548,7 +6553,7 @@ dependencies = [
"serde_json",
"serde_with",
"swift-rs",
"thiserror 2.0.17",
"thiserror 2.0.18",
"toml 0.9.11+spec-1.1.0",
"url",
"urlpattern",
@@ -6574,7 +6579,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b1e66e07de489fe43a46678dd0b8df65e0c973909df1b60ba33874e297ba9b9"
dependencies = [
"quick-xml 0.37.5",
"thiserror 2.0.17",
"thiserror 2.0.18",
"windows",
"windows-version",
]
@@ -6614,11 +6619,11 @@ dependencies = [
[[package]]
name = "thiserror"
version = "2.0.17"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
dependencies = [
"thiserror-impl 2.0.17",
"thiserror-impl 2.0.18",
]
[[package]]
@@ -6634,9 +6639,9 @@ dependencies = [
[[package]]
name = "thiserror-impl"
version = "2.0.17"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
dependencies = [
"proc-macro2",
"quote",
@@ -6997,7 +7002,7 @@ dependencies = [
"once_cell",
"png 0.17.16",
"serde",
"thiserror 2.0.17",
"thiserror 2.0.18",
"windows-sys 0.60.2",
]
@@ -7507,7 +7512,7 @@ version = "0.38.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c"
dependencies = [
"thiserror 2.0.17",
"thiserror 2.0.18",
"windows",
"windows-core 0.61.2",
]
@@ -8130,7 +8135,7 @@ dependencies = [
"sha2",
"soup3",
"tao-macros",
"thiserror 2.0.17",
"thiserror 2.0.18",
"url",
"webkit2gtk",
"webkit2gtk-sys",
@@ -8202,9 +8207,9 @@ dependencies = [
[[package]]
name = "zbus"
version = "5.13.1"
version = "5.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17f79257df967b6779afa536788657777a0001f5b42524fcaf5038d4344df40b"
checksum = "1bfeff997a0aaa3eb20c4652baf788d2dfa6d2839a0ead0b3ff69ce2f9c4bdd1"
dependencies = [
"async-broadcast",
"async-executor",
@@ -8237,9 +8242,9 @@ dependencies = [
[[package]]
name = "zbus_macros"
version = "5.13.1"
version = "5.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aad23e2d2f91cae771c7af7a630a49e755f1eb74f8a46e9f6d5f7a146edf5a37"
checksum = "0bbd5a90dbe8feee5b13def448427ae314ccd26a49cac47905cafefb9ff846f1"
dependencies = [
"proc-macro-crate 3.4.0",
"proc-macro2",
@@ -8343,9 +8348,9 @@ dependencies = [
[[package]]
name = "zmij"
version = "1.0.15"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94f63c051f4fe3c1509da62131a678643c5b6fbdc9273b2b79d4378ebda003d2"
checksum = "dfcd145825aace48cff44a8844de64bf75feec3080e0aa5cdbde72961ae51a65"
[[package]]
name = "zune-core"
@@ -8379,18 +8384,18 @@ dependencies = [
[[package]]
name = "zune-jpeg"
version = "0.5.9"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87c86acb70a85b2c16f071f171847d1945e8f44812630463cd14ec83900ad01c"
checksum = "2959ca473aae96a14ecedf501d20b3608d2825ba280d5adb57d651721885b0c2"
dependencies = [
"zune-core 0.5.1",
]
[[package]]
name = "zvariant"
version = "5.9.1"
version = "5.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "326aaed414f04fe839777b4c443d4e94c74e7b3621093bd9c5e649ac8aa96543"
checksum = "68b64ef4f40c7951337ddc7023dd03528a57a3ce3408ee9da5e948bd29b232c4"
dependencies = [
"endi",
"enumflags2",
@@ -8402,9 +8407,9 @@ dependencies = [
[[package]]
name = "zvariant_derive"
version = "5.9.1"
version = "5.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba44e1f8f4da9e6e2d25d2a60b116ef8b9d0be174a7685e55bb12a99866279a7"
checksum = "484d5d975eb7afb52cc6b929c13d3719a20ad650fea4120e6310de3fc55e415c"
dependencies = [
"proc-macro-crate 3.4.0",
"proc-macro2",

View File

@@ -1,6 +1,6 @@
[package]
name = "TeyvatGuide"
version = "0.9.3"
version = "0.9.4"
description = "Game Tool for Genshin Impact player"
authors = ["BTMuli <bt-muli@outlook.com>"]
license = "MIT"

View File

@@ -1,5 +1,5 @@
//! Yae 相关处理
//! @since Beta v0.9.2
//! @since Beta v0.9.4
#![cfg(target_os = "windows")]
pub mod inject;
@@ -75,11 +75,19 @@ pub fn call_yae_dll(
ticket: Option<String>,
is_msix: bool,
) -> Result<(), String> {
let mut dll_path = app_handle.path().app_config_dir().unwrap().join("YaeAchievementLib.dll");
let mut dll_path =
app_handle.path().resource_dir().unwrap().join("resources\\YaeAchievementLib.dll");
if is_msix {
dll_path = app_handle.path().document_dir().unwrap().join("TeyvatGuide\\YaeAchievementLib.dll");
}
dbg!(&dll_path);
log::info!("Resolved DLL path: {}", dll_path.display());
// 检测 dll 存在
if !dll_path.exists() {
let msg = format!("未检测到 DLL路径: {}", dll_path.display());
return Err(msg);
}
// 0. 创建 YaeAchievementPipe 的 命名管道,获取句柄
dbg!("开始启动 YaeAchievementPipe 命名管道");
let _pipe_handle = create_named_pipe("YaeAchievementPipe");

View File

@@ -2,7 +2,7 @@
"$schema": "https://schema.tauri.app/config/2",
"productName": "TeyvatGuide",
"identifier": "TeyvatGuide",
"version": "0.9.3",
"version": "0.9.4",
"build": {
"beforeDevCommand": "pnpm vite:dev",
"beforeBuildCommand": "pnpm vite:build",

View File

@@ -1,134 +0,0 @@
<!-- 嵌入游戏内容的iframe组件 -->
<template>
<div class="gro-iframe-container">
<v-tabs class="gro-ic-tabs" v-model="poolTab" align-tabs="start" direction="vertical">
<v-tab v-for="(item, index) in tabList" :key="index" :value="item.value">
<template v-if="item.beyond">
<img src="/icon/nation/千星奇域.webp" title="千星奇域" alt="beyond" />
</template>
{{ item.label }}
</v-tab>
</v-tabs>
<iframe class="gro-iframe" :src="link" style="width: 100%; height: 100%; border: none" />
</div>
</template>
<script lang="ts" setup>
import showSnackbar from "@comp/func/snackbar.js";
import takumiReq from "@req/takumiReq.js";
import useUserStore from "@store/user.js";
import { storeToRefs } from "pinia";
import { onMounted, ref, shallowRef, watch } from "vue";
/**
* 卡池类型-ID映射
* @remarks
* 目前缺失集录&新手池
* TODO: 动态获取当前卡池类型&ID映射
*/
const GachaIdMap: Record<string, string> = {
"200": "34ff1a235049182fd199d285110e3e7d292c50cd", // 常驻
"301": "182e725d99b742b14839117650d3e79628cc6221", //角色活动
"302": "8ff7a7d42bea79b0d54e92fdb58a20f971490372", // 武器活动
"400": "bb0486115a7e7c4bd2994135f7d212014b17173b", // 角色活动-2
"1000": "f3f5090a8ec0b28f15805c9969aa6c4ec357", // 千星奇域常驻
"20011": "a8d0a985efb4ed61eb2e73a86a57237bd116", // 千星奇域角色活动-男
"20021": "57016dec6b768231ba1342c01935417a799b", // 千星奇域角色活动-女
};
const tabNormal: ReadonlyArray<GroTab> = [
{ label: "常驻祈愿", value: "200" },
{ label: "角色活动祈愿", value: "301" },
{ label: "武器活动祈愿", value: "302" },
{ label: "角色活动祈愿-2", value: "400" },
];
const tabBeyond: ReadonlyArray<GroTab> = [
{ label: "常驻颂愿", value: "1000", beyond: true },
{ label: "活动颂愿-男", value: "20011", beyond: true },
{ label: "活动颂愿-女", value: "20021", beyond: true },
];
type GroTabKey = keyof typeof GachaIdMap;
type GroTab = { label: string; value: string; beyond?: boolean };
type GroIframeProps = { mode: "normal" | "beyond" };
const props = defineProps<GroIframeProps>();
const { cookie, account } = storeToRefs(useUserStore());
const authkey = ref<string>("");
const link = ref<string>("");
const poolTab = ref<GroTabKey>("200");
const tabList = shallowRef<ReadonlyArray<GroTab>>(props.mode === "beyond" ? tabBeyond : tabNormal);
onMounted(async () => {
link.value = await getUrl();
});
watch(
() => poolTab.value,
async () => {
link.value = await getUrl();
},
);
async function getUrl(): Promise<string> {
const path = "https://webstatic.mihoyo.com/hk4e/event/e20190909gacha-v3/index.html";
const pathB = "https://webstatic.mihoyo.com/hk4e/event/e20250716gacha/index.html";
const pathF = poolTab.value.length < 4 ? path : pathB;
if (authkey.value === "") await refreshAuthkey();
const param: Record<string, string> = {
win_mode: "fullscreen",
no_joypad_close: "1",
authkey_ver: "1",
sign_type: "2",
auth_appid: "webview_gacha",
gacha_id: GachaIdMap[poolTab.value],
timestamp: Math.floor(Date.now() / 1000).toString(),
lang: "zh-cn",
device_type: "pc",
region: account.value.region,
authkey: authkey.value,
game_biz: account.value.gameBiz,
};
const targetLink = new URL(pathF);
for (const key in param) {
targetLink.searchParams.append(key, param[key]);
}
return targetLink.toString();
}
async function refreshAuthkey(): Promise<void> {
if (!cookie.value || !account.value) {
return;
}
const authkeyRes = await takumiReq.bind.authKey(cookie.value, account.value);
if (typeof authkeyRes === "string") {
authkey.value = authkeyRes;
} else {
showSnackbar.error("获取authkey失败");
return;
}
}
</script>
<style lang="scss" scoped>
.gro-iframe-container {
display: flex;
width: 100%;
height: 100%;
align-items: flex-start;
justify-content: space-between;
}
.gro-ic-tabs {
height: 100%;
img {
width: 24px;
height: 24px;
margin-right: 4px;
}
}
.gro-ic-window {
height: 100%;
flex: 1;
}
</style>

View File

@@ -124,8 +124,6 @@
<v-tab value="echarts">图表概览</v-tab>
<v-tab value="table">数据表格</v-tab>
<v-tab value="history">过往祈愿</v-tab>
<!-- TODO: 暂时隐藏内置祈愿链接 -->
<v-tab v-if="false" value="iframe">祈愿详情</v-tab>
</v-tabs>
<v-window v-model="tab" class="gacha-window">
<v-window-item class="gacha-window-item" value="overview">
@@ -140,9 +138,6 @@
<v-window-item class="gacha-window-item" value="history">
<gro-history :uid="uidCur" />
</v-window-item>
<v-window-item class="gacha-window-item" value="iframe">
<gro-iframe mode="normal" />
</v-window-item>
</v-window>
</div>
<UgoUid v-model="ovShow" :fpi="ovFpi" :mode="ovMode" />
@@ -154,7 +149,6 @@ import showLoading from "@comp/func/loading.js";
import showSnackbar from "@comp/func/snackbar.js";
import GroEcharts from "@comp/userGacha/gro-echarts.vue";
import GroHistory from "@comp/userGacha/gro-history.vue";
import GroIframe from "@comp/userGacha/gro-iframe.vue";
import GroOverview from "@comp/userGacha/gro-overview.vue";
import GroTable from "@comp/userGacha/gro-table.vue";
import UgoHutaoDu, { type UgoHutaoMode } from "@comp/userGacha/ugo-hutao-du.vue";

View File

@@ -4,7 +4,7 @@ variantelevated<!-- 千星奇域祈愿记录页面 TODO处理活动卡池次
<template #prepend>
<div class="gb-top-title">
<img alt="byd" class="gb-top-byd" src="/icon/nation/千星奇域.webp" />
<span>愿记录</span>
<span>愿记录</span>
<v-select
v-model="uidCur"
:hide-details="true"
@@ -49,8 +49,6 @@ variantelevated<!-- 千星奇域祈愿记录页面 TODO处理活动卡池次
<v-tabs v-model="tab" align-tabs="start" class="gb-tab" density="compact">
<v-tab value="overview">数据概览</v-tab>
<v-tab value="table">数据表格</v-tab>
<!-- TODO: 暂时隐藏内置祈愿链接 -->
<v-tab v-if="false" value="iframe">祈愿详情</v-tab>
</v-tabs>
<v-window v-model="tab" class="gb-window">
<v-window-item class="gb-window-item" value="overview">
@@ -59,9 +57,6 @@ variantelevated<!-- 千星奇域祈愿记录页面 TODO处理活动卡池次
<v-window-item class="gb-window-item" value="table">
<gbr-table v-model="gachaListCur" />
</v-window-item>
<v-window-item class="gb-window-item" value="iframe">
<gro-iframe mode="beyond" />
</v-window-item>
</v-window>
</div>
</template>
@@ -71,7 +66,6 @@ import showLoading from "@comp/func/loading.js";
import showSnackbar from "@comp/func/snackbar.js";
import GbrOverview from "@comp/userGacha/gbr-overview.vue";
import GbrTable from "@comp/userGacha/gbr-table.vue";
import GroIframe from "@comp/userGacha/gro-iframe.vue";
import hk4eReq from "@req/hk4eReq.js";
import takumiReq from "@req/takumiReq.js";
import TSUserGachaB from "@Sqlm/userGachaB.js";

View File

@@ -55,7 +55,7 @@
<v-btn
class="top-link top-btn"
prepend-icon="mdi-import"
title="通过Yae导入"
title="通过Yae导入(请确保导入前游戏未启动)"
variant="elevated"
@click="toYae()"
>

View File

@@ -36,6 +36,7 @@
prepend-icon="mdi-import"
variant="elevated"
@click="tryImportMaterial()"
title="通过Yae导入请确保导入前游戏未启动"
>
导入
</v-btn>

View File

@@ -203,7 +203,7 @@ import { emit } from "@tauri-apps/api/event";
import { open } from "@tauri-apps/plugin-dialog";
import { remove } from "@tauri-apps/plugin-fs";
import { platform } from "@tauri-apps/plugin-os";
import { relaunch } from "@tauri-apps/plugin-process";
import { exit, relaunch } from "@tauri-apps/plugin-process";
import { backUpUserData, restoreUserData } from "@utils/dataBS.js";
import TGLogger from "@utils/TGLogger.js";
import { bytesToSize, getCacheDir, getDeviceInfo, getRandomString } from "@utils/toolFunc.js";
@@ -236,7 +236,10 @@ onMounted(async () => {
await showLoading.start("正在加载设置页面", "正在获取缓存大小");
await TGLogger.Info("[Config] 打开设置页面");
const cacheDir = await getCacheDir();
if (cacheDir === false) return;
if (cacheDir === false) {
await showLoading.end();
return;
}
let cacheBSize: number = 0;
for (const dir of cacheDir) {
const size: number = await core.invoke("get_dir_size", { path: dir });
@@ -448,7 +451,8 @@ async function confirmDelCache(): Promise<void> {
await TGLogger.Info("[Config][confirmDelCache] 缓存清除完成");
showSnackbar.success("缓存已清除!即将重启...");
await new Promise<void>((resolve) => setTimeout(resolve, 1500));
await relaunch();
if (isDevEnv.value) await exit();
else await relaunch();
}
// 恢复默认设置

View File

@@ -1,6 +1,6 @@
/**
* 负责米游社客户端的 callback 处理
* @since Beta v0.8.3
* @since Beta v0.9.4
*/
import showSnackbar from "@comp/func/snackbar.js";
@@ -544,7 +544,7 @@ class Client {
/**
* 获取米游社客户端的 cookie_token
* @since Beta v0.8.3
* @since Beta v0.9.4
* @param arg - 请求参数
* @returns 无返回值
*/
@@ -553,7 +553,7 @@ class Client {
): Promise<void> {
const user = useUserStore();
if (!user.cookie) return;
if (arg.payload.forceRefresh) {
if (typeof arg.payload === "object" && arg.payload.forceRefresh) {
const res = await passportReq.cookieToken(user.cookie);
if (typeof res !== "string") return;
user.cookie.cookie_token = res;

View File

@@ -1,6 +1,6 @@
/**
* 游戏文件相关功能
* @since Beta v0.9.2
* @since Beta v0.9.4
*/
import showDialog from "@comp/func/dialog.js";
@@ -62,20 +62,16 @@ export async function isRunInAdmin(): Promise<boolean> {
/**
* 尝试移动dll
* @since Beta v0.9.2
* @returns 无返回值
* @since Beta v0.9.4
* @returns 是否存在 YaeAchievementLib.dll
*/
export async function tryCopyYae(): Promise<boolean> {
const srcDllPath = `${await resourceDir()}${sep()}resources${sep()}YaeAchievementLib.dll`;
const srcCheck = await exists(srcDllPath);
if (!srcCheck) {
showSnackbar.warn("未检测到本地 dll");
return false;
}
const targetDir = `${await documentDir()}${sep()}TeyvatGuide`;
await mkdir(targetDir, { recursive: true });
const targetPath = `${targetDir}${sep()}YaeAchievementLib.dll`;
console.log(targetPath);
const check = await exists(targetPath);
if (check) return true;
await mkdir(targetDir, { recursive: true });
const srcDllPath = `${await resourceDir()}${sep()}resources${sep()}YaeAchievementLib.dll`;
await copyFile(srcDllPath, targetPath);
const check2 = await exists(targetPath);
if (!check2) {