Compare commits

...

16 Commits

Author SHA1 Message Date
BTMuli
6068821f89 🚀 v0.3.1 版本更新 2023-09-15 19:49:51 +08:00
BTMuli
0c95648dc6 🔧 还是得加上不然打包不了 2023-09-15 18:51:47 +08:00
BTMuli
55901ee680 检测更新,自动弹出 Changelog 2023-09-15 18:28:48 +08:00
BTMuli
7513643e02 💚 配置微改 2023-09-15 18:14:46 +08:00
BTMuli
42cf8bfd9c 🔨 添加 icon 2023-09-15 18:02:03 +08:00
BTMuli
17457169fd 🔥 关闭 updater,已经有 MS Store 了 2023-09-15 17:31:36 +08:00
BTMuli
0c2d4d0b89 🐛 应用初次加载也加载数据库,完善数据库 load #40 2023-09-15 17:30:07 +08:00
BTMuli
a7dd069930 🚚 tauri-genshin → Teyvat Guide 2023-09-15 17:19:33 +08:00
BTMuli
f907c798bc 📝 添加微软商店链接 2023-09-15 16:48:47 +08:00
BTMuli
8abeeb8c8f 🐛 尝试修复 action 报错 2023-09-11 13:51:21 +08:00
BTMuli
8a11dd6919 💄 修复 dark mode 下字体不清晰问题 2023-09-11 13:09:33 +08:00
BTMuli
4e23970a6c 🐛 获取延时,以避免 -110 报错 2023-09-10 18:22:40 +08:00
BTMuli
61287e3297 🌱 开始开发 0.3.1 2023-09-10 18:22:00 +08:00
BTMuli
a0d9f38f79 🐛 修复 targets 错误 2023-09-08 11:16:48 +08:00
BTMuli
40e0157443 🐛 修复 Frontmatter 错误 2023-09-08 11:01:26 +08:00
BTMuli
00cecf593a 🍱 v0.3.0 2023-09-08 10:52:02 +08:00
34 changed files with 635 additions and 547 deletions

View File

@@ -42,8 +42,8 @@ jobs:
- uses: tauri-apps/tauri-action@dev - uses: tauri-apps/tauri-action@dev
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} # TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} # TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with: with:
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: v__VERSION__-beta releaseName: v__VERSION__-beta

View File

