Compare commits
68 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c18bea220 | ||
|
|
66fd82ea66 | ||
|
|
859c6165bf | ||
|
|
18d1d26344 | ||
|
|
f05d8ceb82 | ||
|
|
e1a0bbcbc5 | ||
|
|
61dd56fddd | ||
|
|
ca1465f43a | ||
|
|
0e01f2bdaa | ||
|
|
848227f6b0 | ||
|
|
7fb13635f2 | ||
|
|
f590197a22 | ||
|
|
077ffc0c21 | ||
|
|
e8ab05759e | ||
|
|
e23a0363c1 | ||
|
|
291e92edd6 | ||
|
|
6d8f7967fe | ||
|
|
25bb259d7a | ||
|
|
70a716842f | ||
|
|
33e9704f2d | ||
|
|
b30d96c3d3 | ||
|
|
36f2adf3f7 | ||
|
|
a8d9808deb | ||
|
|
4a748f20b7 | ||
|
|
0e9a0ec5f2 | ||
|
|
a910792e6a | ||
|
|
e3bc295aa5 | ||
|
|
11bf522e22 | ||
|
|
9092d46759 | ||
|
|
99327dd9eb | ||
|
|
ae6dc39702 | ||
|
|
dca590e027 | ||
|
|
5c5380f4f7 | ||
|
|
6b3b0e1de1 | ||
|
|
eb7e0df4fb | ||
|
|
58b95dc5e9 | ||
|
|
724f828761 | ||
|
|
0d6ba14a0e | ||
|
|
1266e5e9ee | ||
|
|
690da47cd8 | ||
|
|
f75f982d84 | ||
|
|
22aea89f76 | ||
|
|
b757c4a432 | ||
|
|
d8e14b14de | ||
|
|
1e2c479cee | ||
|
|
0bb774f2c2 | ||
|
|
38c2be5edd | ||
|
|
16332793ef | ||
|
|
652a92a0da | ||
|
|
928af9de4c | ||
|
|
7da1308386 | ||
|
|
69cede4274 | ||
|
|
20e942b8a8 | ||
|
|
82c06c3727 | ||
|
|
c31cf7aa82 | ||
|
|
ac46adf5cf | ||
|
|
500b6442ac | ||
|
|
c9f5f86919 | ||
|
|
27c79aec62 | ||
|
|
e98c7a580f | ||
|
|
777b386b74 | ||
|
|
7c7fa1bb1a | ||
|
|
08dc712c1f | ||
|
|
07ae2ed0c6 | ||
|
|
8d8f3bb07f | ||
|
|
b7d1d5dbd9 | ||
|
|
5286d9914f | ||
|
|
7df0748816 |
2
.github/workflows/build.yml
vendored
@@ -55,7 +55,7 @@ jobs:
|
||||
- name: setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 10.7.0
|
||||
version: 10.10.0
|
||||
- name: Install frontend dependencies
|
||||
run: pnpm install
|
||||
|
||||
|
||||
2
.github/workflows/qodana_code_quality.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
- name: setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 10.7.0
|
||||
version: 10.10.0
|
||||
- name: Install dependencies
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
- name: "Qodana Scan"
|
||||
|
||||
22
.github/workflows/test.yml
vendored
@@ -5,7 +5,7 @@ on:
|
||||
version:
|
||||
description: "Version to build"
|
||||
required: true
|
||||
default: "0.1.0"
|
||||
default: "0.7.6"
|
||||
|
||||
jobs:
|
||||
build-tauri:
|
||||
@@ -20,11 +20,11 @@ jobs:
|
||||
target: "windows"
|
||||
bundlePath: msi/
|
||||
- platform: macos-latest
|
||||
args: "--target x86_64-apple-darwin"
|
||||
args: "x86_64-apple-darwin"
|
||||
target: "macos-intel"
|
||||
bundlePath: macos/TeyvatGuide.app
|
||||
- platform: macos-latest
|
||||
args: "--target aarch64-apple-darwin"
|
||||
args: "aarch64-apple-darwin"
|
||||
target: "macos-arm"
|
||||
bundlePath: macos/TeyvatGuide.app
|
||||
runs-on: ${{ matrix.settings.platform }}
|
||||
@@ -42,12 +42,14 @@ jobs:
|
||||
run: ssh -T git@github.com || true
|
||||
- name: Rust setup
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Add Rust targets(macOS Intel)
|
||||
if: matrix.settings.target == 'macos-intel'
|
||||
run: rustup target add x86_64-apple-darwin
|
||||
- name: Add Rust targets(macOS ARM)
|
||||
if: matrix.settings.target == 'macos-arm'
|
||||
run: rustup target add aarch64-apple-darwin
|
||||
|
||||
- name: setup node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
@@ -55,14 +57,22 @@ jobs:
|
||||
- name: setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 9.15.0
|
||||
version: 10.10.0
|
||||
- name: Install frontend dependencies
|
||||
run: pnpm install
|
||||
- name: Update version
|
||||
run: pnpm upv ${{ github.event.inputs.version }}
|
||||
|
||||
- name: Build app
|
||||
run: pnpm build ${{ matrix.settings.args }}
|
||||
run: pnpm build --target ${{ matrix.settings.args }}
|
||||
if: matrix.settings.args != ''
|
||||
- name: Build app (no target)
|
||||
run: pnpm build
|
||||
if: matrix.settings.args == ''
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: TeyvatGuide_v${{ github.event.inputs.version }}_${{ matrix.settings.target }}
|
||||
path: src-tauri/target/release/bundle/${{ matrix.settings.bundlePath }}
|
||||
path: src-tauri/target/${{ matrix.settings.args }}/release/bundle/${{ matrix.settings.bundlePath }}
|
||||
if-no-files-found: error
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
semi: true
|
||||
singleQuote: false
|
||||
printWidth: 100
|
||||
useTabs: false
|
||||
tabWidth: 2
|
||||
bracketSpacing: true
|
||||
endOfLine: auto
|
||||
printWidth: 100
|
||||
semi: true
|
||||
singleQuote: false
|
||||
tabWidth: 2
|
||||
trailingComma: all
|
||||
useTabs: false
|
||||
|
||||
@@ -1,15 +1,44 @@
|
||||
customSyntax: postcss-html
|
||||
extends:
|
||||
- stylelint-high-performance-animation
|
||||
- stylelint-order
|
||||
- stylelint-declaration-block-no-ignored-properties
|
||||
- stylelint-config-standard-vue
|
||||
- stylelint-config-standard-scss
|
||||
- stylelint-config-idiomatic-order
|
||||
overrides:
|
||||
- customSyntax: postcss-scss
|
||||
files:
|
||||
- "*.scss"
|
||||
plugins:
|
||||
- stylelint-scss
|
||||
- stylelint-prettier
|
||||
- stylelint-order
|
||||
- "@btmuli/stylelint-plugin-color"
|
||||
rules:
|
||||
color-hex-length: long
|
||||
color/format:
|
||||
- true
|
||||
- hexa
|
||||
import-notation: string
|
||||
no-descending-specificity:
|
||||
- true
|
||||
- severity: warning
|
||||
order/order:
|
||||
- name: include
|
||||
type: at-rule
|
||||
- custom-properties
|
||||
- declarations
|
||||
- rules
|
||||
- at-rules
|
||||
prettier/prettier: true
|
||||
property-no-vendor-prefix:
|
||||
- true
|
||||
- ignoreProperties: [backdrop-filter]
|
||||
prettier/prettier: true
|
||||
rule-empty-line-before:
|
||||
- always
|
||||
- except: ["first-nested"]
|
||||
selector-class-pattern: null
|
||||
selector-pseudo-class-no-unknown:
|
||||
- true
|
||||
- ignorePseudoClasses: ["deep"]
|
||||
|
||||
4
.vscode/launch.json
vendored
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug",
|
||||
@@ -9,5 +8,6 @@
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"type": "node"
|
||||
}
|
||||
]
|
||||
],
|
||||
"version": "0.2.0"
|
||||
}
|
||||
|
||||
30
.vscode/settings.json
vendored
@@ -1,33 +1,33 @@
|
||||
{
|
||||
"editor.tabSize": 2,
|
||||
"eslint.format.enable": true,
|
||||
"eslint.quiet": false,
|
||||
"eslint.lintTask.enable": true,
|
||||
"eslint.validate": ["typescript", "vue"],
|
||||
"stylelint.enable": true,
|
||||
"stylelint.validate": ["css", "less", "postcss"],
|
||||
"css.validate": false,
|
||||
"less.validate": false,
|
||||
"scss.validate": false,
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"[javascriptreact]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"[scss]": {
|
||||
"editor.defaultFormatter": "stylelint.vscode-stylelint"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"[scss]": {
|
||||
"editor.defaultFormatter": "stylelint.vscode-stylelint"
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"css.validate": false,
|
||||
"editor.rulers": [80, 120],
|
||||
"editor.tabSize": 2,
|
||||
"eslint.format.enable": true,
|
||||
"eslint.lintTask.enable": true,
|
||||
"eslint.quiet": false,
|
||||
"eslint.validate": ["typescript", "vue"],
|
||||
"less.validate": false,
|
||||
"scss.validate": false,
|
||||
"stylelint.enable": true,
|
||||
"stylelint.validate": ["css", "less", "postcss"],
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"vue.features.codeActions.enable": false
|
||||
}
|
||||
|
||||
4
.vscode/tasks.json
vendored
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
@@ -7,5 +6,6 @@
|
||||
"problemMatcher": ["$eslint-compact", "$eslint-stylish"],
|
||||
"label": "npm: lint:code"
|
||||
}
|
||||
]
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
||||
|
||||
42
CHANGELOG.md
@@ -2,12 +2,50 @@
|
||||
Author: 目棃
|
||||
Description: CHANGELOG
|
||||
Date: 2024-10-09
|
||||
Update: 2025-04-11
|
||||
Update: 2025-06-17
|
||||
---
|
||||
|
||||
> 本文档 [`Frontmatter`](https://github.com/BTMuli/MuCli#Frontmatter) 由 [MuCli](https://github.com/BTMuli/Mucli) 自动生成于 `2024-10-09 15:51:43`
|
||||
>
|
||||
> 更新于 `2025-04-11 22:18:50`
|
||||
> 更新于 `2025-06-17 17:08:35`
|
||||
|
||||
## [0.7.7](https://github.com/BTMuli/TeyvatGuide/releases/v0.7.7) (2025-06-17)
|
||||
|
||||
- 🍱 更新5.7资源
|
||||
- ✨ 页面触底加载
|
||||
- ✨ 部分浮窗触底加载
|
||||
- 🐛 修复五星平均抽数计算异常
|
||||
- 🐛 完善帖子ID判断逻辑
|
||||
- 🐛 修复公告卡片分享图生成异常
|
||||
- ♻️ 重构公告模块,降低界面加载耗时&请求次数
|
||||
- 💄 调整投票组件样式
|
||||
- 💄 调整链接卡片组件背景
|
||||
- 💄 调整帖子等页面网格列宽至360px
|
||||
- 🚸 修正无痕浏览状态提示信息
|
||||
- 🚸 首页卡池不传递ck
|
||||
|
||||
## [0.7.6](https://github.com/BTMuli/TeyvatGuide/releases/v0.7.6) (2025-05-25)
|
||||
|
||||
- 🍱 更新下半资源
|
||||
- 🐛 修正macOS平台的窗口大小适配逻辑
|
||||
- 🚸 子窗口添加外部打开菜单项
|
||||
- ✨ 添加游戏卡片类型组件
|
||||
- ♻️ 部分跳转改为外部浏览器打开
|
||||
- ✨ 脚本支持“一键执行”
|
||||
|
||||
## [0.7.5](https://github.com/BTMuli/TeyvatGuide/releases/v0.7.5) (2025-05-09)
|
||||
|
||||
- 🐛 处理UIGF时区异常 [`#155`](https://github.com/BTMuli/TeyvatGuide/issues/155)
|
||||
|
||||
## [0.7.4](https://github.com/BTMuli/TeyvatGuide/releases/v0.7.4) (2025-05-06)
|
||||
|
||||
- 🍱 更新5.6资源
|
||||
- 🐛 修正首页卡池组件封面判断逻辑
|
||||
- 🐛 修正主窗口尺寸计算
|
||||
- 🐛 修正用户收藏帖子获取API链接
|
||||
- 🐛 修复帖子列表刷新时的请求状态异常
|
||||
- 🚸 调整咨讯页浮窗显示逻辑
|
||||
- 🚸 移除正式环境下公告页标题点击产生的JSON子窗口
|
||||
|
||||
## [0.7.3](https://github.com/BTMuli/TeyvatGuide/releases/v0.7.3) (2025-04-11)
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
Author: 目棃
|
||||
Description: 说明文档
|
||||
Date: 2023-03-05
|
||||
Update: 2025-03-31
|
||||
Update: 2025-05-09
|
||||
---
|
||||
|
||||
> 本文档 [`Frontmatter`](https://github.com/BTMuli/MuCli#Frontmatter) 由 [MuCli](https://github.com/BTMuli/Mucli) 自动生成于 `2023-03-05 14:41:55`
|
||||
>
|
||||
> 更新于 `2025-03-31 15:53:10`
|
||||
> 更新于 `2025-05-09 23:07:28`
|
||||
|
||||
 
|
||||
[](https://deepwiki.com/BTMuli/TeyvatGuide)  
|
||||
|
||||
   
|
||||
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
import eslint_jsonc from "eslint-plugin-jsonc";
|
||||
import eslint_js from "@eslint/js";
|
||||
import eslint_ts from "typescript-eslint";
|
||||
import eslint_vue from "eslint-plugin-vue";
|
||||
/**
|
||||
* @file eslint.config.mjs
|
||||
* @description ESLint配置文件
|
||||
* @since 2025-05-29
|
||||
*/
|
||||
import eslintPluginJsonc from "eslint-plugin-jsonc";
|
||||
import eslintPluginJs from "@eslint/js";
|
||||
import eslintPluginTs from "typescript-eslint";
|
||||
import eslintPluginVue from "eslint-plugin-vue";
|
||||
|
||||
import { jsonEslintConfig } from "./eslint/jsonEslint.js";
|
||||
import { vueEslintConfig } from "./eslint/vueEslint.js";
|
||||
import ymlEslintConfig from "./eslint/ymlEslint.js";
|
||||
import eslintConfigJson from "./eslint/jsonEslint.js";
|
||||
import eslintConfigVue from "./eslint/vueEslint.js";
|
||||
import eslintConfigYml from "./eslint/ymlEslint.js";
|
||||
|
||||
export default [
|
||||
eslint_js.configs.recommended,
|
||||
...eslint_jsonc.configs["flat/recommended-with-jsonc"],
|
||||
...eslint_ts.configs.recommended,
|
||||
...eslint_vue.configs["flat/essential"],
|
||||
...jsonEslintConfig,
|
||||
...vueEslintConfig,
|
||||
ymlEslintConfig,
|
||||
eslintPluginJs.configs.recommended,
|
||||
...eslintPluginJsonc.configs["flat/recommended-with-jsonc"],
|
||||
...eslintPluginTs.configs.recommended,
|
||||
...eslintPluginVue.configs["flat/essential"],
|
||||
...eslintConfigJson,
|
||||
...eslintConfigVue,
|
||||
eslintConfigYml,
|
||||
{
|
||||
ignores: [
|
||||
"dist",
|
||||
@@ -25,9 +30,6 @@ export default [
|
||||
"src-tauri/**/*.json",
|
||||
"qodana.yaml",
|
||||
".github",
|
||||
".vscode",
|
||||
".prettierrc.yml",
|
||||
".stylelintrc.yml",
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/**
|
||||
* @file eslint/jsonEslint.js
|
||||
* @description JSON相关的ESLint配置
|
||||
* @since Beta v0.7.7
|
||||
*/
|
||||
|
||||
import pluginJsonc from "eslint-plugin-jsonc";
|
||||
import parserJsonc from "jsonc-eslint-parser";
|
||||
|
||||
@@ -66,4 +72,6 @@ const jsoncConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
export const jsonEslintConfig = [pkgJsonConfig, tscJsonConfig, jsoncConfig];
|
||||
const eslintConfigJson = [pkgJsonConfig, tscJsonConfig, jsoncConfig];
|
||||
|
||||
export default eslintConfigJson;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @file eslint/vueEslint.js
|
||||
* @description Vue相关的ESLint配置
|
||||
* @since Beta v0.7.7
|
||||
*/
|
||||
import pluginImport from "eslint-plugin-import";
|
||||
import pluginPrettier from "eslint-plugin-prettier";
|
||||
import pluginVue from "eslint-plugin-vue";
|
||||
@@ -49,4 +54,6 @@ const vueConfig = {
|
||||
rules: { ...tsConfigRules, "vue/multi-word-component-names": "off" },
|
||||
};
|
||||
|
||||
export const vueEslintConfig = [tsConfig, vueConfig];
|
||||
const eslintConfigVue = [tsConfig, vueConfig];
|
||||
|
||||
export default eslintConfigVue;
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
/**
|
||||
* @file eslint/ymlEslint.js
|
||||
* @description YAML相关的ESLint配置
|
||||
* @since Beta v0.7.7
|
||||
*/
|
||||
import pluginYml from "eslint-plugin-yml";
|
||||
import parserYml from "yaml-eslint-parser";
|
||||
|
||||
const ymlEslintConfig = {
|
||||
const eslintConfigYml = {
|
||||
files: ["**/*.yml", "**/*.yaml"],
|
||||
plugins: { yml: pluginYml },
|
||||
languageOptions: {
|
||||
@@ -16,4 +21,4 @@ const ymlEslintConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
export default ymlEslintConfig;
|
||||
export default eslintConfigYml;
|
||||
|
||||
83
package.json
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "teyvatguide",
|
||||
"version": "0.7.3",
|
||||
"version": "0.7.7",
|
||||
"description": "Game Tool for GenshinImpact player",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.8.0",
|
||||
"packageManager": "pnpm@10.12.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "tauri build",
|
||||
@@ -40,7 +40,8 @@
|
||||
"prettier --write",
|
||||
"stylelint --fix"
|
||||
],
|
||||
"*.{yml,json,md}": [
|
||||
"*.{yml,json}": [
|
||||
"eslint --fix",
|
||||
"prettier --write"
|
||||
],
|
||||
"*.rs": [
|
||||
@@ -70,79 +71,81 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@mdi/font": "7.4.47",
|
||||
"@tauri-apps/api": "^2.4.1",
|
||||
"@tauri-apps/plugin-deep-link": "^2.2.1",
|
||||
"@tauri-apps/plugin-dialog": "^2.2.1",
|
||||
"@tauri-apps/plugin-fs": "^2.2.1",
|
||||
"@tauri-apps/plugin-http": "^2.4.3",
|
||||
"@tauri-apps/plugin-log": "^2.3.1",
|
||||
"@tauri-apps/plugin-opener": "^2.2.6",
|
||||
"@tauri-apps/api": "^2.5.0",
|
||||
"@tauri-apps/plugin-deep-link": "^2.3.0",
|
||||
"@tauri-apps/plugin-dialog": "^2.2.2",
|
||||
"@tauri-apps/plugin-fs": "^2.3.0",
|
||||
"@tauri-apps/plugin-http": "^2.4.4",
|
||||
"@tauri-apps/plugin-log": "^2.4.0",
|
||||
"@tauri-apps/plugin-opener": "^2.2.7",
|
||||
"@tauri-apps/plugin-os": "^2.2.1",
|
||||
"@tauri-apps/plugin-process": "^2.2.1",
|
||||
"@tauri-apps/plugin-shell": "^2.2.1",
|
||||
"@tauri-apps/plugin-sql": "^2.2.0",
|
||||
"ajv": "^8.17.1",
|
||||
"artplayer": "^5.2.2",
|
||||
"artplayer": "^5.2.3",
|
||||
"clipboard": "^2.0.11",
|
||||
"color-convert": "^3.0.1",
|
||||
"color-convert": "^3.1.0",
|
||||
"echarts": "^5.6.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
"js-md5": "^0.8.3",
|
||||
"jsencrypt": "^3.3.2",
|
||||
"pinia": "^3.0.1",
|
||||
"pinia-plugin-persistedstate": "^4.2.0",
|
||||
"pinia": "^3.0.3",
|
||||
"pinia-plugin-persistedstate": "^4.3.0",
|
||||
"qrcode.vue": "^3.6.0",
|
||||
"sass-embedded": "^1.86.3",
|
||||
"sass-embedded": "^1.89.2",
|
||||
"uuid": "^11.1.0",
|
||||
"vue": "^3.5.13",
|
||||
"vue": "^3.5.16",
|
||||
"vue-echarts": "^7.0.3",
|
||||
"vue-json-pretty": "^2.4.0",
|
||||
"vue-router": "^4.5.0",
|
||||
"vuetify": "^3.8.1",
|
||||
"vue-router": "^4.5.1",
|
||||
"vuetify": "^3.8.8",
|
||||
"wcag-color": "^1.1.1",
|
||||
"xml-js": "^1.6.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@btmuli/stylelint-plugin-color": "^0.1.0",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@eslint/js": "^9.24.0",
|
||||
"@tauri-apps/cli": "2.4.1",
|
||||
"@eslint/js": "^9.28.0",
|
||||
"@tauri-apps/cli": "2.5.0",
|
||||
"@types/color-convert": "^2.0.4",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/js-md5": "^0.7.2",
|
||||
"@types/node": "^22.14.0",
|
||||
"@types/js-md5": "^0.8.0",
|
||||
"@types/node": "^24.0.0",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@typescript-eslint/parser": "^8.29.1",
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
"@typescript-eslint/parser": "^8.34.0",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"concurrently": "^9.1.2",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint": "^9.28.0",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-jsonc": "^2.20.0",
|
||||
"eslint-plugin-prettier": "^5.2.6",
|
||||
"eslint-plugin-vue": "^10.0.0",
|
||||
"eslint-plugin-yml": "^1.17.0",
|
||||
"eslint-plugin-jsonc": "^2.20.1",
|
||||
"eslint-plugin-prettier": "^5.4.1",
|
||||
"eslint-plugin-vue": "^10.2.0",
|
||||
"eslint-plugin-yml": "^1.18.0",
|
||||
"fs-extra": "^11.3.0",
|
||||
"globals": "^16.0.0",
|
||||
"globals": "^16.2.0",
|
||||
"husky": "^9.1.7",
|
||||
"jsonc-eslint-parser": "^2.4.0",
|
||||
"lint-staged": "^15.5.0",
|
||||
"oxlint": "^0.16.5",
|
||||
"lint-staged": "^16.1.0",
|
||||
"oxlint": "^0.18.1",
|
||||
"prettier": "3.5.3",
|
||||
"stylelint": "^16.18.0",
|
||||
"stylelint": "^16.20.0",
|
||||
"stylelint-config-idiomatic-order": "^10.0.0",
|
||||
"stylelint-config-standard-scss": "^15.0.1",
|
||||
"stylelint-config-standard-vue": "^1.0.0",
|
||||
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
||||
"stylelint-high-performance-animation": "^1.11.0",
|
||||
"stylelint-order": "^6.0.4",
|
||||
"stylelint-order": "^7.0.0",
|
||||
"stylelint-prettier": "^5.0.3",
|
||||
"stylelint-scss": "^6.11.1",
|
||||
"tsx": "^4.19.3",
|
||||
"stylelint-scss": "^6.12.0",
|
||||
"tsx": "^4.19.4",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.29.1",
|
||||
"vite": "^6.2.5",
|
||||
"vite-plugin-vue-devtools": "^7.7.2",
|
||||
"typescript-eslint": "^8.34.0",
|
||||
"vite": "^6.3.5",
|
||||
"vite-plugin-vue-devtools": "^7.7.6",
|
||||
"vite-plugin-vuetify": "^2.1.1",
|
||||
"vue-eslint-parser": "^10.1.3",
|
||||
"vue-tsc": "^2.2.8",
|
||||
"vue-tsc": "^2.2.10",
|
||||
"yaml-eslint-parser": "^1.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
2815
pnpm-lock.yaml
generated
BIN
public/WIKI/character/10000112.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/WIKI/character/10000113.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/WIKI/character/10000114.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/WIKI/character/10000115.webp
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/WIKI/nameCard/bg/丝柯克·孤影.webp
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
public/WIKI/nameCard/bg/伊法·哥们.webp
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
public/WIKI/nameCard/bg/塔利雅·天职.webp
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
public/WIKI/nameCard/bg/庆典·宴飨.webp
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
public/WIKI/nameCard/bg/爱可菲·韵味.webp
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/WIKI/nameCard/bg/纪行·推想.webp
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
public/WIKI/nameCard/bg/纪行·舞剧.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/WIKI/nameCard/icon/丝柯克·孤影.webp
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
public/WIKI/nameCard/icon/伊法·哥们.webp
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
public/WIKI/nameCard/icon/塔利雅·天职.webp
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
public/WIKI/nameCard/icon/庆典·宴飨.webp
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
public/WIKI/nameCard/icon/爱可菲·韵味.webp
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
public/WIKI/nameCard/icon/纪行·推想.webp
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
public/WIKI/nameCard/icon/纪行·舞剧.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
public/WIKI/nameCard/profile/丝柯克·孤影.webp
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
public/WIKI/nameCard/profile/伊法·哥们.webp
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/WIKI/nameCard/profile/塔利雅·天职.webp
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/WIKI/nameCard/profile/庆典·宴飨.webp
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
public/WIKI/nameCard/profile/爱可菲·韵味.webp
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
public/WIKI/nameCard/profile/纪行·推想.webp
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
public/WIKI/nameCard/profile/纪行·舞剧.webp
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
public/WIKI/weapon/11517.webp
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
public/WIKI/weapon/13514.webp
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/WIKI/weapon/15432.webp
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
public/icon/constellations/UI_Talent_S_Dahlia_01.webp
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
public/icon/constellations/UI_Talent_S_Dahlia_02.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/icon/constellations/UI_Talent_S_Dahlia_03.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
public/icon/constellations/UI_Talent_S_Dahlia_04.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/icon/constellations/UI_Talent_S_Escoffier_01.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/icon/constellations/UI_Talent_S_Escoffier_02.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/icon/constellations/UI_Talent_S_Escoffier_03.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
public/icon/constellations/UI_Talent_S_Escoffier_04.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/icon/constellations/UI_Talent_S_Ifa_01.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/icon/constellations/UI_Talent_S_Ifa_02.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/icon/constellations/UI_Talent_S_Ifa_03.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/icon/constellations/UI_Talent_S_Ifa_04.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/icon/constellations/UI_Talent_S_SkirkNew_01.webp
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
public/icon/constellations/UI_Talent_S_SkirkNew_02.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/icon/constellations/UI_Talent_S_SkirkNew_03.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/icon/constellations/UI_Talent_S_SkirkNew_04.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
public/icon/constellations/UI_Talent_U_Dahlia_01.webp
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
public/icon/constellations/UI_Talent_U_Dahlia_02.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/icon/constellations/UI_Talent_U_Escoffier_01.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/icon/constellations/UI_Talent_U_Escoffier_02.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
public/icon/constellations/UI_Talent_U_Ifa_01.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/icon/constellations/UI_Talent_U_Ifa_02.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
public/icon/constellations/UI_Talent_U_SkirkNew_01.webp
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/icon/constellations/UI_Talent_U_SkirkNew_02.webp
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/icon/material/113073.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/icon/material/113074.webp
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
public/icon/material/113075.webp
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
public/icon/material/113076.webp
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
public/icon/material/121234.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
public/icon/material/220115.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/icon/material/220116.webp
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
public/icon/talents/Skill_E_Dahlia_01.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/icon/talents/Skill_E_Escoffier_01.webp
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
public/icon/talents/Skill_E_Ifa_01.webp
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
public/icon/talents/Skill_E_SkirkNew_01.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/icon/talents/Skill_S_Dahlia_01.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/icon/talents/Skill_S_Escoffier_01.webp
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/icon/talents/Skill_S_Ifa_01.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/icon/talents/Skill_S_SkirkNew_01.webp
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/icon/talents/UI_Talent_S_Dahlia_05.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
public/icon/talents/UI_Talent_S_Dahlia_06.webp
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
public/icon/talents/UI_Talent_S_Escoffier_05.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/icon/talents/UI_Talent_S_Escoffier_06.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
public/icon/talents/UI_Talent_S_Escoffier_08.webp
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
public/icon/talents/UI_Talent_S_Ifa_05.webp
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
public/icon/talents/UI_Talent_S_Ifa_06.webp
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
public/icon/talents/UI_Talent_S_Ifa_07.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
public/icon/talents/UI_Talent_S_Ifa_08.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
public/icon/talents/UI_Talent_S_SkirkNew_05.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/icon/talents/UI_Talent_S_SkirkNew_06.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
public/icon/talents/UI_Talent_S_SkirkNew_08.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
1268
src-tauri/Cargo.lock
generated
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "TeyvatGuide"
|
||||
version = "0.7.3"
|
||||
version = "0.7.7"
|
||||
description = "Game Tool for Genshin Impact player"
|
||||
authors = ["BTMuli <bt-muli@outlook.com>"]
|
||||
license = "MIT"
|
||||
@@ -17,15 +17,15 @@ name = "teyvat_guide_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.1.1", features = [] }
|
||||
tauri-build = { version = "2.2.0", features = [] }
|
||||
|
||||
[dependencies]
|
||||
chrono = "0.4.40"
|
||||
chrono = "0.4.41"
|
||||
log = "0.4.27"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
serde_json = "1.0.140"
|
||||
tauri = { version = "2.4.1", features = [] }
|
||||
tauri-utils = "2.3.1"
|
||||
tauri = { version = "2.5.1", features = [] }
|
||||
tauri-utils = "2.4.0"
|
||||
url = "2.5.4"
|
||||
walkdir = "2.5.0"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! @file src/client/menu.rs
|
||||
//! @desc 客户端菜单模块,负责操作米游社客户端菜单
|
||||
//! @since Beta v0.5.2
|
||||
//! @since Beta v0.7.6
|
||||
|
||||
use crate::client::utils;
|
||||
use tauri::menu::{Menu, MenuBuilder, MenuEvent, MenuItemBuilder, Submenu, SubmenuBuilder};
|
||||
@@ -33,11 +33,14 @@ fn create_utils_menu(app: AppHandle) -> Submenu<Wry> {
|
||||
MenuItemBuilder::with_id("remove_overlay", "移除遮罩").build(&app).unwrap();
|
||||
let rotate_window_submenu =
|
||||
MenuItemBuilder::with_id("rotate_window", "旋转窗口").build(&app).unwrap();
|
||||
let open_with_webview_submenu =
|
||||
MenuItemBuilder::with_id("open_with_webview", "外部打开").build(&app).unwrap();
|
||||
let utils_menu = SubmenuBuilder::new(&app, "工具")
|
||||
.item(&retry_bridge_submenu)
|
||||
.item(&mock_touch_submenu)
|
||||
.item(&remove_overlay_submenu)
|
||||
.item(&rotate_window_submenu)
|
||||
.item(&open_with_webview_submenu)
|
||||
.build()
|
||||
.expect("failed to create utils_menu");
|
||||
utils_menu
|
||||
@@ -68,6 +71,7 @@ pub fn handle_menu_event(window: &Window, event: MenuEvent) {
|
||||
"mock_touch" => handle_menu_mock_touch(window),
|
||||
"remove_overlay" => handle_menu_remove_overlay(window),
|
||||
"rotate_window" => handle_menu_rotate_window(window),
|
||||
"open_with_webview" => handle_menu_open_with_webview(window),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
@@ -124,7 +128,7 @@ fn handle_menu_open_post(app_handle: &Window) {
|
||||
await window.__TAURI__.event.emit('post_mhy_client',JSON.stringify(arg));
|
||||
})()"#;
|
||||
if window.is_some() {
|
||||
window.unwrap().eval(&execute_js).ok().unwrap();
|
||||
window.unwrap().eval(execute_js).ok().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +143,7 @@ fn handle_menu_retry(app_handle: &Window) {
|
||||
await window.__TAURI__.event.emit('post_mhy_client',JSON.stringify(arg));
|
||||
})()"#;
|
||||
if window.is_some() {
|
||||
window.unwrap().eval(&execute_js).ok().unwrap();
|
||||
window.unwrap().eval(execute_js).ok().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +158,7 @@ fn handle_menu_mock_touch(app_handle: &Window) {
|
||||
await window.__TAURI__.event.emit('post_mhy_client',JSON.stringify(arg));
|
||||
})()"#;
|
||||
if window.is_some() {
|
||||
window.unwrap().eval(&execute_js).ok().unwrap();
|
||||
window.unwrap().eval(execute_js).ok().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +173,7 @@ fn handle_menu_remove_overlay(app_handle: &Window) {
|
||||
await window.__TAURI__.event.emit('post_mhy_client',JSON.stringify(arg));
|
||||
})()"#;
|
||||
if window.is_some() {
|
||||
window.unwrap().eval(&execute_js).ok().unwrap();
|
||||
window.unwrap().eval(execute_js).ok().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,3 +201,20 @@ fn handle_menu_rotate_window(app_handle: &Window) {
|
||||
window.center().unwrap();
|
||||
window.set_focus().unwrap();
|
||||
}
|
||||
|
||||
// 处理使用 WebView 打开菜单
|
||||
fn handle_menu_open_with_webview(app_handle: &Window) {
|
||||
let window = app_handle.get_webview_window("mhy_client");
|
||||
let execute_js = r#"
|
||||
javascript:(async function(){
|
||||
const url = window.location.href;
|
||||
const arg = {
|
||||
method: 'teyvat_open_webview',
|
||||
payload: url,
|
||||
}
|
||||
await window.__TAURI__.event.emit('post_mhy_client',JSON.stringify(arg));
|
||||
})()"#;
|
||||
if window.is_some() {
|
||||
window.unwrap().eval(execute_js).ok().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! @file src/client/mod.rs
|
||||
//! @desc 客户端模块,负责操作米游社客户端
|
||||
//! @since Beta v0.7.3
|
||||
//! @since Beta v0.7.7
|
||||
|
||||
mod menu;
|
||||
mod utils;
|
||||
@@ -8,7 +8,7 @@ mod utils;
|
||||
use tauri::{AppHandle, Manager, WebviewWindowBuilder};
|
||||
use tauri_utils::config::WebviewUrl;
|
||||
|
||||
static BBS_VERSION: &'static str = "2.85.1";
|
||||
static BBS_VERSION: &'static str = "2.87.0";
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn create_mhy_client(handle: AppHandle, func: String, url: String) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! @file src/client/utils.rs
|
||||
//! @desc 结合屏幕分辨率获取窗口大小
|
||||
//! @since Beta v0.5.5
|
||||
//! @since Beta v0.7.6
|
||||
|
||||
use tauri::{AppHandle, Manager, Monitor};
|
||||
|
||||
@@ -17,7 +17,16 @@ pub fn get_window_size2(monitor: Monitor, width: f64, height: f64) -> (f64, f64)
|
||||
let monitor_scale = monitor.scale_factor();
|
||||
let width_scale = monitor_width / 1920.0;
|
||||
let height_scale = monitor_height / 1080.0;
|
||||
let get_width = (width * width_scale / monitor_scale).round();
|
||||
let get_height = (height * height_scale / monitor_scale).round();
|
||||
let mut get_width: f64 = 0.0;
|
||||
let mut get_height: f64 = 0.0;
|
||||
// 忽略未使用
|
||||
println!("{} {}", get_width, get_height);
|
||||
get_width = (width * width_scale / monitor_scale).round();
|
||||
get_height = (height * height_scale / monitor_scale).round();
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
get_width = (width * width_scale).round();
|
||||
get_height = (height * height_scale).round();
|
||||
}
|
||||
(get_width, get_height)
|
||||
}
|
||||
|
||||