feat: client: add page 'posts with file attached'
Based on FoundKey commit 3747d7ecb1. Closes #10695
This commit is contained in:
parent
2691bd14ee
commit
a04f488da0
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -384,6 +384,8 @@ withReplies: "返信を含む"
|
||||
connectedTo: "次のアカウントに接続されています"
|
||||
notesAndReplies: "投稿と返信"
|
||||
withFiles: "ファイル付き"
|
||||
attachedToNotes: "このファイルが添付された投稿"
|
||||
showAttachedNotes: "このファイルが添付された投稿を見る"
|
||||
silence: "サイレンス"
|
||||
silenceConfirm: "サイレンスしますか?"
|
||||
unsilence: "サイレンス解除"
|
||||
|
@ -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,
|
||||
|
@ -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() {
|
||||
|
39
packages/client/src/pages/attached-files.vue
Normal file
39
packages/client/src/pages/attached-files.vue
Normal file
@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<MkStickyContainer>
|
||||
<template #header
|
||||
><MkPageHeader :display-back-button="true"
|
||||
/></template>
|
||||
<MkSpacer :content-max="800">
|
||||
<div class="attachments-timeline">
|
||||
<XTimeline ref="tl" class="tl" src="file" :fileId="fileId" />
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</MkStickyContainer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
import XTimeline from "@/components/MkTimeline.vue";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
defineProps<{
|
||||
fileId: string;
|
||||
}>();
|
||||
|
||||
definePageMetadata(
|
||||
computed(() => ({
|
||||
title: i18n.ts.attachedToNotes,
|
||||
icon: `${icon("ph-paperclip")}`,
|
||||
})),
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.attachments-timeline {
|
||||
background: var(--bg);
|
||||
border-radius: var(--radius);
|
||||
overflow: clip;
|
||||
}
|
||||
</style>
|
@ -583,6 +583,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")),
|
||||
|
Loading…
Reference in New Issue
Block a user