feat: 管理者が特定ユーザーのアップロードしたファイル一覧を見れるように
This commit is contained in:
parent
905d8625f8
commit
696e8add00
5 changed files with 133 additions and 86 deletions
|
|
@ -76,6 +76,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="tab === 'files'" class="_formRoot">
|
||||
<MkFileListForAdmin :pagination="filesPagination" view-mode="grid"/>
|
||||
</div>
|
||||
<div v-else-if="tab === 'ap'" class="_formRoot">
|
||||
<MkObjectView v-if="ap" tall :value="user">
|
||||
</MkObjectView>
|
||||
|
|
@ -105,6 +108,7 @@ import FormButton from '@/components/ui/button.vue';
|
|||
import MkKeyValue from '@/components/key-value.vue';
|
||||
import MkSelect from '@/components/form/select.vue';
|
||||
import FormSuspense from '@/components/form/suspense.vue';
|
||||
import MkFileListForAdmin from '@/components/file-list-for-admin.vue';
|
||||
import * as os from '@/os';
|
||||
import number from '@/filters/number';
|
||||
import bytes from '@/filters/bytes';
|
||||
|
|
@ -127,6 +131,13 @@ let ap = $ref(null);
|
|||
let moderator = $ref(false);
|
||||
let silenced = $ref(false);
|
||||
let suspended = $ref(false);
|
||||
const filesPagination = {
|
||||
endpoint: 'admin/drive/files' as const,
|
||||
limit: 10,
|
||||
params: computed(() => ({
|
||||
userId: props.userId,
|
||||
})),
|
||||
};
|
||||
|
||||
function createFetcher() {
|
||||
if (iAmModerator) {
|
||||
|
|
@ -244,7 +255,11 @@ const headerTabs = $computed(() => [{
|
|||
key: 'chart',
|
||||
title: i18n.ts.charts,
|
||||
icon: 'fas fa-chart-simple',
|
||||
}, {
|
||||
}, iAmModerator ? {
|
||||
key: 'files',
|
||||
title: i18n.ts.files,
|
||||
icon: 'fas fa-cloud',
|
||||
} : null, {
|
||||
key: 'ap',
|
||||
title: 'AP',
|
||||
icon: 'fas fa-share-alt',
|
||||
|
|
@ -252,7 +267,7 @@ const headerTabs = $computed(() => [{
|
|||
key: 'raw',
|
||||
title: 'Raw data',
|
||||
icon: 'fas fa-code',
|
||||
}]);
|
||||
}].filter(x => x != null));
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
title: user ? acct(user) : i18n.ts.userInfo,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue