mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-18 04:23:21 +08:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dca590e027 | ||
|
|
5c5380f4f7 | ||
|
|
6b3b0e1de1 | ||
|
|
eb7e0df4fb | ||
|
|
58b95dc5e9 | ||
|
|
724f828761 | ||
|
|
0d6ba14a0e | ||
|
|
1266e5e9ee | ||
|
|
690da47cd8 | ||
|
|
f75f982d84 | ||
|
|
22aea89f76 | ||
|
|
b757c4a432 | ||
|
|
d8e14b14de | ||
|
|
1e2c479cee | ||
|
|
0bb774f2c2 | ||
|
|
38c2be5edd | ||
|
|
16332793ef | ||
|
|
652a92a0da | ||
|
|
928af9de4c | ||
|
|
7da1308386 | ||
|
|
69cede4274 | ||
|
|
20e942b8a8 | ||
|
|
82c06c3727 |
22
.github/workflows/test.yml
vendored
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
|
||||
|
||||
@@ -8,8 +8,13 @@ plugins:
|
||||
- stylelint-scss
|
||||
- stylelint-prettier
|
||||
- stylelint-order
|
||||
- "@btmuli/stylelint-plugin-color"
|
||||
rules:
|
||||
property-no-vendor-prefix:
|
||||
- true
|
||||
- ignoreProperties: [backdrop-filter]
|
||||
color-hex-length: long
|
||||
prettier/prettier: true
|
||||
color/format:
|
||||
- true
|
||||
- hexa
|
||||
|
||||
17
CHANGELOG.md
17
CHANGELOG.md
@@ -2,12 +2,25 @@
|
||||
Author: 目棃
|
||||
Description: CHANGELOG
|
||||
Date: 2024-10-09
|
||||
Update: 2025-05-06
|
||||
Update: 2025-05-25
|
||||
---
|
||||
|
||||
> 本文档 [`Frontmatter`](https://github.com/BTMuli/MuCli#Frontmatter) 由 [MuCli](https://github.com/BTMuli/Mucli) 自动生成于 `2024-10-09 15:51:43`
|
||||
>
|
||||
> 更新于 `2025-05-06 13:52:36`
|
||||
> 更新于 `2025-05-25 14:28:57`
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
@@ -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)  
|
||||
|
||||
   
