mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 02:53:09 +02:00
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
2 changed files with 25 additions and 85 deletions
|
@ -180,20 +180,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkObjectView tall :value="user">
|
<MkObjectView tall :value="user">
|
||||||
</MkObjectView>
|
</MkObjectView>
|
||||||
</div>
|
</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>
|
</FormSuspense>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
</MkStickyContainer>
|
</MkStickyContainer>
|
||||||
|
@ -244,7 +230,6 @@ let approved = $ref(false);
|
||||||
let suspended = $ref(false);
|
let suspended = $ref(false);
|
||||||
let markedAsNSFW = $ref(false);
|
let markedAsNSFW = $ref(false);
|
||||||
let moderationNote = $ref('');
|
let moderationNote = $ref('');
|
||||||
let signupReason = $ref('');
|
|
||||||
|
|
||||||
const filesPagination = {
|
const filesPagination = {
|
||||||
endpoint: 'admin/drive/files' as const,
|
endpoint: 'admin/drive/files' as const,
|
||||||
|
@ -278,7 +263,6 @@ function createFetcher() {
|
||||||
approved = info.approved;
|
approved = info.approved;
|
||||||
suspended = info.isSuspended;
|
suspended = info.isSuspended;
|
||||||
moderationNote = info.moderationNote;
|
moderationNote = info.moderationNote;
|
||||||
signupReason = info.signupReason;
|
|
||||||
markedAsNSFW = info.alwaysMarkNsfw;
|
markedAsNSFW = info.alwaysMarkNsfw;
|
||||||
|
|
||||||
watch($$(moderationNote), async () => {
|
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() {
|
async function assignRole() {
|
||||||
const roles = await os.api('admin/roles/list');
|
const roles = await os.api('admin/roles/list');
|
||||||
|
|
||||||
|
@ -493,60 +467,31 @@ watch($$(user), () => {
|
||||||
|
|
||||||
const headerActions = $computed(() => []);
|
const headerActions = $computed(() => []);
|
||||||
|
|
||||||
const headerTabs = $computed(() => iAmAdmin && !approved ?
|
const headerTabs = $computed(() => [{
|
||||||
[{
|
key: 'overview',
|
||||||
key: 'overview',
|
title: i18n.ts.overview,
|
||||||
title: i18n.ts.overview,
|
icon: 'ph-info ph-bold ph-lg',
|
||||||
icon: 'ph-info ph-bold ph-lg',
|
}, {
|
||||||
}, {
|
key: 'roles',
|
||||||
key: 'roles',
|
title: i18n.ts.roles,
|
||||||
title: i18n.ts.roles,
|
icon: 'ph-seal-check ph-bold pg-lg',
|
||||||
icon: 'ph-seal-check ph-bold pg-lg',
|
}, {
|
||||||
}, {
|
key: 'announcements',
|
||||||
key: 'announcements',
|
title: i18n.ts.announcements,
|
||||||
title: i18n.ts.announcements,
|
icon: 'ph-megaphone ph-bold ph-lg',
|
||||||
icon: 'ph-megaphone ph-bold ph-lg',
|
}, {
|
||||||
}, {
|
key: 'drive',
|
||||||
key: 'drive',
|
title: i18n.ts.drive,
|
||||||
title: i18n.ts.drive,
|
icon: 'ph-cloud ph-bold ph-lg',
|
||||||
icon: 'ph-cloud ph-bold ph-lg',
|
}, {
|
||||||
}, {
|
key: 'chart',
|
||||||
key: 'chart',
|
title: i18n.ts.charts,
|
||||||
title: i18n.ts.charts,
|
icon: 'ph-chart-line ph-bold pg-lg',
|
||||||
icon: 'ph-chart-line ph-bold pg-lg',
|
}, {
|
||||||
}, {
|
key: 'raw',
|
||||||
key: 'raw',
|
title: 'Raw',
|
||||||
title: 'Raw',
|
icon: 'ph-code ph-bold pg-lg',
|
||||||
icon: 'ph-code ph-bold pg-lg',
|
}]);
|
||||||
}, {
|
|
||||||
key: 'approval',
|
|
||||||
title: 'Approval',
|
|
||||||
icon: 'ph-eye ph-bold pg-lg',
|
|
||||||
}] : [{
|
|
||||||
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',
|
|
||||||
}]);
|
|
||||||
|
|
||||||
definePageMetadata(computed(() => ({
|
definePageMetadata(computed(() => ({
|
||||||
title: user ? acct(user) : i18n.ts.userInfo,
|
title: user ? acct(user) : i18n.ts.userInfo,
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
<!--
|
|
||||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<MkStickyContainer>
|
<MkStickyContainer>
|
||||||
|
|
Loading…
Reference in a new issue