diff --git a/src/components/t-sidebar.vue b/src/components/t-sidebar.vue index 9d235363..3de72e38 100644 --- a/src/components/t-sidebar.vue +++ b/src/components/t-sidebar.vue @@ -16,17 +16,17 @@ - + - + - + @@ -34,20 +34,20 @@ - + - + @@ -58,22 +58,22 @@ diff --git a/src/pages/Achievements.vue b/src/pages/Achievements.vue index 59d246bd..26baa271 100644 --- a/src/pages/Achievements.vue +++ b/src/pages/Achievements.vue @@ -266,7 +266,14 @@ async function importJson() { const localTime = localData.completed_time; // 如果本地数据不存在,或者本地数据的 timeStamp 小于远程数据的 timeStamp,更新数据 if (data.timestamp !== 0) { - const fin_time = new Date(data.timestamp * 1000).toLocaleString(); + const fin_time = new Date(data.timestamp * 1000).toLocaleString("zh", { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + }); if (fin_time !== localTime || localData.progress !== data.current) { localData.completed_time = fin_time; localData.progress = data.current; diff --git a/src/pages/GCG.vue b/src/pages/GCG.vue index 8efab607..f117891a 100644 --- a/src/pages/GCG.vue +++ b/src/pages/GCG.vue @@ -120,7 +120,7 @@ async function loadData() { } function toOuter(card_name: string, card_id: number) { const url = MysContent.replace("content_id", card_id.toString()); - createTGWindow(url, "GCG", card_name, 1600, 900, true); + createTGWindow(url, "GCG", card_name, 1200, 800, true); } async function searchCard() { loading.value = true; @@ -128,6 +128,7 @@ async function searchCard() { const res: BaseCard[] = []; const allCardsInfo = await ReadAllTGData("GCG"); allCardsInfo.map(item => (item.name.includes(search.value) ? res.push(item) : null)); + res.sort((a, b) => a.name.localeCompare(b.name)); loading.value = false; if (res.length == 0) { await dialog.message("未找到相关卡牌"); diff --git a/src/pages/Home.vue b/src/pages/Home.vue index bd23908b..cb840db5 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -251,7 +251,7 @@ async function toPost(post_id: string) { .Home-pool-clock { width: auto; - margin-left: 120px; + margin-left: 40px; float: right; font-size: small; height: 80px; diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index e999f035..55202498 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -22,7 +22,14 @@ const useAppStore = defineStore({ // 是否加载数据 loading: false, // 侧边栏设置 - sidebar: true, + sidebar: { + // 是否折叠 + collapse: false, + // 是否显示 + submenu: { + database: false, + }, + }, // 咨讯页渲染模式 structureRender: true, // 是否采用结构化渲染,否则采用 raw 渲染 // 数据路径 @@ -44,11 +51,22 @@ const useAppStore = defineStore({ }; }, actions: { + // 获取折叠 + getSubmenu() { + let open = []; + if (this.sidebar.submenu.database) open.push("database"); + return open; + }, // 初始化配置 async init() { // 防止数据清空 if (this.sidebar === undefined) { - this.sidebar = true; + this.sidebar = { + collapse: false, + submenu: { + database: false, + }, + }; } // 初始化加载状态 this.loading = false;