mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-01 16:28:06 +09:00
fix instance-info if moderator but not admin
This commit is contained in:
parent
6213ea2280
commit
47e2ba724b
@ -81,7 +81,7 @@
|
|||||||
}}</template>
|
}}</template>
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
|
|
||||||
<FormSection v-if="iAmModerator">
|
<FormSection v-if="iAmAdmin">
|
||||||
<template #label>Moderation</template>
|
<template #label>Moderation</template>
|
||||||
<FormSuspense :p="init">
|
<FormSuspense :p="init">
|
||||||
<FormSwitch
|
<FormSwitch
|
||||||
@ -349,7 +349,7 @@ import MkSelect from "@/components/form/select.vue";
|
|||||||
import FormSwitch from "@/components/form/switch.vue";
|
import FormSwitch from "@/components/form/switch.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import number from "@/filters/number";
|
import number from "@/filters/number";
|
||||||
import { iAmModerator } from "@/account";
|
import { iAmAdmin } from "@/account";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
import { deviceKind } from "@/scripts/device-kind";
|
import { deviceKind } from "@/scripts/device-kind";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
@ -374,7 +374,7 @@ const props = defineProps<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
let tabs = ["overview"];
|
let tabs = ["overview"];
|
||||||
if (iAmModerator) tabs.push("chart", "users", "raw");
|
if (iAmAdmin) tabs.push("chart", "users", "raw");
|
||||||
let tab = $ref(tabs[0]);
|
let tab = $ref(tabs[0]);
|
||||||
watch($$(tab), () => syncSlide(tabs.indexOf(tab)));
|
watch($$(tab), () => syncSlide(tabs.indexOf(tab)));
|
||||||
|
|
||||||
@ -387,7 +387,7 @@ let isSilenced = $ref(false);
|
|||||||
let faviconUrl = $ref(null);
|
let faviconUrl = $ref(null);
|
||||||
|
|
||||||
const usersPagination = {
|
const usersPagination = {
|
||||||
endpoint: iAmModerator ? "admin/show-users" : ("users" as const),
|
endpoint: iAmAdmin ? "admin/show-users" : ("users" as const),
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: {
|
params: {
|
||||||
sort: "+updatedAt",
|
sort: "+updatedAt",
|
||||||
@ -478,7 +478,7 @@ let theTabs = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
if (iAmModerator) {
|
if (iAmAdmin) {
|
||||||
theTabs.push(
|
theTabs.push(
|
||||||
{
|
{
|
||||||
key: "chart",
|
key: "chart",
|
||||||
|
Loading…
Reference in New Issue
Block a user