From 92a20195663c6aff9a3c6b856b23af6d349caf78 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Oct 2025 10:21:58 +0000 Subject: [PATCH] Use kvToken instead of siteKey in examschedule button cloud URL Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com> --- .eslintrc-auto-import.json | 18 +- src/App.vue | 10 +- src/components/AppFooter.vue | 11 +- src/components/AppHeader.vue | 12 +- src/components/CacheManager.vue | 69 ++- src/components/ExamConfigEditor.vue | 301 +++++++--- src/components/FloatingToolbar.vue | 65 +- src/components/GlobalMessage.vue | 22 +- src/components/HelloWorld.vue | 12 +- src/components/HomeworkEditDialog.vue | 60 +- src/components/MessageLog.vue | 40 +- src/components/MigrationTool.vue | 113 +++- src/components/RandomPicker.vue | 103 +++- src/components/RateLimitModal.vue | 44 +- src/components/SettingsCard.vue | 14 +- src/components/SettingsLinkGenerator.vue | 50 +- src/components/error/404.vue | 29 +- src/components/settings/AboutCard.vue | 48 +- src/components/settings/SettingGroup.vue | 18 +- src/components/settings/SettingItem.vue | 52 +- src/components/settings/SettingsExplorer.vue | 41 +- src/components/settings/StudentListCard.vue | 51 +- .../settings/cards/CloudNamespaceInfoCard.vue | 118 +++- .../cards/DataProviderSettingsCard.vue | 118 +++- .../settings/cards/DisplaySettingsCard.vue | 45 +- .../settings/cards/EchoChamberCard.vue | 23 +- .../settings/cards/EditSettingsCard.vue | 6 +- .../settings/cards/HomeworkTemplateCard.vue | 120 +++- .../settings/cards/KvDatabaseCard.vue | 245 ++++++-- .../settings/cards/RandomPickerCard.vue | 39 +- .../settings/cards/RefreshSettingsCard.vue | 16 +- .../settings/cards/SubjectManagementCard.vue | 22 +- .../settings/cards/ThemeSettingsCard.vue | 30 +- src/pages/CacheManagement.vue | 64 +- src/pages/DataMigration.vue | 55 +- src/pages/authorize.vue | 27 +- src/pages/cses2wakeup.vue | 431 ++++++++++--- src/pages/examschedule.vue | 124 +++- src/pages/index.vue | 242 ++++++-- src/pages/list/[id].vue | 564 ++++++++++-------- src/pages/list/index.vue | 87 ++- src/pages/settings.vue | 106 +++- src/utils/dataProvider.js | 8 +- 43 files changed, 2628 insertions(+), 1045 deletions(-) diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json index 347c2aa..f90a538 100644 --- a/.eslintrc-auto-import.json +++ b/.eslintrc-auto-import.json @@ -3,13 +3,18 @@ "Component": true, "ComponentPublicInstance": true, "ComputedRef": true, + "DirectiveBinding": true, "EffectScope": true, "ExtractDefaultPropTypes": true, "ExtractPropTypes": true, "ExtractPublicPropTypes": true, "InjectionKey": true, + "MaybeRef": true, + "MaybeRefOrGetter": true, "PropType": true, "Ref": true, + "Slot": true, + "Slots": true, "VNode": true, "WritableComputedRef": true, "computed": true, @@ -43,6 +48,7 @@ "onServerPrefetch": true, "onUnmounted": true, "onUpdated": true, + "onWatcherCleanup": true, "provide": true, "reactive": true, "readonly": true, @@ -60,20 +66,16 @@ "useAttrs": true, "useCssModule": true, "useCssVars": true, + "useId": true, "useLink": true, + "useModel": true, "useRoute": true, "useRouter": true, "useSlots": true, + "useTemplateRef": true, "watch": true, "watchEffect": true, "watchPostEffect": true, - "watchSyncEffect": true, - "DirectiveBinding": true, - "MaybeRef": true, - "MaybeRefOrGetter": true, - "onWatcherCleanup": true, - "useId": true, - "useModel": true, - "useTemplateRef": true + "watchSyncEffect": true } } diff --git a/src/App.vue b/src/App.vue index d97ba1c..97cffaf 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,8 +4,14 @@ - - + + diff --git a/src/components/AppFooter.vue b/src/components/AppFooter.vue index 060f9cc..7e2a1fe 100644 --- a/src/components/AppFooter.vue +++ b/src/components/AppFooter.vue @@ -1,5 +1,8 @@ - + - + @@ -17,7 +23,6 @@ class="text-caption text-disabled" style="position: absolute; right: 16px" > - - - - - + + + + - 作业 - + 作业 + diff --git a/src/components/error/404.vue b/src/components/error/404.vue index 27ed800..b890441 100644 --- a/src/components/error/404.vue +++ b/src/components/error/404.vue @@ -1,12 +1,23 @@ - - + + - 出现了错误 + + 出现了错误 + - 404 + + 404 + @@ -25,11 +36,15 @@ - 为什么会出现此错误? + + 为什么会出现此错误? + - 大概是页面未找到 + + 大概是页面未找到 + - + - 关于 + + 关于 + - + - + - Classworks - 适用于班级大屏的作业板小工具 + + Classworks + + + 适用于班级大屏的作业板小工具 + - + - 备注与致谢 + + 备注与致谢 + - + - - + + + 使用的第三方库 - + diff --git a/src/components/settings/SettingGroup.vue b/src/components/settings/SettingGroup.vue index 3e1efa7..55f88dd 100644 --- a/src/components/settings/SettingGroup.vue +++ b/src/components/settings/SettingGroup.vue @@ -1,7 +1,17 @@ - - - + + + {{ title }} @@ -18,7 +28,7 @@ - + diff --git a/src/components/settings/SettingItem.vue b/src/components/settings/SettingItem.vue index dda9a80..5dc511f 100644 --- a/src/components/settings/SettingItem.vue +++ b/src/components/settings/SettingItem.vue @@ -1,5 +1,8 @@ - + @@ -14,7 +17,10 @@ - + - + - + - - + + 复制设置ID - - + + 复制设置值 - + - - - + + + 重置为默认值 @@ -116,7 +137,10 @@ - + - - - - + + - - + + - 当前配置 + + 当前配置 + {{ formattedSettings }} - - + + 复制到剪贴板 - mdi-content-copy + + mdi-content-copy + diff --git a/src/components/settings/StudentListCard.vue b/src/components/settings/StudentListCard.vue index 8bd4797..fa017d7 100644 --- a/src/components/settings/StudentListCard.vue +++ b/src/components/settings/StudentListCard.vue @@ -6,17 +6,26 @@ > - + - 学生列表 + + 学生列表 + - + 按姓名首字母排序 @@ -39,7 +48,13 @@ class="mb-4" /> - + {{ error }} @@ -47,7 +62,11 @@ - + - + - + - + - + - + - + - mdi-cloud-check + + mdi-cloud-check + 设备信息 - + - 此设备由贵校或贵单位管理,该管理员系此空间所有者,如有疑问请咨询他,对于恶意绑定、滥用行为请反馈。 + + 此设备由贵校或贵单位管理,该管理员系此空间所有者,如有疑问请咨询他,对于恶意绑定、滥用行为请反馈。 + - - 设备信息 + + + 设备信息 + - mdi-tag + + mdi-tag + 设备名称: {{ namespaceInfo.device.name || "未命名设备" }} - mdi-identifier + + mdi-identifier + 设备 ID: {{ namespaceInfo.device.id }} - mdi-uuid + + mdi-uuid + UUID: {{ namespaceInfo.device.uuid || "未知" }} - mdi-calendar + + mdi-calendar + 创建时间: {{ formatDate(namespaceInfo.device.createdAt) }} @@ -59,33 +101,50 @@ v-if="namespaceInfo.device.updatedAt" class="d-flex align-center" > - mdi-calendar-clock + + mdi-calendar-clock + 更新时间: {{ formatDate(namespaceInfo.device.updatedAt) }} - Classworks KV + + + + Classworks KV 是厚浪云推出的云原生键值数据库,其是一个开放的云应用平台,为各种应用提供存储服务。此设备正在使用其服务,如果您希望管理设备信息,请前往 Classworks KV 的网站,如果您在服务推出前就在使用 Classworks,您的数据已被自动迁移。 - Classworks KV 的全域管理员是 孙悟元Classworks KV 的全域管理员是 孙悟元 + + 前往 Classworks KV + > + 前往 Classworks KV + + + - + 未获取到设备信息 您尚未完成云端存储授权或连接失败,请点击下方按钮进行初始化。 @@ -102,7 +161,10 @@ 刷新设备信息 - + 重新初始化云端存储 diff --git a/src/components/settings/cards/DataProviderSettingsCard.vue b/src/components/settings/cards/DataProviderSettingsCard.vue index da1b2c7..7247de3 100644 --- a/src/components/settings/cards/DataProviderSettingsCard.vue +++ b/src/components/settings/cards/DataProviderSettingsCard.vue @@ -1,16 +1,22 @@ - + - + 检查服务器连接 @@ -21,84 +27,132 @@ > 测试连接 - + + - + 清除数据库缓存 - 这将清除所有本地数据库中的数据 + + 这将清除所有本地数据库中的数据 + - + 清除 - + 导出数据库 - 导出 + + 导出 + - + 迁移旧数据 - 将旧的存储格式数据转移到新的KV存储 + + 将旧的存储格式数据转移到新的KV存储 + - + 迁移 - + + - + 本机唯一标识符 - {{ - machineId - }} - 正在加载... + + {{ + machineId + }} + + + 正在加载... + - + 查看本地缓存 - 查看 + + 查看 + - + {{ confirmTitle }} {{ confirmMessage }} - - 取消 + - 确认 + + 确认 + diff --git a/src/components/settings/cards/DisplaySettingsCard.vue b/src/components/settings/cards/DisplaySettingsCard.vue index e413942..4b83187 100644 --- a/src/components/settings/cards/DisplaySettingsCard.vue +++ b/src/components/settings/cards/DisplaySettingsCard.vue @@ -1,34 +1,37 @@ - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - + + + diff --git a/src/components/settings/cards/EchoChamberCard.vue b/src/components/settings/cards/EchoChamberCard.vue index 4112de3..6c38368 100644 --- a/src/components/settings/cards/EchoChamberCard.vue +++ b/src/components/settings/cards/EchoChamberCard.vue @@ -6,11 +6,20 @@ @click="handleClick" > - - + + - + @@ -49,6 +58,10 @@ export default { this.initTypewriters(); }, + beforeUnmount() { + [this.typewriter, this.sourceWriter].forEach(writer => writer?.stop()); + }, + methods: { initTypewriters() { this.typewriter = new Typewriter(this.$refs.typewriter, TYPEWRITER_CONFIG.main); @@ -93,10 +106,6 @@ export default { console.error("复制失败:", err); } } - }, - - beforeUnmount() { - [this.typewriter, this.sourceWriter].forEach(writer => writer?.stop()); } }; diff --git a/src/components/settings/cards/EditSettingsCard.vue b/src/components/settings/cards/EditSettingsCard.vue index 010846f..04bbd08 100644 --- a/src/components/settings/cards/EditSettingsCard.vue +++ b/src/components/settings/cards/EditSettingsCard.vue @@ -1,5 +1,8 @@ - + @@ -15,7 +18,6 @@ - diff --git a/src/components/settings/cards/HomeworkTemplateCard.vue b/src/components/settings/cards/HomeworkTemplateCard.vue index 3c40238..2265eeb 100644 --- a/src/components/settings/cards/HomeworkTemplateCard.vue +++ b/src/components/settings/cards/HomeworkTemplateCard.vue @@ -23,8 +23,8 @@ size="large" prepend-icon="mdi-refresh" :loading="loading" - @click="loadConfig" class="mr-2" + @click="loadConfig" > 重新加载配置 @@ -48,8 +48,15 @@ - - + + - - + + addBookType(subject)" /> - + - - + + - + - - + + - + - - + + - + - + - + - + {{ dialog.title }} @@ -235,22 +276,43 @@ /> - - 所属科目 - {{ dialog.editedItem.subject }} + + + 所属科目 + + + {{ dialog.editedItem.subject }} + - + - 需完成部分 + + 需完成部分 + - + - - + + - + @@ -287,7 +349,7 @@ - + - + - + 数据库状态 {{ connectionStatus }} - + 刷新 @@ -20,17 +32,29 @@ - + 数据条目 共 {{ kvData.length }} 条记录 - + 加载数据 - - + + 新建 @@ -39,9 +63,16 @@ - + - + KV数据列表 - + @@ -102,13 +136,23 @@ - + - + 查看数据 - + @@ -129,11 +173,20 @@ - - + + 复制数据 - + 关闭 @@ -141,13 +194,23 @@ - + - + 编辑数据 - + @@ -168,15 +231,18 @@ - + 取消 保存 @@ -185,13 +251,23 @@ - + - + 新建数据 - + @@ -213,21 +289,24 @@ class="font-monospace" :error="!isValidNewJson" :error-messages="isValidNewJson ? [] : ['请输入有效的JSON格式']" - placeholder='请输入JSON数据,如:{"name": "value"}' + placeholder="请输入JSON数据,如:{"name": "value"}" /> - + 取消 创建 @@ -236,13 +315,23 @@ - + - + 获取云端访问地址 - + @@ -250,19 +339,43 @@ - + {{ cloudUrlError }} - + 云端地址获取成功 - - + + 数据已从本地迁移到云端 - - + + 云端配置已自动设置 @@ -279,10 +392,16 @@ @click:append-inner="copyCloudUrl" /> - + - + 高级选项 @@ -297,13 +416,16 @@ density="compact" /> - + 重新获取 @@ -313,16 +435,22 @@ - + 关闭 - + 在新窗口打开 @@ -330,31 +458,44 @@ - + - + 确认删除 确定要删除键名为 {{ itemToDelete?.key }} 的数据吗? - + 此操作不可撤销,请谨慎操作! - + 取消 删除 diff --git a/src/components/settings/cards/RandomPickerCard.vue b/src/components/settings/cards/RandomPickerCard.vue index 1db45cc..728f6a5 100644 --- a/src/components/settings/cards/RandomPickerCard.vue +++ b/src/components/settings/cards/RandomPickerCard.vue @@ -1,27 +1,26 @@ - - - - + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + diff --git a/src/pages/examschedule.vue b/src/pages/examschedule.vue index 8f35ba2..256e9b0 100644 --- a/src/pages/examschedule.vue +++ b/src/pages/examschedule.vue @@ -2,9 +2,17 @@ - + - mdi-calendar-check + + mdi-calendar-check + 考试看板 @@ -22,7 +30,9 @@ @click:close="error = ''" > - mdi-alert-circle + + mdi-alert-circle + {{ error }} @@ -38,7 +48,9 @@ @click:close="success = ''" > - mdi-check-circle + + mdi-check-circle + {{ success }} @@ -58,8 +70,8 @@ color="info" prepend-icon="mdi-refresh" :loading="loading" - @click="loadConfigs" variant="outlined" + @click="loadConfigs" > 刷新 @@ -74,19 +86,29 @@ - + + /> - + - mdi-format-list-bulleted + + mdi-format-list-bulleted + 配置列表 @@ -98,8 +120,13 @@ @click="showEditDialog(config)" > - - mdi-calendar-text + + + mdi-calendar-text + @@ -108,11 +135,21 @@ - mdi-information-outline + + mdi-information-outline + {{ config.message || '无描述' }} - mdi-book-multiple + + mdi-book-multiple + {{ config.examInfos ? config.examInfos.length : 0 }} 堂考试 @@ -140,8 +177,6 @@ > mdi-eye - - @@ -149,12 +184,22 @@ - + - + mdi-calendar-blank - 暂无配置 + + 暂无配置 + 点击"新建配置"按钮创建您的第一个考试配置 @@ -173,10 +218,18 @@ - + - mdi-rename-box + + mdi-rename-box + 重命名配置 @@ -187,10 +240,10 @@ variant="outlined" :rules="[v => !!v || '配置名称不能为空']" @keyup.enter="renameConfig" - > + /> - + 确认 @@ -212,12 +265,21 @@ - + - mdi-pencil + + mdi-pencil + 编辑考试配置 - + mdi-close - + > 关闭 - + - + - + - + - + - mdi-plus + + mdi-plus + {{ subject.name }} - + - mdi-plus - 点击添加作业 + + mdi-plus + + + 点击添加作业 + @@ -102,7 +127,12 @@ > 上传 - + 同步完成 - + 屏幕保护技术已启用 @@ -168,7 +202,7 @@ *研究显示动态像素偏移技术可以修复屏幕坏点,起到保护屏幕的作用,数据来自实验室。专利号CN108648692 + >专利号CN108648692 @@ -187,66 +221,73 @@ > 出勤 - 应到 : + + 应到 + : {{ state.studentList.length - - state.boardData.attendance.exclude.length + state.boardData.attendance.exclude.length }}人 - 实到 : + + 实到 + : {{ state.studentList.length - - state.boardData.attendance.absent.length - - state.boardData.attendance.late.length - - state.boardData.attendance.exclude.length + state.boardData.attendance.absent.length - + state.boardData.attendance.late.length - + state.boardData.attendance.exclude.length }}人 - 请假 : + + 请假 + : {{ state.boardData.attendance.absent.length }}人 - {{ `${index + 1}. ` }}{{ name }} + {{ `${index + 1}. ` }}{{ name }} - 迟到: + + 迟到 + : {{ state.boardData.attendance.late.length }}人 - {{ `${index + 1}. ` }}{{ name }} + {{ `${index + 1}. ` }}{{ name }} - 不参与: + + 不参与 + : {{ state.boardData.attendance.exclude.length }}人 - {{ `${index + 1}. ` }}{{ name }} + {{ `${index + 1}. ` }}{{ name }} @@ -259,7 +300,10 @@ @save="handleHomeworkSave" /> - + {{ state.snackbarText }} @@ -271,10 +315,17 @@ > - + 出勤状态管理 - + {{ state.dateString }} @@ -282,7 +333,10 @@ - + 到课 @@ -340,11 +394,11 @@ attendanceFilter.includes('absent') ? 'elevated' : 'tonal' " class="px-2 filter-chip" - @click="toggleFilter('absent')" prepend-icon="mdi-account-off" :append-icon=" attendanceFilter.includes('absent') ? 'mdi-check' : '' " + @click="toggleFilter('absent')" > 请假 @@ -355,11 +409,11 @@ attendanceFilter.includes('late') ? 'elevated' : 'tonal' " class="px-2 filter-chip" - @click="toggleFilter('late')" prepend-icon="mdi-clock-alert" :append-icon=" attendanceFilter.includes('late') ? 'mdi-check' : '' " + @click="toggleFilter('late')" > 迟到 @@ -370,11 +424,11 @@ attendanceFilter.includes('exclude') ? 'elevated' : 'tonal' " class="px-2 filter-chip" - @click="toggleFilter('exclude')" prepend-icon="mdi-account-cancel" :append-icon=" attendanceFilter.includes('exclude') ? 'mdi-check' : '' " + @click="toggleFilter('exclude')" > 不参与 @@ -391,7 +445,10 @@ md="6" lg="4" > - + @@ -404,11 +461,15 @@ size="24" class="mr-2" > - {{ - getStudentStatusIcon(state.studentList.indexOf(student)) - }} + + {{ + getStudentStatusIcon(state.studentList.indexOf(student)) + }} + - {{ student }} + + {{ student }} + @@ -421,8 +482,8 @@ icon="mdi-account-check" size="small" variant="text" - @click="setPresent(state.studentList.indexOf(student))" :title="'设为到课'" + @click="setPresent(state.studentList.indexOf(student))" /> @@ -466,10 +527,19 @@ - - + + - 批量操作 + + 批量操作 + - + + @@ -513,8 +583,13 @@ - - mdi-content-save + + + mdi-content-save + 保存 @@ -542,18 +617,32 @@ - + - 确认保存 + + 确认保存 + 您正在修改 {{ state.dateString }} 的数据,确定要保存吗? - + 取消 - 确认保存 + + 确认保存 + @@ -566,9 +655,14 @@ /> - + - 确认应用URL配置 + + 确认应用URL配置 + 以下配置将应用于当前班级: @@ -577,17 +671,30 @@ :key="change.key" > - + {{ change.name }} - {{ - change.description || change.key - }} + + {{ + change.description || change.key + }} + {{ change.oldValue }} - + {{ change.newValue }} @@ -604,12 +711,15 @@ > 取消 - + 确认应用 - +
适用于班级大屏的作业板小工具
+ 适用于班级大屏的作业板小工具 +
{{ formattedSettings }}
您尚未完成云端存储授权或连接失败,请点击下方按钮进行初始化。
{{ itemToDelete?.key }}
点击"新建配置"按钮创建您的第一个考试配置
@@ -187,66 +221,73 @@ >
以下配置将应用于当前班级: