fix
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-07 19:08:18 -06:00
parent 93c816f3ab
commit 17e816761f

View File

@@ -29,7 +29,13 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, h } from "vue" import { computed, h } from "vue"
import { Icon } from "@iconify/vue" import { Icon } from "@iconify/vue"
import { authed, roleNormal, roleSuper, user } from "../../store/user" import {
authed,
roleAdmin,
roleNormal,
roleSuper,
user,
} from "../../store/user"
import { loginModal } from "../../store/modal" import { loginModal } from "../../store/modal"
import { show, panelSize } from "../../store/panel" import { show, panelSize } from "../../store/panel"
import { step } from "../../store/tutorial" import { step } from "../../store/tutorial"
@@ -96,9 +102,20 @@ function showTutorial() {
function clickMenu(name: string) { function clickMenu(name: string) {
switch (name) { switch (name) {
case "dashboard": case "dashboard": {
router.push({ name: "tutorial-editor", params: { display: step.value } }) if (roleSuper.value) {
router.push({
name: "tutorial-editor",
params: { display: step.value },
})
break break
} else if (roleAdmin.value) {
router.push({ name: "challenge-editor" })
break
} else {
break
}
}
case "admin": case "admin":
window.open(ADMIN_URL) window.open(ADMIN_URL)
break break