diff --git a/tdrive/frontend/public/locales/en.json b/tdrive/frontend/public/locales/en.json index 12e28e67..77c1eb6d 100644 --- a/tdrive/frontend/public/locales/en.json +++ b/tdrive/frontend/public/locales/en.json @@ -341,7 +341,6 @@ "components.item_context_menu.trash.empty": "Empty trash", "components.item_context_menu.add_documents": "Add document or folder", "components.item_context_menu.download_folder": "Download folder", - "components.item_context_menu.go_to_trash": "Go to trash", "components.item_context_menu.manage_users": "Manager users", "components.item_context_menu.all": "All", "components.item_context_menu.today": "Today", diff --git a/tdrive/frontend/public/locales/fr.json b/tdrive/frontend/public/locales/fr.json index 16c42c4d..bec97f77 100644 --- a/tdrive/frontend/public/locales/fr.json +++ b/tdrive/frontend/public/locales/fr.json @@ -332,7 +332,6 @@ "components.item_context_menu.trash.empty": "Vider la corbeille", "components.item_context_menu.add_documents": "Ajouter un document ou un dossier", "components.item_context_menu.download_folder": "Télécharger le dossier", - "components.item_context_menu.go_to_trash": "Voir la corbeille", "components.item_context_menu.all": "Tous", "components.item_context_menu.today": "Aujourd'hui", "components.item_context_menu.last_week": "La semaine dernière", diff --git a/tdrive/frontend/public/locales/ru.json b/tdrive/frontend/public/locales/ru.json index 17b1ce1c..7d6e40e8 100644 --- a/tdrive/frontend/public/locales/ru.json +++ b/tdrive/frontend/public/locales/ru.json @@ -331,7 +331,6 @@ "components.item_context_menu.trash.empty": "Очистить корзину", "components.item_context_menu.add_documents": "Добавить документ в папку", "components.item_context_menu.download_folder": "Скачать папку", - "components.item_context_menu.go_to_trash": "Перейти в корзину", "components.item_context_menu.all": "Все", "components.item_context_menu.today": "Сегодня", "components.item_context_menu.last_week": "За неделю", diff --git a/tdrive/frontend/public/locales/vn.json b/tdrive/frontend/public/locales/vn.json index 4d3f4f93..9d221145 100644 --- a/tdrive/frontend/public/locales/vn.json +++ b/tdrive/frontend/public/locales/vn.json @@ -329,7 +329,6 @@ "components.item_context_menu.trash.empty": "Làm trống thùng rác", "components.item_context_menu.add_documents": "Thêm tài liệu hoặc thư mục", "components.item_context_menu.download_folder": "Tải xuống thư mục", - "components.item_context_menu.go_to_trash": "Chuyển đến thùng rác", "components.item_context_menu.manage_users": "Quản lý người dùng", "components.item_context_menu.all": "Tất cả", "components.item_context_menu.today": "Hôm nay", diff --git a/tdrive/frontend/src/app/views/client/body/drive/context-menu.tsx b/tdrive/frontend/src/app/views/client/body/drive/context-menu.tsx index 0233c1b2..c05f2536 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/context-menu.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/context-menu.tsx @@ -94,7 +94,7 @@ export const useOnBuildContextMenu = (children: DriveItem[], initialParentId?: s icon: 'download-alt', text: Languages.t('components.item_context_menu.download'), onClick: () => { - if (item.is_directory) { + if (item && item.is_directory) { downloadZip([item!.id]); console.log(item!.id); } else { @@ -329,14 +329,7 @@ export const useOnBuildContextMenu = (children: DriveItem[], initialParentId?: s text: Languages.t('components.item_context_menu.manage_users'), hide: parent.item!.id != 'root', onClick: () => setUsersModalState({ open: true }), - }, - { type: 'separator', hide: inTrash || parent.access === 'read' }, - { - type: 'menu', - text: Languages.t('components.item_context_menu.go_to_trash'), - hide: inTrash || parent.access === 'read', - onClick: () => setParentId('trash'), - }, + } ]; if (menu.length && newMenuActions.filter(a => !a.hide).length) { menu = [...menu, { type: 'separator' }];