diff --git a/locales/en-US.yml b/locales/en-US.yml
index 25158511b..bee6111fc 100644
--- a/locales/en-US.yml
+++ b/locales/en-US.yml
@@ -347,6 +347,8 @@ withReplies: "Include replies"
connectedTo: "Following account(s) are connected"
notesAndReplies: "Notes and replies"
withFiles: "Including files"
+attachedToNotes: "Notes with this file"
+showAttachedNotes: "Show notes with this file"
silence: "Silence"
silenceConfirm: "Are you sure that you want to silence this user?"
unsilence: "Undo silencing"
diff --git a/packages/client/src/components/drive.file.vue b/packages/client/src/components/drive.file.vue
index f6713947e..0091766a4 100644
--- a/packages/client/src/components/drive.file.vue
+++ b/packages/client/src/components/drive.file.vue
@@ -85,6 +85,11 @@ function getMenu(): MenuItem[] {
text: i18n.ts.download,
icon: 'fas fa-download',
download: props.file.name,
+ }, {
+ type: 'link',
+ href: `/my/drive/file/${props.file.id}/attached`,
+ text: i18n.ts.showAttachedNotes,
+ icon: 'fas fa-paperclip',
}, null, {
text: i18n.ts.delete,
icon: 'fas fa-trash-alt',
diff --git a/packages/client/src/components/timeline.vue b/packages/client/src/components/timeline.vue
index 4ce9d9113..147c0c8a0 100644
--- a/packages/client/src/components/timeline.vue
+++ b/packages/client/src/components/timeline.vue
@@ -10,11 +10,12 @@ import * as sound from '@/scripts/sound';
import { $i } from '@/account';
const props = defineProps<{
- src: 'antenna' | 'home' | 'local' | 'social' | 'global' | 'mentions' | 'directs' | 'list' | 'channel';
+ src: 'antenna' | 'home' | 'local' | 'social' | 'global' | 'mentions' | 'directs' | 'list' | 'channel' | 'file';
list?: string;
antenna?: string;
channel?: string;
sound?: boolean;
+ fileId?: string;
}>();
const emit = defineEmits<{
@@ -129,6 +130,12 @@ switch (props.src) {
});
connection.on('note', prepend);
break;
+ case 'file':
+ endpoint = 'drive/files/attached-notes';
+ query = {
+ fileId: props.fileId,
+ };
+ break;
}
const pagination = {
diff --git a/packages/client/src/pages/attached-files.vue b/packages/client/src/pages/attached-files.vue
new file mode 100644
index 000000000..66830ec3f
--- /dev/null
+++ b/packages/client/src/pages/attached-files.vue
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/client/src/router.ts b/packages/client/src/router.ts
index 10869a3cf..6ba2c09ef 100644
--- a/packages/client/src/router.ts
+++ b/packages/client/src/router.ts
@@ -177,6 +177,10 @@ export const routes = [{
path: '/my/drive/folder/:folder',
component: page(() => import('./pages/drive.vue')),
loginRequired: true,
+}, {
+ path: '/my/drive/file/:fileId/attached',
+ component: page(() => import('./pages/attached-files.vue')),
+ loginRequired: true,
}, {
path: '/my/drive',
component: page(() => import('./pages/drive.vue')),