Skip to content

Commit

Permalink
Feat: admin entrance
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyCreeper committed Dec 12, 2023
1 parent 0c9a91f commit b7bf50b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { userStore } from "@/stores/user";
import DarkModeSwitcher from "@/components/DarkModeSwitcher.vue";
import router from "@/router";
import SyncTVLogo from "@/assets/appIcons/synctv-nobg.svg";
import { ROLE } from "@/types/User";
const mobileMenu = ref(false);
const { isLogin, info } = userStore();
Expand Down Expand Up @@ -42,6 +43,12 @@ const menuLinks = computed(() => {
to: "/createRoom"
}
];
if (info.value?.role! >= ROLE.Admin) {
loginLinks.push({
name: "管理后台",
to: "/admin"
});
}
links = loginLinks;
}
Expand Down

0 comments on commit b7bf50b

Please sign in to comment.