mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-05-17 04:46:46 +08:00
✨ 深渊上传支持胡桃账户设置
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file store/modules/user.ts
|
||||
* @description 用户信息模块
|
||||
* @since Beta v0.6.0
|
||||
* @since Beta v0.6.8
|
||||
*/
|
||||
|
||||
import showSnackbar from "@comp/func/snackbar.js";
|
||||
@@ -34,6 +34,9 @@ export const useUserStore = defineStore(
|
||||
const cookie = ref<TGApp.App.Account.Cookie>();
|
||||
const propMap = ref<TGApp.Game.Avatar.PropMap>();
|
||||
|
||||
// 胡桃账号(邮箱),用于上传深渊记录
|
||||
const hutaoEmail = ref<string>();
|
||||
|
||||
function getProp(prop: number): TGApp.Game.Avatar.PropMapItem | false {
|
||||
if (!propMap.value) return false;
|
||||
return propMap.value[prop.toString()] || false;
|
||||
@@ -66,6 +69,7 @@ export const useUserStore = defineStore(
|
||||
briefInfo,
|
||||
account,
|
||||
propMap,
|
||||
hutaoEmail,
|
||||
getProp,
|
||||
switchGameAccount,
|
||||
};
|
||||
@@ -77,11 +81,8 @@ export const useUserStore = defineStore(
|
||||
storage: window.localStorage,
|
||||
pick: ["uid", "briefInfo", "cookie", "account"],
|
||||
},
|
||||
{
|
||||
key: "propMap",
|
||||
storage: window.localStorage,
|
||||
pick: ["propMap"],
|
||||
},
|
||||
{ key: "propMap", storage: window.localStorage, pick: ["propMap"] },
|
||||
{ key: "hutaoAccount", storage: window.localStorage, pick: ["hutaoEmail"] },
|
||||
],
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user