add bloom
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-03-30 05:33:19 -06:00
parent ecce21aaaf
commit 35dbfda52c
3 changed files with 26 additions and 2 deletions

View File

@@ -228,6 +228,7 @@ export const Submission = {
const res = await http.get(`/submission/stats/${taskId}`, { params }) const res = await http.get(`/submission/stats/${taskId}`, { params })
return res.data as TaskStatsOut return res.data as TaskStatsOut
}, },
} }
export const Prompt = { export const Prompt = {

View File

@@ -75,7 +75,19 @@
transition: 'all 0.2s', transition: 'all 0.2s',
}" }"
> >
{{ round.question }} <div style="display: flex; justify-content: space-between; align-items: flex-start; gap: 8px">
<span>{{ round.question }}</span>
<span
v-if="round.prompt_level"
:style="{
flexShrink: 0,
fontSize: '11px',
fontWeight: 'bold',
color: levelColors[round.prompt_level],
marginTop: '2px',
}"
>L{{ round.prompt_level }}</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -121,6 +133,7 @@ const selectedRound = ref(0)
const rounds = computed(() => { const rounds = computed(() => {
const result: { const result: {
question: string question: string
prompt_level: number | null
html: string | null html: string | null
css: string | null css: string | null
js: string | null js: string | null
@@ -139,11 +152,20 @@ const rounds = computed(() => {
break break
} }
} }
result.push({ question: msg.content, html, css, js }) result.push({ question: msg.content, prompt_level: msg.prompt_level ?? null, html, css, js })
} }
return result return result
}) })
const levelColors: Record<number, string> = {
1: "#aaa",
2: "#6aab9c",
3: "#4a9ade",
4: "#c47ab8",
5: "#e0a040",
6: "#e05c5c",
}
const selectedPageHtml = computed(() => { const selectedPageHtml = computed(() => {
const round = rounds.value[selectedRound.value] const round = rounds.value[selectedRound.value]
if (!round?.html) return null if (!round?.html) return null

View File

@@ -7,6 +7,7 @@ export interface PromptMessage {
code_html: string | null code_html: string | null
code_css: string | null code_css: string | null
code_js: string | null code_js: string | null
prompt_level?: number | null
created: string created: string
} }