@@ -2,12 +2,34 @@
Author: 目棃 Author: 目棃
Date: 2023-09-08 Date: 2023-09-08
Description: CHANGELOG Description: CHANGELOG
Update: 2023-09-08 Update: 2023-09-15
--- ---
> 本文档 [`Front-matter`](https://github.com/BTMuli/Mucli#FrontMatter) 由 [MuCli](https://github.com/BTMuli/Mucli) 自动生成于 `2023-09-08 09:45:17 ` > 本文档 [`Front-matter`](https://github.com/BTMuli/Mucli#FrontMatter) 由 [MuCli](https://github.com/BTMuli/Mucli) 自动生成于 `2023-09-08 09:45:17 `
> >
> 更新于 `2023-09-08 09:45:17` > 更新于 `2023-09-15 19:43:50`
## [0.3.1](https://github.com/BTMuli/TeyvatGuide/releases/v0.3.1) (2023-09-15)
### Feat
- 正式上架微软商店 <a href="https://apps.microsoft.com/store/detail/9NLBNNNBNSJN?launch=true&cid=BTMuli&mode=mini">
<img src="https://get.microsoft.com/images/zh-cn%20dark.svg" alt="download"/>
</a>
- 首页:检测到版本更新时,会弹出更新页面
### Fix
- 修复祈愿记录获取失败的问题 [`#38`](https://github.com/BTMuli/TeyvatGuide/issues/38)
- 修复应用初始化加载数据库失败的问题 [`#40`](https://github.com/BTMuli/TeyvatGuide/issues/40)
- 修复 Github action 构建失败的问题
### Change
- 应用:关闭 Tauri 自带的自动更新功能,依赖微软商店的更新机制
- 应用:更改应用名称,`Tauri.Genshin` -> `Teyvat Guide`
FullCommits: [`v0.3.0...v0.3.1`](https://github.com/BTMuli/TeyvatGuide/compare/v0.3.0...v0.3.1)
## [0.3.0](https://github.com/BTMuli/Tauri.Genshin/releases/v0.3.0) (2023-09-08) ## [0.3.0](https://github.com/BTMuli/Tauri.Genshin/releases/v0.3.0) (2023-09-08)

View File

@@ -1,20 +1,19 @@
--- ---
Author: 目棃 Author: 目棃
Date: 2023-03-05
Description: 说明文档 Description: 说明文档
Update: 2023-09-08 Date: 2023-03-05
Update: 2023-09-15
--- ---
> 本文档 [`Front-matter`](https://github.com/BTMuli/Mucli#FrontMatter) 由 [MuCli](https://github.com/BTMuli/Mucli) 自动生成于 `undefined` > 本文档 [`Frontmatter`](https://github.com/BTMuli/MuCli#Frontmatter) 由 [MuCli](https://github.com/BTMuli/Mucli) 自动生成于 `2023-03-05 14:41:55`
> >
> 更新于 `2023-09-08 09:44:24` > 更新于 `2023-09-15 19:07:25`
> 更新于 `2023-08-31 11:14:51`
![](https://img.shields.io/github/last-commit/BTMuli/Tauri.Genshin?style=for-the-badge) ![](https://img.shields.io/github/commits-since/BTMuli/Tauri.Genshin/latest?include_prereleases&style=for-the-badge) ![](https://img.shields.io/github/last-commit/BTMuli/TeyvatGuide?style=for-the-badge) ![](https://img.shields.io/github/commits-since/BTMuli/TeyvatGuide/latest?include_prereleases&style=for-the-badge)
![](https://img.shields.io/badge/UIAF-v1.1-orange?style=for-the-badge) ![](https://img.shields.io/badge/UIGF-v2.3-red?style=for-the-badge) ![](https://img.shields.io/github/license/BTMuli/Tauri.Genshin?style=for-the-badge) ![](https://img.shields.io/badge/UIAF-v1.1-orange?style=for-the-badge) ![](https://img.shields.io/badge/UIGF-v2.3-red?style=for-the-badge) ![](https://img.shields.io/github/license/BTMuli/TeyvatGuide?style=for-the-badge)
# Tauri.Genshin # Teyvat Guide
基于 Tauri 的原神助手应用。 基于 Tauri 的原神助手应用。
@@ -36,9 +35,15 @@ A Genshin Impact assistant app based on Tauri.
## 下载 / Download ## 下载 / Download
应用仅支持 Windows x64 平台,如需其他平台请自行编译 > 程序已经通过微软商店审核,可以直接在商店下载
[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/BTMuli/Tauri.Genshin?include_prereleases&style=for-the-badge)](https://github.com/BTMuli/Tauri.Genshin/releases/latest) <a href="https://apps.microsoft.com/store/detail/9NLBNNNBNSJN?launch=true&cid=BTMuli&mode=mini">
<img src="https://get.microsoft.com/images/zh-cn%20dark.svg" alt="download"/>
</a>
> 不推荐通过 GitHub Release 下载,但仍保留了该功能。
[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/BTMuli/TeyvatGuide?include_prereleases&style=for-the-badge)](https://github.com/BTMuli/TeyvatGuide/releases/latest)
## 技术栈 / Tech Stack ## 技术栈 / Tech Stack

View File

@@ -1,11 +0,0 @@
{
"version": "0.2.3",
"notes": "https://github.com/BTMuli/Tauri.Genshin/releases/tag/v0.2.3",
"pub_date": "2023-08-31T03:45:54.050Z",
"platforms": {
"windows-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVSWkdzekNNZjh1aGpiYTMxZkxtaU1HQzRRcFJQWngyaTdzZUpBMjZrak5QZ3JTbXBOV1JySG1FcmlQTDVlM2kwK08xeEZRYVZLZUdMWlRNaXFJdXVsSEloTm8rMjBxUUFnPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNjkzNDUzNTM4CWZpbGU6dGF1cmktZ2Vuc2hpbl8wLjIuM194NjRfemgtQ04ubXNpLnppcApZZzZMSDlRZDlMZ3VWd1BORUlOL2l3WXBKd2JSajFtVzVwR01Wd2NFUHJ1OUkwT2JVYi9NVFFTQ0x0NDlvUkxXejFhZTVZdUhuM0lSSXZkbGpaVExDdz09Cg==",
"url": "https://github.com/BTMuli/Tauri.Genshin/releases/download/v0.2.3/tauri-genshin_0.2.3_x64_zh-CN.msi.zip"
}
}
}

View File

@@ -1,10 +1,10 @@
{ {
"name": "tauri-genshin", "name": "TeyvatGuide",
"description": "A Genshin Tool build with Tauri", "description": "A Genshin Tool build with Tauri",
"private": true, "private": true,
"version": "0.3.0", "version": "0.3.1",
"author": "BTMuli <bt-muli@outlook.com>", "author": "BTMuli <bt-muli@outlook.com>",
"packageManager": "pnpm@8.7.4", "packageManager": "pnpm@8.7.5",
"scripts": { "scripts": {
"build": "tauri build", "build": "tauri build",
"debug": "tauri build --debug", "debug": "tauri build --debug",
@@ -17,6 +17,7 @@
"lint:style:fix": "pnpm lint:style --fix", "lint:style:fix": "pnpm lint:style --fix",
"prettier": "prettier . --write", "prettier": "prettier . --write",
"tauri": "tauri", "tauri": "tauri",
"tauri:icon": "tauri icon ./public/icon.png",
"vite:dev": "vite dev", "vite:dev": "vite dev",
"vite:build": "vite build", "vite:build": "vite build",
"prepare": "husky install" "prepare": "husky install"
@@ -27,12 +28,12 @@
"*.{ts,vue,css,yml,json,md}": "prettier --write" "*.{ts,vue,css,yml,json,md}": "prettier --write"
}, },
"bugs": { "bugs": {
"url": "https://github.com/BTMuli/Tauri.Genshin/issues" "url": "https://github.com/BTMuli/TeyvatGuide/issues"
}, },
"directories": { "directories": {
"doc": "docs" "doc": "docs"
}, },
"homepage": "https://github.com/BTMuli/Tauri.Genshin#readme", "homepage": "https://github.com/BTMuli/TeyvatGuide#readme",
"keywords": [ "keywords": [
"Tauri", "Tauri",
"Node", "Node",
@@ -44,7 +45,7 @@
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/BTMuli/Tauri.Genshin.git" "url": "https://github.com/BTMuli/TeyvatGuide.git"
}, },
"dependencies": { "dependencies": {
"@mdi/font": "7.2.96", "@mdi/font": "7.2.96",
@@ -57,7 +58,7 @@
"pinia": "^2.1.6", "pinia": "^2.1.6",
"pinia-plugin-persistedstate": "^3.2.0", "pinia-plugin-persistedstate": "^3.2.0",
"qrcode.vue": "^3.4.1", "qrcode.vue": "^3.4.1",
"tauri-plugin-sql-api": "github:tauri-apps/tauri-plugin-sql#v1", "tauri-plugin-sql-api": "https://github.com/tauri-apps/tauri-plugin-sql#v1",
"vue": "^3.3.4", "vue": "^3.3.4",
"vue-echarts": "^6.6.1", "vue-echarts": "^6.6.1",
"vue-json-viewer": "^3.0.4", "vue-json-viewer": "^3.0.4",

945
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 48 KiB

43
src-tauri/Cargo.lock generated
View File

@@ -2,6 +2,17 @@
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3 version = 3
[[package]]
name = "TeyvatGuide"
version = "0.3.1"
dependencies = [
"serde",
"serde_json",
"tauri",
"tauri-build",
"tauri-plugin-sql",
]
[[package]] [[package]]
name = "addr2line" name = "addr2line"
version = "0.21.0" version = "0.21.0"
@@ -2069,12 +2080,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "minisign-verify"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881"
[[package]] [[package]]
name = "miniz_oxide" name = "miniz_oxide"
version = "0.7.1" version = "0.7.1"
@@ -3964,7 +3969,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fbe522898e35407a8e60dc3870f7579fea2fc262a6a6072eccdd37ae1e1d91e" checksum = "7fbe522898e35407a8e60dc3870f7579fea2fc262a6a6072eccdd37ae1e1d91e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64 0.21.3",
"bytes", "bytes",
"cocoa", "cocoa",
"dirs-next", "dirs-next",
@@ -3978,7 +3982,6 @@ dependencies = [
"heck 0.4.1", "heck 0.4.1",
"http", "http",
"ignore", "ignore",
"minisign-verify",
"notify-rust", "notify-rust",
"objc", "objc",
"once_cell", "once_cell",
@@ -4006,14 +4009,12 @@ dependencies = [
"tauri-utils", "tauri-utils",
"tempfile", "tempfile",
"thiserror", "thiserror",
"time",
"tokio", "tokio",
"url", "url",
"uuid", "uuid",
"webkit2gtk", "webkit2gtk",
"webview2-com", "webview2-com",
"windows 0.39.0", "windows 0.39.0",
"zip",
] ]
[[package]] [[package]]
@@ -4059,17 +4060,6 @@ dependencies = [
"walkdir", "walkdir",
] ]
[[package]]
name = "tauri-genshin"
version = "0.3.0"
dependencies = [
"serde",
"serde_json",
"tauri",
"tauri-build",
"tauri-plugin-sql",
]
[[package]] [[package]]
name = "tauri-macros" name = "tauri-macros"
version = "1.4.0" version = "1.4.0"
@@ -5314,17 +5304,6 @@ version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9"
[[package]]
name = "zip"
version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
dependencies = [
"byteorder",
"crc32fast",
"crossbeam-utils",
]
[[package]] [[package]]
name = "zvariant" name = "zvariant"
version = "3.15.0" version = "3.15.0"

View File

@@ -1,10 +1,10 @@
[package] [package]
name = "tauri-genshin" name = "TeyvatGuide"
version = "0.3.0" version = "0.3.1"
description = "A Genshin Tool build with Tauri" description = "A Genshin Tool build with Tauri"
authors = ["BTMuli<bt-muli@outlook.com>"] authors = ["BTMuli<bt-muli@outlook.com>"]
license = "MIT" license = "MIT"
repository = "https://github.com/BTMuli/Tauri.Genshin" repository = "https://github.com/BTMuli/TeyvatGuide"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -13,7 +13,7 @@ edition = "2021"
tauri-build = { version = "1.4", features = [] } tauri-build = { version = "1.4", features = [] }
[dependencies] [dependencies]
tauri = { version = "1.4", features = ["api-all", "updater"] } tauri = { version = "1.4", features = ["api-all"] }
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"

BIN
src-tauri/icons/128x128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
src-tauri/icons/32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
src-tauri/icons/icon.icns Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 209 KiB

View File

@@ -7,7 +7,7 @@ fn main() {
tauri::Builder::default() tauri::Builder::default()
.plugin(tauri_plugin_sql::Builder::default().build()) .plugin(tauri_plugin_sql::Builder::default().build())
.setup(|_app| { .setup(|_app| {
let _window = _app.get_window("tauri-genshin").unwrap(); let _window = _app.get_window("TeyvatGuide").unwrap();
#[cfg(debug_assertions)] // only include this code on debug builds #[cfg(debug_assertions)] // only include this code on debug builds
_window.open_devtools(); // open the devtools on startup _window.open_devtools(); // open the devtools on startup
Ok(()) Ok(())

View File

@@ -7,8 +7,8 @@
"withGlobalTauri": true "withGlobalTauri": true
}, },
"package": { "package": {
"productName": "tauri-genshin", "productName": "TeyvatGuide",
"version": "0.3.0" "version": "0.3.1"
}, },
"tauri": { "tauri": {
"allowlist": { "allowlist": {
@@ -46,8 +46,26 @@
}, },
"bundle": { "bundle": {
"active": true, "active": true,
"icon": ["icons/icon.png", "icons/icon.ico"], "icon": [
"identifier": "tauri-genshin", "icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico",
"icons/icon.png",
"icons/Square30x30Logo.png",
"icons/Square44x44Logo.png",
"icons/Square71x71Logo.png",
"icons/Square89x89Logo.png",
"icons/Square107x107Logo.png",
"icons/Square142x142Logo.png",
"icons/Square150x150Logo.png",
"icons/Square284x284Logo.png",
"icons/Square310x310Logo.png",
"icons/StoreLogo.png"
],
"identifier": "TeyvatGuide",
"targets": ["msi"],
"windows": { "windows": {
"wix": { "wix": {
"language": "zh-CN" "language": "zh-CN"
@@ -58,11 +76,11 @@
"csp": null "csp": null
}, },
"updater": { "updater": {
"active": true, "active": false,
"dialog": true, "dialog": true,
"endpoints": [ "endpoints": [
"https://raw.fastgit.org/BTMuli/Tauri.Genshin/master/latest.json", "https://raw.fastgit.org/BTMuli/TeyvatGuide/master/latest.json",
"https://raw.kgithub.com/BTMuli/Tauri.Genshin/master/latest.json" "https://raw.kgithub.com/BTMuli/TeyvatGuide/master/latest.json"
], ],
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDg2MkVGRjMxQzJDQzFBNTkKUldSWkdzekNNZjh1aHJGRXBEOGtwbUxLaU1wdWNVeUJaeGhoV2ZlZ3VlYmQ0b2tYZWQwODdnTHkK" "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDg2MkVGRjMxQzJDQzFBNTkKUldSWkdzekNNZjh1aHJGRXBEOGtwbUxLaU1wdWNVeUJaeGhoV2ZlZ3VlYmQ0b2tYZWQwODdnTHkK"
}, },
@@ -70,8 +88,8 @@
{ {
"fullscreen": false, "fullscreen": false,
"resizable": true, "resizable": true,
"title": "Tauri.Genshin", "title": "Teyvat Guide",
"label": "tauri-genshin", "label": "TeyvatGuide",
"width": 1600, "width": 1600,
"height": 900, "height": 900,
"center": true, "center": true,

View File

@@ -22,6 +22,7 @@ import { useAppStore } from "./store/modules/app";
// utils // utils
import { getEmojis } from "./plugins/Mys/request/getEmojis"; import { getEmojis } from "./plugins/Mys/request/getEmojis";
import showSnackbar from "./components/func/snackbar"; import showSnackbar from "./components/func/snackbar";
import TGSqlite from "./plugins/Sqlite";
const appStore = useAppStore(); const appStore = useAppStore();
const isMain = ref<boolean>(false); const isMain = ref<boolean>(false);
@@ -30,9 +31,9 @@ const theme = ref<string>(appStore.theme);
onBeforeMount(async () => { onBeforeMount(async () => {
// 获取当前窗口 // 获取当前窗口
const win = window.getCurrent(); const win = window.getCurrent();
isMain.value = win.label === "tauri-genshin"; isMain.value = win.label === "TeyvatGuide";
if (isMain.value) { if (isMain.value) {
const title = "Tauri.Genshin v" + (await app.getVersion()) + " Beta"; const title = "Teyvat Guide v" + (await app.getVersion()) + " Beta";
await win.setTitle(title); await win.setTitle(title);
await emojiLoad(); await emojiLoad();
await checkLoad(); await checkLoad();
@@ -76,6 +77,7 @@ async function checkLoad(): Promise<void> {
return; return;
} }
await createDataDir(); await createDataDir();
await initData();
appStore.loading = true; appStore.loading = true;
console.info("数据加载完成!"); console.info("数据加载完成!");
} }
@@ -89,6 +91,14 @@ async function createDataDir(): Promise<void> {
} }
console.info("数据文件夹创建完成!"); console.info("数据文件夹创建完成!");
} }
// 初始化数据库
async function initData(): Promise<void> {
await TGSqlite.reset();
showSnackbar({
text: "已成功初始化数据库!",
});
}
</script> </script>
<style lang="css"> <style lang="css">
.app-container { .app-container {

View File

@@ -139,14 +139,18 @@ async function confirmRefresh(): Promise<void> {
loadingTitle.value = "数据获取完成,即将刷新页面"; loadingTitle.value = "数据获取完成,即将刷新页面";
loadingSub.value = ""; loadingSub.value = "";
loading.value = false; loading.value = false;
setTimeout(() => { await new Promise((resolve) => {
window.location.reload(); setTimeout(() => {
}, 1000); resolve("");
}, 1000);
});
window.location.reload();
} }
// 获取祈愿数据并写入数据库 // 获取祈愿数据并写入数据库
async function getGachaLogs(pool: string, endId: string = "0"): Promise<void> { async function getGachaLogs(pool: string, endId: string = "0"): Promise<void> {
const gachaRes = await TGRequest.User.getGachaLog(authkey.value, pool, endId); const gachaRes = await TGRequest.User.getGachaLog(authkey.value, pool, endId);
console.log(pool, endId, gachaRes);
if (Array.isArray(gachaRes)) { if (Array.isArray(gachaRes)) {
const uigfList: TGApp.Plugins.UIGF.GachaItem[] = []; const uigfList: TGApp.Plugins.UIGF.GachaItem[] = [];
gachaRes.forEach((item) => { gachaRes.forEach((item) => {
@@ -173,8 +177,18 @@ async function getGachaLogs(pool: string, endId: string = "0"): Promise<void> {
}); });
await TGSqlite.mergeUIGF(account.gameUid, uigfList); await TGSqlite.mergeUIGF(account.gameUid, uigfList);
if (gachaRes.length === 20) { if (gachaRes.length === 20) {
await new Promise((resolve) => {
setTimeout(() => {
resolve("");
}, 1000);
});
await getGachaLogs(pool, gachaRes[gachaRes.length - 1].id); await getGachaLogs(pool, gachaRes[gachaRes.length - 1].id);
} }
} else {
showSnackbar({
color: "error",
text: `[${pool}][${gachaRes.retcode}] ${gachaRes.message}`,
});
} }
} }

View File

@@ -51,7 +51,6 @@
margin: '10px', margin: '10px',
borderRadius: '10px 50px 50px 10px', borderRadius: '10px 50px 50px 10px',
border: '1px solid var(--common-shadow-2)', border: '1px solid var(--common-shadow-2)',
color: 'var(--tgc-dark-6)',
fontFamily: 'var(--font-title)', fontFamily: 'var(--font-title)',
cursor: 'pointer', cursor: 'pointer',
position: 'relative', position: 'relative',

View File

@@ -21,7 +21,7 @@
<v-btn <v-btn
size="small" size="small"
variant="outlined" variant="outlined"
@click="toOuter('https://github.com/BTMuli/Tauri.Genshin/releases/latest')" @click="toOuter('https://github.com/BTMuli/TeyvatGuide/releases/latest')"
> >
BETA BETA
</v-btn> </v-btn>
@@ -221,7 +221,14 @@ onMounted(async () => {
loadingSub.value = "正在获取系统版本"; loadingSub.value = "正在获取系统版本";
osVersion.value = await os.version(); osVersion.value = await os.version();
loadingSub.value = "正在获取数据库信息"; loadingSub.value = "正在获取数据库信息";
dbInfo.value = await TGSqlite.getAppData(); try {
dbInfo.value = await TGSqlite.getAppData();
} catch (e) {
showSnackbar({
text: "加载数据库错误,请重置数据库!",
color: "error",
});
}
loadingSub.value = ""; loadingSub.value = "";
loading.value = false; loading.value = false;
}); });
@@ -385,6 +392,7 @@ async function confirmRestore(): Promise<void> {
} }
loadingSub.value = "正在恢复祈愿数据"; loadingSub.value = "正在恢复祈愿数据";
res = await restoreCookieData(); res = await restoreCookieData();
userStore.cookie = await TGSqlite.getCookie();
if (!res) { if (!res) {
fail.push("Cookie"); fail.push("Cookie");
} }

View File

@@ -17,6 +17,7 @@ import { useHomeStore } from "../../store/modules/home";
import { useAppStore } from "../../store/modules/app"; import { useAppStore } from "../../store/modules/app";
// utils // utils
import { getBuildTime } from "../../utils/TGBuild"; import { getBuildTime } from "../../utils/TGBuild";
import showConfirm from "../../components/func/confirm";
// store // store
const appStore = useAppStore(); const appStore = useAppStore();
@@ -54,7 +55,6 @@ onMounted(async () => {
if (!appStore.devEnv && appStore.devMode) { if (!appStore.devEnv && appStore.devMode) {
appStore.devMode = false; appStore.devMode = false;
} }
appStore.buildTime = getBuildTime();
const showItems = homeStore.getShowValue(); const showItems = homeStore.getShowValue();
await Promise.allSettled( await Promise.allSettled(
showItems.map((item) => { showItems.map((item) => {
@@ -71,6 +71,16 @@ onMounted(async () => {
}), }),
); );
timer.value = setInterval(readLoading, 100); timer.value = setInterval(readLoading, 100);
if (appStore.buildTime !== getBuildTime() && !appStore.devEnv) {
const confirm = await showConfirm({
title: "检测到版本更新",
text: "请到设置页手动更新版本,即将弹出更新说明子页面",
});
if (confirm) {
appStore.buildTime = getBuildTime();
}
window.open("https://app.btmuli.ink/docs/Changelogs.html");
}
}); });
function setItemRef(item: any): void { function setItemRef(item: any): void {

View File

@@ -2,7 +2,7 @@
* @file plugins Sqlite index.ts * @file plugins Sqlite index.ts
* @description Sqlite 数据库操作类 * @description Sqlite 数据库操作类
* @author BTMuli<bt-muli@outlook.com> * @author BTMuli<bt-muli@outlook.com>
* @since Beta v0.3.0 * @since Beta v0.3.1
*/ */
// tauri // tauri
@@ -27,7 +27,7 @@ class Sqlite {
* @since Alpha v0.2.0 * @since Alpha v0.2.0
* @private * @private
*/ */
private readonly dbPath: string = "sqlite:tauri-genshin.db"; private readonly dbPath: string = "sqlite:TeyvatGuide.db";
/** /**
* @description 数据库包含的表 * @description 数据库包含的表
* @since Alpha v0.2.3 * @since Alpha v0.2.3

View File

@@ -2,7 +2,7 @@
* @file store modules app.ts * @file store modules app.ts
* @description App store module * @description App store module
* @author BTMuli <bt-muli@outlook.com> * @author BTMuli <bt-muli@outlook.com>
* @since Beta v0.3.0 * @since Beta v0.3.1
*/ */
// vue // vue
@@ -15,7 +15,7 @@ import { path } from "@tauri-apps/api";
// 用于存储用户数据的路径 // 用于存储用户数据的路径
const userDataDir = `${await path.appLocalDataDir()}userData`; const userDataDir = `${await path.appLocalDataDir()}userData`;
// 用于存放数据库的路径 // 用于存放数据库的路径
const dbDataPath = `${await path.appConfigDir()}tauri-genshin.db`; const dbDataPath = `${await path.appConfigDir()}TeyvatGuide.db`;
export const useAppStore = defineStore( export const useAppStore = defineStore(
"app", "app",