mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-16 04:03:17 +08:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cfd47c36b | ||
|
|
fcc5d3db15 | ||
|
|
2f19691a57 | ||
|
|
83ddadd451 | ||
|
|
b965cccbf1 | ||
|
|
8b60a7f8dd | ||
|
|
04c9907490 | ||
|
|
adef358534 | ||
|
|
fcdad22d94 | ||
|
|
bbc142ac2d | ||
|
|
7169bc202e |
@@ -1,3 +1,3 @@
|
||||
VITE_SENTRY_RELEASE=TeyvatGuide@0.9.6
|
||||
VITE_COMMIT_HASH=40ffb41f
|
||||
VITE_BUILD_TIME=1772034641
|
||||
VITE_SENTRY_RELEASE=TeyvatGuide@0.9.7
|
||||
VITE_COMMIT_HASH=fcc5d3db
|
||||
VITE_BUILD_TIME=1772101907
|
||||
|
||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -2,12 +2,20 @@
|
||||
Author: 目棃
|
||||
Description: CHANGELOG
|
||||
Date: 2025-09-09
|
||||
Update: 2026-02-25
|
||||
Update: 2026-02-26
|
||||
---
|
||||
|
||||
> 本文档 [`Frontmatter`](https://github.com/BTMuli/MuCli#Frontmatter) 由 [MuCli](https://github.com/BTMuli/Mucli) 自动生成于 `2025-09-09 14:30:56`
|
||||
>
|
||||
> 更新于 `2026-02-25 23:50:25`
|
||||
> 更新于 `2026-02-26 18:31:44`
|
||||
|
||||
## [0.9.7](https://github.com/BTMuli/TeyvatGuide/releases/v0.9.7) (2026-02-26)
|
||||
|
||||
- 🐛 修复脚本页面账号切换异常
|
||||
- 🚸 调整游戏安装目录选取逻辑,调整大小写处理 [`#219`](https://github.com/BTMuli/TeyvatGuide/issues/219)
|
||||
- 💄 替换部分侧边栏图标
|
||||
- 💄 调整浅色模式下滚动条可见度
|
||||
- 💄 调整部分页面UI
|
||||
|
||||
## [0.9.6](https://github.com/BTMuli/TeyvatGuide/releases/v0.9.6) (2026-02-26)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "teyvatguide",
|
||||
"version": "0.9.6",
|
||||
"version": "0.9.7",
|
||||
"description": "Game Tool for GenshinImpact player",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.30.1",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB |
BIN
public/UI/nav/subRecord.webp
Normal file
BIN
public/UI/nav/subRecord.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/UI/nav/subSign.webp
Normal file
BIN
public/UI/nav/subSign.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
public/UI/nav/userBag.webp
Normal file
BIN
public/UI/nav/userBag.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -10,7 +10,7 @@ checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
|
||||
|
||||
[[package]]
|
||||
name = "TeyvatGuide"
|
||||
version = "0.9.6"
|
||||
version = "0.9.7"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"image",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "TeyvatGuide"
|
||||
version = "0.9.6"
|
||||
version = "0.9.7"
|
||||
description = "Game Tool for Genshin Impact player"
|
||||
authors = ["BTMuli <bt-muli@outlook.com>"]
|
||||
license = "MIT"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "TeyvatGuide",
|
||||
"identifier": "TeyvatGuide",
|
||||
"version": "0.9.6",
|
||||
"version": "0.9.7",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm vite:dev",
|
||||
"beforeBuildCommand": "pnpm vite:build",
|
||||
|
||||
@@ -93,7 +93,7 @@ html {
|
||||
::-webkit-scrollbar-thumb {
|
||||
min-height: 48px;
|
||||
border-radius: 4px;
|
||||
background: var(--tgc-od-white);
|
||||
background: var(--app-scroll-bg);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 主题样式文件-深色主题
|
||||
* @since v0.8.9
|
||||
* @since v0.9.7
|
||||
*/
|
||||
|
||||
/* dark mode */
|
||||
@@ -11,6 +11,7 @@ html.dark {
|
||||
--app-page-content: #d0d0d0ff;
|
||||
--app-side-bg: #151c26ff;
|
||||
--app-side-content: #ddddddff;
|
||||
--app-scroll-bg: var(--tgc-od-white);
|
||||
|
||||
/* box container */
|
||||
--box-bg-1: #21252bff;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 主题样式文件-默认(浅色)主题
|
||||
* @since v0.8.9
|
||||
* @since v0.9.7
|
||||
*/
|
||||
|
||||
/* default(light) theme */
|
||||
@@ -11,6 +11,7 @@ html.default {
|
||||
--app-page-content: #2f2f2fff;
|
||||
--app-side-bg: #f2f2f2ff;
|
||||
--app-side-content: #222222ff;
|
||||
--app-scroll-bg: var(--tgc-yellow-3);
|
||||
|
||||
/* box container */
|
||||
--box-bg-1: #f9f6f2ff;
|
||||
|
||||
@@ -42,26 +42,26 @@
|
||||
<v-list-item :link="true" :title.attr="'背包材料'" href="/bag/material">
|
||||
<template #title>背包材料</template>
|
||||
<template #prepend>
|
||||
<img alt="materialBagIcon" class="side-icon" src="/icon/material/121234.webp" />
|
||||
<img alt="materialBagIcon" class="side-icon" src="/UI/nav/userBag.webp" />
|
||||
</template>
|
||||
</v-list-item>
|
||||
<v-divider />
|
||||
<v-list-item :link="true" :title.attr="'原神战绩'" href="/user/record">
|
||||
<template #title>原神战绩</template>
|
||||
<template #prepend>
|
||||
<img alt="record" class="side-icon-menu" src="/UI/nav/userRecord.webp" />
|
||||
<img alt="record" class="side-icon" src="/UI/nav/userRecord.webp" />
|
||||
</template>
|
||||
</v-list-item>
|
||||
<v-list-item :link="true" :title.attr="'角色列表'" href="/user/characters">
|
||||
<template #title>角色列表</template>
|
||||
<template #prepend>
|
||||
<img alt="characters" class="side-icon-menu" src="/UI/nav/userAvatar.webp" />
|
||||
<img alt="characters" class="side-icon" src="/UI/nav/userAvatar.webp" />
|
||||
</template>
|
||||
</v-list-item>
|
||||
<v-list-item :link="true" :title.attr="'祈愿记录'" href="/user/gacha">
|
||||
<template #title>祈愿记录</template>
|
||||
<template #prepend>
|
||||
<img alt="gacha" class="side-icon-menu" src="/UI/nav/userGacha.webp" />
|
||||
<img alt="gacha" class="side-icon" src="/UI/nav/userGacha.webp" />
|
||||
</template>
|
||||
</v-list-item>
|
||||
<!-- 高难挑战,包括深渊&剧诗&危战 -->
|
||||
@@ -182,7 +182,7 @@
|
||||
@click="openClient('sign_in')"
|
||||
>
|
||||
<template #prepend>
|
||||
<img alt="sing_in" class="side-icon-menu" src="/UI/nav/userGacha.webp" />
|
||||
<img alt="sing_in" class="side-icon-menu" src="/UI/nav/subSign.webp" />
|
||||
</template>
|
||||
</v-list-item>
|
||||
<v-list-item
|
||||
@@ -192,7 +192,7 @@
|
||||
@click="openClient('game_record')"
|
||||
>
|
||||
<template #prepend>
|
||||
<img alt="game_record" class="side-icon-menu" src="/UI/nav/userRecord.webp" />
|
||||
<img alt="game_record" class="side-icon-menu" src="/UI/nav/subRecord.webp" />
|
||||
</template>
|
||||
</v-list-item>
|
||||
<v-list-item
|
||||
@@ -330,7 +330,7 @@ import useUserStore from "@store/user.js";
|
||||
import { event, path, webviewWindow } from "@tauri-apps/api";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import type { Event, UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { exists } from "@tauri-apps/plugin-fs";
|
||||
import { readDir } from "@tauri-apps/plugin-fs";
|
||||
import mhyClient from "@utils/TGClient.js";
|
||||
import { isRunInAdmin, tryCopyYae, tryReadGameVer, YAE_GAME_VER } from "@utils/TGGame.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
@@ -729,11 +729,17 @@ async function tryLaunchGame(): Promise<void> {
|
||||
showSnackbar.warn("请先登录!");
|
||||
return;
|
||||
}
|
||||
const gamePath = `${gameDir.value}${path.sep()}YuanShen.exe`;
|
||||
if (!(await exists(gamePath))) {
|
||||
if (gameDir.value === "未设置") {
|
||||
showSnackbar.warn("请前往设置页面设置游戏安装目录");
|
||||
return;
|
||||
}
|
||||
const dirRead = await readDir(gameDir.value);
|
||||
const find = dirRead.find((i) => i.isFile && i.name.toLowerCase() === "yuanshen.exe");
|
||||
if (!find) {
|
||||
showSnackbar.warn("未检测到原神本体应用!");
|
||||
return;
|
||||
}
|
||||
const gamePath = `${gameDir.value}${path.sep()}${find.name}`;
|
||||
const resp = await passportReq.authTicket(account.value, cookie.value);
|
||||
if (typeof resp !== "string") {
|
||||
showSnackbar.error(`[${resp.retcode}] ${resp.message}`);
|
||||
|
||||
@@ -70,9 +70,8 @@ import showSnackbar from "@comp/func/snackbar.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 { 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";
|
||||
@@ -146,31 +145,32 @@ async function confirmCGD(): Promise<void> {
|
||||
const oriEmpty = gameDir.value === "未设置";
|
||||
const editCheck = await showDialog.check(
|
||||
oriEmpty ? "确认设置游戏目录?" : "确认修改游戏目录?",
|
||||
oriEmpty ? "请选择 Yuanshen.exe 所在目录" : `当前:${gameDir.value}`,
|
||||
oriEmpty ? "请选择 YuanShen.exe 所在目录" : `当前:${gameDir.value}`,
|
||||
);
|
||||
if (!editCheck) {
|
||||
showSnackbar.cancel(oriEmpty ? "已取消设置" : "已取消修改");
|
||||
return;
|
||||
}
|
||||
const dir: string | null = await open({
|
||||
directory: true,
|
||||
defaultPath: oriEmpty ? undefined : gameDir.value,
|
||||
const file: string | null = await open({
|
||||
defaultPath: oriEmpty ? undefined : `${gameDir.value}${path.sep()}YuanShen.exe`,
|
||||
multiple: false,
|
||||
});
|
||||
if (dir === null) {
|
||||
if (file === null) {
|
||||
showSnackbar.warn("路径不能为空!");
|
||||
return;
|
||||
}
|
||||
if (!oriEmpty && gameDir.value === dir) {
|
||||
if (!file.toLowerCase().endsWith("yuanshen.exe")) {
|
||||
showSnackbar.warn("请选中游戏本体(YuanShen.exe)");
|
||||
return;
|
||||
}
|
||||
if (
|
||||
!oriEmpty &&
|
||||
`${gameDir.value}${path.sep()}YuanShen.exe`.toLowerCase() === file.toLowerCase()
|
||||
) {
|
||||
showSnackbar.warn("路径未修改!");
|
||||
return;
|
||||
}
|
||||
// 校验是否存在游戏本体
|
||||
if (!(await exists(`${dir}${path.sep()}YuanShen.exe`))) {
|
||||
showSnackbar.warn("未检测到游戏本体");
|
||||
return;
|
||||
}
|
||||
gameDir.value = dir;
|
||||
gameDir.value = file.substring(0, file.lastIndexOf(path.sep()));
|
||||
showSnackbar.success(oriEmpty ? "成功设置游戏目录" : "成功修改游戏目录");
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ async function confirmCLD(): Promise<void> {
|
||||
await showLoading.start("正在清理日志文件...");
|
||||
for (const file of delFiles) {
|
||||
await showLoading.update(`正在清理 ${file.name}`);
|
||||
const filePath = `${logDir.value}${sep()}${file.name}`;
|
||||
const filePath = `${logDir.value}${path.sep()}${file.name}`;
|
||||
await remove(filePath);
|
||||
}
|
||||
await new Promise<void>((resolve) => setTimeout(resolve, 1000));
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="tgb-box">
|
||||
<div class="tgb-top">
|
||||
<div class="tgb-title">✨原神,启动!</div>
|
||||
<v-btn size="small" icon="mdi-rocket" variant="outlined" @click="tryPlayGame()" />
|
||||
<v-btn icon="mdi-rocket" size="small" variant="outlined" @click="tryPlayGame()" />
|
||||
</div>
|
||||
<v-list-item v-if="account.uid">
|
||||
<v-list-item-title class="tgb-name">
|
||||
@@ -22,7 +22,7 @@ import useAppStore from "@store/app.js";
|
||||
import useUserStore from "@store/user.js";
|
||||
import { path } from "@tauri-apps/api";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { exists } from "@tauri-apps/plugin-fs";
|
||||
import { readDir } from "@tauri-apps/plugin-fs";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
@@ -42,11 +42,13 @@ async function tryPlayGame(): Promise<void> {
|
||||
showSnackbar.warn("未设置游戏安装目录!");
|
||||
return;
|
||||
}
|
||||
const gamePath = `${gameDir.value}${path.sep()}YuanShen.exe`;
|
||||
if (!(await exists(gamePath))) {
|
||||
const dirRead = await readDir(gameDir.value);
|
||||
const find = dirRead.find((i) => i.isFile && i.name.toLowerCase() === "yuanshen.exe");
|
||||
if (!find) {
|
||||
showSnackbar.warn("未检测到原神本体应用!");
|
||||
return;
|
||||
}
|
||||
const gamePath = `${gameDir.value}${path.sep()}${find.name}`;
|
||||
const resp = await passportReq.authTicket(account.value, cookie.value);
|
||||
if (typeof resp !== "string") {
|
||||
showSnackbar.error(`[${resp.retcode}] ${resp.message}`);
|
||||
|
||||
@@ -89,6 +89,7 @@ async function toDonate(): Promise<void> {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
padding: 8px;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div class="twc-bi-desc">{{ data.description }}</div>
|
||||
</div>
|
||||
<div class="twc-bi-grid1">
|
||||
<div class="twc-bi-grid">
|
||||
<div class="twc-big-item">
|
||||
<span>{{ data.elePrefix }}</span>
|
||||
<span>{{ data.element }}</span>
|
||||
@@ -40,7 +40,7 @@
|
||||
<span>{{ data.brief.birth }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="twc-bi-grid2">
|
||||
<div class="twc-bi-grid">
|
||||
<div class="twc-big-item">
|
||||
<span>汉语CV</span>
|
||||
<span>{{ data.brief.cv.cn }}</span>
|
||||
@@ -182,7 +182,7 @@ async function toBirth(date: string): Promise<void> {
|
||||
await router.push({ name: "留影叙佳期", params: { date: birth } });
|
||||
}
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.v-expansion-panel-title) {
|
||||
background: var(--common-shadow-1);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ async function toBirth(date: string): Promise<void> {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0 auto;
|
||||
row-gap: 10px;
|
||||
row-gap: 8px;
|
||||
}
|
||||
|
||||
.twc-brief {
|
||||
@@ -201,7 +201,9 @@ async function toBirth(date: string): Promise<void> {
|
||||
}
|
||||
|
||||
.twc-brief-info {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
@@ -212,8 +214,10 @@ async function toBirth(date: string): Promise<void> {
|
||||
}
|
||||
|
||||
.twc-bi-title {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: fit-content;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--common-text-title);
|
||||
@@ -240,16 +244,12 @@ async function toBirth(date: string): Promise<void> {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.twc-bi-grid1 {
|
||||
display: grid;
|
||||
column-gap: 10px;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
|
||||
.twc-bi-grid2 {
|
||||
display: grid;
|
||||
column-gap: 10px;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
.twc-bi-grid {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
column-gap: 16px;
|
||||
}
|
||||
|
||||
.twc-big-item {
|
||||
|
||||
@@ -58,20 +58,19 @@ const mixData = computed<Array<TGApp.Sqlite.Gacha.Gacha>>(() =>
|
||||
props.modelValue.filter((item) => item.uigfType === "500"),
|
||||
);
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
<style lang="scss" scoped>
|
||||
.gro-o-swiper {
|
||||
--swiper-pagination-bottom: 16px;
|
||||
--swiper-pagination-color: var(--tgc-pink-1);
|
||||
--swiper-pagination-bullet-inactive-color: var(--tgc-od-white);
|
||||
--swiper-pagination-bullet-inactive-opacity: 1;
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
column-gap: 8px;
|
||||
}
|
||||
|
||||
/* swiper dot */
|
||||
|
||||
:deep(.swiper-pagination-bullet) {
|
||||
background: var(--tgc-od-white);
|
||||
}
|
||||
|
||||
:deep(.swiper-pagination-bullet-active) {
|
||||
background-color: var(--tgc-pink-1);
|
||||
box-shadow: 0 0 4px var(--common-shadow-4);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<img alt="icon" src="/UI/nav/toolbox.webp" />
|
||||
<span>实用脚本</span>
|
||||
<v-select
|
||||
v-model="curAccount"
|
||||
:disabled="runScript || runAll"
|
||||
:hide-details="true"
|
||||
:items="accounts"
|
||||
:model-value="curAccount"
|
||||
class="us-top-select"
|
||||
density="compact"
|
||||
item-title="uid"
|
||||
@@ -17,18 +17,18 @@
|
||||
variant="outlined"
|
||||
>
|
||||
<template #selection="{ item }">
|
||||
<div class="select-main">
|
||||
<div class="us-select-main">
|
||||
<img :src="item.brief.avatar" alt="icon" />
|
||||
<div class="content">
|
||||
<div class="us-sm-content">
|
||||
<span>{{ item.brief.nickname }}</span>
|
||||
<span>UID:{{ item.uid }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #item="{ props, item }">
|
||||
<div class="select-item" v-bind="props">
|
||||
<div class="us-select-item" v-bind="props" @click="() => (curAccount = item)">
|
||||
<img :src="item.brief.avatar" alt="icon" />
|
||||
<div class="content">
|
||||
<div class="us-si-content">
|
||||
<span>{{ item.brief.nickname }}</span>
|
||||
<span>UID:{{ item.uid }}</span>
|
||||
</div>
|
||||
@@ -224,7 +224,7 @@ async function tryExecAll(): Promise<void> {
|
||||
max-width: 250px;
|
||||
}
|
||||
|
||||
.select-main {
|
||||
.us-select-main {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: 24px;
|
||||
@@ -236,24 +236,24 @@ async function tryExecAll(): Promise<void> {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.us-sm-content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
:first-child {
|
||||
font-family: var(--font-title);
|
||||
font-size: 12px;
|
||||
}
|
||||
:first-child {
|
||||
font-family: var(--font-title);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
:last-child {
|
||||
font-size: 10px;
|
||||
}
|
||||
:last-child {
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.select-item {
|
||||
.us-select-item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
@@ -262,35 +262,40 @@ async function tryExecAll(): Promise<void> {
|
||||
justify-content: flex-start;
|
||||
padding: 8px;
|
||||
column-gap: 4px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: var(--common-shadow-1);
|
||||
}
|
||||
|
||||
img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.us-si-content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
:first-child {
|
||||
font-family: var(--font-title);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
:last-child {
|
||||
font-size: 10px;
|
||||
}
|
||||
:first-child {
|
||||
font-family: var(--font-title);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.append {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: auto;
|
||||
:last-child {
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.append {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.top-hint {
|
||||
position: relative;
|
||||
padding: 8px;
|
||||
|
||||
@@ -139,7 +139,7 @@ async function toOuter(item?: TGApp.App.Character.WikiBriefInfo): Promise<void>
|
||||
.wc-left {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: fit-content;
|
||||
flex: 3;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
gap: 8px;
|
||||
@@ -169,13 +169,14 @@ async function toOuter(item?: TGApp.App.Character.WikiBriefInfo): Promise<void>
|
||||
width: 100%;
|
||||
padding-right: 8px;
|
||||
gap: 8px;
|
||||
grid-template-columns: repeat(3, 160px);
|
||||
grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
|
||||
}
|
||||
|
||||
.wc-detail {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
flex: 5;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 4px var(--common-shadow-2);
|
||||
|
||||
@@ -117,8 +117,9 @@ async function toOuter(item?: TGApp.App.Weapon.WikiBriefInfo): Promise<void> {
|
||||
}
|
||||
|
||||
.ww-left {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: fit-content;
|
||||
flex: 3;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
gap: 8px;
|
||||
@@ -148,13 +149,14 @@ async function toOuter(item?: TGApp.App.Weapon.WikiBriefInfo): Promise<void> {
|
||||
width: 100%;
|
||||
padding-right: 8px;
|
||||
gap: 8px;
|
||||
grid-template-columns: repeat(3, 160px);
|
||||
grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
|
||||
}
|
||||
|
||||
.ww-detail {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
flex: 5;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 4px var(--common-shadow-2);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<template #prepend>
|
||||
<div class="pa-prepend">
|
||||
<v-tabs v-model="tab" align-tabs="start" class="pa-tabs">
|
||||
<v-tab v-for="tab in tabList" :key="tab.id" :value="tab.id" :title="tab.name">
|
||||
<v-tab v-for="tab in tabList" :key="tab.id" :title="tab.name" :value="tab.id">
|
||||
{{ tab.mi18n_name }}
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
@@ -36,23 +36,16 @@
|
||||
</template>
|
||||
<template #append>
|
||||
<div class="anno-top-append">
|
||||
<v-btn
|
||||
class="anno-btn"
|
||||
prepend-icon="mdi-bullhorn"
|
||||
rounded
|
||||
variant="elevated"
|
||||
@click="switchNews"
|
||||
>
|
||||
切换米游社资讯
|
||||
</v-btn>
|
||||
<v-btn
|
||||
v-if="isLogin"
|
||||
class="anno-btn"
|
||||
prepend-icon="mdi-web"
|
||||
rounded
|
||||
size="small"
|
||||
variant="elevated"
|
||||
@click="showIframe()"
|
||||
>
|
||||
<v-icon>mdi-web</v-icon>
|
||||
游戏内公告
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
@@ -82,7 +75,6 @@ import useAppStore from "@store/app.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { onMounted, ref, shallowRef, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
type AnnoSelect<T = string> = { text: string; value: T };
|
||||
|
||||
@@ -92,7 +84,6 @@ const langList: ReadonlyArray<AnnoSelect<TGApp.Game.Anno.AnnoLangEnum>> =
|
||||
gameEnum.anno.langList.map((i) => ({ text: gameEnum.anno.langDesc(i), value: i }));
|
||||
|
||||
const { server, lang, isLogin } = storeToRefs(useAppStore());
|
||||
const router = useRouter();
|
||||
|
||||
const tab = ref<number>(0);
|
||||
const tabList = shallowRef<Array<TGApp.Game.Anno.ListType>>([]);
|
||||
@@ -158,11 +149,6 @@ async function loadData(): Promise<void> {
|
||||
await showLoading.end();
|
||||
isReq.value = false;
|
||||
}
|
||||
|
||||
async function switchNews(): Promise<void> {
|
||||
await TGLogger.Info("[Announcements][switchNews] 切换米游社资讯");
|
||||
await router.push("/news/2");
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.pa-prepend {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<v-app-bar>
|
||||
<template #prepend>
|
||||
<div class="pbm-nav-prepend">
|
||||
<img alt="icon" src="/icon/material/121234.webp" />
|
||||
<img alt="icon" src="/UI/nav/userBag.webp" />
|
||||
<span>背包材料</span>
|
||||
<v-select
|
||||
v-model="curUid"
|
||||
|
||||
@@ -607,6 +607,7 @@ async function switchIncognito(): Promise<void> {
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
justify-content: flex-start;
|
||||
padding-right: 4px;
|
||||
row-gap: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -40,16 +40,6 @@
|
||||
<v-btn class="post-news-btn" size="small" variant="elevated" @click="handleList()">
|
||||
<v-icon>mdi-view-list</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
v-if="gid === '2'"
|
||||
class="post-news-btn"
|
||||
prepend-icon="mdi-bullhorn"
|
||||
rounded
|
||||
variant="elevated"
|
||||
@click="switchAnno"
|
||||
>
|
||||
切换游戏内公告
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-app-bar>
|
||||
<v-window v-model="recentNewsType">
|
||||
@@ -62,7 +52,7 @@
|
||||
</v-window-item>
|
||||
</v-window>
|
||||
<ToChannel v-model="showList" :gid="gid" />
|
||||
<VpOverlaySearch v-model="showSearch" :gid="gid" :keyword="search" />
|
||||
<VpOverlaySearch v-model="showSearch" :gid="Number(gid)" :keyword="search" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import TPostCard from "@comp/app/t-postcard.vue";
|
||||
@@ -78,14 +68,13 @@ import useBBSStore from "@store/bbs.js";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
import { createPost } from "@utils/TGWindow.js";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, reactive, Ref, ref, shallowRef, watch } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { computed, onMounted, reactive, type Ref, ref, shallowRef, watch } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
type PostData = Record<TGApp.BBS.Post.NewsTypeEnum, Ref<Array<TGApp.BBS.Post.FullData>>>;
|
||||
type RawItem = { isLast: boolean; name: string; lastId: number };
|
||||
type RawData = Record<TGApp.BBS.Post.NewsTypeEnum, Ref<RawItem>>;
|
||||
|
||||
const router = useRouter();
|
||||
const { recentNewsType } = storeToRefs(useAppStore());
|
||||
const { gameList } = storeToRefs(useBBSStore());
|
||||
const { gid } = <{ gid: string }>useRoute().params;
|
||||
@@ -159,11 +148,6 @@ async function firstLoad(refresh: boolean = false): Promise<void> {
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
async function switchAnno(): Promise<void> {
|
||||
await TGLogger.Info(`[News][${gid}][switchAnno] 切换公告`);
|
||||
await router.push("/announcements");
|
||||
}
|
||||
|
||||
function handleList(): void {
|
||||
if (showSearch.value === true) showSearch.value = false;
|
||||
showList.value = true;
|
||||
|
||||
@@ -7,7 +7,14 @@ import showDialog from "@comp/func/dialog.js";
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { documentDir, resourceDir, sep } from "@tauri-apps/api/path";
|
||||
import { copyFile, exists, mkdir, readTextFile, readTextFileLines } from "@tauri-apps/plugin-fs";
|
||||
import {
|
||||
copyFile,
|
||||
exists,
|
||||
mkdir,
|
||||
readDir,
|
||||
readTextFile,
|
||||
readTextFileLines,
|
||||
} from "@tauri-apps/plugin-fs";
|
||||
import { platform } from "@tauri-apps/plugin-os";
|
||||
import TGLogger from "@utils/TGLogger.js";
|
||||
|
||||
@@ -97,11 +104,13 @@ export async function tryCallYae(gameDir: string, uid?: string): Promise<void> {
|
||||
showSnackbar.warn("请前往设置页面设置游戏安装目录");
|
||||
return;
|
||||
}
|
||||
const gamePath = `${gameDir}${sep()}YuanShen.exe`;
|
||||
if (!(await exists(gamePath))) {
|
||||
const dirRead = await readDir(gameDir);
|
||||
const find = dirRead.find((i) => i.isFile && i.name.toLowerCase() === "yuanshen.exe");
|
||||
if (!find) {
|
||||
showSnackbar.warn("未检测到游戏本体");
|
||||
return;
|
||||
}
|
||||
const gamePath = `${gameDir}${sep()}${find.name}`;
|
||||
const isRun = await invoke<boolean>("is_process_running", { processName: "Yuanshen.exe" });
|
||||
if (isRun) {
|
||||
showSnackbar.warn("检测到已启动的原神进程,请关闭进程(Yuanshen.exe)后重试");
|
||||
|
||||
Reference in New Issue
Block a user