Skip to content

Commit

Permalink
✨ Create context menu new icons
Browse files Browse the repository at this point in the history
Co-authored-by: Monta <monta@HP-ProBook-445-14-inch-G9-Notebook-PC-505aadfc.localdomain>
  • Loading branch information
MontaGhanmy and Monta committed Apr 2, 2024
1 parent 6eee587 commit afaa914
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 8 deletions.
5 changes: 4 additions & 1 deletion tdrive/frontend/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,5 +332,8 @@
"scenes.app.shared_with_me.name": "Name",
"scenes.app.shared_with_me.shared_by": "Shared by",
"scenes.app.shared_with_me.shared_date": "Shared date",
"scenes.app.shared_with_me.edit": "Edit"
"scenes.app.shared_with_me.edit": "Edit",
"ONLYOFFICE Word Document": "Create a Document",
"ONLYOFFICE Excel Document": "Create a Spreadsheet",
"ONLYOFFICE PowerPoint Document": "Create a Presentation"
}
5 changes: 4 additions & 1 deletion tdrive/frontend/public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,5 +331,8 @@
"scenes.app.shared_with_me.shared_by": "Partagé par",
"scenes.app.shared_with_me.shared_date": "Date de partage",
"scenes.app.shared_with_me.edit": "Modifier",
"components.item_context_menu.manage_users": "Gérer les utilisateurs"
"components.item_context_menu.manage_users": "Gérer les utilisateurs",
"ONLYOFFICE Word Document": "Créer un document",
"ONLYOFFICE Excel Document": "Créer une feuille de calcul",
"ONLYOFFICE PowerPoint Document": "Créer une présentation"
}
5 changes: 4 additions & 1 deletion tdrive/frontend/public/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -330,5 +330,8 @@
"scenes.app.shared_with_me.name": "Название",
"scenes.app.shared_with_me.shared_by": "Кто открыл доступ",
"scenes.app.shared_with_me.shared_date": "Дата предоставления доступа",
"scenes.app.shared_with_me.edit": "Редактировать"
"scenes.app.shared_with_me.edit": "Редактировать",
"ONLYOFFICE Word Document": "Создать документ",
"ONLYOFFICE Excel Document": "Создать электронную таблицу",
"ONLYOFFICE PowerPoint Document": "Создать презентацию"
}
5 changes: 4 additions & 1 deletion tdrive/frontend/public/locales/vn.json
Original file line number Diff line number Diff line change
Expand Up @@ -330,5 +330,8 @@
"scenes.app.shared_with_me.name": "Tên",
"scenes.app.shared_with_me.shared_by": "Được chia sẻ bởi",
"scenes.app.shared_with_me.shared_date": "Ngày chia sẻ",
"scenes.app.shared_with_me.edit": "Chỉnh sửa"
"scenes.app.shared_with_me.edit": "Chỉnh sửa",
"ONLYOFFICE Word Document": "Tạo Tài liệu Word",
"ONLYOFFICE Excel Document": "Tạo Bảng tính Excel",
"ONLYOFFICE PowerPoint Document": "Tạo Bài thuyết trình PowerPoint"
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { slideXTransition, slideXTransitionReverted } from 'src/utils/transition
import { CreateFolder } from './create-folder';
import { CreateLink } from './create-link';
import Languages from "features/global/services/languages-service";
import { FileTypeDocumentIcon, FileTypeSlidesIcon, FileTypeSpreadsheetIcon } from 'app/atoms/icons-colored';

export type CreateModalAtomType = {
open: boolean;
Expand Down Expand Up @@ -59,7 +60,9 @@ export const CreateModal = ({
<ChevronLeftIcon className="w-6 h-6" />
</A>
)}
<span className="ml-2">{Languages.t('components.create_modal.create_folder_or_doc')}</span>
<span className="ml-2">
{Languages.t('components.create_modal.create_folder_or_doc')}
</span>
</div>
}
>
Expand Down Expand Up @@ -115,15 +118,21 @@ export const CreateModal = ({
return (
<CreateModalOption
key={i}
icon={
icon={app.emptyFile.filename === "Untitled.docx" ? (
<FileTypeDocumentIcon className={'h-5 w-5 shrink-0 text-gray-400'} />
) : app.emptyFile.filename === "Untitled.xlsx" ? (
<FileTypeSpreadsheetIcon className={'h-5 w-5 shrink-0 text-gray-400'} />
) : app.emptyFile.filename === "Untitled.pptx" ? (
<FileTypeSlidesIcon className={'h-5 w-5 shrink-0 text-gray-400'} />
) : (
<Avatar
type="square"
size="sm"
className="w-5 h-5"
avatar={app.app.identity?.icon}
/>
}
text={`${app.emptyFile.name}`}
)}
text={Languages.t(`${app.emptyFile.name}`)}
onClick={() =>
addFromUrl(app.emptyFile.url, app.emptyFile.filename || app.emptyFile.name)
}
Expand Down

0 comments on commit afaa914

Please sign in to comment.