feat: 替换认证存储逻辑为BiliAuth

- 将所有使用useAuthStore的地方替换为useBiliAuth
- 删除useAuthStore文件,整合认证逻辑
- 更新相关视图和组件以适应新的认证存储
This commit is contained in:
2025-05-02 01:59:21 +08:00
parent c922f8358a
commit 993107c24c
18 changed files with 477 additions and 218 deletions

View File

@@ -1,6 +1,6 @@
import { GetSelfAccount, useAccount, UpdateAccountLoop } from "@/api/account";
import { QueryGetAPI } from "@/api/query";
import { useAuthStore } from "@/store/useAuthStore";
import { useBiliAuth } from "@/store/useBiliAuth";
import { useNotificationStore } from "@/store/useNotificationStore";
import { createDiscreteApi, NText, NFlex, NButton } from "naive-ui";
import { BASE_API_URL, isTauri, apiFail } from "./constants";
@@ -64,7 +64,7 @@ async function InitOther() {
InitTTS()
await GetSelfAccount()
const account = useAccount()
const useAuth = useAuthStore()
const useAuth = useBiliAuth()
if (account.value.id) {
if (account.value.biliUserAuthInfo && !useAuth.currentToken) {
useAuth.currentToken = account.value.biliUserAuthInfo.token