@@ -44,6 +44,9 @@ SPDX-License-Identifier: AGPL-3.0-only
44
44
<MkButton danger @click="del"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
45
45
</div>
46
46
</div>
47
+ <div v-else-if="tab === 'notes' && info" class="_gaps_m">
48
+ <XNotes :fileId="fileId"/>
49
+ </div>
47
50
<div v-else-if="tab === 'ip' && info" class="_gaps_m">
48
51
<MkInfo v-if="!iAmAdmin" warn>{{ i18n.ts.requireAdminForView }}</MkInfo>
49
52
<MkKeyValue v-if="info.requestIp" class="_monospace" :copy="info.requestIp" oneline>
@@ -67,7 +70,7 @@ SPDX-License-Identifier: AGPL-3.0-only
67
70
</template>
68
71
69
72
<script lang="ts" setup>
70
- import { computed, ref } from 'vue';
73
+ import { computed, defineAsyncComponent, ref } from 'vue';
71
74
import * as Misskey from 'misskey-js';
72
75
import MkButton from '@/components/MkButton.vue';
73
76
import MkSwitch from '@/components/MkSwitch.vue';
@@ -88,6 +91,7 @@ const tab = ref('overview');
88
91
const file = ref<Misskey.entities.DriveFile | null>(null);
89
92
const info = ref<Misskey.entities.AdminDriveShowFileResponse | null>(null);
90
93
const isSensitive = ref<boolean>(false);
94
+ const XNotes = defineAsyncComponent(() => import('./drive.file.notes.vue'));
91
95
92
96
const props = defineProps<{
93
97
fileId: string,
@@ -131,6 +135,10 @@ const headerTabs = computed(() => [{
131
135
title: i18n.ts.overview,
132
136
icon: 'ti ti-info-circle',
133
137
}, iAmModerator ? {
138
+ key: 'notes',
139
+ title: i18n.ts._fileViewer.attachedNotes,
140
+ icon: 'ti ti-pencil',
141
+ } : null, iAmModerator ? {
134
142
key: 'ip',
135
143
title: 'IP',
136
144
icon: 'ti ti-password',
0 commit comments