diff --git a/packages/frontend/src/components/MkMediaAudio.vue b/packages/frontend/src/components/MkMediaAudio.vue
index efcff17e6..cf44e1067 100644
--- a/packages/frontend/src/components/MkMediaAudio.vue
+++ b/packages/frontend/src/components/MkMediaAudio.vue
@@ -82,9 +82,7 @@ const hide = ref((defaultStore.state.nsfw === 'force' || defaultStore.state.data
const menuShowing = ref(false);
function showMenu(ev: MouseEvent) {
- let menu: MenuItem[] = [];
-
- menu = [
+ const menu: MenuItem[] = [
// TODO: 再生キューに追加
{
text: i18n.ts.hide,
@@ -95,6 +93,12 @@ function showMenu(ev: MouseEvent) {
},
];
+ if ($i?.id === props.audio.userId || iAmModerator) {
+ menu.push({
+ type: 'divider',
+ });
+ }
+
if (iAmModerator) {
menu.push({
text: props.audio.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive,
@@ -102,12 +106,19 @@ function showMenu(ev: MouseEvent) {
danger: true,
action: () => toggleSensitive(props.audio),
});
+
+ if ($i?.id !== props.audio.userId) {
+ menu.push({
+ type: 'link' as const,
+ text: i18n.ts._fileViewer.title,
+ icon: 'ti ti-info-circle',
+ to: `/admin/file/${props.audio.id}`,
+ });
+ }
}
if ($i?.id === props.audio.userId) {
menu.push({
- type: 'divider',
- }, {
type: 'link' as const,
text: i18n.ts._fileViewer.title,
icon: 'ti ti-info-circle',
diff --git a/packages/frontend/src/components/MkMediaImage.vue b/packages/frontend/src/components/MkMediaImage.vue
index d2d5be66b..72ee04b5a 100644
--- a/packages/frontend/src/components/MkMediaImage.vue
+++ b/packages/frontend/src/components/MkMediaImage.vue
@@ -53,6 +53,7 @@ SPDX-License-Identifier: AGPL-3.0-only