feat: 添加签到功能及相关设置

- 更新 .gitignore,添加 SpecStory 说明文件
- 在 App.vue 中引入 NGlobalStyle 组件
- 更新 api-models.ts,添加签到相关数据模型
- 在 CheckInSettings.vue 中实现签到功能的配置界面
- 添加签到排行榜功能,允许用户查看签到情况
- 更新 PointHistoryCard.vue,增加签到记录显示
- 在 PointSettings.vue 中添加签到相关设置项
- 更新路由,添加签到排行页面
This commit is contained in:
2025-05-01 08:18:58 +08:00
parent 6160c89c68
commit f525bbb759
20 changed files with 1479 additions and 761 deletions

View File

@@ -34,6 +34,7 @@ const columns = [
title: '时间',
key: 'timestamp',
width: 180,
sorter: (a: HistoryItem, b: HistoryItem) => a.timestamp - b.timestamp,
render: (row: HistoryItem) => {
return h(NTime, {
time: new Date(row.timestamp),
@@ -106,9 +107,9 @@ async function loadHistory() {
]);
historyData.value = {
[HistoryType.DANMAKU]: danmakuHistory,
[HistoryType.PRIVATE_MSG]: privateMsgHistory,
[HistoryType.COMMAND]: commandHistory
[HistoryType.DANMAKU]: danmakuHistory.sort((a, b) => b.timestamp - a.timestamp),
[HistoryType.PRIVATE_MSG]: privateMsgHistory.sort((a, b) => b.timestamp - a.timestamp),
[HistoryType.COMMAND]: commandHistory.sort((a, b) => b.timestamp - a.timestamp)
};
} catch (error) {
console.error('加载历史数据失败:', error);
@@ -253,6 +254,7 @@ onUnmounted(() => {
pageSizes: [10, 20, 50],
}"
:row-key="row => row.id"
default-sort-order="descend"
>
<template #empty>
<NEmpty description="暂无历史记录" />