add entrance
Some checks failed
Deploy / deploy (build, debian, 22) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822) (push) Has been cancelled

This commit is contained in:
2026-04-01 00:17:33 -06:00
parent f2ddd4bc93
commit 40f361cf91

View File

@@ -18,6 +18,9 @@
> >
<Icon :width="16" icon="lucide:list" /> <Icon :width="16" icon="lucide:list" />
</n-button> </n-button>
<n-button v-if="roleAdmin || roleSuper" text @click="showStats = true">
<Icon :width="16" icon="lucide:bar-chart-2" />
</n-button>
<n-button v-if="roleSuper" text @click="edit"> <n-button v-if="roleSuper" text @click="edit">
<Icon :width="16" icon="lucide:edit" /> <Icon :width="16" icon="lucide:edit" />
</n-button> </n-button>
@@ -46,6 +49,7 @@
/> />
</div> </div>
</div> </div>
<TaskStatsModal v-model:show="showStats" :task-id="taskId" />
<n-modal <n-modal
v-model:show="showCode" v-model:show="showCode"
preset="card" preset="card"
@@ -75,10 +79,11 @@ import { marked } from "marked"
import PromptPanel from "../components/PromptPanel.vue" import PromptPanel from "../components/PromptPanel.vue"
import ExternalAIPanel from "../components/ExternalAIPanel.vue" import ExternalAIPanel from "../components/ExternalAIPanel.vue"
import Preview from "../components/Preview.vue" import Preview from "../components/Preview.vue"
import TaskStatsModal from "../components/TaskStatsModal.vue"
import { Challenge, Submission } from "../api" import { Challenge, Submission } from "../api"
import { html, css, js } from "../store/editors" import { html, css, js } from "../store/editors"
import { taskId } from "../store/task" import { taskId } from "../store/task"
import { authed, roleSuper } from "../store/user" import { authed, roleAdmin, roleSuper } from "../store/user"
import { import {
connectPrompt, connectPrompt,
disconnectPrompt, disconnectPrompt,
@@ -93,6 +98,7 @@ const message = useMessage()
const activeTab = ref("desc") const activeTab = ref("desc")
const challengeContent = ref("") const challengeContent = ref("")
const showCode = ref(false) const showCode = ref(false)
const showStats = ref(false)
watch(streaming, (val) => { watch(streaming, (val) => {
if (val) activeTab.value = "chat" if (val) activeTab.value = "chat"