enhance(frontend): tweak drive file component

Resolve #12220
This commit is contained in:
syuilo
2023-11-03 08:01:22 +09:00
parent 5f888809e9
commit 7f5ad5badb
3 changed files with 15 additions and 6 deletions

View File

@@ -78,6 +78,11 @@ export function getDriveFileMenu(file: Misskey.entities.DriveFile, folder?: Miss
const isImage = file.type.startsWith('image/');
let menu;
menu = [{
type: 'link',
to: `/my/drive/file/${file.id}`,
text: i18n.ts._fileViewer.title,
icon: 'ti ti-info-circle',
}, null, {
text: i18n.ts.rename,
icon: 'ti ti-forms',
action: () => rename(file),
@@ -113,11 +118,6 @@ export function getDriveFileMenu(file: Misskey.entities.DriveFile, folder?: Miss
text: i18n.ts.download,
icon: 'ti ti-download',
download: file.name,
}, null, {
type: 'link',
to: `/my/drive/file/${file.id}`,
text: i18n.ts._fileViewer.title,
icon: 'ti ti-file',
}, null, {
text: i18n.ts.delete,
icon: 'ti ti-trash',