summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--packages/frontend/src/components/MkMediaAudio.vue18
-rw-r--r--packages/frontend/src/components/MkMediaImage.vue18
-rw-r--r--packages/frontend/src/components/MkMediaVideo.vue18
4 files changed, 46 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 66fc43872e..5d4c4643e1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
- Enhance: アンテナ、リスト等の名前をカラム名のデフォルト値にするように `#13992`
- Enhance: クライアントエラー画面の多言語対応
- Enhance: 開発者モードでメニューからファイルIDをコピー出来るように `#15441'
+- Enhance: ノートに埋め込まれたメディアのコンテキストメニューから管理者用のファイル管理画面を開けるように ( #15440 )
- Fix: コンディショナルロールを手動で割り当てできる導線を削除 `#13529`
- Fix: 埋め込みプレイヤーから外部ページに移動できない問題を修正
diff --git a/packages/frontend/src/components/MkMediaAudio.vue b/packages/frontend/src/components/MkMediaAudio.vue
index e509cac945..8cf88abaaf 100644
--- a/packages/frontend/src/components/MkMediaAudio.vue
+++ b/packages/frontend/src/components/MkMediaAudio.vue
@@ -217,10 +217,9 @@ function showMenu(ev: MouseEvent) {
});
}
+ const details: MenuItem[] = [];
if ($i?.id === props.audio.userId) {
- menu.push({
- type: 'divider',
- }, {
+ details.push({
type: 'link',
text: i18n.ts._fileViewer.title,
icon: 'ti ti-info-circle',
@@ -228,6 +227,19 @@ function showMenu(ev: MouseEvent) {
});
}
+ if (iAmModerator) {
+ details.push({
+ type: 'link',
+ text: i18n.ts.moderation,
+ icon: 'ti ti-photo-exclamation',
+ to: `/admin/file/${props.audio.id}`,
+ });
+ }
+
+ if (details.length > 0) {
+ menu.push({ type: 'divider' }, ...details);
+ }
+
if (defaultStore.state.devMode) {
menu.push({ type: 'divider' }, {
icon: 'ti ti-id',
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',
diff --git a/packages/frontend/src/components/MkMediaVideo.vue b/packages/frontend/src/components/MkMediaVideo.vue
index dec190f16c..26372e1a52 100644
--- a/packages/frontend/src/components/MkMediaVideo.vue
+++ b/packages/frontend/src/components/MkMediaVideo.vue
@@ -242,10 +242,9 @@ function showMenu(ev: MouseEvent) {
});
}
+ const details: MenuItem[] = [];
if ($i?.id === props.video.userId) {
- menu.push({
- type: 'divider',
- }, {
+ details.push({
type: 'link',
text: i18n.ts._fileViewer.title,
icon: 'ti ti-info-circle',
@@ -253,6 +252,19 @@ function showMenu(ev: MouseEvent) {
});
}
+ if (iAmModerator) {
+ details.push({
+ type: 'link',
+ text: i18n.ts.moderation,
+ icon: 'ti ti-photo-exclamation',
+ to: `/admin/file/${props.video.id}`,
+ });
+ }
+
+ if (details.length > 0) {
+ menu.push({ type: 'divider' }, ...details);
+ }
+
if (defaultStore.state.devMode) {
menu.push({ type: 'divider' }, {
icon: 'ti ti-id',