summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkMediaImage.vue
diff options
context:
space:
mode:
authorおさむのひと <46447427+samunohito@users.noreply.github.com>2025-02-13 20:09:04 +0900
committerGitHub <noreply@github.com>2025-02-13 11:09:04 +0000
commit4d562e7439e65092ff93cf0c9980459baa1602a3 (patch)
tree63115245ce63a4dc17af8ab85d10cf86053e7fba /packages/frontend/src/components/MkMediaImage.vue
parentUpdate about-misskey.vue (diff)
downloadsharkey-4d562e7439e65092ff93cf0c9980459baa1602a3.tar.gz
sharkey-4d562e7439e65092ff93cf0c9980459baa1602a3.tar.bz2
sharkey-4d562e7439e65092ff93cf0c9980459baa1602a3.zip
enhance(frontend): ノートに埋め込まれたメディアのコンテキストメニューから管理者用のファイル管理画面を開けるように (#15460)
* enhance(frontend): ノートに埋め込まれたメディアのコンテキストメニューから管理者用のファイル管理画面を開けるように * fix icon * fix menu --------- 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.vue18
1 files changed, 15 insertions, 3 deletions
diff --git a/packages/frontend/src/components/MkMediaImage.vue b/packages/frontend/src/components/MkMediaImage.vue
index bd6decd082..3645a4a66e 100644
--- a/packages/frontend/src/components/MkMediaImage.vue
+++ b/packages/frontend/src/components/MkMediaImage.vue
@@ -133,10 +133,9 @@ function showMenu(ev: MouseEvent) {
});
}
+ const details: MenuItem[] = [];
if ($i?.id === props.image.userId) {
- menuItems.push({
- type: 'divider',
- }, {
+ details.push({
type: 'link',
text: i18n.ts._fileViewer.title,
icon: 'ti ti-info-circle',
@@ -144,6 +143,19 @@ function showMenu(ev: MouseEvent) {
});
}
+ if (iAmModerator) {
+ details.push({
+ type: 'link',
+ text: i18n.ts.moderation,
+ icon: 'ti ti-photo-exclamation',
+ to: `/admin/file/${props.image.id}`,
+ });
+ }
+
+ if (details.length > 0) {
+ menuItems.push({ type: 'divider' }, ...details);
+ }
+
if (defaultStore.state.devMode) {
menuItems.push({ type: 'divider' }, {
icon: 'ti ti-id',