mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-01 06:39:45 +08:00
✨首页添加游戏签到组件,支持补签 (#182)
* Initial plan * Add sign-in card component to homepage Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Fix v-icon usage in sign-in card buttons Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Fix: Merge new home components into existing localStorage Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Refactor: Remove redundant code in getShowItems Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Add error handling for localStorage parsing Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Redesign sign-in card to show multiple game accounts with compact UI Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Fix reward item spacing with flex properties Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Redesign sign-in card: grid layout, account switching, light mode fixes Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Add forceReload parameter to prevent unnecessary API calls Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Show multiple game accounts with grid layout and MiHoYo account in append Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Use unique keys and concurrent API requests for better performance Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Refactor sign-in component: split into reusable parts with user switcher Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Fix sign-in logic: highlight based on count not date, enable resign button Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Remove duplicate code and fix comment Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Add reward cell component, extra rewards support, and improved visual distinction Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * 🏷️ 添加Store类型,调整首页选项框宽度 * 🏷️签到 → 游戏签到 * ♻️ 首页组件重构,支持组件分享 * ♻️ 调整组件UI * 💄 调整loading标题文本大小 * 💄 微调样式 * Refactor sign-in component: sequential loading, progress bar, internal data processing Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * Fix code review issues: correct gameInfo reference and add refresh event Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * 🎨 调整逻辑 * Refactor: self-contained data updates and numeric state enums Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * 🚸 调整排序逻辑 * 🚸 调整loading文本 * ✏️ 调整类型,修复打包失败 * ♻️ 添加补签相关请求 * 💄 调整脚本页布局 * 💄 调整首页布局 * Implement resign feature with local data updates and confirmation dialog Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * ✏️ 补充类型描述 * Fix resign logic: check is_sub, optimize resign info loading, improve success message Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * 🎨 调整逻辑,微调样式 * 🎨 调整唤起位置 * Add click handlers to reward cells for sign-in and resign actions Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * 🐛 对ID进行限制 * 💄 微调顶部gameNav样式 * Fix resign logic: only first missed day is clickable Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> * 🎨 放宽补签限制 * 🐛 修正删除逻辑判断 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com> Co-authored-by: BTMuli <bt-muli@outlook.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* @file plugins/Sqlite/modules/userAccounts.ts
|
||||
* @description 用户账户模块
|
||||
* @since Beta v0.7.8
|
||||
* 用户账户模块
|
||||
* @since Beta v0.9.0
|
||||
*/
|
||||
|
||||
import { path } from "@tauri-apps/api";
|
||||
@@ -215,15 +214,15 @@ function copyCookie(cookie: TGApp.App.Account.Cookie): string {
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取指定用户账号
|
||||
* @since Beta v0.7.2
|
||||
* 获取指定用户账号
|
||||
* @since Beta v0.9.0
|
||||
* @param {string} uid - 用户UID
|
||||
* @returns {Promise<TGApp.Sqlite.Account.Game[]>}
|
||||
* @returns {Promise<Array<TGApp.Sqlite.Account.Game>>}
|
||||
*/
|
||||
async function getGameAccount(uid: string): Promise<TGApp.Sqlite.Account.Game[]> {
|
||||
async function getGameAccount(uid: string): Promise<Array<TGApp.Sqlite.Account.Game>> {
|
||||
const db = await TGSqlite.getDB();
|
||||
return await db.select<TGApp.Sqlite.Account.Game[]>(
|
||||
"SELECT * FROM GameAccount WHERE uid = ? ORDER BY region, gameUid;",
|
||||
return await db.select<Array<TGApp.Sqlite.Account.Game>>(
|
||||
"SELECT * FROM GameAccount WHERE uid = ? ORDER BY gameBiz, gameUid;",
|
||||
[uid],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user