fix
This commit is contained in:
@@ -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) {
|
||||||
break
|
router.push({
|
||||||
|
name: "tutorial-editor",
|
||||||
|
params: { display: step.value },
|
||||||
|
})
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user