upd: remove approvals from admin-users
Removes approvals tab in favor of the new approvals page
This commit is contained in:
parent
142f500f4b
commit
fd8fa9b3de
|
@ -180,20 +180,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkObjectView tall :value="user">
|
||||
</MkObjectView>
|
||||
</div>
|
||||
|
||||
<div v-else-if="tab === 'approval'" class="_gaps_m">
|
||||
<MkKeyValue oneline>
|
||||
<template #key>{{ i18n.ts.approvalStatus }}</template>
|
||||
<template #value><span class="_monospace">{{ approved ? i18n.ts.approved : i18n.ts.notApproved }}</span></template>
|
||||
</MkKeyValue>
|
||||
|
||||
<MkTextarea v-model="signupReason" readonly>
|
||||
<template #label>Reason</template>
|
||||
</MkTextarea>
|
||||
|
||||
<MkButton v-if="$i.isAdmin" inline success @click="approveAccount">{{ i18n.ts.approveAccount }}</MkButton>
|
||||
<MkButton v-if="$i.isAdmin" inline danger @click="deleteAccount">{{ i18n.ts.denyAccount }}</MkButton>
|
||||
</div>
|
||||
</FormSuspense>
|
||||
</MkSpacer>
|
||||
</MkStickyContainer>
|
||||
|
@ -244,7 +230,6 @@ let approved = $ref(false);
|
|||
let suspended = $ref(false);
|
||||
let markedAsNSFW = $ref(false);
|
||||
let moderationNote = $ref('');
|
||||
let signupReason = $ref('');
|
||||
|
||||
const filesPagination = {
|
||||
endpoint: 'admin/drive/files' as const,
|
||||
|
@ -278,7 +263,6 @@ function createFetcher() {
|
|||
approved = info.approved;
|
||||
suspended = info.isSuspended;
|
||||
moderationNote = info.moderationNote;
|
||||
signupReason = info.signupReason;
|
||||
markedAsNSFW = info.alwaysMarkNsfw;
|
||||
|
||||
watch($$(moderationNote), async () => {
|
||||
|
@ -397,16 +381,6 @@ async function deleteAccount() {
|
|||
}
|
||||
}
|
||||
|
||||
async function approveAccount() {
|
||||
const confirm = await os.confirm({
|
||||
type: 'warning',
|
||||
text: i18n.ts.approveConfirm,
|
||||
});
|
||||
if (confirm.canceled) return;
|
||||
await os.api('admin/approve-user', { userId: user.id });
|
||||
await refreshUser();
|
||||
}
|
||||
|
||||
async function assignRole() {
|
||||
const roles = await os.api('admin/roles/list');
|
||||
|
||||
|
@ -493,36 +467,7 @@ watch($$(user), () => {
|
|||
|
||||
const headerActions = $computed(() => []);
|
||||
|
||||
const headerTabs = $computed(() => iAmAdmin && !approved ?
|
||||
[{
|
||||
key: 'overview',
|
||||
title: i18n.ts.overview,
|
||||
icon: 'ph-info ph-bold ph-lg',
|
||||
}, {
|
||||
key: 'roles',
|
||||
title: i18n.ts.roles,
|
||||
icon: 'ph-seal-check ph-bold pg-lg',
|
||||
}, {
|
||||
key: 'announcements',
|
||||
title: i18n.ts.announcements,
|
||||
icon: 'ph-megaphone ph-bold ph-lg',
|
||||
}, {
|
||||
key: 'drive',
|
||||
title: i18n.ts.drive,
|
||||
icon: 'ph-cloud ph-bold ph-lg',
|
||||
}, {
|
||||
key: 'chart',
|
||||
title: i18n.ts.charts,
|
||||
icon: 'ph-chart-line ph-bold pg-lg',
|
||||
}, {
|
||||
key: 'raw',
|
||||
title: 'Raw',
|
||||
icon: 'ph-code ph-bold pg-lg',
|
||||
}, {
|
||||
key: 'approval',
|
||||
title: 'Approval',
|
||||
icon: 'ph-eye ph-bold pg-lg',
|
||||
}] : [{
|
||||
const headerTabs = $computed(() => [{
|
||||
key: 'overview',
|
||||
title: i18n.ts.overview,
|
||||
icon: 'ph-info ph-bold ph-lg',
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<MkStickyContainer>
|
||||
|
|
Loading…
Reference in New Issue