|
||||
|
||||
|
||||
21
package.json
21
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "teyvatguide",
|
||||
"version": "0.7.4",
|
||||
"version": "0.7.6",
|
||||
"description": "Game Tool for GenshinImpact player",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.10.0",
|
||||
@@ -98,21 +98,22 @@
|
||||
"vue-echarts": "^7.0.3",
|
||||
"vue-json-pretty": "^2.4.0",
|
||||
"vue-router": "^4.5.1",
|
||||
"vuetify": "^3.8.3",
|
||||
"vuetify": "^3.8.4",
|
||||
"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.26.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.15.3",
|
||||
"@types/node": "^22.15.17",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@typescript-eslint/parser": "^8.31.1",
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
"@typescript-eslint/parser": "^8.32.0",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"concurrently": "^9.1.2",
|
||||
"eslint": "^9.26.0",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
@@ -121,11 +122,11 @@
|
||||
"eslint-plugin-vue": "^10.1.0",
|
||||
"eslint-plugin-yml": "^1.18.0",
|
||||
"fs-extra": "^11.3.0",
|
||||
"globals": "^16.0.0",
|
||||
"globals": "^16.1.0",
|
||||
"husky": "^9.1.7",
|
||||
"jsonc-eslint-parser": "^2.4.0",
|
||||
"lint-staged": "^15.5.1",
|
||||
"oxlint": "^0.16.9",
|
||||
"lint-staged": "^15.5.2",
|
||||
"oxlint": "^0.16.10",
|
||||
"prettier": "3.5.3",
|
||||
"stylelint": "^16.19.1",
|
||||
"stylelint-config-idiomatic-order": "^10.0.0",
|
||||
@@ -134,10 +135,10 @@
|
||||
"stylelint-high-performance-animation": "^1.11.0",
|
||||
"stylelint-order": "^7.0.0",
|
||||
"stylelint-prettier": "^5.0.3",
|
||||
"stylelint-scss": "^6.11.1",
|
||||
"stylelint-scss": "^6.12.0",
|
||||
"tsx": "^4.19.4",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.31.1",
|
||||
"typescript-eslint": "^8.32.0",
|
||||
"vite": "^6.3.5",
|
||||
"vite-plugin-vue-devtools": "^7.7.6",
|
||||
"vite-plugin-vuetify": "^2.1.1",
|
||||
|
||||
857
pnpm-lock.yaml
generated
857
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
255
src-tauri/Cargo.lock
generated
255
src-tauri/Cargo.lock
generated
@@ -4,7 +4,7 @@ version = 4
|
||||
|
||||
[[package]]
|
||||
name = "TeyvatGuide"
|
||||
version = "0.7.4"
|
||||
version = "0.7.6"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"log",
|
||||
@@ -325,9 +325,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.74"
|
||||
version = "0.3.75"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
|
||||
checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002"
|
||||
dependencies = [
|
||||
"addr2line",
|
||||
"cfg-if",
|
||||
@@ -596,9 +596,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.21"
|
||||
version = "1.2.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0"
|
||||
checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1"
|
||||
dependencies = [
|
||||
"shlex",
|
||||
]
|
||||
@@ -798,9 +798,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "crc"
|
||||
version = "3.2.1"
|
||||
version = "3.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
|
||||
checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675"
|
||||
dependencies = [
|
||||
"crc-catalog",
|
||||
]
|
||||
@@ -1630,9 +1630,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0"
|
||||
checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
@@ -1990,7 +1990,7 @@ dependencies = [
|
||||
"tokio",
|
||||
"tokio-rustls",
|
||||
"tower-service",
|
||||
"webpki-roots",
|
||||
"webpki-roots 0.26.11",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2049,21 +2049,22 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "icu_collections"
|
||||
version = "1.5.0"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526"
|
||||
checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"potential_utf",
|
||||
"yoke",
|
||||
"zerofrom",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_locid"
|
||||
version = "1.5.0"
|
||||
name = "icu_locale_core"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
|
||||
checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"litemap",
|
||||
@@ -2072,31 +2073,11 @@ dependencies = [
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_locid_transform"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_locid",
|
||||
"icu_locid_transform_data",
|
||||
"icu_provider",
|
||||
"tinystr",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_locid_transform_data"
|
||||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d"
|
||||
|
||||
[[package]]
|
||||
name = "icu_normalizer"
|
||||
version = "1.5.0"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f"
|
||||
checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_collections",
|
||||
@@ -2104,67 +2085,54 @@ dependencies = [
|
||||
"icu_properties",
|
||||
"icu_provider",
|
||||
"smallvec",
|
||||
"utf16_iter",
|
||||
"utf8_iter",
|
||||
"write16",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_normalizer_data"
|
||||
version = "1.5.1"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7"
|
||||
checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3"
|
||||
|
||||
[[package]]
|
||||
name = "icu_properties"
|
||||
version = "1.5.1"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5"
|
||||
checksum = "2549ca8c7241c82f59c80ba2a6f415d931c5b58d24fb8412caa1a1f02c49139a"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_collections",
|
||||
"icu_locid_transform",
|
||||
"icu_locale_core",
|
||||
"icu_properties_data",
|
||||
"icu_provider",
|
||||
"tinystr",
|
||||
"potential_utf",
|
||||
"zerotrie",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_properties_data"
|
||||
version = "1.5.1"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2"
|
||||
checksum = "8197e866e47b68f8f7d95249e172903bec06004b18b2937f1095d40a0c57de04"
|
||||
|
||||
[[package]]
|
||||
name = "icu_provider"
|
||||
version = "1.5.0"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9"
|
||||
checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_locid",
|
||||
"icu_provider_macros",
|
||||
"icu_locale_core",
|
||||
"stable_deref_trait",
|
||||
"tinystr",
|
||||
"writeable",
|
||||
"yoke",
|
||||
"zerofrom",
|
||||
"zerotrie",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_provider_macros"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.101",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ident_case"
|
||||
version = "1.0.1"
|
||||
@@ -2184,9 +2152,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "idna_adapter"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
|
||||
checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
|
||||
dependencies = [
|
||||
"icu_normalizer",
|
||||
"icu_properties",
|
||||
@@ -2412,9 +2380,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libm"
|
||||
version = "0.2.14"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a25169bd5913a4b437588a7e3d127cd6e90127b60e0ffbd834a38f1599e016b8"
|
||||
checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"
|
||||
|
||||
[[package]]
|
||||
name = "libredox"
|
||||
@@ -2451,9 +2419,9 @@ checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
|
||||
|
||||
[[package]]
|
||||
name = "litemap"
|
||||
version = "0.7.5"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856"
|
||||
checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956"
|
||||
|
||||
[[package]]
|
||||
name = "litrs"
|
||||
@@ -2480,6 +2448,12 @@ dependencies = [
|
||||
"value-bag",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lru-slab"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
|
||||
|
||||
[[package]]
|
||||
name = "mac"
|
||||
version = "0.1.1"
|
||||
@@ -3305,6 +3279,15 @@ dependencies = [
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "potential_utf"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585"
|
||||
dependencies = [
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "powerfmt"
|
||||
version = "0.2.0"
|
||||
@@ -3440,9 +3423,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "quinn"
|
||||
version = "0.11.7"
|
||||
version = "0.11.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3bd15a6f2967aef83887dcb9fec0014580467e33720d073560cf015a5683012"
|
||||
checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"cfg_aliases",
|
||||
@@ -3460,12 +3443,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "quinn-proto"
|
||||
version = "0.11.11"
|
||||
version = "0.11.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bcbafbbdbb0f638fe3f35f3c56739f77a8a1d070cb25603226c83339b391472b"
|
||||
checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"getrandom 0.3.2",
|
||||
"getrandom 0.3.3",
|
||||
"lru-slab",
|
||||
"rand 0.9.1",
|
||||
"ring",
|
||||
"rustc-hash",
|
||||
@@ -3602,7 +3586,7 @@ version = "0.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
|
||||
dependencies = [
|
||||
"getrandom 0.3.2",
|
||||
"getrandom 0.3.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3733,7 +3717,7 @@ dependencies = [
|
||||
"wasm-bindgen-futures",
|
||||
"wasm-streams",
|
||||
"web-sys",
|
||||
"webpki-roots",
|
||||
"webpki-roots 0.26.11",
|
||||
"windows-registry 0.4.0",
|
||||
]
|
||||
|
||||
@@ -3901,9 +3885,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustls"
|
||||
version = "0.23.26"
|
||||
version = "0.23.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0"
|
||||
checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"ring",
|
||||
@@ -3924,18 +3908,19 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustls-pki-types"
|
||||
version = "1.11.0"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
|
||||
checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79"
|
||||
dependencies = [
|
||||
"web-time",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
version = "0.103.1"
|
||||
version = "0.103.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fef8b8769aaccf73098557a87cd1816b4f9c7c16811c9c77142aa695c16f2c03"
|
||||
checksum = "7149975849f1abb3832b246010ef62ccc80d3a76169517ada7188252b9cfb437"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"rustls-pki-types",
|
||||
@@ -4900,7 +4885,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-deep-link"
|
||||
version = "2.2.1"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#98e268a98fd31f8f57c2611826478b76a43cfe0b"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#a6b854032d0b10f0f17c4ffa6bdf4a05429e05fb"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"rust-ini",
|
||||
@@ -4919,7 +4904,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-dialog"
|
||||
version = "2.2.1"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#98e268a98fd31f8f57c2611826478b76a43cfe0b"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#a6b854032d0b10f0f17c4ffa6bdf4a05429e05fb"
|
||||
dependencies = [
|
||||
"log",
|
||||
"raw-window-handle",
|
||||
@@ -4936,7 +4921,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-fs"
|
||||
version = "2.2.1"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#98e268a98fd31f8f57c2611826478b76a43cfe0b"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#a6b854032d0b10f0f17c4ffa6bdf4a05429e05fb"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"dunce",
|
||||
@@ -4957,7 +4942,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-http"
|
||||
version = "2.4.3"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#98e268a98fd31f8f57c2611826478b76a43cfe0b"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#a6b854032d0b10f0f17c4ffa6bdf4a05429e05fb"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"cookie_store",
|
||||
@@ -4980,7 +4965,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-log"
|
||||
version = "2.4.0"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#98e268a98fd31f8f57c2611826478b76a43cfe0b"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#a6b854032d0b10f0f17c4ffa6bdf4a05429e05fb"
|
||||
dependencies = [
|
||||
"android_logger",
|
||||
"byte-unit",
|
||||
@@ -5001,7 +4986,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-opener"
|
||||
version = "2.2.6"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#98e268a98fd31f8f57c2611826478b76a43cfe0b"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#a6b854032d0b10f0f17c4ffa6bdf4a05429e05fb"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"glob",
|
||||
@@ -5022,7 +5007,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-os"
|
||||
version = "2.2.1"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#98e268a98fd31f8f57c2611826478b76a43cfe0b"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#a6b854032d0b10f0f17c4ffa6bdf4a05429e05fb"
|
||||
dependencies = [
|
||||
"gethostname",
|
||||
"log",
|
||||
@@ -5039,7 +5024,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-process"
|
||||
version = "2.2.1"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#98e268a98fd31f8f57c2611826478b76a43cfe0b"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#a6b854032d0b10f0f17c4ffa6bdf4a05429e05fb"
|
||||
dependencies = [
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
@@ -5048,7 +5033,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-shell"
|
||||
version = "2.2.1"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#98e268a98fd31f8f57c2611826478b76a43cfe0b"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#a6b854032d0b10f0f17c4ffa6bdf4a05429e05fb"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"log",
|
||||
@@ -5068,7 +5053,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-single-instance"
|
||||
version = "2.2.3"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#98e268a98fd31f8f57c2611826478b76a43cfe0b"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#a6b854032d0b10f0f17c4ffa6bdf4a05429e05fb"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -5082,7 +5067,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-sql"
|
||||
version = "2.2.0"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#98e268a98fd31f8f57c2611826478b76a43cfe0b"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#a6b854032d0b10f0f17c4ffa6bdf4a05429e05fb"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"indexmap 2.9.0",
|
||||
@@ -5202,7 +5187,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf"
|
||||
dependencies = [
|
||||
"fastrand",
|
||||
"getrandom 0.3.2",
|
||||
"getrandom 0.3.3",
|
||||
"once_cell",
|
||||
"rustix 1.0.7",
|
||||
"windows-sys 0.59.0",
|
||||
@@ -5309,9 +5294,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tinystr"
|
||||
version = "0.7.6"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
|
||||
checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"zerovec",
|
||||
@@ -5334,9 +5319,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.44.2"
|
||||
version = "1.45.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48"
|
||||
checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"bytes",
|
||||
@@ -5449,7 +5434,7 @@ dependencies = [
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"toml_write",
|
||||
"winnow 0.7.9",
|
||||
"winnow 0.7.10",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5684,12 +5669,6 @@ version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
||||
|
||||
[[package]]
|
||||
name = "utf16_iter"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246"
|
||||
|
||||
[[package]]
|
||||
name = "utf8-width"
|
||||
version = "0.1.7"
|
||||
@@ -5708,7 +5687,7 @@ version = "1.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9"
|
||||
dependencies = [
|
||||
"getrandom 0.3.2",
|
||||
"getrandom 0.3.3",
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -5952,9 +5931,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "0.26.10"
|
||||
version = "0.26.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37493cadf42a2a939ed404698ded7fb378bf301b5011f973361779a3a74f8c93"
|
||||
checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
|
||||
dependencies = [
|
||||
"webpki-roots 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb"
|
||||
dependencies = [
|
||||
"rustls-pki-types",
|
||||
]
|
||||
@@ -6481,9 +6469,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.7.9"
|
||||
version = "0.7.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9fb597c990f03753e08d3c29efbfcf2019a003b4bf4ba19225c158e1549f0f3"
|
||||
checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
@@ -6507,17 +6495,11 @@ dependencies = [
|
||||
"bitflags 2.9.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "write16"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936"
|
||||
|
||||
[[package]]
|
||||
name = "writeable"
|
||||
version = "0.5.5"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
|
||||
checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb"
|
||||
|
||||
[[package]]
|
||||
name = "wry"
|
||||
@@ -6595,9 +6577,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yoke"
|
||||
version = "0.7.5"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40"
|
||||
checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"stable_deref_trait",
|
||||
@@ -6607,9 +6589,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yoke-derive"
|
||||
version = "0.7.5"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
|
||||
checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -6645,7 +6627,7 @@ dependencies = [
|
||||
"tracing",
|
||||
"uds_windows",
|
||||
"windows-sys 0.59.0",
|
||||
"winnow 0.7.9",
|
||||
"winnow 0.7.10",
|
||||
"zbus_macros",
|
||||
"zbus_names",
|
||||
"zvariant",
|
||||
@@ -6674,7 +6656,7 @@ checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"static_assertions",
|
||||
"winnow 0.7.9",
|
||||
"winnow 0.7.10",
|
||||
"zvariant",
|
||||
]
|
||||
|
||||
@@ -6726,10 +6708,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
|
||||
|
||||
[[package]]
|
||||
name = "zerovec"
|
||||
version = "0.10.4"
|
||||
name = "zerotrie"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079"
|
||||
checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"yoke",
|
||||
"zerofrom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerovec"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428"
|
||||
dependencies = [
|
||||
"yoke",
|
||||
"zerofrom",
|
||||
@@ -6738,9 +6731,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zerovec-derive"
|
||||
version = "0.10.3"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
|
||||
checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -6757,7 +6750,7 @@ dependencies = [
|
||||
"enumflags2",
|
||||
"serde",
|
||||
"url",
|
||||
"winnow 0.7.9",
|
||||
"winnow 0.7.10",
|
||||
"zvariant_derive",
|
||||
"zvariant_utils",
|
||||
]
|
||||
@@ -6786,5 +6779,5 @@ dependencies = [
|
||||
"serde",
|
||||
"static_assertions",
|
||||
"syn 2.0.101",
|
||||
"winnow 0.7.9",
|
||||
"winnow 0.7.10",
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "TeyvatGuide"
|
||||
version = "0.7.4"
|
||||
version = "0.7.6"
|
||||
description = "Game Tool for Genshin Impact player"
|
||||
authors = ["BTMuli <bt-muli@outlook.com>"]
|
||||
license = "MIT"
|
||||
@@ -20,7 +20,7 @@ crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
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"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! @file src/client/menu.rs
|
||||
//! @desc 客户端菜单模块,负责操作米游社客户端菜单
|
||||
//! @since Beta v0.7.4
|
||||
//! @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),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
@@ -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/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)
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "TeyvatGuide",
|
||||
"identifier": "TeyvatGuide",
|
||||
"version": "0.7.4",
|
||||
"version": "0.7.6",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm vite:dev",
|
||||
"beforeBuildCommand": "pnpm vite:build",
|
||||
|
||||
19
src/App.vue
19
src/App.vue
@@ -15,24 +15,23 @@ import TBackTop from "@comp/app/t-backTop.vue";
|
||||
import TSidebar from "@comp/app/t-sidebar.vue";
|
||||
import showDialog from "@comp/func/dialog.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TGSqlite from "@Sqlite/index.js";
|
||||
import TSUserAccount from "@Sqlite/modules/userAccount.js";
|
||||
import OtherApi from "@req/otherReq.js";
|
||||
import TGSqlite from "@Sql/index.js";
|
||||
import TSUserAccount from "@Sqlm/userAccount.js";
|
||||
import useAppStore from "@store/app.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import { app, core, event, webviewWindow } from "@tauri-apps/api";
|
||||
import type { Event, UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { getCurrentWindow, LogicalSize } from "@tauri-apps/api/window";
|
||||
import { mkdir } from "@tauri-apps/plugin-fs";
|
||||
import { openUrl } from "@tauri-apps/plugin-opener";
|
||||
import { getBuildTime } from "@utils/TGBuild.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { getWindowSize, resizeWindow } from "@utils/TGWindow.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, onUnmounted, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import { getBuildTime } from "@/utils/TGBuild.js";
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import { getWindowSize, resizeWindow } from "@/utils/TGWindow.js";
|
||||
import OtherApi from "@/web/request/otherReq.js";
|
||||
|
||||
const router = useRouter();
|
||||
const { theme, needResize, deviceInfo, isLogin, userDir, buildTime } = storeToRefs(useAppStore());
|
||||
const { uid, briefInfo, account, cookie } = storeToRefs(useUserStore());
|
||||
@@ -60,7 +59,7 @@ onMounted(async () => {
|
||||
document.documentElement.className = theme.value;
|
||||
});
|
||||
resizeListener = await event.listen<string>("needResize", async (e: Event<string>) => {
|
||||
console.log(needResize);
|
||||
console.log(needResize.value);
|
||||
const windowCur = webviewWindow.getCurrentWebviewWindow();
|
||||
if (e.payload !== "false") {
|
||||
await resizeWindow();
|
||||
|
||||
@@ -14,22 +14,20 @@
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import showDialog from "@comp/func/dialog.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import ApiHubReq from "@req/apiHubReq.js";
|
||||
import OtherApi from "@req/otherReq.js";
|
||||
import useAppStore from "@store/app.js";
|
||||
import { emit } from "@tauri-apps/api/event";
|
||||
import { openUrl } from "@tauri-apps/plugin-opener";
|
||||
import TGClient from "@utils/TGClient.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { createPost } from "@utils/TGWindow.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import ToLivecode from "./to-livecode.vue";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
import TGClient from "@/utils/TGClient.js";
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import { createPost } from "@/utils/TGWindow.js";
|
||||
import ApiHubReq from "@/web/request/apiHubReq.js";
|
||||
import OtherApi from "@/web/request/otherReq.js";
|
||||
|
||||
type TGameNavProps = { modelValue: number };
|
||||
const props = withDefaults(defineProps<TGameNavProps>(), { modelValue: 2 });
|
||||
const model = defineModel<number>({ default: 2 });
|
||||
|
||||
const { isLogin } = storeToRefs(useAppStore());
|
||||
const nav = shallowRef<TGApp.BBS.Navigator.Navigator[]>([]);
|
||||
@@ -39,18 +37,20 @@ const actId = ref<string>();
|
||||
|
||||
const hasNav = computed<TGApp.BBS.Navigator.Navigator | undefined>(() => {
|
||||
const liveNames = ["前瞻直播", "前瞻节目", "直播兑换码"];
|
||||
return nav.value.find((item) => liveNames.includes(item.name));
|
||||
const find = nav.value.find((item) => liveNames.includes(item.name));
|
||||
if (find) return find;
|
||||
return nav.value.find((item) => item.name.includes("前瞻"));
|
||||
});
|
||||
|
||||
onMounted(async () => await loadNav());
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
() => model.value,
|
||||
async () => await loadNav(),
|
||||
);
|
||||
|
||||
async function loadNav(): Promise<void> {
|
||||
nav.value = await ApiHubReq.home(props.modelValue);
|
||||
nav.value = await ApiHubReq.home(model.value);
|
||||
}
|
||||
|
||||
async function tryGetCode(): Promise<void> {
|
||||
@@ -120,7 +120,7 @@ async function toBBS(link: URL): Promise<void> {
|
||||
}
|
||||
if (link.hostname === "forum") {
|
||||
const forumId = link.pathname.split("/").pop();
|
||||
const localPath = `/posts/forum/${props.modelValue}/${forumId}`;
|
||||
const localPath = `/posts/forum/${model.value}/${forumId}`;
|
||||
await emit("active_deep_link", `router?path=${localPath}`);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ const props = defineProps<TItemBoxProps>();
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
width: v-bind("props.modelValue.size");
|
||||
height: v-bind("props.modelValue.height");
|
||||
height: v-bind("props.modelValue.size");
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ const props = defineProps<TItemBoxProps>();
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: v-bind("props.modelValue.size");
|
||||
height: v-bind("props.modelValue.height");
|
||||
height: v-bind("props.modelValue.size");
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ const props = defineProps<TItemBoxProps>();
|
||||
left: 0;
|
||||
display: flex;
|
||||
width: v-bind("props.modelValue.size");
|
||||
height: v-bind("props.modelValue.height");
|
||||
height: v-bind("props.modelValue.size");
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import useAppStore from "@store/app.js";
|
||||
import { onMounted, onUnmounted, ref, watch } from "vue";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
import { saveImgLocal } from "@/utils/TGShare.js";
|
||||
|
||||
type TMiImgProps = {
|
||||
|
||||
@@ -108,13 +108,12 @@ import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TpAvatar from "@comp/viewPost/tp-avatar.vue";
|
||||
import { emit } from "@tauri-apps/api/event";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { createPost } from "@utils/TGWindow.js";
|
||||
import { timestampToDate } from "@utils/toolFunc.js";
|
||||
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import { createPost } from "@/utils/TGWindow.js";
|
||||
import { timestampToDate } from "@/utils/toolFunc.js";
|
||||
|
||||
type TPostCardProps = {
|
||||
modelValue: TGApp.BBS.Post.FullData;
|
||||
selectMode?: boolean;
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
<script lang="ts" setup>
|
||||
import showLoading from "@comp/func/loading.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
|
||||
type TShareBtnProps = { selector: string; title: string };
|
||||
const props = defineProps<TShareBtnProps>();
|
||||
|
||||
@@ -182,15 +182,14 @@
|
||||
<script lang="ts" setup>
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import VpOverlayFollow from "@comp/viewPost/vp-overlay-follow.vue";
|
||||
import useAppStore from "@store/app.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import { event, webviewWindow } from "@tauri-apps/api";
|
||||
import type { Event, UnlistenFn } from "@tauri-apps/api/event";
|
||||
import mhyClient from "@utils/TGClient.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, onUnmounted, ref } from "vue";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import mhyClient from "@/utils/TGClient.js";
|
||||
|
||||
const { sidebar, theme, isLogin, recentNewsType } = storeToRefs(useAppStore());
|
||||
const { briefInfo } = storeToRefs(useUserStore());
|
||||
let themeListener: UnlistenFn | null = null;
|
||||
|
||||
@@ -8,13 +8,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import useAppStore from "@store/app.js";
|
||||
import { event } from "@tauri-apps/api";
|
||||
import type { Event, UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { onMounted, onUnmounted } from "vue";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
|
||||
const { theme } = storeToRefs(useAppStore());
|
||||
const appStore = useAppStore();
|
||||
let themeListener: UnlistenFn | null = null;
|
||||
|
||||
@@ -39,13 +39,12 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { timestampToDate } from "@utils/toolFunc.js";
|
||||
|
||||
import TMiImg from "./t-mi-img.vue";
|
||||
import TOverlay from "./t-overlay.vue";
|
||||
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import { timestampToDate } from "@/utils/toolFunc.js";
|
||||
|
||||
type ToLiveCodeProps = { data: Array<TGApp.BBS.Navigator.CodeData>; actId: string | undefined };
|
||||
|
||||
const props = defineProps<ToLiveCodeProps>();
|
||||
|
||||
@@ -32,12 +32,11 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { ref } from "vue";
|
||||
|
||||
import TOverlay from "./t-overlay.vue";
|
||||
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
|
||||
type ToNameCardProps = { data?: TGApp.App.NameCard.Item };
|
||||
|
||||
const props = defineProps<ToNameCardProps>();
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref, shallowRef, useTemplateRef, watch } from "vue";
|
||||
|
||||
|
||||
@@ -184,9 +184,8 @@ defineExpose({ displayBox });
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<!-- loading -->
|
||||
<style lang="css" scoped>
|
||||
|
||||
/* loading */
|
||||
.loading-circle,
|
||||
.loading-circle > div {
|
||||
position: relative;
|
||||
|
||||
@@ -116,7 +116,7 @@ defineExpose({ displayBox });
|
||||
}
|
||||
|
||||
.func-snackbar-text {
|
||||
color: #fff;
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -55,13 +55,13 @@
|
||||
<script lang="ts" setup>
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { timestampToDate } from "@utils/toolFunc.js";
|
||||
import { ref } from "vue";
|
||||
|
||||
import HtaOverviewLine from "./hta-overview-line.vue";
|
||||
|
||||
import type { AbyssDataItem } from "@/pages/WIKI/Abyss.vue";
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import { timestampToDate } from "@/utils/toolFunc.js";
|
||||
|
||||
type HtaOverlayOverviewProps = { data: AbyssDataItem<TGApp.Plugins.Hutao.Abyss.OverviewData> };
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
<script lang="ts" setup>
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { createTGWindow } from "@utils/TGWindow.js";
|
||||
|
||||
import type { AnnoCard } from "@/pages/common/PageAnno.vue";
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import { createTGWindow } from "@/utils/TGWindow.js";
|
||||
|
||||
type TAnnoCardProps = { region: string; modelValue: AnnoCard; lang: string };
|
||||
const props = defineProps<TAnnoCardProps>();
|
||||
|
||||
@@ -12,12 +12,11 @@ import TpImage from "@comp/viewPost/tp-image.vue";
|
||||
import TpText from "@comp/viewPost/tp-text.vue";
|
||||
import TpTexts from "@comp/viewPost/tp-texts.vue";
|
||||
import TpUnknown from "@comp/viewPost/tp-unknown.vue";
|
||||
import parseAnnoContent from "@utils/annoParser.js";
|
||||
import type { Component } from "vue";
|
||||
|
||||
import TaTable from "./ta-table.vue";
|
||||
|
||||
import parseAnnoContent from "@/web/utils/annoParser.js";
|
||||
|
||||
type TaParserProps = { data: TGApp.BBS.Announcement.ContentItem };
|
||||
const props = defineProps<TaParserProps>();
|
||||
|
||||
|
||||
@@ -37,13 +37,12 @@ import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { fetch } from "@tauri-apps/plugin-http";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { copyToClipboard, getImageBuffer, saveCanvasImg } from "@utils/TGShare.js";
|
||||
import { bytesToSize } from "@utils/toolFunc.js";
|
||||
import { onMounted, ref, shallowRef, watch } from "vue";
|
||||
import { xml2json } from "xml-js";
|
||||
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import { copyToClipboard, getImageBuffer, saveCanvasImg } from "@/utils/TGShare.js";
|
||||
import { bytesToSize } from "@/utils/toolFunc.js";
|
||||
|
||||
type ToArcBirthProps = { data?: TGApp.Archive.Birth.DrawItem; choice: boolean };
|
||||
type XmlKeyMap = { id: string; rel: string; group?: string; icon: string };
|
||||
type XmlTextList = { chara: string; img: string; text: string };
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showDialog from "@comp/func/dialog.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TSUserCollection from "@Sqlite/modules/userCollect.js";
|
||||
import TSUserCollection from "@Sqlm/userCollect.js";
|
||||
import { ref, shallowRef, watch } from "vue";
|
||||
|
||||
type ToPostCollectProps = { post: Array<string> };
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import useAppStore from "@store/app.js";
|
||||
import { app } from "@tauri-apps/api";
|
||||
import { openUrl } from "@tauri-apps/plugin-opener";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { onMounted, ref } from "vue";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
|
||||
const { buildTime } = storeToRefs(useAppStore());
|
||||
const versionApp = ref<string>();
|
||||
|
||||
|
||||
@@ -63,19 +63,18 @@
|
||||
import showDialog from "@comp/func/dialog.js";
|
||||
import showLoading from "@comp/func/loading.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TGSqlite from "@Sqlite/index.js";
|
||||
import TGSqlite from "@Sql/index.js";
|
||||
import useAppStore from "@store/app.js";
|
||||
import { path } from "@tauri-apps/api";
|
||||
import { sep } from "@tauri-apps/api/path";
|
||||
import { open } from "@tauri-apps/plugin-dialog";
|
||||
import { exists, readDir, remove } from "@tauri-apps/plugin-fs";
|
||||
import { openPath } from "@tauri-apps/plugin-opener";
|
||||
import { platform } from "@tauri-apps/plugin-os";
|
||||
import { backUpUserData } from "@utils/dataBS.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { onMounted } from "vue";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
import { backUpUserData } from "@/utils/dataBS.js";
|
||||
|
||||
const { dbPath, logDir, userDir, gameDir } = storeToRefs(useAppStore());
|
||||
|
||||
onMounted(async () => {
|
||||
|
||||
@@ -17,16 +17,15 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import PassportApi from "@req/passportReq.js";
|
||||
import useAppStore from "@store/app.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import { path } from "@tauri-apps/api";
|
||||
import { exists } from "@tauri-apps/plugin-fs";
|
||||
import { Command } from "@tauri-apps/plugin-shell";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import PassportApi from "@/web/request/passportReq.js";
|
||||
|
||||
const { gameDir } = storeToRefs(useAppStore());
|
||||
const { account, uid, cookie } = storeToRefs(useUserStore());
|
||||
|
||||
|
||||
@@ -74,15 +74,14 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TGSqlite from "@Sqlite/index.js";
|
||||
import TSUserAchi from "@Sqlite/modules/userAchi.js";
|
||||
import TGSqlite from "@Sql/index.js";
|
||||
import TSUserAchi from "@Sqlm/userAchi.js";
|
||||
import { app } from "@tauri-apps/api";
|
||||
import { openUrl } from "@tauri-apps/plugin-opener";
|
||||
import { platform, version } from "@tauri-apps/plugin-os";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { onMounted, ref, shallowRef } from "vue";
|
||||
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
|
||||
const latestAchiVersion = TSUserAchi.getLatestAchiVersion();
|
||||
const osPlatform = platform();
|
||||
const osVersion = version();
|
||||
|
||||
@@ -125,18 +125,17 @@ import showGeetest from "@comp/func/geetest.js";
|
||||
import showLoading from "@comp/func/loading.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import ToGameLogin from "@comp/pageConfig/tco-gameLogin.vue";
|
||||
import TSUserAccount from "@Sqlite/modules/userAccount.js";
|
||||
import BBSApi from "@req/bbsReq.js";
|
||||
import PassportApi from "@req/passportReq.js";
|
||||
import passportReq from "@req/passportReq.js";
|
||||
import takumiReq from "@req/takumiReq.js";
|
||||
import TSUserAccount from "@Sqlm/userAccount.js";
|
||||
import useAppStore from "@store/app.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, ref, shallowRef } from "vue";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import BBSApi from "@/web/request/bbsReq.js";
|
||||
import PassportApi from "@/web/request/passportReq.js";
|
||||
import passportReq from "@/web/request/passportReq.js";
|
||||
import takumiReq from "@/web/request/takumiReq.js";
|
||||
|
||||
const { isLogin } = storeToRefs(useAppStore());
|
||||
const { uid, briefInfo, cookie, account } = storeToRefs(useUserStore());
|
||||
|
||||
|
||||
@@ -38,15 +38,14 @@
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showLoading from "@comp/func/loading.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import hk4eReq from "@req/hk4eReq.js";
|
||||
import PassportReq from "@req/passportReq.js";
|
||||
import passportReq from "@req/passportReq.js";
|
||||
import takumiReq from "@req/takumiReq.js";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import QrcodeVue from "qrcode.vue";
|
||||
import { onUnmounted, ref, watch } from "vue";
|
||||
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import hk4eReq from "@/web/request/hk4eReq.js";
|
||||
import PassportReq from "@/web/request/passportReq.js";
|
||||
import passportReq from "@/web/request/passportReq.js";
|
||||
import takumiReq from "@/web/request/takumiReq.js";
|
||||
|
||||
type ToGameLoginEmits = (e: "success", data: TGApp.App.Account.Cookie) => void;
|
||||
type ToGameLoginSelect = { title: string; value: number; icon: string };
|
||||
|
||||
|
||||
@@ -39,13 +39,12 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import TSAvatarBirth from "@Sqlite/modules/avatarBirth.js";
|
||||
import TSAvatarBirth from "@Sqlm/avatarBirth.js";
|
||||
import useAppStore from "@store/app.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { onBeforeMount, ref, shallowRef } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
|
||||
const router = useRouter();
|
||||
const { recentNewsType } = storeToRefs(useAppStore());
|
||||
const isBirthday = ref<boolean>(false);
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import TItemBox, { type TItemBoxData } from "@comp/app/t-itemBox.vue";
|
||||
import { timestampToDate } from "@utils/toolFunc.js";
|
||||
import { computed, onMounted, ref, shallowRef } from "vue";
|
||||
|
||||
import TCalendarBirth from "./ph-calendar-birth.vue";
|
||||
@@ -45,7 +46,6 @@ import ToCalendar from "./ph-calendar-overlay.vue";
|
||||
import THomeCard from "./ph-comp-card.vue";
|
||||
|
||||
import { AppCalendarData } from "@/data/index.js";
|
||||
import { timestampToDate } from "@/utils/toolFunc.js";
|
||||
|
||||
type BtnItem = { week: 1 | 2 | 3 | 4 | 5 | 6 | 7; text: string };
|
||||
type TCalendarEmits = (e: "success") => void;
|
||||
|
||||
@@ -11,13 +11,12 @@
|
||||
<script lang="ts" setup>
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import PhPoolCard from "@comp/pageHome/ph-pool-card.vue";
|
||||
import takumiReq from "@req/takumiReq.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { onMounted, shallowRef } from "vue";
|
||||
|
||||
import THomeCard from "./ph-comp-card.vue";
|
||||
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import takumiReq from "@/web/request/takumiReq.js";
|
||||
|
||||
type TPoolEmits = (e: "success") => void;
|
||||
|
||||
const emits = defineEmits<TPoolEmits>();
|
||||
|
||||
@@ -11,13 +11,12 @@
|
||||
<script lang="ts" setup>
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import PhPositionCard from "@comp/pageHome/ph-position-card.vue";
|
||||
import takumiReq from "@req/takumiReq.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { onMounted, shallowRef } from "vue";
|
||||
|
||||
import THomeCard from "./ph-comp-card.vue";
|
||||
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import takumiReq from "@/web/request/takumiReq.js";
|
||||
|
||||
type TPositionEmits = (e: "success") => void;
|
||||
const emits = defineEmits<TPositionEmits>();
|
||||
const positions = shallowRef<Array<TGApp.BBS.Obc.PositionItem>>([]);
|
||||
|
||||
@@ -39,16 +39,16 @@
|
||||
import TItemBox, { TItemBoxData } from "@comp/app/t-itemBox.vue";
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import postReq from "@req/postReq.js";
|
||||
import useHomeStore from "@store/home.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { createPost, createTGWindow } from "@utils/TGWindow.js";
|
||||
import { stamp2LastTime } from "@utils/toolFunc.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, ref, shallowRef } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { AppCharacterData } from "@/data/index.js";
|
||||
import { useHomeStore } from "@/store/modules/home.js";
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import { createPost, createTGWindow } from "@/utils/TGWindow.js";
|
||||
import { stamp2LastTime } from "@/utils/toolFunc.js";
|
||||
import postReq from "@/web/request/postReq.js";
|
||||
|
||||
type PhPoolCardProps = { pool: TGApp.BBS.Obc.GachaItem };
|
||||
type PhPoolAvatar = TGApp.BBS.Obc.GachaPool & { info?: TGApp.App.Character.WikiBriefInfo };
|
||||
|
||||
@@ -35,12 +35,11 @@
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { openUrl } from "@tauri-apps/plugin-opener";
|
||||
import { parseLink } from "@utils/linkParser.js";
|
||||
import { toObcPage, createPost } from "@utils/TGWindow.js";
|
||||
import { stamp2LastTime, timestampToDate } from "@utils/toolFunc.js";
|
||||
import { computed, onMounted, onUnmounted, ref } from "vue";
|
||||
|
||||
import { parseLink } from "@/utils/linkParser.js";
|
||||
import { createObc, createPost } from "@/utils/TGWindow.js";
|
||||
import { stamp2LastTime, timestampToDate } from "@/utils/toolFunc.js";
|
||||
|
||||
type PhPositionCardProps = { pos: TGApp.BBS.Obc.PositionItem };
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
@@ -73,7 +72,7 @@ function handlePosition(): void {
|
||||
|
||||
async function openPosition(): Promise<void> {
|
||||
if (props.pos.url === "" && props.pos.content_id !== 0) {
|
||||
await createObc(props.pos.content_id, props.pos.title);
|
||||
await toObcPage(props.pos.content_id);
|
||||
return;
|
||||
}
|
||||
const res = await parseLink(props.pos.url);
|
||||
|
||||
@@ -21,12 +21,11 @@
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import useAppStore, { type NewsType } from "@store/app.js";
|
||||
import useBBSStore from "@store/bbs.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { onMounted, shallowRef } from "vue";
|
||||
|
||||
import { type NewsType, useAppStore } from "@/store/modules/app.js";
|
||||
import useBBSStore from "@/store/modules/bbs.js";
|
||||
|
||||
type ChannelItem = { icon: string; title: string; gid: number };
|
||||
type ToChannelProps = { gid?: string; curType?: string };
|
||||
|
||||
|
||||
@@ -107,6 +107,8 @@ import TItembox, { type TItemBoxData } from "@comp/app/t-itemBox.vue";
|
||||
import ToNameCard from "@comp/app/to-nameCard.vue";
|
||||
import TopNameCard from "@comp/app/top-nameCard.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { toObcPage } from "@utils/TGWindow.js";
|
||||
import { parseHtmlText } from "@utils/toolFunc.js";
|
||||
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
@@ -115,8 +117,6 @@ import TwcMaterials from "./twc-materials.vue";
|
||||
import TwcSkills from "./twc-skills.vue";
|
||||
|
||||
import { AppCharacterData, AppNameCardsData, WikiCharacterData } from "@/data/index.js";
|
||||
import { createObc } from "@/utils/TGWindow.js";
|
||||
import { parseHtmlText } from "@/utils/toolFunc.js";
|
||||
|
||||
type TwcCharacterProps = { item: TGApp.App.Character.WikiBriefInfo };
|
||||
|
||||
@@ -165,7 +165,7 @@ async function toWiki(): Promise<void> {
|
||||
showSnackbar.warn(`角色 ${props.item.name} 暂无详情`);
|
||||
return;
|
||||
}
|
||||
await createObc(props.item.contentId, props.item.name);
|
||||
await toObcPage(props.item.contentId);
|
||||
}
|
||||
|
||||
async function toBirth(date: string): Promise<void> {
|
||||
|
||||
@@ -26,10 +26,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { parseHtmlText } from "@utils/toolFunc.js";
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
|
||||
import { parseHtmlText } from "@/utils/toolFunc.js";
|
||||
|
||||
type TwcConstellationProps = { data: Array<TGApp.Plugins.Hutao.Character.RhisdTalent> };
|
||||
|
||||
const props = defineProps<TwcConstellationProps>();
|
||||
|
||||
@@ -23,10 +23,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { parseHtmlText } from "@utils/toolFunc.js";
|
||||
import { onMounted, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import { parseHtmlText } from "@/utils/toolFunc.js";
|
||||
|
||||
type TwcSkillsProps = { data: Array<TGApp.App.Character.WikiSkill> };
|
||||
type TabItem = { name: string; icon: string };
|
||||
|
||||
|
||||
@@ -59,13 +59,13 @@
|
||||
<script lang="ts" setup>
|
||||
import TItemBox, { type TItemBoxData } from "@comp/app/t-itemBox.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { toObcPage } from "@utils/TGWindow.js";
|
||||
import { parseHtmlText } from "@utils/toolFunc.js";
|
||||
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import TwcMaterials from "./twc-materials.vue";
|
||||
|
||||
import { WikiWeaponData } from "@/data/index.js";
|
||||
import { createObc } from "@/utils/TGWindow.js";
|
||||
import { parseHtmlText } from "@/utils/toolFunc.js";
|
||||
|
||||
type TwcWeaponProps = { item: TGApp.App.Weapon.WikiBriefInfo };
|
||||
|
||||
@@ -108,7 +108,7 @@ async function toWiki(): Promise<void> {
|
||||
showSnackbar.warn(`武器 ${props.item.name} 暂无详情`);
|
||||
return;
|
||||
}
|
||||
await createObc(props.item.contentId, props.item.name);
|
||||
await toObcPage(props.item.contentId);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -29,14 +29,13 @@
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { getVersion } from "@tauri-apps/api/app";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { parseHtmlText } from "@utils/toolFunc.js";
|
||||
import { onMounted, ref } from "vue";
|
||||
|
||||
import TwoConvert from "./two-convert.vue";
|
||||
import TwoSource from "./two-source.vue";
|
||||
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import { parseHtmlText } from "@/utils/toolFunc.js";
|
||||
|
||||
type TwoMaterialProps = { data: TGApp.App.Material.WikiItem };
|
||||
|
||||
const props = defineProps<TwoMaterialProps>();
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
import ToNameCard from "@comp/app/to-nameCard.vue";
|
||||
import TopNameCard from "@comp/app/top-nameCard.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TSUserAchi from "@Sqlite/modules/userAchi.js";
|
||||
import TSUserAchi from "@Sqlm/userAchi.js";
|
||||
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import ToAchiInfo from "./tua-achi-overlay.vue";
|
||||
|
||||
@@ -63,11 +63,11 @@
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import VpOverlaySearch from "@comp/viewPost/vp-overlay-search.vue";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { ref } from "vue";
|
||||
|
||||
import { AppAchievementSeriesData } from "@/data/index.js";
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
|
||||
type ToAchiInfoProps = { data: TGApp.Sqlite.Achievement.RenderAchi };
|
||||
type ToAchiInfoEmits = (e: "select-series", v: number) => void;
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
<script lang="ts" setup>
|
||||
import showDialog from "@comp/func/dialog.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TSUserAchi from "@Sqlite/modules/userAchi.js";
|
||||
import TSUserAchi from "@Sqlm/userAchi.js";
|
||||
import { event } from "@tauri-apps/api";
|
||||
import { timestampToDate } from "@utils/toolFunc.js";
|
||||
import { ref, toRaw, watch } from "vue";
|
||||
|
||||
import { AppAchievementSeriesData } from "@/data/index.js";
|
||||
import { timestampToDate } from "@/utils/toolFunc.js";
|
||||
|
||||
type TuaAchiProps = { modelValue: TGApp.Sqlite.Achievement.RenderAchi };
|
||||
type TuaAchiEmits = (e: "select-achi", data: TGApp.Sqlite.Achievement.RenderAchi) => void;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TSUserAchi from "@Sqlite/modules/userAchi.js";
|
||||
import TSUserAchi from "@Sqlm/userAchi.js";
|
||||
import { type Event, listen, type UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { computed, onMounted, onUnmounted, shallowRef, watch } from "vue";
|
||||
|
||||
|
||||
@@ -54,14 +54,13 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import TItemBox, { type TItemBoxData } from "@comp/app/t-itemBox.vue";
|
||||
import TSUserAvatar from "@Sqlite/modules/userAvatar.js";
|
||||
import TSUserAvatar from "@Sqlm/userAvatar.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import { getZhElement } from "@utils/toolFunc.js";
|
||||
import { computed } from "vue";
|
||||
|
||||
import TuaRelicBox from "./tua-relic-box.vue";
|
||||
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import { getZhElement } from "@/utils/toolFunc.js";
|
||||
|
||||
type fixedLenArr<T, N extends number> = [T, ...Array<T>] & { length: N };
|
||||
type AvatarRelics = fixedLenArr<TGApp.Game.Avatar.Relic | false, 5>;
|
||||
type TuaAvatarBoxProps = { modelValue: TGApp.Sqlite.Character.UserRole };
|
||||
|
||||
@@ -60,10 +60,9 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import useUserStore from "@store/user.js";
|
||||
import { computed } from "vue";
|
||||
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
|
||||
type TuaDcRelicProps = {
|
||||
modelValue: TGApp.Game.Avatar.Relic | false;
|
||||
pos: "1" | "2" | "3" | "4" | "5";
|
||||
|
||||
@@ -42,11 +42,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import useUserStore from "@store/user.js";
|
||||
import { app } from "@tauri-apps/api";
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
|
||||
type TuaDcWeaponProps = {
|
||||
modelValue: TGApp.Game.Avatar.WeaponDetail;
|
||||
updated: string;
|
||||
|
||||
@@ -77,7 +77,9 @@
|
||||
<script lang="ts" setup>
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TSUserAvatar from "@Sqlite/modules/userAvatar.js";
|
||||
import TSUserAvatar from "@Sqlm/userAvatar.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { computed, ref } from "vue";
|
||||
|
||||
import TuaDcConstellations from "./tua-dc-constellations.vue";
|
||||
@@ -86,9 +88,6 @@ import TuaDcRelic from "./tua-dc-relic.vue";
|
||||
import TuaDcTalents from "./tua-dc-talents.vue";
|
||||
import TuaDcWeapon from "./tua-dc-weapon.vue";
|
||||
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
|
||||
type fixedLenArr<T, N extends number> = [T, ...Array<T>] & { length: N };
|
||||
type RelicList = fixedLenArr<TGApp.Game.Avatar.Relic | false, 5>;
|
||||
type TuaDetailCardProps = { modelValue: TGApp.Sqlite.Character.UserRole };
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
|
||||
type TuaRelicBoxProps = { modelValue: TGApp.Game.Avatar.Relic | false; position: number };
|
||||
|
||||
|
||||
@@ -12,10 +12,9 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import TItemBox, { type TItemBoxData } from "@comp/app/t-itemBox.vue";
|
||||
import { getZhElement } from "@utils/toolFunc.js";
|
||||
import { computed } from "vue";
|
||||
|
||||
import { getZhElement } from "@/utils/toolFunc.js";
|
||||
|
||||
type DucDetailOltProps =
|
||||
| {
|
||||
data: TGApp.Game.Avatar.Avatar;
|
||||
|
||||
@@ -46,7 +46,7 @@ const props = defineProps<DucDetailOrtProps>();
|
||||
border-radius: 50%;
|
||||
-webkit-backdrop-filter: blur(5px);
|
||||
backdrop-filter: blur(5px);
|
||||
background: rgba(0 0 0 /40%);
|
||||
background: rgb(0 0 0 / 40%);
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
@@ -62,6 +62,6 @@ const props = defineProps<DucDetailOrtProps>();
|
||||
color: var(--tgc-white-1);
|
||||
font-family: var(--font-title);
|
||||
font-size: 16px;
|
||||
text-shadow: 0 0 5px rgba(0 0 0/40%);
|
||||
text-shadow: 0 0 5px rgb(0 0 0 / 40%);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -42,8 +42,9 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TSUserAvatar from "@Sqlite/modules/userAvatar.js";
|
||||
import TSUserAvatar from "@Sqlm/userAvatar.js";
|
||||
import { app } from "@tauri-apps/api";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
|
||||
import DucDetailOlb from "./duc-detail-olb.vue";
|
||||
@@ -51,8 +52,6 @@ import DucDetailOlt from "./duc-detail-olt.vue";
|
||||
import DucDetailOrt from "./duc-detail-ort.vue";
|
||||
import DucDetailRelic from "./duc-detail-relic.vue";
|
||||
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
|
||||
type DucDetailOverlayProps = { modelValue: TGApp.Sqlite.Character.UserRole };
|
||||
type fixedLenArr<T, N extends number> = [T, ...Array<T>] & { length: N };
|
||||
type RelicList = fixedLenArr<TGApp.Game.Avatar.Relic | false, 5>;
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
</TucDetailDesc>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { parseHtmlText } from "@utils/toolFunc.js";
|
||||
|
||||
import TucDetailConstellation from "./tuc-detail-constellation.vue";
|
||||
import TucDetailDesc from "./tuc-detail-desc.vue";
|
||||
|
||||
import { parseHtmlText } from "@/utils/toolFunc.js";
|
||||
|
||||
defineProps<{ modelValue: TGApp.Game.Avatar.Constellation }>();
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
</TucDetailDesc>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { parseHtmlText } from "@utils/toolFunc.js";
|
||||
|
||||
import TucDetailDesc from "./tuc-detail-desc.vue";
|
||||
import TucDetailItemBox from "./tuc-detail-itembox.vue";
|
||||
|
||||
import { parseHtmlText } from "@/utils/toolFunc.js";
|
||||
|
||||
defineProps<{ modelValue: TGApp.Game.Avatar.WeaponDetail }>();
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import TItemBox, { type TItemBoxData } from "@comp/app/t-itemBox.vue";
|
||||
|
||||
import { getWikiBrief, getZhElement } from "@/utils/toolFunc.js";
|
||||
import { getWikiBrief, getZhElement } from "@utils/toolFunc.js";
|
||||
|
||||
type TucAvatarsProps = { modelValue: Array<TGApp.Game.Combat.Avatar>; detail: boolean };
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ import TItemBox, { type TItemBoxData } from "@comp/app/t-itemBox.vue";
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showLoading from "@comp/func/loading.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { timestampToDate } from "@utils/toolFunc.js";
|
||||
import { computed } from "vue";
|
||||
|
||||
import { AppCharacterData } from "@/data/index.js";
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import { timestampToDate } from "@/utils/toolFunc.js";
|
||||
|
||||
type TucOverlayProps = { data: TGApp.Plugins.Hutao.Combat.Data | undefined };
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { timestampToDate } from "@utils/toolFunc.js";
|
||||
|
||||
import TucAvatars from "./tuc-avatars.vue";
|
||||
import TucBuffs from "./tuc-buffs.vue";
|
||||
import TucCards from "./tuc-cards.vue";
|
||||
import TucSub from "./tuc-sub.vue";
|
||||
|
||||
import { timestampToDate } from "@/utils/toolFunc.js";
|
||||
|
||||
defineProps<{ modelValue: TGApp.Game.Combat.RoundData }>();
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { getWikiBrief } from "@utils/toolFunc.js";
|
||||
import { computed } from "vue";
|
||||
|
||||
import { AppGachaData } from "@/data/index.js";
|
||||
import { getWikiBrief } from "@/utils/toolFunc.js";
|
||||
|
||||
export type GroDataLineProps = { data: TGApp.Sqlite.GachaRecords.SingleTable; count: number };
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
<script lang="ts" setup>
|
||||
// about import err,see:https://github.com/apache/echarts/issues/19992
|
||||
import showLoading from "@comp/func/loading.js";
|
||||
import useAppStore from "@store/app.js";
|
||||
import TGachaCharts from "@utils/gachaCharts.js";
|
||||
import { BarChart, HeatmapChart, PieChart } from "echarts/charts.js";
|
||||
import {
|
||||
CalendarComponent,
|
||||
@@ -45,9 +47,6 @@ import { storeToRefs } from "pinia";
|
||||
import { computed, ref, shallowRef, watch } from "vue";
|
||||
import VChart from "vue-echarts";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
import TGachaCharts from "@/utils/gachaCharts.js";
|
||||
|
||||
// echarts
|
||||
use([
|
||||
LabelLayout,
|
||||
|
||||
@@ -37,11 +37,10 @@
|
||||
<script lang="ts" setup>
|
||||
import TItemBox, { type TItemBoxData } from "@comp/app/t-itemBox.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { createPost } from "@utils/TGWindow.js";
|
||||
import { getWikiBrief, timestampToDate } from "@utils/toolFunc.js";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { createPost } from "@/utils/TGWindow.js";
|
||||
import { getWikiBrief, timestampToDate } from "@/utils/toolFunc.js";
|
||||
|
||||
type UgHisCardProps = { pool: TGApp.App.Gacha.PoolItem };
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
@@ -50,16 +50,15 @@
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showLoading from "@comp/func/loading.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TSUserGacha from "@Sqlite/modules/userGacha.js";
|
||||
import TSUserGacha from "@Sqlm/userGacha.js";
|
||||
import { path } from "@tauri-apps/api";
|
||||
import { open } from "@tauri-apps/plugin-dialog";
|
||||
import { writeTextFile } from "@tauri-apps/plugin-fs";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { timestampToDate } from "@utils/toolFunc.js";
|
||||
import { getUigf4Header, getUigf4Item, readUigf4Data, verifyUigfData } from "@utils/UIGF.js";
|
||||
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import { timestampToDate } from "@/utils/toolFunc.js";
|
||||
import { getUigf4Header, getUigf4Item, readUigf4Data, verifyUigfData } from "@/utils/UIGF.js";
|
||||
|
||||
type UgoUidProps = { mode: "import" | "export" };
|
||||
type UgoUidItem = { uid: string; length: number; time: string };
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<template>
|
||||
<div class="tur-box-container">
|
||||
<slot name="default"></slot>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup></script>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -43,11 +43,10 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import useAppStore from "@store/app.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed } from "vue";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
|
||||
type TurWorldSubProps = { data: TGApp.Sqlite.Record.WorldExplore };
|
||||
|
||||
const { theme } = storeToRefs(useAppStore());
|
||||
|
||||
@@ -32,16 +32,15 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import apiHubReq from "@req/apiHubReq.js";
|
||||
import miscReq from "@req/miscReq.js";
|
||||
import painterReq from "@req/painterReq.js";
|
||||
import postReq from "@req/postReq.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { ref, shallowRef, watch } from "vue";
|
||||
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import apiHubReq from "@/web/request/apiHubReq.js";
|
||||
import miscReq from "@/web/request/miscReq.js";
|
||||
import painterReq from "@/web/request/painterReq.js";
|
||||
import postReq from "@/web/request/postReq.js";
|
||||
|
||||
type ParseMission = {
|
||||
id: number;
|
||||
key: string;
|
||||
@@ -62,6 +61,8 @@ const loadMission = ref<boolean>(false);
|
||||
const parseMissions = shallowRef<Array<ParseMission>>([]);
|
||||
const missionList = shallowRef<Array<TGApp.BBS.Mission.MissionItem>>([]);
|
||||
|
||||
defineExpose({ tryAuto });
|
||||
|
||||
watch(
|
||||
() => uid.value,
|
||||
() => {
|
||||
|
||||
@@ -56,16 +56,15 @@ import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import showDialog from "@comp/func/dialog.js";
|
||||
import showGeetest from "@comp/func/geetest.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TSUserAccount from "@Sqlite/modules/userAccount.js";
|
||||
import lunaReq from "@req/lunaReq.js";
|
||||
import miscReq from "@req/miscReq.js";
|
||||
import takumiReq from "@req/takumiReq.js";
|
||||
import TSUserAccount from "@Sqlm/userAccount.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { onMounted, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import lunaReq from "@/web/request/lunaReq.js";
|
||||
import miscReq from "@/web/request/miscReq.js";
|
||||
import takumiReq from "@/web/request/takumiReq.js";
|
||||
|
||||
type SignGameInfo = { title: string; icon: string; gid: number };
|
||||
type SignAccount = {
|
||||
selected: boolean;
|
||||
@@ -82,6 +81,8 @@ const loadSign = ref<boolean>(false);
|
||||
const signAccounts = ref<Array<SignAccount>>([]);
|
||||
const gameAccounts = shallowRef<Array<TGApp.Sqlite.Account.Game>>([]);
|
||||
|
||||
defineExpose({ tryAuto });
|
||||
|
||||
watch(
|
||||
() => uid.value,
|
||||
async () => await loadData(),
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
/>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { saveImgLocal } from "@utils/TGShare.js";
|
||||
import { computed, onMounted, onUnmounted, ref } from "vue";
|
||||
|
||||
import type { TpImage } from "./tp-image.vue";
|
||||
import VpOverlayImage from "./vp-overlay-image.vue";
|
||||
|
||||
import { saveImgLocal } from "@/utils/TGShare.js";
|
||||
|
||||
type TpCustomEmoticon = {
|
||||
insert: {
|
||||
backup_text: "[自定义表情]";
|
||||
|
||||
122
src/components/viewPost/tp-gameCard.vue
Normal file
122
src/components/viewPost/tp-gameCard.vue
Normal file
@@ -0,0 +1,122 @@
|
||||
<!-- 游戏卡片 -->
|
||||
<template>
|
||||
<div class="tp-game-card-box">
|
||||
<div class="icon">
|
||||
<img :src="props.data.insert.reception_card.icon" alt="icon" />
|
||||
</div>
|
||||
<div class="info">
|
||||
<span>{{ props.data.insert.reception_card.prompt }}</span>
|
||||
<span>{{ props.data.insert.reception_card.custom_toast }}</span>
|
||||
</div>
|
||||
<v-btn class="act" @click="toGame()">
|
||||
<span>查看</span>
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { openUrl } from "@tauri-apps/plugin-opener";
|
||||
|
||||
type TpGameCard = {
|
||||
insert: {
|
||||
backup_text: "[游戏卡片]";
|
||||
reception_card: {
|
||||
id: string;
|
||||
game_id: number;
|
||||
name: number;
|
||||
icon: string;
|
||||
game_reception_status: number;
|
||||
pre_register_count: { count: string };
|
||||
is_order: boolean;
|
||||
prompt: string;
|
||||
custom_toast: string;
|
||||
pkg: {
|
||||
android_url: string;
|
||||
pkg_name: string;
|
||||
pkg_version: string;
|
||||
ios_url: string;
|
||||
pkg_length: number;
|
||||
pkg_md5: string;
|
||||
pkg_version_code: number;
|
||||
ios_version: string;
|
||||
ios_scheme_url: string;
|
||||
};
|
||||
user_status: {
|
||||
is_device_support: boolean;
|
||||
pre_register_status: number;
|
||||
is_order: boolean;
|
||||
has_qualification: boolean;
|
||||
qualify_type: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
type TpGameCardProps = { data: TpGameCard };
|
||||
|
||||
const props = defineProps<TpGameCardProps>();
|
||||
|
||||
async function toGame(): Promise<void> {
|
||||
await openUrl(`https://www.miyoushe.com/ys/gameCenter/${props.data.insert.reception_card.id}`);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tp-game-card-box {
|
||||
position: relative;
|
||||
margin: 12px 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
column-gap: 12px;
|
||||
padding: 8px 16px;
|
||||
border-radius: 4px;
|
||||
background: var(--box-bg-1);
|
||||
border: 1px solid var(--common-shadow-1);
|
||||
}
|
||||
|
||||
.icon {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
|
||||
span {
|
||||
&:first-child {
|
||||
font-family: var(--font-title);
|
||||
color: var(--common-text-title);
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.act {
|
||||
height: 40px;
|
||||
background: var(--tgc-btn-1);
|
||||
color: var(--btn-text);
|
||||
font-family: var(--font-title);
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.dark .act {
|
||||
border: 1px solid var(--common-shadow-2);
|
||||
}
|
||||
</style>
|
||||
@@ -30,15 +30,14 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import showLoading from "@comp/func/loading.js";
|
||||
import useAppStore from "@store/app.js";
|
||||
import { saveImgLocal } from "@utils/TGShare.js";
|
||||
import { bytesToSize } from "@utils/toolFunc.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, onUnmounted, ref, watch } from "vue";
|
||||
|
||||
import VpOverlayImage from "./vp-overlay-image.vue";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
import { saveImgLocal } from "@/utils/TGShare.js";
|
||||
import { bytesToSize } from "@/utils/toolFunc.js";
|
||||
|
||||
export type TpImage = {
|
||||
insert: { image: string };
|
||||
attributes?: {
|
||||
|
||||
@@ -14,11 +14,10 @@
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { openUrl } from "@tauri-apps/plugin-opener";
|
||||
import { parseLink, parsePost } from "@utils/linkParser.js";
|
||||
import { computed, toRaw } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { parseLink, parsePost } from "@/utils/linkParser.js";
|
||||
|
||||
type TpLinkCard = {
|
||||
insert: {
|
||||
link_card: {
|
||||
|
||||
@@ -12,6 +12,7 @@ import type { Component } from "vue";
|
||||
import TpBackupText from "./tp-backupText.vue";
|
||||
import TpDivider from "./tp-divider.vue";
|
||||
import TpEmoticon from "./tp-emoticon.vue";
|
||||
import TpGameCard from "./tp-gameCard.vue";
|
||||
import TpImage from "./tp-image.vue";
|
||||
import TpLinkCard from "./tp-linkCard.vue";
|
||||
import TpMention from "./tp-mention.vue";
|
||||
@@ -97,7 +98,10 @@ function getTpName(tp: TGApp.BBS.SctPost.Base): Component {
|
||||
if ("custom_emoticon" in tp.insert) return TpEmoticon;
|
||||
// game_user_info属于backup_text的一种,必须放在backup_text判断的前面
|
||||
if ("game_user_info" in tp.insert) return TpUid;
|
||||
if ("backup_text" in tp.insert) return TpBackupText;
|
||||
if ("backup_text" in tp.insert) {
|
||||
if (tp.insert.backup_text === "[游戏卡片]") return TpGameCard;
|
||||
return TpBackupText;
|
||||
}
|
||||
if ("divider" in tp.insert) return TpDivider;
|
||||
if ("image" in tp.insert) return TpImage;
|
||||
if ("link_card" in tp.insert) return TpLinkCard;
|
||||
|
||||
@@ -21,13 +21,12 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import bbsReq from "@req/bbsReq.js";
|
||||
import { openUrl } from "@tauri-apps/plugin-opener";
|
||||
import { parseLink, parsePost } from "@utils/linkParser.js";
|
||||
import { isColorSimilar, decodeRegExp } from "@utils/toolFunc.js";
|
||||
import { onMounted, ref, shallowRef, StyleValue, toRaw } from "vue";
|
||||
|
||||
import { parseLink, parsePost } from "@/utils/linkParser.js";
|
||||
import { isColorSimilar, decodeRegExp } from "@/utils/toolFunc.js";
|
||||
import bbsReq from "@/web/request/bbsReq.js";
|
||||
|
||||
export type TpText = {
|
||||
insert: string;
|
||||
attributes?: {
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { onMounted, toRaw } from "vue";
|
||||
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
|
||||
type TpUnknownProps = { data: TGApp.BBS.SctPost.Empty };
|
||||
|
||||
const props = defineProps<TpUnknownProps>();
|
||||
|
||||
@@ -29,11 +29,10 @@
|
||||
<script lang="ts" setup>
|
||||
import Bili from "@Bili/index.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { saveImgLocal } from "@utils/TGShare.js";
|
||||
import { getVideoDuration, timestampToDate } from "@utils/toolFunc.js";
|
||||
import { onMounted, onUnmounted, ref, shallowRef } from "vue";
|
||||
|
||||
import { saveImgLocal } from "@/utils/TGShare.js";
|
||||
import { getVideoDuration, timestampToDate } from "@/utils/toolFunc.js";
|
||||
|
||||
type TpVideo = { insert: { video: string } };
|
||||
type TpVideoProps = { data: TpVideo };
|
||||
|
||||
|
||||
@@ -21,15 +21,14 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import showLoading from "@comp/func/loading.js";
|
||||
import useAppStore from "@store/app.js";
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { getImageBuffer, saveCanvasImg, saveImgLocal } from "@utils/TGShare.js";
|
||||
import { getVideoDuration } from "@utils/toolFunc.js";
|
||||
import Artplayer from "artplayer";
|
||||
import type { Option } from "artplayer/types/option.js";
|
||||
import { onMounted, onUnmounted, ref, shallowRef, toRaw } from "vue";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
import { getImageBuffer, saveCanvasImg, saveImgLocal } from "@/utils/TGShare.js";
|
||||
import { getVideoDuration } from "@/utils/toolFunc.js";
|
||||
|
||||
type TpVod = {
|
||||
insert: {
|
||||
vod: {
|
||||
|
||||
@@ -21,10 +21,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import ApiHubReq from "@req/apiHubReq.js";
|
||||
import { onMounted, ref, shallowRef } from "vue";
|
||||
|
||||
import ApiHubReq from "@/web/request/apiHubReq.js";
|
||||
|
||||
type TpVote = { insert: { vote: { id: string; uid: string } } };
|
||||
type TpVoteProps = { data: TpVote };
|
||||
type TpVoteData = { title: string; count: number; percent: number };
|
||||
@@ -126,6 +125,6 @@ function getWidth(item: TpVoteData): string {
|
||||
.tp-vote-val {
|
||||
height: 100%;
|
||||
border-radius: 5px;
|
||||
background: linear-gradient(to right, #6cf 0, #f09199 360px);
|
||||
background: linear-gradient(to right, #66ccff 0, #f09199 360px);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -14,14 +14,13 @@
|
||||
<script lang="ts" setup>
|
||||
import showDialog from "@comp/func/dialog.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TSUserCollection from "@Sqlite/modules/userCollect.js";
|
||||
import TSUserCollection from "@Sqlm/userCollect.js";
|
||||
import { event } from "@tauri-apps/api";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { onBeforeMount, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import VpOverlayCollect from "./vp-overlay-collect.vue";
|
||||
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
|
||||
type TbCollectProps = { modelValue: number; data?: TGApp.BBS.Post.FullData };
|
||||
|
||||
const props = defineProps<TbCollectProps>();
|
||||
|
||||
@@ -70,15 +70,14 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import postReq from "@req/postReq.js";
|
||||
import useAppStore from "@store/app.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import VpReplyDebug from "./vp-reply-debug.vue";
|
||||
import VpReplyItem from "./vp-reply-item.vue";
|
||||
|
||||
import { useAppStore } from "@/store/modules/app.js";
|
||||
import postReq from "@/web/request/postReq.js";
|
||||
|
||||
type TprMainProps = { gid: number; postId: string };
|
||||
type SelectItem = { label: string; value: string };
|
||||
const props = defineProps<TprMainProps>();
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showDialog from "@comp/func/dialog.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TSUserCollection from "@Sqlite/modules/userCollect.js";
|
||||
import TSUserCollection from "@Sqlm/userCollect.js";
|
||||
import { ref, shallowRef, watch } from "vue";
|
||||
|
||||
type ToPostCollectProps = { post?: TGApp.BBS.Post.FullData };
|
||||
|
||||
@@ -24,11 +24,10 @@
|
||||
<script lang="ts" setup>
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import TPostcard from "@comp/app/t-postcard.vue";
|
||||
import bbsReq from "@req/bbsReq.js";
|
||||
import postReq from "@req/postReq.js";
|
||||
import { nextTick, onMounted, shallowRef, useTemplateRef, watch } from "vue";
|
||||
|
||||
import bbsReq from "@/web/request/bbsReq.js";
|
||||
import postReq from "@/web/request/postReq.js";
|
||||
|
||||
type TpoCollectionProps = { collection: TGApp.BBS.Post.Collection; gid: number };
|
||||
|
||||
const props = defineProps<TpoCollectionProps>();
|
||||
|
||||
@@ -27,12 +27,11 @@
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import TPostcard from "@comp/app/t-postcard.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import painterReq from "@req/painterReq.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { ref, shallowRef, watch } from "vue";
|
||||
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import painterReq from "@/web/request/painterReq.js";
|
||||
|
||||
const { cookie } = storeToRefs(useUserStore());
|
||||
const visible = defineModel<boolean>();
|
||||
const offset = ref<number>();
|
||||
|
||||
@@ -38,13 +38,12 @@
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showLoading from "@comp/func/loading.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { copyToClipboard, getImageBuffer, saveCanvasImg } from "@utils/TGShare.js";
|
||||
import { bytesToSize } from "@utils/toolFunc.js";
|
||||
import { computed, nextTick, ref, shallowRef } from "vue";
|
||||
|
||||
import type { TpImage } from "./tp-image.vue";
|
||||
|
||||
import { copyToClipboard, getImageBuffer, saveCanvasImg } from "@/utils/TGShare.js";
|
||||
import { bytesToSize } from "@/utils/toolFunc.js";
|
||||
|
||||
type TpoImageProps = { image: TpImage };
|
||||
|
||||
const props = defineProps<TpoImageProps>();
|
||||
@@ -167,7 +166,7 @@ async function onDownload(): Promise<void> {
|
||||
border: 1px solid var(--tgc-od-white);
|
||||
border-radius: 4px;
|
||||
background-color: var(--common-shadow-2);
|
||||
color: white;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.tpoi-info-item {
|
||||
|
||||
@@ -38,10 +38,9 @@
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TpAvatar from "@comp/viewPost/tp-avatar.vue";
|
||||
import painterReq from "@req/painterReq.js";
|
||||
import { onUnmounted, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import painterReq from "@/web/request/painterReq.js";
|
||||
|
||||
type TpoLotteryProps = { lottery: string | undefined };
|
||||
type RenderCard = {
|
||||
id: string;
|
||||
|
||||
@@ -24,12 +24,11 @@
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import TPostCard from "@comp/app/t-postcard.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import postReq from "@req/postReq.js";
|
||||
import useBBSStore from "@store/bbs.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import useBBSStore from "@/store/modules/bbs.js";
|
||||
import postReq from "@/web/request/postReq.js";
|
||||
|
||||
type ToPostSearchProps = { gid: string; keyword?: string };
|
||||
|
||||
const { gameList } = storeToRefs(useBBSStore());
|
||||
|
||||
@@ -46,11 +46,10 @@ import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import TPostCard from "@comp/app/t-postcard.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import bbsReq from "@req/bbsReq.js";
|
||||
import postReq from "@req/postReq.js";
|
||||
import { computed, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import bbsReq from "@/web/request/bbsReq.js";
|
||||
import postReq from "@/web/request/postReq.js";
|
||||
|
||||
type ToPostUserProps = { gid: number; uid: string; postId?: string };
|
||||
|
||||
const props = defineProps<ToPostUserProps>();
|
||||
|
||||
@@ -17,12 +17,11 @@ import TOverlay from "@comp/app/t-overlay.vue";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { open } from "@tauri-apps/plugin-dialog";
|
||||
import { readTextFile } from "@tauri-apps/plugin-fs";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { ref, shallowRef } from "vue";
|
||||
|
||||
import TprReply from "./vp-reply-item.vue";
|
||||
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
|
||||
const visible = defineModel<boolean>();
|
||||
const filePath = ref<string>("");
|
||||
const replyData = shallowRef<TGApp.BBS.Reply.ReplyFull | null>(null);
|
||||
|
||||
@@ -103,18 +103,17 @@
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import showDialog from "@comp/func/dialog.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import postReq from "@req/postReq.js";
|
||||
import { event, path } from "@tauri-apps/api";
|
||||
import { emit, Event, UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { emit, type Event, type UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { save } from "@tauri-apps/plugin-dialog";
|
||||
import { writeTextFile } from "@tauri-apps/plugin-fs";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { getNearTime, timestampToDate } from "@utils/toolFunc.js";
|
||||
import { computed, onMounted, onUnmounted, ref, shallowRef, toRaw, watch } from "vue";
|
||||
|
||||
import TpParser from "./tp-parser.vue";
|
||||
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import { getNearTime, timestampToDate } from "@/utils/toolFunc.js";
|
||||
import postReq from "@/web/request/postReq.js";
|
||||
|
||||
type TprReplyProps =
|
||||
| { mode: "sub"; modelValue: TGApp.BBS.Reply.ReplyFull }
|
||||
| { mode: "main"; modelValue: TGApp.BBS.Reply.ReplyFull; pinId: string };
|
||||
|
||||
@@ -681,8 +681,11 @@
|
||||
"reward": 10,
|
||||
"version": "1.2",
|
||||
"trigger": {
|
||||
"type": "FINISH_QUEST_AND",
|
||||
"task": [{ "questId": 70102, "name": "腐殖之牙", "type": "世界任务" }]
|
||||
"type": "FINISH_QUEST_OR",
|
||||
"task": [
|
||||
{ "questId": 70102, "name": "腐殖之牙", "type": "世界任务" },
|
||||
{ "questId": 75197, "name": "腐殖之牙", "type": "世界任务" }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -12400,7 +12403,7 @@
|
||||
"description": "解开弈局中的所有谜题。",
|
||||
"reward": 5,
|
||||
"version": "5.6",
|
||||
"trigger": { "type": "Unknown" }
|
||||
"trigger": { "type": "COMBAT_CONFIG_COMMON" }
|
||||
},
|
||||
{
|
||||
"id": 82297,
|
||||
@@ -12410,7 +12413,7 @@
|
||||
"description": "连续使用冰元素进行攻击,阻碍「液流动量」的积累。",
|
||||
"reward": 5,
|
||||
"version": "5.6",
|
||||
"trigger": { "type": "Unknown" }
|
||||
"trigger": { "type": "COMBAT_CONFIG_COMMON" }
|
||||
},
|
||||
{
|
||||
"id": 84000,
|
||||
@@ -14834,7 +14837,7 @@
|
||||
"description": "与伙伴们一同抵御自雪山而来的魔物。",
|
||||
"reward": 5,
|
||||
"version": "5.6",
|
||||
"trigger": { "type": "Unknown" }
|
||||
"trigger": { "type": "FINISH_QUEST_AND" }
|
||||
},
|
||||
{
|
||||
"id": 84343,
|
||||
@@ -14844,7 +14847,7 @@
|
||||
"description": "通过魔女会设下的试炼。",
|
||||
"reward": 5,
|
||||
"version": "5.6",
|
||||
"trigger": { "type": "Unknown" }
|
||||
"trigger": { "type": "FINISH_QUEST_AND" }
|
||||
},
|
||||
{
|
||||
"id": 84344,
|
||||
@@ -14854,7 +14857,7 @@
|
||||
"description": "完成「悖理」。",
|
||||
"reward": 5,
|
||||
"version": "5.6",
|
||||
"trigger": { "type": "Unknown" }
|
||||
"trigger": { "type": "FINISH_QUEST_AND" }
|
||||
},
|
||||
{
|
||||
"id": 84501,
|
||||
|
||||
@@ -2465,7 +2465,7 @@
|
||||
},
|
||||
{
|
||||
"id": 13514,
|
||||
"contentId": 0,
|
||||
"contentId": 505323,
|
||||
"dropDays": [2, 5, 7],
|
||||
"name": "香韵奏者",
|
||||
"itemType": "weapon",
|
||||
@@ -3633,7 +3633,7 @@
|
||||
},
|
||||
{
|
||||
"id": 15432,
|
||||
"contentId": 0,
|
||||
"contentId": 505322,
|
||||
"dropDays": [1, 4, 7],
|
||||
"name": "冷寂迸音",
|
||||
"itemType": "weapon",
|
||||
|
||||
@@ -2664,5 +2664,60 @@
|
||||
"postId": "64170337",
|
||||
"up5List": [13514, 12512],
|
||||
"up4List": [11427, 12427, 13427, 15427, 14402]
|
||||
},
|
||||
{
|
||||
"name": "巡火猎秘",
|
||||
"version": "5.6",
|
||||
"order": 2,
|
||||
"banner": "https://sdk.hoyoverse.com/upload/ann/2025/05/09/6c41ce910b9b2fc8af3679a319448925_1239699432953303235.png",
|
||||
"from": "2025-05-27T18:00:00+08:00",
|
||||
"to": "2025-06-17T14:59:00+08:00",
|
||||
"type": 301,
|
||||
"postId": "64614233",
|
||||
"up5List": [10000101],
|
||||
"up4List": [10000050, 10000056, 10000083]
|
||||
},
|
||||
{
|
||||
"name": "影寂天下人",
|
||||
"version": "5.6",
|
||||
"order": 2,
|
||||
"banner": "https://sdk.hoyoverse.com/upload/ann/2025/05/09/814a42cec82961243591e619aab4b785_2378943652187334315.png",
|
||||
"from": "2025-05-27T18:00:00+08:00",
|
||||
"to": "2025-06-17T14:59:00+08:00",
|
||||
"type": 400,
|
||||
"postId": "64614234",
|
||||
"up5List": [10000052],
|
||||
"up4List": [10000050, 10000056, 10000083]
|
||||
},
|
||||
{
|
||||
"name": "神铸赋形",
|
||||
"version": "5.6",
|
||||
"order": 2,
|
||||
"banner": "https://sdk.hoyoverse.com/upload/ann/2025/05/09/c87c4ade57711ec466b78c857dba5ecf_6092058254131077827.png",
|
||||
"from": "2025-05-27T18:00:00+08:00",
|
||||
"to": "2025-06-17T14:59:00+08:00",
|
||||
"type": 302,
|
||||
"postId": "64614236",
|
||||
"up5List": [12513, 13509],
|
||||
"up4List": [11405, 12401, 13401, 14409, 15402]
|
||||
},
|
||||
{
|
||||
"name": "鸣雷贯天原",
|
||||
"version": "5.6",
|
||||
"order": 2,
|
||||
"banner": "https://sdk.hoyoverse.com/upload/ann/2025/05/09/2a3f0e2c17a8c8d05fffb9e1a4cb7208_5029805462550361538.png",
|
||||
"from": "2025-05-27T18:00:00+08:00",
|
||||
"to": "2025-06-17T14:59:00+08:00",
|
||||
"type": 500,
|
||||
"postId": "64614237",
|
||||
"up5List": [
|
||||
10000002, 10000066, 10000049, 10000094, 10000058, 10000057, 10000054, 10000047, 11514, 11510,
|
||||
11509, 11503, 12510, 14509, 14506, 15509
|
||||
],
|
||||
"up4List": [
|
||||
10000065, 10000061, 10000059, 10000056, 10000055, 10000053, 10000050, 11405, 11403, 11402,
|
||||
11401, 12416, 12405, 12403, 12402, 12401, 13416, 13407, 13401, 14409, 14403, 14402, 14401,
|
||||
15416, 15405, 15403, 15402, 15401
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
{ "id": 14504, "contentId": 1222, "name": "尘世之锁", "star": 5, "weapon": "法器" },
|
||||
{ "id": 14502, "contentId": 297, "name": "四风原典", "star": 5, "weapon": "法器" },
|
||||
{ "id": 14501, "contentId": 227, "name": "天空之卷", "star": 5, "weapon": "法器" },
|
||||
{ "id": 13514, "contentId": 0, "name": "香韵奏者", "star": 5, "weapon": "长柄武器" },
|
||||
{ "id": 13514, "contentId": 505323, "name": "香韵奏者", "star": 5, "weapon": "长柄武器" },
|
||||
{ "id": 13513, "contentId": 501725, "name": "柔灯挽歌", "star": 5, "weapon": "长柄武器" },
|
||||
{ "id": 13512, "contentId": 501137, "name": "赤月之形", "star": 5, "weapon": "长柄武器" },
|
||||
{ "id": 13511, "contentId": 4794, "name": "赤沙之杖", "star": 5, "weapon": "长柄武器" },
|
||||
@@ -56,7 +56,7 @@
|
||||
{ "id": 11503, "contentId": 2129, "name": "苍古自由之誓", "star": 5, "weapon": "单手剑" },
|
||||
{ "id": 11502, "contentId": 215, "name": "天空之刃", "star": 5, "weapon": "单手剑" },
|
||||
{ "id": 11501, "contentId": 293, "name": "风鹰剑", "star": 5, "weapon": "单手剑" },
|
||||
{ "id": 15432, "contentId": 0, "name": "冷寂迸音", "star": 4, "weapon": "弓" },
|
||||
{ "id": 15432, "contentId": 505322, "name": "冷寂迸音", "star": 4, "weapon": "弓" },
|
||||
{ "id": 15431, "contentId": 501964, "name": "碎链", "star": 4, "weapon": "弓" },
|
||||
{ "id": 15430, "contentId": 503391, "name": "缀花之翎", "star": 4, "weapon": "弓" },
|
||||
{ "id": 15427, "contentId": 7406, "name": "测距规", "star": 4, "weapon": "弓" },
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
<script lang="ts" setup>
|
||||
import TMiImg from "@comp/app/t-mi-img.vue";
|
||||
import ToArcBrith from "@comp/pageArchive/to-arcBrith.vue";
|
||||
import TGClient from "@utils/TGClient.js";
|
||||
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import { ArcBirDraw, ArcBirRole } from "@/data/index.js";
|
||||
import TGClient from "@/utils/TGClient.js";
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
|
||||
@@ -108,18 +108,17 @@ import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TuaDetail from "@comp/userAbyss/tua-detail.vue";
|
||||
import TuaOverview from "@comp/userAbyss/tua-overview.vue";
|
||||
import Hutao from "@Hutao/index.js";
|
||||
import TSUserAbyss from "@Sqlite/modules/userAbyss.js";
|
||||
import TSUserAvatar from "@Sqlite/modules/userAvatar.js";
|
||||
import recordReq from "@req/recordReq.js";
|
||||
import TSUserAbyss from "@Sqlm/userAbyss.js";
|
||||
import TSUserAvatar from "@Sqlm/userAvatar.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import { getVersion } from "@tauri-apps/api/app";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import TakumiRecordGenshinApi from "@/web/request/recordReq.js";
|
||||
|
||||
const router = useRouter();
|
||||
const { account, cookie, hutaoEmail } = storeToRefs(useUserStore());
|
||||
const userTab = ref<number>(0);
|
||||
@@ -211,7 +210,7 @@ async function refreshAbyss(): Promise<void> {
|
||||
}
|
||||
await TGLogger.Info("[UserAbyss][getAbyssData] 更新深渊数据");
|
||||
await showLoading.start(`正在获取${account.value.gameUid}的深渊数据`, "正在获取上期数据");
|
||||
const resP = await TakumiRecordGenshinApi.spiralAbyss(cookie.value, account.value, "2");
|
||||
const resP = await recordReq.spiralAbyss(cookie.value, account.value, "2");
|
||||
if ("retcode" in resP) {
|
||||
await showLoading.end();
|
||||
showSnackbar.error(`[${resP.retcode}]${resP.message}`);
|
||||
@@ -225,7 +224,7 @@ async function refreshAbyss(): Promise<void> {
|
||||
await showLoading.update("正在保存上期深渊数据");
|
||||
await TSUserAbyss.saveAbyss(account.value.gameUid, resP);
|
||||
await showLoading.update("正在获取本期深渊数据");
|
||||
const res = await TakumiRecordGenshinApi.spiralAbyss(cookie.value, account.value, "1");
|
||||
const res = await recordReq.spiralAbyss(cookie.value, account.value, "1");
|
||||
if ("retcode" in res) {
|
||||
await showLoading.end();
|
||||
showSnackbar.error(`[${res.retcode}]${res.message}`);
|
||||
|
||||
@@ -113,17 +113,17 @@ import showSnackbar from "@comp/func/snackbar.js";
|
||||
import TwoSelectC, { type SelectedCValue } from "@comp/pageWiki/two-select-c.vue";
|
||||
import TuaAvatarBox from "@comp/userAvatar/tua-avatar-box.vue";
|
||||
import TuaDetailOverlay from "@comp/userAvatar/tua-detail-overlay.vue";
|
||||
import TSUserAvatar from "@Sqlite/modules/userAvatar.js";
|
||||
import recordReq from "@req/recordReq.js";
|
||||
import TSUserAvatar from "@Sqlm/userAvatar.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import { getVersion } from "@tauri-apps/api/app";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { generateShareImg } from "@utils/TGShare.js";
|
||||
import { getZhElement, timestampToDate } from "@utils/toolFunc.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, ref, shallowRef, watch } from "vue";
|
||||
|
||||
import { AppCharacterData } from "@/data/index.js";
|
||||
import { useUserStore } from "@/store/modules/user.js";
|
||||
import TGLogger from "@/utils/TGLogger.js";
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import { getZhElement, timestampToDate } from "@/utils/toolFunc.js";
|
||||
import TakumiRecordGenshinApi from "@/web/request/recordReq.js";
|
||||
|
||||
type TabItem = { label: string; value: string };
|
||||
type OverviewItem = { element: string; cnt: number; label: string };
|
||||
@@ -286,7 +286,7 @@ async function refresh(): Promise<void> {
|
||||
await showLoading.start(`正在更新${account.value.gameUid}的角色数据`);
|
||||
loadData.value = true;
|
||||
await showLoading.update("正在刷新首页数据");
|
||||
const indexRes = await TakumiRecordGenshinApi.index(cookie.value, account.value, 1);
|
||||
const indexRes = await recordReq.index(cookie.value, account.value, 1);
|
||||
if ("retcode" in indexRes) {
|
||||
showSnackbar.error(`[${indexRes.retcode}] ${indexRes.message}`);
|
||||
await TGLogger.Error(JSON.stringify(indexRes.message));
|
||||
@@ -295,7 +295,7 @@ async function refresh(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
await showLoading.update("正在获取角色列表");
|
||||
const listRes = await TakumiRecordGenshinApi.character.list(cookie.value, account.value);
|
||||
const listRes = await recordReq.character.list(cookie.value, account.value);
|
||||
if (!Array.isArray(listRes)) {
|
||||
showSnackbar.error(`[${listRes.retcode}] ${listRes.message}`);
|
||||
await TGLogger.Error(`[Character][refreshRoles][${account.value.gameUid}] 获取角色列表失败`);
|
||||
@@ -308,7 +308,7 @@ async function refresh(): Promise<void> {
|
||||
}
|
||||
const idList = listRes.map((i) => i.id.toString());
|
||||
await showLoading.update(`共${idList.length}个角色`);
|
||||
const res = await TakumiRecordGenshinApi.character.detail(cookie.value, account.value, idList);
|
||||
const res = await recordReq.character.detail(cookie.value, account.value, idList);
|
||||
if ("retcode" in res) {
|
||||
showSnackbar.error(`[${res.retcode}] ${res.message}`);
|
||||
await TGLogger.Error(`[Character][refreshRoles][${account.value.gameUid}] 获取角色数据失败`);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user