summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkMediaImage.vue
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2024-03-05 18:06:57 +0900
committerGitHub <noreply@github.com>2024-03-05 18:06:57 +0900
commit08d618bb8b98199a4670313019d6a85ad4cf155b (patch)
treec615a5d3b5dca1dda3b54f1d351f9aa1f5a5f771 /packages/frontend/src/components/MkMediaImage.vue
parentfix(frontend): router遷移時にmatchAllに入った場合一度`location.hr... (diff)
downloadmisskey-08d618bb8b98199a4670313019d6a85ad4cf155b.tar.gz
misskey-08d618bb8b98199a4670313019d6a85ad4cf155b.tar.bz2
misskey-08d618bb8b98199a4670313019d6a85ad4cf155b.zip
enhance(frontend): 自分のノートの添付ファイルから直接ファイルの詳細ページに飛べるようにする (#13520)
* enhance(frontend): 自分のノートの添付ファイルから直接ファイルの詳細ページに飛べるようにする * 他のファイルタイプにも対応 * Update Changelog --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/components/MkMediaImage.vue')
-rw-r--r--packages/frontend/src/components/MkMediaImage.vue9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/frontend/src/components/MkMediaImage.vue b/packages/frontend/src/components/MkMediaImage.vue
index 4ba2c76133..82f36fe5c4 100644
--- a/packages/frontend/src/components/MkMediaImage.vue
+++ b/packages/frontend/src/components/MkMediaImage.vue
@@ -59,7 +59,7 @@ import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
import { defaultStore } from '@/store.js';
import { i18n } from '@/i18n.js';
import * as os from '@/os.js';
-import { iAmModerator } from '@/account.js';
+import { $i, iAmModerator } from '@/account.js';
const props = withDefaults(defineProps<{
image: Misskey.entities.DriveFile;
@@ -114,6 +114,13 @@ function showMenu(ev: MouseEvent) {
action: () => {
os.apiWithDialog('drive/files/update', { fileId: props.image.id, isSensitive: true });
},
+ }] : []), ...($i?.id === props.image.userId ? [{
+ type: 'divider' as const,
+ }, {
+ type: 'link' as const,
+ text: i18n.ts._fileViewer.title,
+ icon: 'ti ti-info-circle',
+ to: `/my/drive/file/${props.image.id}`,
}] : [])], ev.currentTarget ?? ev.target);
}