You've already forked AstralRinth
forked from didirus/AstralRinth
Add moderation button to user menu
This commit is contained in:
@@ -231,6 +231,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #revenue> <CurrencyIcon aria-hidden="true" /> Revenue </template>
|
<template #revenue> <CurrencyIcon aria-hidden="true" /> Revenue </template>
|
||||||
<template #analytics> <ChartIcon aria-hidden="true" /> Analytics </template>
|
<template #analytics> <ChartIcon aria-hidden="true" /> Analytics </template>
|
||||||
|
<template #moderation> <ModerationIcon aria-hidden="true" /> Moderation </template>
|
||||||
<template #sign-out> <LogOutIcon aria-hidden="true" /> Sign out </template>
|
<template #sign-out> <LogOutIcon aria-hidden="true" /> Sign out </template>
|
||||||
</OverflowMenu>
|
</OverflowMenu>
|
||||||
<ButtonStyled v-else color="brand">
|
<ButtonStyled v-else color="brand">
|
||||||
@@ -778,6 +779,7 @@ const userMenuOptions = computed(() => {
|
|||||||
link: "/settings",
|
link: "/settings",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
// TODO: Only show if user has projects
|
// TODO: Only show if user has projects
|
||||||
options = [
|
options = [
|
||||||
...options,
|
...options,
|
||||||
@@ -801,6 +803,24 @@ const userMenuOptions = computed(() => {
|
|||||||
link: "/dashboard/analytics",
|
link: "/dashboard/analytics",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (
|
||||||
|
(auth.value && auth.value.user && auth.value.user.role === "moderator") ||
|
||||||
|
auth.value.user.role === "admin"
|
||||||
|
) {
|
||||||
|
options = [
|
||||||
|
...options,
|
||||||
|
{
|
||||||
|
divider: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "moderation",
|
||||||
|
color: "orange",
|
||||||
|
link: "/moderation/review",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
options = [
|
options = [
|
||||||
...options,
|
...options,
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user