This commit is contained in:
2026-06-29 07:19:04 -06:00
parent 2da0d098b9
commit 4261bae104
10 changed files with 58 additions and 61 deletions

View File

@@ -15,7 +15,7 @@
@click="handleAnalyze" @click="handleAnalyze"
> >
<template #icon> <template #icon>
<Icon icon="mingcute:ai-line" /> <Icon icon="ph:sparkle" />
</template> </template>
开始分析 开始分析
</n-button> </n-button>

View File

@@ -796,7 +796,7 @@ const radarChartOptions = {
style="margin-top: 26px" style="margin-top: 26px"
> >
<template #icon> <template #icon>
<Icon icon="mingcute:ai-line" /> <Icon icon="ph:sparkle" />
</template> </template>
AI分析 AI分析
</n-button> </n-button>

View File

@@ -49,7 +49,7 @@ const codeStore = useCodeStore()
const problemStore = useProblemStore() const problemStore = useProblemStore()
const { problem, languages } = storeToRefs(problemStore) const { problem, languages } = storeToRefs(problemStore)
const { isMobile, isDesktop } = useBreakpoints() const { isDesktop } = useBreakpoints()
const syncEnabled = ref(false) // 用户点击按钮后的意图状态(想要开启/关闭) const syncEnabled = ref(false) // 用户点击按钮后的意图状态(想要开启/关闭)
const statisticPanel = ref(false) const statisticPanel = ref(false)
@@ -65,12 +65,6 @@ const showSyncFeature = computed(
!isContestMode.value, !isContestMode.value,
) )
const menu = computed<DropdownOption[]>(() => [
{ label: "去自测猫", key: "goTestCat", show: isMobile.value },
{ label: "复制代码", key: "copy" },
{ label: "重置代码", key: "reset" },
])
const showGoSubmissionButton = computed(() => { const showGoSubmissionButton = computed(() => {
if (isContestMode.value) return true if (isContestMode.value) return true
else if (userStore.isAdminRole) return true else if (userStore.isAdminRole) return true
@@ -133,15 +127,6 @@ const goEdit = () => {
window.open(router.resolve(url).href, "_blank") window.open(router.resolve(url).href, "_blank")
} }
const handleMenuSelect = (key: string) => {
const actions: Record<string, () => void> = {
reset,
copy,
goTestCat,
}
actions[key]?.()
}
const toggleSync = () => { const toggleSync = () => {
syncEnabled.value = !syncEnabled.value syncEnabled.value = !syncEnabled.value
emit("toggleSync", syncEnabled.value) emit("toggleSync", syncEnabled.value)
@@ -174,41 +159,43 @@ onMounted(() => {
<SubmitCode v-else /> <SubmitCode v-else />
<n-button <IconButton
v-if="showGoSubmissionButton" v-if="showGoSubmissionButton"
:size="buttonSize" icon="streamline-ultimate-color:task-list-text-1"
tip="提交信息"
@click="goSubmissions" @click="goSubmissions"
> />
提交信息
</n-button>
<n-button <IconButton
v-if="userStore.isTeacherOrAbove" v-if="userStore.isTeacherOrAbove"
:size="buttonSize" icon="streamline-ultimate-color:analytics-pie-2"
tip="统计信息"
@click="statisticPanel = true" @click="statisticPanel = true"
> />
{{ isDesktop ? "统计信息" : "统计" }}
</n-button>
<n-button <template v-if="codeStore.code.language !== 'Flowchart'">
v-if="isDesktop && codeStore.code.language !== 'Flowchart'" <IconButton
icon="streamline-ultimate-color:business-lucky-cat"
tip="自测猫"
@click="goTestCat" @click="goTestCat"
> />
自测猫
</n-button>
<n-dropdown <IconButton
v-if="codeStore.code.language !== 'Flowchart'" icon="streamline-ultimate-color:copy-paste-1"
size="large" tip="复制代码"
:options="menu" @click="copy"
@select="handleMenuSelect" />
>
<n-button :size="buttonSize">操作</n-button> <IconButton
</n-dropdown> icon="streamline-ultimate-color:synchronize-arrow"
tip="重置代码"
@click="reset"
/>
</template>
<IconButton <IconButton
v-if="isDesktop && userStore.isSuperAdmin" v-if="isDesktop && userStore.isSuperAdmin"
icon="streamline-ultimate-color:file-code-edit" icon="streamline-ultimate-color:common-file-edit"
tip="编辑题目" tip="编辑题目"
@click="goEdit" @click="goEdit"
/> />
@@ -217,8 +204,8 @@ onMounted(() => {
<IconButton <IconButton
:icon=" :icon="
syncEnabled syncEnabled
? 'streamline-ultimate-color:flash-off' ? 'ph:wifi-slash'
: 'streamline-ultimate-color:monitor-flash' : 'ph:wifi-high'
" "
:tip="syncEnabled ? SYNC_MESSAGES.SYNC_ON : SYNC_MESSAGES.SYNC_OFF" :tip="syncEnabled ? SYNC_MESSAGES.SYNC_ON : SYNC_MESSAGES.SYNC_OFF"
:type="syncEnabled ? 'warning' : 'default'" :type="syncEnabled ? 'warning' : 'default'"

View File

@@ -259,7 +259,7 @@ function type(status: ProblemStatus) {
</n-flex> </n-flex>
<p class="title" :style="style"> <p class="title" :style="style">
<n-flex align="center"> <n-flex align="center">
<Icon icon="streamline-emojis:sparkles"></Icon> <Icon icon="streamline-emojis:scroll"></Icon>
描述 描述
</n-flex> </n-flex>
</p> </p>
@@ -271,7 +271,7 @@ function type(status: ProblemStatus) {
<p class="title" :style="style"> <p class="title" :style="style">
<n-flex align="center"> <n-flex align="center">
<Icon icon="streamline-emojis:four-leaf-clover"></Icon> <Icon icon="streamline-emojis:e-mail-1"></Icon>
输入 输入
</n-flex> </n-flex>
</p> </p>
@@ -283,7 +283,7 @@ function type(status: ProblemStatus) {
<p class="title" :style="style"> <p class="title" :style="style">
<n-flex align="center"> <n-flex align="center">
<Icon icon="streamline-emojis:herb"></Icon> <Icon icon="streamline-emojis:postbox"></Icon>
输出 输出
</n-flex> </n-flex>
</p> </p>
@@ -296,7 +296,7 @@ function type(status: ProblemStatus) {
<div v-if="problem.hint"> <div v-if="problem.hint">
<p class="title" :style="style"> <p class="title" :style="style">
<n-flex align="center"> <n-flex align="center">
<Icon icon="streamline-emojis:seedling"></Icon> <Icon icon="streamline-emojis:man-tipping-hand-1"></Icon>
提示 提示
</n-flex> </n-flex>
</p> </p>
@@ -311,7 +311,7 @@ function type(status: ProblemStatus) {
<div v-if="astRulesForDisplay.length > 0"> <div v-if="astRulesForDisplay.length > 0">
<p class="title" :style="style"> <p class="title" :style="style">
<n-flex align="center"> <n-flex align="center">
<Icon icon="streamline-emojis:open-book"></Icon> <Icon icon="streamline-emojis:ballot-box-with-check"></Icon>
要求 要求
</n-flex> </n-flex>
</p> </p>
@@ -336,7 +336,12 @@ function type(status: ProblemStatus) {
<div v-for="(sample, index) of samples" :key="index"> <div v-for="(sample, index) of samples" :key="index">
<n-flex align="center"> <n-flex align="center">
<p class="title" :style="style">例子 {{ index + 1 }}</p> <p class="title" :style="style">
<n-flex align="center">
<Icon icon="streamline-emojis:microscope"></Icon>
例子 {{ index + 1 }}
</n-flex>
</p>
<n-button <n-button
size="small" size="small"
:type="type(sample.status)" :type="type(sample.status)"
@@ -375,7 +380,12 @@ function type(status: ProblemStatus) {
</div> </div>
<div v-if="problem.source"> <div v-if="problem.source">
<p class="title" :style="style">来源</p> <p class="title" :style="style">
<n-flex align="center">
<Icon icon="streamline-emojis:open-book"></Icon>
来源
</n-flex>
</p>
<MdPreview <MdPreview
preview-theme="vuepress" preview-theme="vuepress"
:model-value="problem.source" :model-value="problem.source"
@@ -388,7 +398,7 @@ function type(status: ProblemStatus) {
<n-divider /> <n-divider />
<p class="title" :style="style"> <p class="title" :style="style">
<n-flex align="center"> <n-flex align="center">
<Icon icon="fluent-emoji-flat:light-bulb"></Icon> <Icon icon="streamline-emojis:thumbs-up-1"></Icon>
相似题目推荐 相似题目推荐
</n-flex> </n-flex>
</p> </p>

View File

@@ -16,8 +16,8 @@ const color = computed(() => {
<template> <template>
<n-icon v-if="showIcon" :color="color"> <n-icon v-if="showIcon" :color="color">
<Icon icon="ep:select" v-if="status === 'passed'"></Icon> <Icon icon="ph:check" v-if="status === 'passed'"></Icon>
<Icon icon="ep:semi-select" v-if="status === 'failed'"></Icon> <Icon icon="ph:minus" v-if="status === 'failed'"></Icon>
</n-icon> </n-icon>
</template> </template>

View File

@@ -175,7 +175,7 @@ const columns: DataTableColumn<Submission["info"]["data"][number]>[] = [
<n-icon <n-icon
:color="rule.passed ? theme.successColor : theme.errorColor" :color="rule.passed ? theme.successColor : theme.errorColor"
> >
<Icon :icon="rule.passed ? 'ep:select' : 'ep:close-bold'" /> <Icon :icon="rule.passed ? 'ph:check' : 'ph:x-bold'" />
</n-icon> </n-icon>
<span>{{ rule.description }}</span> <span>{{ rule.description }}</span>
</n-flex> </n-flex>

View File

@@ -99,7 +99,7 @@ function handleJoin() {
</n-button> </n-button>
<n-tag v-else type="success" size="large"> <n-tag v-else type="success" size="large">
<template #icon> <template #icon>
<Icon icon="material-symbols:check-circle" /> <Icon icon="ph:check-circle-fill" />
</template> </template>
已加入 已加入
</n-tag> </n-tag>

View File

@@ -747,7 +747,7 @@ watch(
@click="analyzeSingleClassWithAI" @click="analyzeSingleClassWithAI"
> >
<template #icon> <template #icon>
<Icon icon="mingcute:ai-line" /> <Icon icon="ph:sparkle" />
</template> </template>
AI分析 AI分析
</n-button> </n-button>

View File

@@ -40,7 +40,7 @@ function filterClass() {
<template #trigger> <template #trigger>
<n-button text @click="filterClass"> <n-button text @click="filterClass">
<template #icon> <template #icon>
<Icon icon="openmoji:filter"></Icon> <Icon icon="ph:funnel"></Icon>
</template> </template>
</n-button> </n-button>
</template> </template>

View File

@@ -11,7 +11,7 @@
@click="showLargeImage = true" @click="showLargeImage = true"
> >
<template #icon> <template #icon>
<Icon icon="mdi:fullscreen" /> <Icon icon="ph:corners-out" />
</template> </template>
查看大图 查看大图
</n-button> </n-button>
@@ -28,7 +28,7 @@
<div v-if="showLargeImage" class="fullscreen-toolbar"> <div v-if="showLargeImage" class="fullscreen-toolbar">
<n-button secondary round @click="showLargeImage = false"> <n-button secondary round @click="showLargeImage = false">
<template #icon> <template #icon>
<Icon icon="mdi:fullscreen-exit" /> <Icon icon="ph:corners-in" />
</template> </template>
退出大图 退出大图
</n-button> </n-button>