mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-06 08:32:51 +08:00
⚡️ 不允许低于 UIGF v2.3 版本的数据导入
This commit is contained in:
52
package.json
52
package.json
@@ -67,16 +67,16 @@
|
||||
"dependencies": {
|
||||
"@mdi/font": "7.4.47",
|
||||
"@tauri-apps/api": "2.0.0-beta.14",
|
||||
"@tauri-apps/plugin-deep-link": "2.0.0-beta.8",
|
||||
"@tauri-apps/plugin-dialog": "2.0.0-beta.6",
|
||||
"@tauri-apps/plugin-fs": "2.0.0-beta.6",
|
||||
"@tauri-apps/plugin-http": "2.0.0-beta.7",
|
||||
"@tauri-apps/plugin-log": "2.0.0-beta.7",
|
||||
"@tauri-apps/plugin-os": "2.0.0-beta.6",
|
||||
"@tauri-apps/plugin-process": "2.0.0-beta.6",
|
||||
"@tauri-apps/plugin-shell": "2.0.0-beta.7",
|
||||
"@tauri-apps/plugin-sql": "2.0.0-beta.6",
|
||||
"ajv": "^8.16.0",
|
||||
"@tauri-apps/plugin-deep-link": "2.0.0-beta.9",
|
||||
"@tauri-apps/plugin-dialog": "2.0.0-beta.7",
|
||||
"@tauri-apps/plugin-fs": "2.0.0-beta.7",
|
||||
"@tauri-apps/plugin-http": "2.0.0-beta.8",
|
||||
"@tauri-apps/plugin-log": "2.0.0-beta.8",
|
||||
"@tauri-apps/plugin-os": "2.0.0-beta.7",
|
||||
"@tauri-apps/plugin-process": "2.0.0-beta.7",
|
||||
"@tauri-apps/plugin-shell": "2.0.0-beta.8",
|
||||
"@tauri-apps/plugin-sql": "2.0.0-beta.7",
|
||||
"ajv": "^8.17.1",
|
||||
"artplayer": "^5.1.6",
|
||||
"clipboard": "^2.0.11",
|
||||
"color-convert": "^2.0.1",
|
||||
@@ -87,52 +87,52 @@
|
||||
"pinia-plugin-persistedstate": "^3.2.1",
|
||||
"qrcode.vue": "^3.4.1",
|
||||
"uuid": "^10.0.0",
|
||||
"vue": "^3.4.31",
|
||||
"vue": "^3.4.32",
|
||||
"vue-echarts": "^6.7.3",
|
||||
"vue-json-viewer": "^3.0.4",
|
||||
"vue-router": "^4.4.0",
|
||||
"vuetify": "^3.6.11",
|
||||
"vuetify": "^3.6.13",
|
||||
"wcag-color": "^1.1.1",
|
||||
"xml-js": "^1.6.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.1.0",
|
||||
"@eslint/js": "^9.6.0",
|
||||
"@eslint/js": "^9.7.0",
|
||||
"@tauri-apps/cli": "2.0.0-beta.21",
|
||||
"@types/color-convert": "^2.0.3",
|
||||
"@types/js-md5": "^0.7.2",
|
||||
"@types/node": "^20.14.10",
|
||||
"@types/node": "^20.14.11",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@typescript-eslint/parser": "^7.15.0",
|
||||
"@typescript-eslint/parser": "^7.16.1",
|
||||
"@vitejs/plugin-vue": "^5.0.5",
|
||||
"concurrently": "^8.2.2",
|
||||
"eslint": "^9.6.0",
|
||||
"eslint-config-love": "^53.0.0",
|
||||
"eslint": "^9.7.0",
|
||||
"eslint-config-love": "^56.0.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-jsonc": "^2.16.0",
|
||||
"eslint-plugin-n": "^17.9.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-promise": "^6.4.0",
|
||||
"eslint-plugin-vue": "^9.27.0",
|
||||
"eslint-plugin-yml": "^1.14.0",
|
||||
"globals": "^15.8.0",
|
||||
"husky": "^9.0.11",
|
||||
"husky": "^9.1.0",
|
||||
"jsonc-eslint-parser": "^2.4.0",
|
||||
"lint-staged": "^15.2.7",
|
||||
"oxlint": "^0.5.2",
|
||||
"prettier": "3.3.2",
|
||||
"stylelint": "^16.6.1",
|
||||
"oxlint": "^0.6.1",
|
||||
"prettier": "3.3.3",
|
||||
"stylelint": "^16.7.0",
|
||||
"stylelint-config-idiomatic-order": "^10.0.0",
|
||||
"stylelint-config-standard-vue": "^1.0.0",
|
||||
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
||||
"stylelint-high-performance-animation": "^1.10.0",
|
||||
"stylelint-order": "^6.0.4",
|
||||
"stylelint-prettier": "^5.0.0",
|
||||
"stylelint-prettier": "^5.0.2",
|
||||
"typescript": "^5.5.3",
|
||||
"typescript-eslint": "^7.15.0",
|
||||
"vite": "^5.3.3",
|
||||
"vite-plugin-vue-devtools": "^7.3.5",
|
||||
"typescript-eslint": "^7.16.1",
|
||||
"vite": "^5.3.4",
|
||||
"vite-plugin-vue-devtools": "^7.3.6",
|
||||
"vite-plugin-vuetify": "^2.0.3",
|
||||
"vue-eslint-parser": "^9.4.3",
|
||||
"yaml-eslint-parser": "^1.2.3"
|
||||
|
||||
998
pnpm-lock.yaml
generated
998
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
374
src-tauri/Cargo.lock
generated
374
src-tauri/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -10,15 +10,15 @@ edition = "2021"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.0.0-beta.18", features = [] }
|
||||
tauri-build = { version = "2.0.0-beta.19", features = [] }
|
||||
|
||||
[dependencies]
|
||||
chrono = "0.4.38"
|
||||
log = "0.4.22"
|
||||
serde = { version = "1.0.204", features = ["derive"] }
|
||||
serde_json = "1.0.120"
|
||||
tauri = { version = "2.0.0-beta.23", features = [] }
|
||||
tauri-utils = "2.0.0-beta.18"
|
||||
tauri = { version = "2.0.0-beta.24", features = [] }
|
||||
tauri-utils = "2.0.0-beta.19"
|
||||
url = "2.5.2"
|
||||
walkdir = "2.5.0"
|
||||
|
||||
|
||||
@@ -3257,6 +3257,11 @@
|
||||
"description": "Enables the set_title command without any pre-configured scope.",
|
||||
"commands": { "allow": ["set_title"], "deny": [] }
|
||||
},
|
||||
"allow-set-title-bar-style": {
|
||||
"identifier": "allow-set-title-bar-style",
|
||||
"description": "Enables the set_title_bar_style command without any pre-configured scope.",
|
||||
"commands": { "allow": ["set_title_bar_style"], "deny": [] }
|
||||
},
|
||||
"allow-set-visible-on-all-workspaces": {
|
||||
"identifier": "allow-set-visible-on-all-workspaces",
|
||||
"description": "Enables the set_visible_on_all_workspaces command without any pre-configured scope.",
|
||||
@@ -3572,6 +3577,11 @@
|
||||
"description": "Denies the set_title command without any pre-configured scope.",
|
||||
"commands": { "allow": [], "deny": ["set_title"] }
|
||||
},
|
||||
"deny-set-title-bar-style": {
|
||||
"identifier": "deny-set-title-bar-style",
|
||||
"description": "Denies the set_title_bar_style command without any pre-configured scope.",
|
||||
"commands": { "allow": [], "deny": ["set_title_bar_style"] }
|
||||
},
|
||||
"deny-set-visible-on-all-workspaces": {
|
||||
"identifier": "deny-set-visible-on-all-workspaces",
|
||||
"description": "Denies the set_visible_on_all_workspaces command without any pre-configured scope.",
|
||||
|
||||
@@ -4643,6 +4643,11 @@
|
||||
"type": "string",
|
||||
"enum": ["window:allow-set-title"]
|
||||
},
|
||||
{
|
||||
"description": "window:allow-set-title-bar-style -> Enables the set_title_bar_style command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": ["window:allow-set-title-bar-style"]
|
||||
},
|
||||
{
|
||||
"description": "window:allow-set-visible-on-all-workspaces -> Enables the set_visible_on_all_workspaces command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -4958,6 +4963,11 @@
|
||||
"type": "string",
|
||||
"enum": ["window:deny-set-title"]
|
||||
},
|
||||
{
|
||||
"description": "window:deny-set-title-bar-style -> Denies the set_title_bar_style command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": ["window:deny-set-title-bar-style"]
|
||||
},
|
||||
{
|
||||
"description": "window:deny-set-visible-on-all-workspaces -> Denies the set_visible_on_all_workspaces command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
|
||||
@@ -4643,6 +4643,11 @@
|
||||
"type": "string",
|
||||
"enum": ["window:allow-set-title"]
|
||||
},
|
||||
{
|
||||
"description": "window:allow-set-title-bar-style -> Enables the set_title_bar_style command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": ["window:allow-set-title-bar-style"]
|
||||
},
|
||||
{
|
||||
"description": "window:allow-set-visible-on-all-workspaces -> Enables the set_visible_on_all_workspaces command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -4958,6 +4963,11 @@
|
||||
"type": "string",
|
||||
"enum": ["window:deny-set-title"]
|
||||
},
|
||||
{
|
||||
"description": "window:deny-set-title-bar-style -> Denies the set_title_bar_style command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": ["window:deny-set-title-bar-style"]
|
||||
},
|
||||
{
|
||||
"description": "window:deny-set-visible-on-all-workspaces -> Denies the set_visible_on_all_workspaces command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//! @file src/commands.rs
|
||||
//! @desc 命令模块,负责处理命令
|
||||
//! @since Beta v0.5.0
|
||||
//! @since Beta v0.5.1
|
||||
|
||||
use tauri::{AppHandle, Manager, WebviewWindowBuilder};
|
||||
use tauri::{AppHandle, Emitter, Manager, WebviewWindowBuilder};
|
||||
use tauri_utils::config::{WebviewUrl, WindowConfig};
|
||||
|
||||
// 放一个常数,用来判断应用是否初始化
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//! @file src/main.rs
|
||||
//! @desc 主模块,用于启动应用
|
||||
//! @since Beta v0.5.0
|
||||
//! @since Beta v0.5.1
|
||||
|
||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
use tauri::Manager;
|
||||
use tauri::{Emitter, Manager};
|
||||
mod client;
|
||||
mod commands;
|
||||
mod plugins;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<TOverlay v-model="visible" hide blur-val="20px" :to-click="onCancel">
|
||||
<div class="tog-box">
|
||||
<div class="tog-top">
|
||||
<div class="tog-title">请使用米游社或原神进行操作</div>
|
||||
<div class="tog-title">请使用米游社APP进行操作</div>
|
||||
<div class="tog-subtitle">所需米游社版本 >= 2.57.1</div>
|
||||
</div>
|
||||
<div class="tog-mid">
|
||||
@@ -135,7 +135,7 @@ async function cycleGetData() {
|
||||
if (res.payload.proto !== "OpenToken" && res.payload.proto !== "Account") {
|
||||
await TGLogger.Warn(`[to-gameLogin] 检测到意外协议:${res.payload.proto}`);
|
||||
showSnackbar({
|
||||
text: "请使用米游社或原神进行扫码操作",
|
||||
text: "请使用米游社APP进行扫码操作",
|
||||
color: "error",
|
||||
});
|
||||
visible.value = false;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file plugins/Sqlite/modules/userGacha.ts
|
||||
* @description 用户祈愿模块
|
||||
* @since Beta v0.5.0
|
||||
* @since Beta v0.5.1
|
||||
*/
|
||||
|
||||
import { AppCharacterData, AppWeaponData } from "../../../data/index.js";
|
||||
@@ -29,12 +29,12 @@ function getGachaItemType(item_id: string): gachaItemTypeRes {
|
||||
|
||||
/**
|
||||
* @description 转换祈愿数据,防止多语言
|
||||
* @since Beta v0.4.7
|
||||
* @since Beta v0.5.1
|
||||
* @param {TGApp.Plugins.UIGF.GachaItem} gacha - UIGF数据
|
||||
* @return {TGApp.Plugins.UIGF.GachaItem} 转换后的数据
|
||||
*/
|
||||
function transGacha(gacha: TGApp.Plugins.UIGF.GachaItem): TGApp.Plugins.UIGF.GachaItem {
|
||||
const type = getGachaItemType(gacha.item_id!);
|
||||
const type = getGachaItemType(gacha.item_id);
|
||||
let res = gacha;
|
||||
res.item_type = type[0];
|
||||
if (type[0] === "角色") {
|
||||
|
||||
7
src/types/Plugins/UIGF.d.ts
vendored
7
src/types/Plugins/UIGF.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file types/Plugins/UIGF.d.ts
|
||||
* @description UIGF 插件类型定义文件
|
||||
* @since Beta v0.5.0
|
||||
* @since Beta v0.5.1
|
||||
* @version UIGF v3.0 | UIGF v4.0
|
||||
*/
|
||||
|
||||
@@ -114,7 +114,8 @@ declare namespace TGApp.Plugins.UIGF {
|
||||
|
||||
/**
|
||||
* @description UIGF 祈愿列表
|
||||
* @since Alpha v0.2.3
|
||||
* @Beta v0.5.1
|
||||
* @version UIGF v3.0
|
||||
* @interface GachaItem
|
||||
* @property {EnumGachaType} gacha_type - 祈愿类型
|
||||
* @property {string} item_id - 物品ID
|
||||
@@ -130,7 +131,7 @@ declare namespace TGApp.Plugins.UIGF {
|
||||
interface GachaItem {
|
||||
uigf_gacha_type: string;
|
||||
gacha_type: string;
|
||||
item_id?: string;
|
||||
item_id: string;
|
||||
count?: string;
|
||||
time: string;
|
||||
name: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file utils/UIGF.ts
|
||||
* @description UIGF工具类
|
||||
* @since Beta v0.5.0
|
||||
* @since Beta v0.5.1
|
||||
*/
|
||||
|
||||
import { app, path } from "@tauri-apps/api";
|
||||
@@ -110,7 +110,7 @@ export async function verifyUigfData(path: string, isVersion4: boolean = false):
|
||||
|
||||
/**
|
||||
* @description 验证 UIGF 数据
|
||||
* @since Beta v0.5.0
|
||||
* @since Beta v0.5.1
|
||||
* @param {object} data - UIGF 数据
|
||||
* @returns {boolean} 是否验证通过
|
||||
*/
|
||||
@@ -126,6 +126,14 @@ function validateUigfData(data: object): boolean {
|
||||
});
|
||||
return false;
|
||||
}
|
||||
const parsedData: TGApp.Plugins.UIGF.Schema = <TGApp.Plugins.UIGF.Schema>data;
|
||||
if (parsedData.info.uigf_version < "v2.3") {
|
||||
showSnackbar({
|
||||
text: "UIGF 版本过低,请使用 v2.3 或以上版本",
|
||||
color: "error",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user