diff --git a/locales/de-DE.yml b/locales/de-DE.yml
index 9521870fd8..693b521c43 100644
--- a/locales/de-DE.yml
+++ b/locales/de-DE.yml
@@ -402,6 +402,8 @@ withReplies: "Antworten beinhalten"
connectedTo: "Mit folgenden Nutzerkonten verknüpft"
notesAndReplies: "Beiträge und Antworten"
withFiles: "Beiträge mit Dateien"
+attachedToNotes: "Beiträge mit dieser Datei"
+showAttachedNotes: "Zeige Beiträge mit dieser Datei"
silence: "stummschalten"
silenceConfirm: "Sind Sie sicher, dass Sie diesen Benutzer Stummschalten möchten?"
unsilence: "Stummschaltung aufheben"
diff --git a/locales/en-US.yml b/locales/en-US.yml
index 9ecba74ef6..e9bf164a1b 100644
--- a/locales/en-US.yml
+++ b/locales/en-US.yml
@@ -429,6 +429,8 @@ withReplies: "Include replies"
connectedTo: "Following account(s) are connected"
notesAndReplies: "Posts and replies"
withFiles: "Including files"
+attachedToNotes: "Posts with this file"
+showAttachedNotes: "Show posts with this file"
silence: "Silence"
silenceConfirm: "Are you sure that you want to silence this user?"
unsilence: "Undo silencing"
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index a3fa197d5c..53d2ca692b 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -384,6 +384,8 @@ withReplies: "返信を含む"
connectedTo: "次のアカウントに接続されています"
notesAndReplies: "投稿と返信"
withFiles: "ファイル付き"
+attachedToNotes: "このファイルが添付された投稿"
+showAttachedNotes: "このファイルが添付された投稿を見る"
silence: "サイレンス"
silenceConfirm: "サイレンスしますか?"
unsilence: "サイレンス解除"
diff --git a/packages/client/src/components/MkDrive.file.vue b/packages/client/src/components/MkDrive.file.vue
index 483375938b..5163b9f7cb 100644
--- a/packages/client/src/components/MkDrive.file.vue
+++ b/packages/client/src/components/MkDrive.file.vue
@@ -107,6 +107,12 @@ function getMenu() {
icon: `${icon("ph-download-simple")}`,
download: props.file.name,
},
+ {
+ type: "a",
+ href: `/my/drive/file/${props.file.id}/attached`,
+ text: i18n.ts.showAttachedNotes,
+ icon: `${icon("ph-paperclip")}`,
+ },
null,
{
text: i18n.ts.delete,
diff --git a/packages/client/src/components/MkTimeline.vue b/packages/client/src/components/MkTimeline.vue
index beca720a37..c310851e2e 100644
--- a/packages/client/src/components/MkTimeline.vue
+++ b/packages/client/src/components/MkTimeline.vue
@@ -44,6 +44,7 @@ const props = defineProps<{
antenna?: string;
channel?: string;
sound?: boolean;
+ fileId?: string;
}>();
const queue = ref(0);
@@ -195,6 +196,11 @@ if (props.src === "antenna") {
channelId: props.channel,
});
connection.on("note", prepend);
+} else if (props.src === "file") {
+ endpoint = "drive/files/attached-notes";
+ query = {
+ fileId: props.fileId,
+ };
}
function closeHint() {
diff --git a/packages/client/src/pages/attached-files.vue b/packages/client/src/pages/attached-files.vue
new file mode 100644
index 0000000000..e0fd09d419
--- /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 b2d74d6148..2f7446e68b 100644
--- a/packages/client/src/router.ts
+++ b/packages/client/src/router.ts
@@ -582,6 +582,11 @@ export const routes = [
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")),