Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c561ff98f | ||
|
|
817ae298b1 | ||
|
|
92d2e847bd | ||
|
|
d0f12446a8 | ||
|
|
a07d673776 | ||
|
|
083381f2ec | ||
|
|
040f49a33e | ||
|
|
3cfa00a2f6 | ||
|
|
f6068e5bac | ||
|
|
557d68956e | ||
|
|
2f14405cab | ||
|
|
2803d06418 | ||
|
|
298096858f | ||
|
|
7e11b467d1 | ||
|
|
7cd66ffb2d | ||
|
|
5de9c0a76f | ||
|
|
9a3b2ff9b9 | ||
|
|
afa0ba190b | ||
|
|
6316cc42b2 | ||
|
|
abb0a6e751 | ||
|
|
c89dfae2f7 | ||
|
|
9bd9f60699 | ||
|
|
070ab01b22 | ||
|
|
11bf4fea9b | ||
|
|
0b8fa6d8f6 | ||
|
|
8917deb5db | ||
|
|
065019cdc6 | ||
|
|
f802ee9a68 | ||
|
|
971526d6ed | ||
|
|
2c2914a028 | ||
|
|
214b828b10 | ||
|
|
ada6f5b15a | ||
|
|
2aa0df5246 | ||
|
|
d9cdea9670 | ||
|
|
98541e1b49 | ||
|
|
f50398f6e3 | ||
|
|
74eb612d72 | ||
|
|
956634767a | ||
|
|
ee078bbcf2 | ||
|
|
044ec32069 | ||
|
|
19ac8e90e0 | ||
|
|
d1bfa49bd7 | ||
|
|
d78c541c87 |
@@ -1,10 +0,0 @@
|
|||||||
# Build
|
|
||||||
dist
|
|
||||||
src-tauri/target
|
|
||||||
# Package files
|
|
||||||
pnpm-lock.yaml
|
|
||||||
# data
|
|
||||||
src/data/**/*.json
|
|
||||||
# lint files
|
|
||||||
!.prettierrc.yml
|
|
||||||
!.stylelintrc.yml
|
|
||||||
133
.eslintrc.yml
@@ -1,133 +0,0 @@
|
|||||||
root: true
|
|
||||||
env:
|
|
||||||
browser: true
|
|
||||||
es2021: true
|
|
||||||
extends:
|
|
||||||
- plugin:vue/vue3-essential
|
|
||||||
- prettier
|
|
||||||
- plugin:prettier/recommended
|
|
||||||
- plugin:yml/standard
|
|
||||||
- plugin:jsonc/recommended-with-json
|
|
||||||
parserOptions:
|
|
||||||
ecmaVersion: latest
|
|
||||||
sourceType: module
|
|
||||||
tsconfigRootDir: .
|
|
||||||
project: ./tsconfig.json
|
|
||||||
globals:
|
|
||||||
TGApp: readonly
|
|
||||||
window: readonly
|
|
||||||
rules:
|
|
||||||
vue/multi-word-component-names: off
|
|
||||||
vue/valid-template-root: off
|
|
||||||
overrides:
|
|
||||||
- files: ["*.ts"]
|
|
||||||
extends: standard-with-typescript
|
|
||||||
# 将此处规则 copy 到下面的 .vue 文件的 rules 中
|
|
||||||
rules: &typescript-rules
|
|
||||||
import/order:
|
|
||||||
- error
|
|
||||||
- groups:
|
|
||||||
- builtin
|
|
||||||
- external
|
|
||||||
- [internal, parent, sibling, index]
|
|
||||||
- unknown
|
|
||||||
newlines-between: always
|
|
||||||
alphabetize:
|
|
||||||
order: asc
|
|
||||||
caseInsensitive: true
|
|
||||||
"@typescript-eslint/indent": off
|
|
||||||
"@typescript-eslint/quotes":
|
|
||||||
- error
|
|
||||||
- double
|
|
||||||
"@typescript-eslint/semi":
|
|
||||||
- error
|
|
||||||
- always
|
|
||||||
"@typescript-eslint/comma-dangle":
|
|
||||||
- error
|
|
||||||
- always-multiline
|
|
||||||
"@typescript-eslint/space-before-function-paren":
|
|
||||||
- error
|
|
||||||
- anonymous: always
|
|
||||||
named: never
|
|
||||||
asyncArrow: always
|
|
||||||
"@typescript-eslint/member-delimiter-style":
|
|
||||||
- error
|
|
||||||
- multiline:
|
|
||||||
delimiter: semi
|
|
||||||
requireLast: true
|
|
||||||
"@typescript-eslint/no-import-type-side-effects": error
|
|
||||||
"@typescript-eslint/strict-boolean-expressions": off
|
|
||||||
"@typescript-eslint/consistent-type-assertions":
|
|
||||||
- warn
|
|
||||||
- assertionStyle: angle-bracket # 使用尖括号
|
|
||||||
"@typescript-eslint/naming-convention":
|
|
||||||
- warn
|
|
||||||
- selector: variableLike
|
|
||||||
format: [camelCase, UPPER_CASE, PascalCase, snake_case]
|
|
||||||
leadingUnderscore: allow
|
|
||||||
trailingUnderscore: allow
|
|
||||||
"@typescript-eslint/no-non-null-assertion": warn
|
|
||||||
"@typescript-eslint/no-misused-promises": off
|
|
||||||
"@typescript-eslint/restrict-template-expressions": warn
|
|
||||||
- files: ["*.vue"]
|
|
||||||
parser: vue-eslint-parser
|
|
||||||
parserOptions:
|
|
||||||
parser: "@typescript-eslint/parser"
|
|
||||||
extraFileExtensions: [.vue]
|
|
||||||
rules:
|
|
||||||
<<: *typescript-rules
|
|
||||||
- files: [package.json, tsconfig.json]
|
|
||||||
parser: jsonc-eslint-parser
|
|
||||||
rules:
|
|
||||||
jsonc/sort-array-values:
|
|
||||||
- error
|
|
||||||
- pathPattern: .*
|
|
||||||
order:
|
|
||||||
type: asc
|
|
||||||
jsonc/sort-keys:
|
|
||||||
- error
|
|
||||||
- pathPattern: ^$
|
|
||||||
order:
|
|
||||||
- name
|
|
||||||
- version
|
|
||||||
- description
|
|
||||||
- private
|
|
||||||
- packageManager
|
|
||||||
- scripts
|
|
||||||
- lint-staged
|
|
||||||
- keywords
|
|
||||||
- author
|
|
||||||
- license
|
|
||||||
- repository
|
|
||||||
- homepage
|
|
||||||
- bugs
|
|
||||||
- dependencies
|
|
||||||
- devDependencies
|
|
||||||
- files: ["*.yaml", "*.yml"]
|
|
||||||
parser: yaml-eslint-parser
|
|
||||||
parserOptions:
|
|
||||||
defaultYAMLVersion: "1.2"
|
|
||||||
rules:
|
|
||||||
yml/indent:
|
|
||||||
- error
|
|
||||||
- 2
|
|
||||||
yml/no-multiple-empty-lines: error
|
|
||||||
yml/key-spacing: error
|
|
||||||
yml/quotes:
|
|
||||||
- error
|
|
||||||
- prefer: double
|
|
||||||
avoidEscape: true
|
|
||||||
yml/sort-keys:
|
|
||||||
- error
|
|
||||||
- pathPattern: ^$
|
|
||||||
order:
|
|
||||||
- root
|
|
||||||
- env
|
|
||||||
- extends
|
|
||||||
- parserOptions
|
|
||||||
- globals
|
|
||||||
- rules
|
|
||||||
- overrides
|
|
||||||
- pathPattern: ^rules$
|
|
||||||
order:
|
|
||||||
type: asc
|
|
||||||
44
.github/ISSUE_TEMPLATE/source_update.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
name: 原神游戏资源更新(仅供开发者使用)
|
||||||
|
description: 版本前瞻后的例行资源更新
|
||||||
|
title: "[Update] "
|
||||||
|
labels:
|
||||||
|
- 资源
|
||||||
|
body:
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Issue Check
|
||||||
|
options:
|
||||||
|
- label: 个人明确了解该模板仅供开发者使用
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: 游戏版本
|
||||||
|
description: 请填写游戏版本
|
||||||
|
placeholder: 如 4.6
|
||||||
|
- type: checkboxes
|
||||||
|
id: resources
|
||||||
|
attributes:
|
||||||
|
label: 包括的资源
|
||||||
|
options:
|
||||||
|
- label: 角色&名片,有新角色时选择
|
||||||
|
required: false
|
||||||
|
- label: 武器,有新武器时选择
|
||||||
|
required: false
|
||||||
|
- label: 成就,有新成就时选择
|
||||||
|
required: false
|
||||||
|
- label: 卡牌,有新卡牌时选择
|
||||||
|
required: false
|
||||||
|
- label: 材料,有新材料时选择
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: detail
|
||||||
|
attributes:
|
||||||
|
label: 详情
|
||||||
|
description: 对上述内容进行详细说明
|
||||||
|
- type: textarea
|
||||||
|
id: additional
|
||||||
|
attributes:
|
||||||
|
label: 其他信息
|
||||||
|
description: 请填写其他信息
|
||||||
|
placeholder: 请填写其他信息
|
||||||
9
.github/workflows/build.yml
vendored
@@ -26,7 +26,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Add Rust targets(macOS)
|
- 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'
|
if: matrix.settings.target == 'macos-arm'
|
||||||
run: rustup target add aarch64-apple-darwin
|
run: rustup target add aarch64-apple-darwin
|
||||||
|
|
||||||
@@ -40,11 +43,11 @@ jobs:
|
|||||||
- name: setup node
|
- name: setup node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18.16.0
|
node-version: 22.0.0
|
||||||
- name: setup pnpm
|
- name: setup pnpm
|
||||||
uses: pnpm/action-setup@v2
|
uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
version: 8.15.6
|
version: 9.1.0
|
||||||
- name: remove lockfile
|
- name: remove lockfile
|
||||||
run: rm pnpm-lock.yaml
|
run: rm pnpm-lock.yaml
|
||||||
- name: Install frontend dependencies
|
- name: Install frontend dependencies
|
||||||
|
|||||||
4
.github/workflows/qodana_code_quality.yml
vendored
@@ -14,11 +14,11 @@ jobs:
|
|||||||
- name: setup node
|
- name: setup node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 21.4.0
|
node-version: 22.0.0
|
||||||
- name: setup pnpm
|
- name: setup pnpm
|
||||||
uses: pnpm/action-setup@v2
|
uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
version: 8.15.6
|
version: 9.1.0
|
||||||
- name: remove lockfile
|
- name: remove lockfile
|
||||||
run: rm -f pnpm-lock.yaml
|
run: rm -f pnpm-lock.yaml
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
36
CHANGELOG.md
@@ -2,12 +2,44 @@
|
|||||||
Author: 目棃
|
Author: 目棃
|
||||||
Description: CHANGELOG
|
Description: CHANGELOG
|
||||||
Date: 2024-01-15
|
Date: 2024-01-15
|
||||||
Update: 2024-04-05
|
Update: 2024-05-10
|
||||||
---
|
---
|
||||||
|
|
||||||
> 本文档 [`Frontmatter`](https://github.com/BTMuli/MuCli#Frontmatter) 由 [MuCli](https://github.com/BTMuli/Mucli) 自动生成于 `2024-01-15 17:29:15`
|
> 本文档 [`Frontmatter`](https://github.com/BTMuli/MuCli#Frontmatter) 由 [MuCli](https://github.com/BTMuli/Mucli) 自动生成于 `2024-01-15 17:29:15`
|
||||||
>
|
>
|
||||||
> 更新于 `2024-04-05 14:19:04`
|
> 更新于 `2024-05-10 23:55:15`
|
||||||
|
|
||||||
|
## [0.4.7](https://github.com/BTMuli/TeyvatGuide/releases/v0.4.7) (2024-05-10)
|
||||||
|
|
||||||
|
- 🐛 修复 mention 类型渲染异常
|
||||||
|
- ⚡️ 对签到链接跳转进行处理,优化部分网页活动打开
|
||||||
|
- ♻️ 重构用户祈愿数据库相关处理
|
||||||
|
- 🔥 隐藏网页登录模块 [`#108`](https://github.com/BTMuli/TeyvatGuide/issues/108)
|
||||||
|
- ✨ 采用 ajv 验证 UIGF [`#109`](https://github.com/BTMuli/TeyvatGuide/issues/109)
|
||||||
|
- 💄 完善公告`table`&`p`部分的渲染
|
||||||
|
- 💄 调整帖子文本部分的样式
|
||||||
|
- ♻️ UIAF重构,支持祈愿备份/恢复
|
||||||
|
- ⚡️ 完善公告正则
|
||||||
|
- ♻️ 名片组件抽离,wiki添加名片信息
|
||||||
|
|
||||||
|
## [0.4.6](https://github.com/BTMuli/TeyvatGuide/releases/v0.4.6) (2024-04-24)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- 帖子:重构文本解析,现在更加贴近应用内的渲染效果
|
||||||
|
- 应用:侧边栏点击咨讯时的参数也支持记忆了
|
||||||
|
- 应用:更新 4.6 版本的游戏资源
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- 留影叙佳期:修复侧边栏点击时初始画片数异常
|
||||||
|
- 首页:修复特定情况下日历组件左侧切换日期按钮点击无效
|
||||||
|
- 帖子:修复 `align:right` 不生效的问题
|
||||||
|
- 首页:修复特定情况下首页卡池渲染异常
|
||||||
|
|
||||||
|
### Change
|
||||||
|
|
||||||
|
- 应用:数据库更新后弹出更新日志
|
||||||
|
|
||||||
## [0.4.5](https://github.com/BTMuli/TeyvatGuide/releases/v0.4.5) (2024-04-05)
|
## [0.4.5](https://github.com/BTMuli/TeyvatGuide/releases/v0.4.5) (2024-04-05)
|
||||||
|
|
||||||
|
|||||||
23
eslint.config.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { jsonEslintConfig } from "./eslint/jsonEslint.js";
|
||||||
|
import { vueEslintConfig } from "./eslint/vueEslint.js";
|
||||||
|
import ymlEslintConfig from "./eslint/ymlEslint.js";
|
||||||
|
|
||||||
|
export default [
|
||||||
|
...jsonEslintConfig,
|
||||||
|
ymlEslintConfig,
|
||||||
|
...vueEslintConfig,
|
||||||
|
{
|
||||||
|
ignores: [
|
||||||
|
"dist",
|
||||||
|
"src-tauri/target",
|
||||||
|
"pnpm-lock.yaml",
|
||||||
|
"src/data/**/*.json",
|
||||||
|
"src-tauri/tauri.conf.json",
|
||||||
|
"qodana.yaml",
|
||||||
|
".github",
|
||||||
|
".vscode",
|
||||||
|
".prettierrc.yml",
|
||||||
|
".stylelintrc.yml",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
94
eslint/jsonEslint.js
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
import eslint_jsonc from "eslint-plugin-jsonc";
|
||||||
|
import jsonc_parser from "jsonc-eslint-parser";
|
||||||
|
|
||||||
|
const pkgJsonConfig = {
|
||||||
|
files: ["package.json"],
|
||||||
|
plugins: {
|
||||||
|
jsonc: eslint_jsonc,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
parser: jsonc_parser,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"jsonc/comma-dangle": ["error", "never"],
|
||||||
|
"jsonc/sort-keys": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
pathPattern: "^$",
|
||||||
|
order: [
|
||||||
|
"name",
|
||||||
|
"version",
|
||||||
|
"description",
|
||||||
|
"type",
|
||||||
|
"scripts",
|
||||||
|
"lint-staged",
|
||||||
|
"keywords",
|
||||||
|
"author",
|
||||||
|
"license",
|
||||||
|
"repository",
|
||||||
|
"homepage",
|
||||||
|
"bugs",
|
||||||
|
"dependencies",
|
||||||
|
"devDependencies",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const tscJsonConfig = {
|
||||||
|
files: ["tsconfig.json"],
|
||||||
|
plugins: {
|
||||||
|
jsonc: eslint_jsonc,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
parser: jsonc_parser,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"jsonc/comma-dangle": ["error", "never"],
|
||||||
|
"jsonc/sort-keys": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
pathPattern: "^$",
|
||||||
|
order: [
|
||||||
|
"compilerOptions",
|
||||||
|
"include",
|
||||||
|
"exclude",
|
||||||
|
"extends",
|
||||||
|
"files",
|
||||||
|
"references",
|
||||||
|
"typeAcquisition",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const jsoncConfig = {
|
||||||
|
files: ["source/data/out/**/*.json", ".vscode/**/*.json"],
|
||||||
|
plugins: {
|
||||||
|
jsonc: eslint_jsonc,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
parser: jsonc_parser,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"jsonc/comma-dangle": ["error", "never"],
|
||||||
|
"jsonc/sort-keys": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
pathPattern: "^$",
|
||||||
|
order: {
|
||||||
|
type: "asc",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const jsonEslintConfig = [
|
||||||
|
...eslint_jsonc.configs["flat/recommended-with-json"],
|
||||||
|
pkgJsonConfig,
|
||||||
|
tscJsonConfig,
|
||||||
|
jsoncConfig,
|
||||||
|
];
|
||||||
87
eslint/vueEslint.js
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
import eslint_js from "@eslint/js";
|
||||||
|
import eslint_import from "eslint-plugin-import";
|
||||||
|
import eslint_prettier from "eslint-plugin-prettier";
|
||||||
|
import eslint_vue from "eslint-plugin-vue";
|
||||||
|
import pluginVue from "eslint-plugin-vue";
|
||||||
|
import globals from "globals";
|
||||||
|
import eslint_ts from "typescript-eslint";
|
||||||
|
import vue_parser from "vue-eslint-parser";
|
||||||
|
|
||||||
|
const tsConfigRules = {
|
||||||
|
"@typescript-eslint/consistent-type-assertions": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
assertionStyle: "angle-bracket",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-import-type-side-effects": "error",
|
||||||
|
"@typescript-eslint/strict-boolean-expressions": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"import/order": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
groups: ["builtin", "external", "internal", "parent", "sibling", "index", "unknown"],
|
||||||
|
"newlines-between": "always",
|
||||||
|
alphabetize: {
|
||||||
|
order: "asc",
|
||||||
|
caseInsensitive: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"prettier/prettier": "error",
|
||||||
|
};
|
||||||
|
|
||||||
|
const tsConfig = {
|
||||||
|
files: ["*.ts"],
|
||||||
|
plugins: {
|
||||||
|
typescript: eslint_ts,
|
||||||
|
import: eslint_import,
|
||||||
|
prettier: eslint_prettier,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
parser: eslint_ts.parser,
|
||||||
|
parserOptions: {
|
||||||
|
project: "tsconfig.json",
|
||||||
|
tsconfigRootDir: ".",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rules: tsConfigRules,
|
||||||
|
};
|
||||||
|
|
||||||
|
const vueConfig = {
|
||||||
|
plugins: {
|
||||||
|
vue: eslint_vue,
|
||||||
|
import: eslint_import,
|
||||||
|
prettier: eslint_prettier,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.es2021,
|
||||||
|
TGApp: "readonly",
|
||||||
|
window: "readonly",
|
||||||
|
},
|
||||||
|
ecmaVersion: "latest",
|
||||||
|
sourceType: "module",
|
||||||
|
parser: vue_parser,
|
||||||
|
parserOptions: {
|
||||||
|
project: "tsconfig.json",
|
||||||
|
parser: eslint_ts.parser,
|
||||||
|
extraFileExtensions: [".vue"],
|
||||||
|
tsconfigRootDir: ".",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
...tsConfigRules,
|
||||||
|
"vue/multi-word-component-names": "off",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const vueEslintConfig = [
|
||||||
|
eslint_js.configs.recommended,
|
||||||
|
...eslint_ts.configs.recommended,
|
||||||
|
...eslint_vue.configs["flat/essential"],
|
||||||
|
...pluginVue.configs["flat/essential"],
|
||||||
|
tsConfig,
|
||||||
|
vueConfig,
|
||||||
|
];
|
||||||
30
eslint/ymlEslint.js
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import eslint_yml from "eslint-plugin-yml";
|
||||||
|
import yml_parser from "yaml-eslint-parser";
|
||||||
|
|
||||||
|
const ymlEslintConfig = {
|
||||||
|
files: ["**/*.yml", "**/*.yaml"],
|
||||||
|
plugins: {
|
||||||
|
yml: eslint_yml,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
parser: yml_parser,
|
||||||
|
parserOptions: {
|
||||||
|
defaultYAMLVersion: "1.2",
|
||||||
|
extraFileExtensions: [".yaml", ".yml"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"yml/indent": ["error", 2],
|
||||||
|
"yml/key-spacing": ["error"],
|
||||||
|
"yml/quotes": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
prefer: "double",
|
||||||
|
avoidEscape: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"yml/sort-keys": ["error", "asc"],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ymlEslintConfig;
|
||||||
49
package.json
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "TeyvatGuide",
|
"name": "TeyvatGuide",
|
||||||
"version": "0.4.5",
|
"version": "0.4.7",
|
||||||
"description": "Game Tool for Genshin Impact player",
|
"description": "Game Tool for Genshin Impact player",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@8.15.6",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tauri build",
|
"build": "tauri build",
|
||||||
"debug": "tauri build --debug",
|
"debug": "tauri build --debug",
|
||||||
@@ -66,7 +66,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mdi/font": "7.4.47",
|
"@mdi/font": "7.4.47",
|
||||||
"@tauri-apps/api": "^1.5.3",
|
"@tauri-apps/api": "^1.5.4",
|
||||||
|
"ajv": "^8.13.0",
|
||||||
"artplayer": "^5.1.1",
|
"artplayer": "^5.1.1",
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
"color-convert": "^2.0.1",
|
"color-convert": "^2.0.1",
|
||||||
@@ -79,50 +80,54 @@
|
|||||||
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
||||||
"tauri-plugin-sql-api": "github:tauri-apps/tauri-plugin-sql#v1",
|
"tauri-plugin-sql-api": "github:tauri-apps/tauri-plugin-sql#v1",
|
||||||
"uuid": "^9.0.1",
|
"uuid": "^9.0.1",
|
||||||
"vue": "^3.4.21",
|
"vue": "^3.4.26",
|
||||||
"vue-echarts": "^6.6.9",
|
"vue-echarts": "^6.7.1",
|
||||||
"vue-json-viewer": "^3.0.4",
|
"vue-json-viewer": "^3.0.4",
|
||||||
"vue-router": "^4.3.0",
|
"vue-router": "^4.3.2",
|
||||||
"vuetify": "^3.5.9",
|
"vuetify": "^3.6.3",
|
||||||
"wcag-color": "^1.1.1",
|
"wcag-color": "^1.1.1",
|
||||||
"xml-js": "^1.6.11"
|
"xml-js": "^1.6.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tauri-apps/cli": "^1.5.11",
|
"@eslint/eslintrc": "^3.0.2",
|
||||||
|
"@eslint/js": "^9.2.0",
|
||||||
|
"@tauri-apps/cli": "^1.5.12",
|
||||||
"@types/color-convert": "^2.0.3",
|
"@types/color-convert": "^2.0.3",
|
||||||
"@types/js-md5": "^0.7.2",
|
"@types/js-md5": "^0.7.2",
|
||||||
"@types/node": "^20.11.28",
|
"@types/node": "^20.12.8",
|
||||||
"@types/uuid": "^9.0.8",
|
"@types/uuid": "^9.0.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
"@typescript-eslint/parser": "^7.8.0",
|
||||||
"@typescript-eslint/parser": "^7.2.0",
|
|
||||||
"@vitejs/plugin-vue": "^5.0.4",
|
"@vitejs/plugin-vue": "^5.0.4",
|
||||||
"concurrently": "^8.2.2",
|
"concurrently": "^8.2.2",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^9.2.0",
|
||||||
|
"eslint-config-love": "^47.0.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-config-standard-with-typescript": "^43.0.1",
|
|
||||||
"eslint-plugin-import": "^2.29.1",
|
"eslint-plugin-import": "^2.29.1",
|
||||||
"eslint-plugin-jsonc": "^2.13.0",
|
"eslint-plugin-jsonc": "^2.15.1",
|
||||||
"eslint-plugin-n": "^16.6.2",
|
"eslint-plugin-n": "^17.4.0",
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
"eslint-plugin-prettier": "^5.1.3",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"eslint-plugin-vue": "^9.23.0",
|
"eslint-plugin-vue": "^9.25.0",
|
||||||
"eslint-plugin-yml": "^1.12.2",
|
"eslint-plugin-yml": "^1.14.0",
|
||||||
|
"globals": "^15.1.0",
|
||||||
"husky": "^9.0.11",
|
"husky": "^9.0.11",
|
||||||
"jsonc-eslint-parser": "^2.4.0",
|
"jsonc-eslint-parser": "^2.4.0",
|
||||||
"lint-staged": "^15.2.2",
|
"lint-staged": "^15.2.2",
|
||||||
"oxlint": "^0.2.13",
|
"oxlint": "^0.3.2",
|
||||||
"prettier": "3.2.5",
|
"prettier": "3.2.5",
|
||||||
"stylelint": "^16.2.1",
|
"stylelint": "^16.5.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",
|
||||||
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
||||||
"stylelint-high-performance-animation": "^1.10.0",
|
"stylelint-high-performance-animation": "^1.10.0",
|
||||||
"stylelint-order": "^6.0.4",
|
"stylelint-order": "^6.0.4",
|
||||||
"stylelint-prettier": "^5.0.0",
|
"stylelint-prettier": "^5.0.0",
|
||||||
"typescript": "^5.4.2",
|
"typescript": "^5.4.5",
|
||||||
"vite": "^5.1.7",
|
"typescript-eslint": "^7.8.0",
|
||||||
"vite-plugin-vue-devtools": "^7.0.17",
|
"vite": "^5.2.11",
|
||||||
|
"vite-plugin-vue-devtools": "^7.1.3",
|
||||||
"vite-plugin-vuetify": "^2.0.3",
|
"vite-plugin-vuetify": "^2.0.3",
|
||||||
|
"vue-eslint-parser": "^9.4.2",
|
||||||
"yaml-eslint-parser": "^1.2.2"
|
"yaml-eslint-parser": "^1.2.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7392
pnpm-lock.yaml
generated
BIN
public/WIKI/GCG/normal/久岐忍.webp
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
public/WIKI/GCG/normal/公义的酬报.webp
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
public/WIKI/GCG/normal/割舍软弱之心.webp
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
public/WIKI/GCG/normal/嗜雷·兽境猎犬.webp
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
public/WIKI/GCG/normal/大型冰史莱姆.webp
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
public/WIKI/GCG/normal/太郎丸.webp
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
public/WIKI/GCG/normal/妙道合真.webp
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
public/WIKI/GCG/normal/暗流涌动.webp
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
public/WIKI/GCG/normal/海中寻宝.webp
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
public/WIKI/GCG/normal/深渊使徒·激流.webp
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
public/WIKI/GCG/normal/清籁岛.webp
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
public/WIKI/GCG/normal/熔火铁甲.webp
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
public/WIKI/GCG/normal/珐露珊.webp
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
public/WIKI/GCG/normal/白手套和渔夫.webp
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
public/WIKI/GCG/normal/紫晶的花冠.webp
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
public/WIKI/GCG/normal/缤纷马卡龙.webp
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
public/WIKI/GCG/normal/铁甲熔火帝皇.webp
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
public/WIKI/character/10000096.webp
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/WIKI/weapon/13512.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/icon/achievement/UI_AchievementIcon_A018.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
public/icon/achievement/UI_AchievementIcon_B004_Part9.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/icon/constellations/UI_Talent_S_Arlecchino_01.webp
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/icon/constellations/UI_Talent_S_Arlecchino_02.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/icon/constellations/UI_Talent_S_Arlecchino_03.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
public/icon/constellations/UI_Talent_S_Arlecchino_04.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/icon/constellations/UI_Talent_U_Arlecchino_01.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/icon/constellations/UI_Talent_U_Arlecchino_02.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
public/icon/material/101322.webp
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
public/icon/material/112098.webp
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
public/icon/material/112099.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
public/icon/material/112100.webp
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
public/icon/material/113059.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/icon/material/113060.webp
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
public/icon/material/113061.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/icon/material/113062.webp
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
public/icon/material/120791.webp
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
public/icon/material/129001.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
public/icon/material/140001.webp
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
public/icon/material/140002.webp
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
public/icon/material/140003.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/icon/material/140004.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
public/icon/material/140005.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
public/icon/material/140006.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/icon/material/140007.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
public/icon/material/140008.webp
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
public/icon/material/140009.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/icon/material/140010.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/icon/material/140011.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
public/icon/material/140012.webp
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/icon/material/140013.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
public/icon/material/220097.webp
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
public/icon/material/220098.webp
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
public/icon/talents/Skill_E_Arlecchino_01.webp
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
public/icon/talents/Skill_S_Arlecchino_01.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/icon/talents/UI_Talent_S_Arlecchino_05.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
public/icon/talents/UI_Talent_S_Arlecchino_06.webp
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
public/icon/talents/UI_Talent_S_Arlecchino_07.webp
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
public/source/nameCard/bg/成就·掣鲸.webp
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
public/source/nameCard/bg/枫丹·调律.webp
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
public/source/nameCard/bg/枫丹·露泉.webp
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
public/source/nameCard/bg/纪行·邦摇.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/source/nameCard/bg/阿蕾奇诺·法度.webp
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
public/source/nameCard/icon/成就·掣鲸.webp
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
public/source/nameCard/icon/枫丹·调律.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
public/source/nameCard/icon/枫丹·露泉.webp
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
public/source/nameCard/icon/纪行·邦摇.webp
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
public/source/nameCard/icon/阿蕾奇诺·法度.webp
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
public/source/nameCard/profile/成就·掣鲸.webp
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
public/source/nameCard/profile/枫丹·调律.webp
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
public/source/nameCard/profile/枫丹·露泉.webp
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/source/nameCard/profile/纪行·邦摇.webp
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
public/source/nameCard/profile/阿蕾奇诺·法度.webp
Normal file
|
After Width: | Height: | Size: 25 KiB |
777
src-tauri/Cargo.lock
generated
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "TeyvatGuide"
|
name = "TeyvatGuide"
|
||||||
version = "0.4.5"
|
version = "0.4.7"
|
||||||
description = "Game Tool for Genshin Impact player"
|
description = "Game Tool for Genshin Impact player"
|
||||||
authors = ["BTMuli <bt-muli@outlook.com>"]
|
authors = ["BTMuli <bt-muli@outlook.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
@@ -13,11 +13,11 @@ edition = "2021"
|
|||||||
tauri-build = { version = "1.4", features = [] }
|
tauri-build = { version = "1.4", features = [] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = "0.4.35"
|
chrono = "0.4.38"
|
||||||
log = "0.4.21"
|
log = "0.4.21"
|
||||||
serde = { version = "1.0.197", features = ["derive"] }
|
serde = { version = "1.0.198", features = ["derive"] }
|
||||||
serde_json = "1.0.114"
|
serde_json = "1.0.116"
|
||||||
tauri = { version = "1.6.1", features = [ "shell-execute", "shell-open", "window-set-always-on-top", "window-set-fullscreen", "dialog-message", "process-exit", "fs-read-dir", "window-hide", "os-all", "clipboard-all", "dialog-open", "dialog-save", "fs-create-dir", "fs-remove-dir", "fs-write-file", "fs-remove-file", "fs-read-file", "path-all", "fs-exists", "window-close", "window-set-title", "window-unminimize", "window-show", "window-set-focus", "http-request"] }
|
tauri = { version = "1.6.2", features = [ "shell-execute", "shell-open", "window-set-always-on-top", "window-set-fullscreen", "dialog-message", "process-exit", "fs-read-dir", "window-hide", "os-all", "clipboard-all", "dialog-open", "dialog-save", "fs-create-dir", "fs-remove-dir", "fs-write-file", "fs-remove-file", "fs-read-file", "path-all", "fs-exists", "window-close", "window-set-title", "window-unminimize", "window-show", "window-set-focus", "http-request"] }
|
||||||
tauri-utils = "1.5.3"
|
tauri-utils = "1.5.3"
|
||||||
url = "2.5.0"
|
url = "2.5.0"
|
||||||
walkdir = "2.5.0"
|
walkdir = "2.5.0"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "TeyvatGuide",
|
"productName": "TeyvatGuide",
|
||||||
"version": "0.4.5"
|
"version": "0.4.7"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
|
|||||||
29
src/App.vue
@@ -189,20 +189,33 @@ async function getDeepLink(): Promise<UnlistenFn> {
|
|||||||
e.payload.startsWith("teyvatguide://import_uiaf")
|
e.payload.startsWith("teyvatguide://import_uiaf")
|
||||||
) {
|
) {
|
||||||
await toUIAF(e.payload);
|
await toUIAF(e.payload);
|
||||||
} else {
|
return;
|
||||||
showSnackbar({
|
|
||||||
text: "无效的 deep link!",
|
|
||||||
color: "error",
|
|
||||||
timeout: 3000,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
if (e.payload.startsWith("router?path=")) {
|
||||||
|
const routerPath = e.payload.replace("router?path=", "");
|
||||||
|
if (router.currentRoute.value.path === routerPath) {
|
||||||
|
showSnackbar({
|
||||||
|
text: "已在当前页面!",
|
||||||
|
color: "warn",
|
||||||
|
timeout: 3000,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await router.push(routerPath);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
showSnackbar({
|
||||||
|
text: "无效的 deep link!",
|
||||||
|
color: "error",
|
||||||
|
timeout: 3000,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function toUIAF(link: string) {
|
async function toUIAF(link: string) {
|
||||||
const url = new URL(link);
|
const url = new URL(link);
|
||||||
const app = url.searchParams.get("app");
|
const app = url.searchParams.get("app");
|
||||||
if (app === null) {
|
if (app === null || app === "") {
|
||||||
await router.push("/achievements");
|
await router.push("/achievements");
|
||||||
} else {
|
} else {
|
||||||
await router.push("/achievements/?app=" + app);
|
await router.push("/achievements/?app=" + app);
|
||||||
@@ -225,7 +238,6 @@ async function checkUpdate(): Promise<void> {
|
|||||||
color: "error",
|
color: "error",
|
||||||
timeout: 3000,
|
timeout: 3000,
|
||||||
});
|
});
|
||||||
window.open("https://app.btmuli.ink/docs/Changelogs.html");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
appStore.buildTime = getBuildTime();
|
appStore.buildTime = getBuildTime();
|
||||||
@@ -235,6 +247,7 @@ async function checkUpdate(): Promise<void> {
|
|||||||
color: "success",
|
color: "success",
|
||||||
timeout: 3000,
|
timeout: 3000,
|
||||||
});
|
});
|
||||||
|
window.open("https://app.btmuli.ink/docs/Changelogs.html");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,12 @@
|
|||||||
<img src="../../assets/icons/board.svg" alt="annoIcon" class="side-icon" />
|
<img src="../../assets/icons/board.svg" alt="annoIcon" class="side-icon" />
|
||||||
</template>
|
</template>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
<v-list-item :title.attr="'咨讯'" value="news" :link="true" href="/news/2">
|
<v-list-item
|
||||||
|
:title.attr="'咨讯'"
|
||||||
|
value="news"
|
||||||
|
:link="true"
|
||||||
|
:href="`/news/2/${appStore.recentNewsType}`"
|
||||||
|
>
|
||||||
<template #title>咨讯</template>
|
<template #title>咨讯</template>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<img src="/platforms/mhy/mys.webp" alt="mihoyo" class="side-icon" />
|
<img src="/platforms/mhy/mys.webp" alt="mihoyo" class="side-icon" />
|
||||||
|
|||||||
@@ -9,13 +9,12 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { event } from "@tauri-apps/api";
|
import { event } from "@tauri-apps/api";
|
||||||
import { computed, onMounted } from "vue";
|
import { UnlistenFn } from "@tauri-apps/api/helpers/event";
|
||||||
|
import { computed, onMounted, onUnmounted } from "vue";
|
||||||
|
|
||||||
import { useAppStore } from "../../store/modules/app";
|
import { useAppStore } from "../../store/modules/app";
|
||||||
|
|
||||||
// store
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
// theme
|
|
||||||
const themeGet = computed({
|
const themeGet = computed({
|
||||||
get() {
|
get() {
|
||||||
return appStore.theme;
|
return appStore.theme;
|
||||||
@@ -24,9 +23,10 @@ const themeGet = computed({
|
|||||||
appStore.theme = value;
|
appStore.theme = value;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
let themeListener: UnlistenFn;
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await listenOnTheme();
|
themeListener = await listenOnTheme();
|
||||||
});
|
});
|
||||||
|
|
||||||
async function switchTheme(): Promise<void> {
|
async function switchTheme(): Promise<void> {
|
||||||
@@ -34,12 +34,18 @@ async function switchTheme(): Promise<void> {
|
|||||||
await event.emit("readTheme", themeGet.value);
|
await event.emit("readTheme", themeGet.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function listenOnTheme(): Promise<void> {
|
async function listenOnTheme(): Promise<UnlistenFn> {
|
||||||
await event.listen("readTheme", (e) => {
|
return await event.listen<string>("readTheme", (e) => {
|
||||||
const theme = <string>e.payload;
|
const theme = e.payload;
|
||||||
themeGet.value = theme === "default" ? "default" : "dark";
|
themeGet.value = theme === "default" ? "default" : "dark";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
if (themeListener) {
|
||||||
|
themeListener();
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
.switch-box {
|
.switch-box {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<template #actions>
|
<template #actions>
|
||||||
<v-spacer />
|
<v-spacer />
|
||||||
<v-btn variant="outlined" @click="scan = true" icon="mdi-qrcode-scan" />
|
<v-btn variant="outlined" @click="scan = true" icon="mdi-qrcode-scan" />
|
||||||
<v-btn variant="outlined" @click="toWebLogin" icon="mdi-web" />
|
<v-btn v-if="false" variant="outlined" @click="toWebLogin" icon="mdi-web" />
|
||||||
<v-btn variant="outlined" @click="confirmRefreshUser" icon="mdi-refresh" :loading="loading" />
|
<v-btn variant="outlined" @click="confirmRefreshUser" icon="mdi-refresh" :loading="loading" />
|
||||||
</template>
|
</template>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|||||||
@@ -43,13 +43,14 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted, onUpdated, ref } from "vue";
|
import { computed, onMounted, onUpdated, ref } from "vue";
|
||||||
|
|
||||||
import DucDetailOlb from "./duc-detail-olb.vue";
|
|
||||||
import DucDetailOlt from "./duc-detail-olt.vue";
|
|
||||||
import DucDetailOrt from "./duc-detail-ort.vue";
|
|
||||||
import TGSqlite from "../../plugins/Sqlite";
|
import TGSqlite from "../../plugins/Sqlite";
|
||||||
import { generateShareImg } from "../../utils/TGShare";
|
import { generateShareImg } from "../../utils/TGShare";
|
||||||
import TOverlay from "../main/t-overlay.vue";
|
import TOverlay from "../main/t-overlay.vue";
|
||||||
|
|
||||||
|
import DucDetailOlb from "./duc-detail-olb.vue";
|
||||||
|
import DucDetailOlt from "./duc-detail-olt.vue";
|
||||||
|
import DucDetailOrt from "./duc-detail-ort.vue";
|
||||||
|
|
||||||
interface DucDetailOverlayProps {
|
interface DucDetailOverlayProps {
|
||||||
modelValue: boolean;
|
modelValue: boolean;
|
||||||
dataVal: TGApp.Sqlite.Character.UserRole;
|
dataVal: TGApp.Sqlite.Character.UserRole;
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ const data = reactive<TGApp.Component.Snackbar.Params>({
|
|||||||
text: "",
|
text: "",
|
||||||
});
|
});
|
||||||
const show = ref<boolean>(false);
|
const show = ref<boolean>(false);
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
let timer: NodeJS.Timeout;
|
let timer: NodeJS.Timeout;
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -66,9 +66,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
// vue
|
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
|
|
||||||
|
import TSUserGacha from "../../plugins/Sqlite/modules/userGacha.js";
|
||||||
|
|
||||||
interface GachaDataViewProps {
|
interface GachaDataViewProps {
|
||||||
dataType: "new" | "avatar" | "weapon" | "normal" | "mix";
|
dataType: "new" | "avatar" | "weapon" | "normal" | "mix";
|
||||||
dataVal: TGApp.Sqlite.GachaRecords.SingleTable[];
|
dataVal: TGApp.Sqlite.GachaRecords.SingleTable[];
|
||||||
@@ -179,8 +180,9 @@ function getStar5Avg(): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取物品图标
|
// 获取物品图标
|
||||||
function getIcon(itemId: string, type: string): string {
|
function getIcon(itemId: string): string {
|
||||||
if (type === "角色") {
|
const type = TSUserGacha.getGachaItemType(itemId);
|
||||||
|
if (type[0] === "角色") {
|
||||||
return "/WIKI/character/" + itemId + ".webp";
|
return "/WIKI/character/" + itemId + ".webp";
|
||||||
} else {
|
} else {
|
||||||
return "/WIKI/weapon/" + itemId + ".webp";
|
return "/WIKI/weapon/" + itemId + ".webp";
|
||||||
|
|||||||
@@ -183,9 +183,9 @@ function getBox(id: number): TItemBoxData {
|
|||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
column-gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gro-tabs {
|
.gro-tabs {
|
||||||
@@ -194,8 +194,8 @@ function getBox(id: number): TItemBoxData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* stylelint-disable-next-line selector-class-pattern */
|
/* stylelint-disable-next-line selector-class-pattern */
|
||||||
.v-tabs.v-slide-group--vertical {
|
.gro-container :deep(.v-tabs.v-slide-group--vertical) {
|
||||||
height: 100%;
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gro-window {
|
.gro-window {
|
||||||
@@ -210,6 +210,11 @@ function getBox(id: number): TItemBoxData {
|
|||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* stylelint-disable-next-line selector-class-pattern */
|
||||||
|
.gro-window :deep(.v-window__container) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.gro-pools {
|
.gro-pools {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -4,13 +4,14 @@
|
|||||||
<img src="/source/UI/empty.webp" alt="empty" />
|
<img src="/source/UI/empty.webp" alt="empty" />
|
||||||
<span>今天没有角色过生日哦~</span>
|
<span>今天没有角色过生日哦~</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tcb-top-active" @click="toBirth(true)" v-else>
|
<div class="tcb-top-active" v-else>
|
||||||
<img @click="toPost()" src="/source/UI/act_birthday.png" alt="empty" class="active" />
|
<img @click="toBirth(true)" src="/source/UI/act_birthday.png" alt="empty" class="active" />
|
||||||
<span>今天是{{ cur.map((i) => i.name).join("、") }}的生日哦~</span>
|
<span>今天是{{ cur.map((i) => i.name).join("、") }}的生日哦~</span>
|
||||||
|
<img v-for="i in cur" :key="i.role_id" class="tcb-cur" :alt="i.name" :src="i.head_icon" />
|
||||||
</div>
|
</div>
|
||||||
<div>即将到来:{{ next[0].role_birthday }}</div>
|
<div>即将到来:{{ next[0].role_birthday }}</div>
|
||||||
<div v-for="i in next" :key="i.role_id" class="tcb-item">
|
<div v-for="i in next" :key="i.role_id" class="tcb-item">
|
||||||
<img :src="i.head_icon" :alt="i.name" @click="toBirth(i)" />
|
<img :src="i.head_icon" :alt="i.name" @click="toBirth(i)" :title="i.name" />
|
||||||
<div class="tcb-item-info">
|
<div class="tcb-item-info">
|
||||||
<span>{{ i.name }} 所属:{{ i.belong }}</span>
|
<span>{{ i.name }} 所属:{{ i.belong }}</span>
|
||||||
<span>{{ i.introduce }}</span>
|
<span>{{ i.introduce }}</span>
|
||||||
@@ -38,10 +39,6 @@ onBeforeMount(async () => {
|
|||||||
next.value = TSAvatarBirth.getNextAvatarBirth();
|
next.value = TSAvatarBirth.getNextAvatarBirth();
|
||||||
});
|
});
|
||||||
|
|
||||||
async function toPost() {
|
|
||||||
await router.push("/news/2");
|
|
||||||
}
|
|
||||||
|
|
||||||
function toBirth(type: TGApp.Archive.Birth.RoleItem | true) {
|
function toBirth(type: TGApp.Archive.Birth.RoleItem | true) {
|
||||||
let dateStr;
|
let dateStr;
|
||||||
if (type === true) {
|
if (type === true) {
|
||||||
@@ -52,6 +49,14 @@ function toBirth(type: TGApp.Archive.Birth.RoleItem | true) {
|
|||||||
} else {
|
} else {
|
||||||
dateStr = type.role_birthday;
|
dateStr = type.role_birthday;
|
||||||
}
|
}
|
||||||
|
if (type != true) {
|
||||||
|
router.push({ name: "留影叙佳期", params: { date: dateStr } });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (cur.value.length > 0 && !cur.value[0].is_subscribe) {
|
||||||
|
router.push("/news/2/news");
|
||||||
|
return;
|
||||||
|
}
|
||||||
router.push({ name: "留影叙佳期", params: { date: dateStr } });
|
router.push({ name: "留影叙佳期", params: { date: dateStr } });
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -87,6 +92,14 @@ function toBirth(type: TGApp.Archive.Birth.RoleItem | true) {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tcb-top-active img.tcb-cur {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-left: 5px;
|
||||||
|
background: var(--common-shadow-1);
|
||||||
|
}
|
||||||
|
|
||||||
.tcb-item {
|
.tcb-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -45,12 +45,13 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
|
|
||||||
import TCalendarBirth from "./t-calendar-birth.vue";
|
|
||||||
import THomeCard from "./t-homecard.vue";
|
|
||||||
import { AppCalendarData } from "../../data";
|
import { AppCalendarData } from "../../data";
|
||||||
import TibCalendarItem from "../itembox/tib-calendar-item.vue";
|
import TibCalendarItem from "../itembox/tib-calendar-item.vue";
|
||||||
import ToCalendar from "../overlay/to-calendar.vue";
|
import ToCalendar from "../overlay/to-calendar.vue";
|
||||||
|
|
||||||
|
import TCalendarBirth from "./t-calendar-birth.vue";
|
||||||
|
import THomeCard from "./t-homecard.vue";
|
||||||
|
|
||||||
const weekNow = ref<number>(0);
|
const weekNow = ref<number>(0);
|
||||||
const btnNow = ref<number>(0);
|
const btnNow = ref<number>(0);
|
||||||
const dateNow = ref<string>("");
|
const dateNow = ref<string>("");
|
||||||
@@ -176,7 +177,11 @@ function getContents(day: number): void {
|
|||||||
calendarNow.value = getCalendar(day);
|
calendarNow.value = getCalendar(day);
|
||||||
characterCards.value = calendarNow.value.filter((item) => item.itemType === "character");
|
characterCards.value = calendarNow.value.filter((item) => item.itemType === "character");
|
||||||
weaponCards.value = calendarNow.value.filter((item) => item.itemType === "weapon");
|
weaponCards.value = calendarNow.value.filter((item) => item.itemType === "weapon");
|
||||||
page.value = 1;
|
if (page.value !== 1) {
|
||||||
|
page.value = 1;
|
||||||
|
} else {
|
||||||
|
renderItems.value = getGrid();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
|
|||||||
@@ -56,7 +56,6 @@
|
|||||||
import { ref, onMounted, onUnmounted } from "vue";
|
import { ref, onMounted, onUnmounted } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
import THomeCard from "./t-homecard.vue";
|
|
||||||
import Mys from "../../plugins/Mys";
|
import Mys from "../../plugins/Mys";
|
||||||
import { useHomeStore } from "../../store/modules/home";
|
import { useHomeStore } from "../../store/modules/home";
|
||||||
import { createPost, createTGWindow } from "../../utils/TGWindow";
|
import { createPost, createTGWindow } from "../../utils/TGWindow";
|
||||||
@@ -64,6 +63,8 @@ import { stamp2LastTime } from "../../utils/toolFunc";
|
|||||||
import showSnackbar from "../func/snackbar";
|
import showSnackbar from "../func/snackbar";
|
||||||
import TItembox, { TItemBoxData } from "../main/t-itembox.vue";
|
import TItembox, { TItemBoxData } from "../main/t-itembox.vue";
|
||||||
|
|
||||||
|
import THomeCard from "./t-homecard.vue";
|
||||||
|
|
||||||
// store
|
// store
|
||||||
const homeStore = useHomeStore();
|
const homeStore = useHomeStore();
|
||||||
|
|
||||||
@@ -143,8 +144,7 @@ onMounted(async () => {
|
|||||||
});
|
});
|
||||||
if (poolCards.value.length > 2) {
|
if (poolCards.value.length > 2) {
|
||||||
poolSelect.value = poolCards.value.filter(
|
poolSelect.value = poolCards.value.filter(
|
||||||
(pool) =>
|
(pool) => poolTimeGet.value[pool.postId] !== "未开始",
|
||||||
poolTimeGet.value[pool.postId] !== "未开始" && poolTimeGet.value[pool.postId] !== "已结束",
|
|
||||||
);
|
);
|
||||||
hasNew.value =
|
hasNew.value =
|
||||||
poolCards.value.filter((pool) => poolTimeGet.value[pool.postId] === "未开始").length > 0;
|
poolCards.value.filter((pool) => poolTimeGet.value[pool.postId] === "未开始").length > 0;
|
||||||
@@ -221,8 +221,7 @@ async function switchPool(): Promise<void> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
poolSelect.value = poolCards.value.filter(
|
poolSelect.value = poolCards.value.filter(
|
||||||
(pool) =>
|
(pool) => poolTimeGet.value[pool.postId] !== "未开始",
|
||||||
poolTimeGet.value[pool.postId] !== "未开始" && poolTimeGet.value[pool.postId] !== "已结束",
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -321,8 +320,8 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pool-icon {
|
.pool-icon {
|
||||||
max-width: 60px;
|
width: 60px;
|
||||||
max-height: 60px;
|
height: 60px;
|
||||||
transition: all ease-in-out 0.3s;
|
transition: all ease-in-out 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,9 +331,10 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pool-icon img {
|
.pool-icon img {
|
||||||
width: 100%;
|
position: absolute;
|
||||||
height: 100%;
|
width: 60px;
|
||||||
border-radius: 8px;
|
height: 60px;
|
||||||
|
border-radius: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,11 +40,12 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onUnmounted } from "vue";
|
import { ref, onMounted, onUnmounted } from "vue";
|
||||||
|
|
||||||
import THomeCard from "./t-homecard.vue";
|
|
||||||
import Mys from "../../plugins/Mys";
|
import Mys from "../../plugins/Mys";
|
||||||
import { createPost } from "../../utils/TGWindow";
|
import { createPost } from "../../utils/TGWindow";
|
||||||
import { stamp2LastTime } from "../../utils/toolFunc";
|
import { stamp2LastTime } from "../../utils/toolFunc";
|
||||||
|
|
||||||
|
import THomeCard from "./t-homecard.vue";
|
||||||
|
|
||||||
// data
|
// data
|
||||||
const positionCards = ref<TGApp.Plugins.Mys.Position.RenderCard[]>([]);
|
const positionCards = ref<TGApp.Plugins.Mys.Position.RenderCard[]>([]);
|
||||||
const positionTimeGet = ref<Record<number, string>>({}); // 剩余时间/已结束/未知
|
const positionTimeGet = ref<Record<number, string>>({}); // 剩余时间/已结束/未知
|
||||||
|
|||||||
@@ -69,22 +69,21 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
.hta-tt-box {
|
.hta-tt-box {
|
||||||
width: calc(100% - 10px);
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
column-gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hta-tt-tab {
|
.hta-tt-tab {
|
||||||
position: absolute;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
color: var(--box-text-4);
|
color: var(--box-text-4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hta-tt-window {
|
.hta-tt-window {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
width: calc(100% - 100px);
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-height: calc(100vh - 130px);
|
max-height: calc(100vh - 130px);
|
||||||
margin-left: 100px;
|
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||