summaryrefslogtreecommitdiff
path: root/packages/frontend/src/pages/drive.file.notes.vue
blob: cf454705889e2eec81faad2c1f8a7fde9f567cc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!--
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->

<template>
<div class="_gaps">
	<MkInfo>{{ i18n.ts._fileViewer.thisPageCanBeSeenFromTheAuthor }}</MkInfo>
	<MkNotesTimeline ref="tlComponent" :pagination="pagination"/>
</div>
</template>

<script lang="ts" setup>
import { ref, computed } from 'vue';
import { i18n } from '@/i18n.js';
import type { PagingCtx } from '@/composables/use-pagination.js';
import MkInfo from '@/components/MkInfo.vue';
import MkNotesTimeline from '@/components/MkNotesTimeline.vue';

const props = defineProps<{
	fileId: string;
}>();

const realFileId = computed(() => props.fileId);

const pagination = ref<PagingCtx>({
	endpoint: 'drive/files/attached-notes',
	limit: 10,
	params: {
		fileId: realFileId.value,
	},
});
</script>