fix instance-info if moderator but not admin

This commit is contained in:
ThatOneCalculator 2023-05-07 16:11:20 -07:00
parent cb4f23ec38
commit 5f69f3fa34
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
1 changed files with 5 additions and 5 deletions

View File

@ -81,7 +81,7 @@
}}</template>
</MkKeyValue>
<FormSection v-if="iAmModerator">
<FormSection v-if="iAmAdmin">
<template #label>Moderation</template>
<FormSuspense :p="init">
<FormSwitch
@ -349,7 +349,7 @@ import MkSelect from "@/components/form/select.vue";
import FormSwitch from "@/components/form/switch.vue";
import * as os from "@/os";
import number from "@/filters/number";
import { iAmModerator } from "@/account";
import { iAmAdmin } from "@/account";
import { definePageMetadata } from "@/scripts/page-metadata";
import { deviceKind } from "@/scripts/device-kind";
import { defaultStore } from "@/store";
@ -374,7 +374,7 @@ const props = defineProps<{
}>();
let tabs = ["overview"];
if (iAmModerator) tabs.push("chart", "users", "raw");
if (iAmAdmin) tabs.push("chart", "users", "raw");
let tab = $ref(tabs[0]);
watch($$(tab), () => syncSlide(tabs.indexOf(tab)));
@ -387,7 +387,7 @@ let isSilenced = $ref(false);
let faviconUrl = $ref(null);
const usersPagination = {
endpoint: iAmModerator ? "admin/show-users" : ("users" as const),
endpoint: iAmAdmin ? "admin/show-users" : ("users" as const),
limit: 10,
params: {
sort: "+updatedAt",
@ -478,7 +478,7 @@ let theTabs = [
},
];
if (iAmModerator) {
if (iAmAdmin) {
theTabs.push(
{
key: "chart",