feat(前台): 各页直达后台对应功能——编辑这一课、新建比赛、编辑这条公告……
Deploy / deploy (push) Canceled after 0s

题目页「编辑题目」从只给超管放宽到有权改这道题的人(含学生管理员改自己出的题);
题目、比赛、题单列表加「新建」;自学首页加「自学情况」「管理教程」,课文加「编辑这一课」;
公告加「编辑这条」「发公告」;成就加「管理成就」;智能分析加「AI 报告」,看某个学生时
带着用户名过去直接筛到他。按钮统一走 shared/components/AdminLink.vue。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-15 14:02:29 +08:00
1 parent e7b6e27b85
commit 0ffc405a20
12 files changed
+140 -3

No files matched your search

@@ -58,7 +58,8 @@ export function useEditorMenu(statisticsInline: Ref<boolean>) {
// 一写回去就顺着 Yjs 同步过去,等于一键清空学生的作业,他还没法撤回
if (!teacherCollab.value) items.push({ label: "重置代码", key: "reset" })
}
if (isDesktop.value && userStore.isSuperAdmin) items.push({ label: "编辑题目", key: "edit" })
if (isDesktop.value && problem.value && userStore.canEditProblem(problem.value))
items.push({ label: "编辑题目", key: "edit" })
return items
})
+4
View File
@@ -15,6 +15,7 @@ import Pagination from "shared/components/Pagination.vue"
import { useBreakpoints } from "shared/composables/breakpoints"
import { usePagination } from "shared/composables/pagination"
import { useAuthModalStore } from "shared/store/authModal"
import AdminLink from "shared/components/AdminLink.vue"
import { useUserStore } from "shared/store/user"
import ProblemStatus from "./components/ProblemStatus.vue"
import ProblemTypeTag from "./components/ProblemTypeTag.vue"
@@ -430,6 +431,9 @@ const gridColumns = computed(() =>
</div>
<div class="spacer"></div>
<Hitokoto class="hitokoto" />
<AdminLink v-if="userStore.hasProblemPermission" to="/admin/problem/create" size="small">
新建题目
</AdminLink>
</div>
<div class="titlebar">