From a2e4041875a2fed0e533a699bada5a145682400e Mon Sep 17 00:00:00 2001 From: Noor Chasib Date: Tue, 8 Apr 2025 16:59:37 -0700 Subject: [PATCH 1/7] feat: Change ActionIcon to Button to add descriptive text --- frontend/src/components/share/FileList.tsx | 29 +++++---- frontend/src/components/upload/FileList.tsx | 20 +++--- frontend/src/pages/account/reverseShares.tsx | 64 ++++++++++++-------- frontend/src/pages/account/shares.tsx | 39 +++++++----- 4 files changed, 89 insertions(+), 63 deletions(-) diff --git a/frontend/src/components/share/FileList.tsx b/frontend/src/components/share/FileList.tsx index 3c5ab51..0692b91 100644 --- a/frontend/src/components/share/FileList.tsx +++ b/frontend/src/components/share/FileList.tsx @@ -1,6 +1,6 @@ import { - ActionIcon, Box, + Button, Group, Skeleton, Stack, @@ -116,31 +116,34 @@ const FileList = ({ {shareService.doesFileSupportPreview(file.name) && ( - } onClick={() => showFilePreviewModal(share.id, file, modals) } - size={25} > - - + + )} {!share.hasPassword && ( - } onClick={() => copyFileLink(file)} > - - + + )} - } onClick={async () => { await shareService.downloadFile(share.id, file.id); }} > - - + + diff --git a/frontend/src/components/upload/FileList.tsx b/frontend/src/components/upload/FileList.tsx index 98468e8..ea8f30a 100644 --- a/frontend/src/components/upload/FileList.tsx +++ b/frontend/src/components/upload/FileList.tsx @@ -1,4 +1,4 @@ -import { ActionIcon, Table } from "@mantine/core"; +import { Button, Table } from "@mantine/core"; import { TbTrash } from "react-icons/tb"; import { GrUndo } from "react-icons/gr"; import { FileListItem } from "../../types/File.type"; @@ -35,27 +35,29 @@ const FileListRow = ({ {byteToHumanSizeString(+file.size)} {removable && ( - } onClick={onRemove} > - - + + )} {uploading && ( )} {restorable && ( - } onClick={onRestore} > - - + + )} diff --git a/frontend/src/pages/account/reverseShares.tsx b/frontend/src/pages/account/reverseShares.tsx index 6f0577a..7824a97 100644 --- a/frontend/src/pages/account/reverseShares.tsx +++ b/frontend/src/pages/account/reverseShares.tsx @@ -151,25 +151,37 @@ const MyShares = () => { {share.id} - { - if (window.isSecureContext) { - clipboard.copy( - `${window.location.origin}/s/${share.id}`, - ); - toast.success( - t("common.notify.copied-link"), - ); - } else { - showShareLinkModal(modals, share.id); - } + - - + { + if (window.isSecureContext) { + clipboard.copy( + `${window.location.origin}/s/${share.id}`, + ); + toast.success( + t("common.notify.copied-link"), + ); + } else { + showShareLinkModal(modals, share.id); + } + }} + > + + + ))} @@ -188,10 +200,11 @@ const MyShares = () => { - } onClick={() => { if (window.isSecureContext) { clipboard.copy( @@ -208,12 +221,13 @@ const MyShares = () => { } }} > - - - + + diff --git a/frontend/src/pages/account/shares.tsx b/frontend/src/pages/account/shares.tsx index 261f8a2..4775ad8 100644 --- a/frontend/src/pages/account/shares.tsx +++ b/frontend/src/pages/account/shares.tsx @@ -1,5 +1,4 @@ import { - ActionIcon, Box, Button, Center, @@ -120,14 +119,20 @@ const MyShares = () => { - - - + - } onClick={() => { showShareInformationsModal( modals, @@ -136,12 +141,13 @@ const MyShares = () => { ); }} > - - - + + + From 80585fbf84629df2d5052afd9ef57f7a633002fa Mon Sep 17 00:00:00 2001 From: Noor Chasib Date: Tue, 8 Apr 2025 17:00:22 -0700 Subject: [PATCH 2/7] feat: Change Header Icon to Button to add descriptive text --- frontend/src/components/header/ActionAvatar.tsx | 14 +++++++++----- frontend/src/components/header/NavbarShareMenu.tsx | 8 ++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/header/ActionAvatar.tsx b/frontend/src/components/header/ActionAvatar.tsx index 414c5a0..9d0dd91 100644 --- a/frontend/src/components/header/ActionAvatar.tsx +++ b/frontend/src/components/header/ActionAvatar.tsx @@ -1,6 +1,6 @@ -import { ActionIcon, Avatar, Menu } from "@mantine/core"; +import { Button, Menu } from "@mantine/core"; import Link from "next/link"; -import { TbDoorExit, TbSettings, TbUser } from "react-icons/tb"; +import { TbDoorExit, TbSettings, TbUser, TbUserCircle } from "react-icons/tb"; import useUser from "../../hooks/user.hook"; import authService from "../../services/auth.service"; import { FormattedMessage, useIntl } from "react-intl"; @@ -11,9 +11,13 @@ const ActionAvatar = () => { return ( - - - + }> diff --git a/frontend/src/components/header/NavbarShareMenu.tsx b/frontend/src/components/header/NavbarShareMenu.tsx index 56775dc..f33672a 100644 --- a/frontend/src/components/header/NavbarShareMenu.tsx +++ b/frontend/src/components/header/NavbarShareMenu.tsx @@ -1,4 +1,4 @@ -import { ActionIcon, Menu } from "@mantine/core"; +import { Button, Menu } from "@mantine/core"; import Link from "next/link"; import { TbArrowLoopLeft, TbLink } from "react-icons/tb"; import { FormattedMessage } from "react-intl"; @@ -7,9 +7,9 @@ const NavbarShareMneu = () => { return ( - - - + }> From 0c59e42c912bbee506fcb2ee4c8ec8e574d56108 Mon Sep 17 00:00:00 2001 From: Noor Chasib Date: Tue, 8 Apr 2025 17:24:12 -0700 Subject: [PATCH 3/7] feat: Add translations for icon descriptions --- frontend/src/i18n/translations/ar-EG.ts | 11 ++++++++++- frontend/src/i18n/translations/cs-CZ.ts | 9 +++++++++ frontend/src/i18n/translations/da-DK.ts | 11 ++++++++++- frontend/src/i18n/translations/de-DE.ts | 11 ++++++++++- frontend/src/i18n/translations/el-GR.ts | 11 ++++++++++- frontend/src/i18n/translations/en-US.ts | 9 +++++++++ frontend/src/i18n/translations/es-ES.ts | 11 ++++++++++- frontend/src/i18n/translations/et-EE.ts | 11 ++++++++++- frontend/src/i18n/translations/fi-FI.ts | 11 ++++++++++- frontend/src/i18n/translations/fr-FR.ts | 11 ++++++++++- frontend/src/i18n/translations/hr-HR.ts | 11 ++++++++++- frontend/src/i18n/translations/hu-HU.ts | 11 ++++++++++- frontend/src/i18n/translations/it-IT.ts | 11 ++++++++++- frontend/src/i18n/translations/ja-JP.ts | 11 ++++++++++- frontend/src/i18n/translations/ko-KR.ts | 11 ++++++++++- frontend/src/i18n/translations/nl-BE.ts | 11 ++++++++++- frontend/src/i18n/translations/pl-PL.ts | 11 ++++++++++- frontend/src/i18n/translations/pt-BR.ts | 11 ++++++++++- frontend/src/i18n/translations/ru-RU.ts | 11 ++++++++++- frontend/src/i18n/translations/sl-SI.ts | 11 ++++++++++- frontend/src/i18n/translations/sr-CS.ts | 11 ++++++++++- frontend/src/i18n/translations/sr-SP.ts | 11 ++++++++++- frontend/src/i18n/translations/sv-SE.ts | 11 ++++++++++- frontend/src/i18n/translations/th-TH.ts | 11 ++++++++++- frontend/src/i18n/translations/tr-TR.ts | 11 ++++++++++- frontend/src/i18n/translations/uk-UA.ts | 11 ++++++++++- frontend/src/i18n/translations/vi-VN.ts | 11 ++++++++++- frontend/src/i18n/translations/zh-CN.ts | 11 ++++++++++- frontend/src/i18n/translations/zh-TW.ts | 11 ++++++++++- 29 files changed, 288 insertions(+), 27 deletions(-) diff --git a/frontend/src/i18n/translations/ar-EG.ts b/frontend/src/i18n/translations/ar-EG.ts index 80b9662..9a86165 100644 --- a/frontend/src/i18n/translations/ar-EG.ts +++ b/frontend/src/i18n/translations/ar-EG.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "معلومات", + "common.button.undo": "تراجع", + "common.button.download": "تنزيل", + "common.button.copy": "نسخ", + "common.button.copy-link": "نسخ الرابط", + "common.button.preview": "معاينة", + "common.button.edit": "تحرير", + "common.button.profile": "الملف الشخصي", + "common.button.shares": "مشاركات", "common.button.save": "حفظ", "common.button.create": "إنشاء", "common.button.submit": "إرسال", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "يجب أن يكون بالضبط {length} حرفًا", "common.error.invalid-number": "يجب أن يكون رقماً", "common.error.field-required": "هذا الحقل مطلوب" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/cs-CZ.ts b/frontend/src/i18n/translations/cs-CZ.ts index d6064dc..6f201a1 100644 --- a/frontend/src/i18n/translations/cs-CZ.ts +++ b/frontend/src/i18n/translations/cs-CZ.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Zpět", + "common.button.download": "Stáhnout", + "common.button.copy": "Kopírovat", + "common.button.copy-link": "Kopírovat odkaz", + "common.button.preview": "Náhled", + "common.button.edit": "Upravit", + "common.button.profile": "Profil", + "common.button.shares": "Sdílení", "common.button.save": "Uložit", "common.button.create": "Vytvořit", "common.button.submit": "Odeslat", diff --git a/frontend/src/i18n/translations/da-DK.ts b/frontend/src/i18n/translations/da-DK.ts index daba05a..b96dccc 100644 --- a/frontend/src/i18n/translations/da-DK.ts +++ b/frontend/src/i18n/translations/da-DK.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Fortryd", + "common.button.download": "Download", + "common.button.copy": "Kopiér", + "common.button.copy-link": "Kopiér link", + "common.button.preview": "Forhåndsvisning", + "common.button.edit": "Rediger", + "common.button.profile": "Profil", + "common.button.shares": "Delinger", "common.button.save": "Gem", "common.button.create": "Opret", "common.button.submit": "Submit", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Skal være præcis {length} tegn", "common.error.invalid-number": "Skal være et tal", "common.error.field-required": "Dette felt er påkrævet" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/de-DE.ts b/frontend/src/i18n/translations/de-DE.ts index a94c6f6..d87ffbf 100644 --- a/frontend/src/i18n/translations/de-DE.ts +++ b/frontend/src/i18n/translations/de-DE.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Rückgängig", + "common.button.download": "Herunterladen", + "common.button.copy": "Kopieren", + "common.button.copy-link": "Link kopieren", + "common.button.preview": "Vorschau", + "common.button.edit": "Bearbeiten", + "common.button.profile": "Profil", + "common.button.shares": "Freigaben", "common.button.save": "Speichern", "common.button.create": "Erstellen", "common.button.submit": "Bestätigen", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Muss genau {length} Zeichen lang sein", "common.error.invalid-number": "Muss eine Zahl sein", "common.error.field-required": "Dieses Feld ist erforderlich" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/el-GR.ts b/frontend/src/i18n/translations/el-GR.ts index 487788e..aba6128 100644 --- a/frontend/src/i18n/translations/el-GR.ts +++ b/frontend/src/i18n/translations/el-GR.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "Σύνδεση OpenID", // Common translations + "common.button.info": "Πληροφορίες", + "common.button.undo": "Αναίρεση", + "common.button.download": "Λήψη", + "common.button.copy": "Αντιγραφή", + "common.button.copy-link": "Αντιγραφή συνδέσμου", + "common.button.preview": "Προεπισκόπηση", + "common.button.edit": "Επεξεργασία", + "common.button.profile": "Προφίλ", + "common.button.shares": "Κοινοποιήσεις", "common.button.save": "Αποθήκευση", "common.button.create": "Δημιουργία", "common.button.submit": "Υποβολή", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Πρέπει να αποτελείται ακριβώς από {length} χαρακτήρες", "common.error.invalid-number": "Πρέπει να είναι αριθμός", "common.error.field-required": "Αυτό το πεδίο είναι υποχρεωτικό" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/en-US.ts b/frontend/src/i18n/translations/en-US.ts index a078d2e..27b99c4 100644 --- a/frontend/src/i18n/translations/en-US.ts +++ b/frontend/src/i18n/translations/en-US.ts @@ -702,6 +702,15 @@ export default { "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Undo", + "common.button.download": "Download", + "common.button.copy": "Copy", + "common.button.copy-link": "Copy link", + "common.button.preview": "Preview", + "common.button.edit": "Edit", + "common.button.profile": "Profile", + "common.button.shares": "Shares", "common.button.save": "Save", "common.button.create": "Create", "common.button.submit": "Submit", diff --git a/frontend/src/i18n/translations/es-ES.ts b/frontend/src/i18n/translations/es-ES.ts index 7be137c..ed1d403 100644 --- a/frontend/src/i18n/translations/es-ES.ts +++ b/frontend/src/i18n/translations/es-ES.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "Conexión OpenID", // Common translations + "common.button.info": "Info", + "common.button.undo": "Deshacer", + "common.button.download": "Descargar", + "common.button.copy": "Copiar", + "common.button.copy-link": "Copiar enlace", + "common.button.preview": "Vista previa", + "common.button.edit": "Editar", + "common.button.profile": "Perfil", + "common.button.shares": "Compartidos", "common.button.save": "Guardar", "common.button.create": "Crear", "common.button.submit": "Enviar", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Debe tener exactamente {length} caracteres", "common.error.invalid-number": "Debe ser un número", "common.error.field-required": "Este campo es requerido" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/et-EE.ts b/frontend/src/i18n/translations/et-EE.ts index 5125df0..ee31e2b 100644 --- a/frontend/src/i18n/translations/et-EE.ts +++ b/frontend/src/i18n/translations/et-EE.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Võta tagasi", + "common.button.download": "Laadi alla", + "common.button.copy": "Kopeeri", + "common.button.copy-link": "Kopeeri link", + "common.button.preview": "Eelvaade", + "common.button.edit": "Muuda", + "common.button.profile": "Profiil", + "common.button.shares": "Jagamised", "common.button.save": "Salvesta", "common.button.create": "Loo", "common.button.submit": "Esita", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Peab olema täpselt {length} tähemärki", "common.error.invalid-number": "Peab olema number", "common.error.field-required": "See väli on kohustuslik" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/fi-FI.ts b/frontend/src/i18n/translations/fi-FI.ts index 5e92273..77bdf96 100644 --- a/frontend/src/i18n/translations/fi-FI.ts +++ b/frontend/src/i18n/translations/fi-FI.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Kumoa", + "common.button.download": "Lataa", + "common.button.copy": "Kopioi", + "common.button.copy-link": "Kopioi linkki", + "common.button.preview": "Esikatselu", + "common.button.edit": "Muokkaa", + "common.button.profile": "Profiili", + "common.button.shares": "Jaot", "common.button.save": "Tallenna", "common.button.create": "Luo", "common.button.submit": "Lähetä", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "On oltava tarkasti {length} merkkiä pitkä", "common.error.invalid-number": "Pitää olla luku", "common.error.field-required": "Tämä kenttä on pakollinen" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/fr-FR.ts b/frontend/src/i18n/translations/fr-FR.ts index cc0fce4..474124e 100644 --- a/frontend/src/i18n/translations/fr-FR.ts +++ b/frontend/src/i18n/translations/fr-FR.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "Connexion OpenID", // Common translations + "common.button.info": "Infos", + "common.button.undo": "Annuler", + "common.button.download": "Télécharger", + "common.button.copy": "Copier", + "common.button.copy-link": "Copier le lien", + "common.button.preview": "Aperçu", + "common.button.edit": "Modifier", + "common.button.profile": "Profil", + "common.button.shares": "Partages", "common.button.save": "Sauvegarder", "common.button.create": "Créer", "common.button.submit": "Envoyer", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Doit comporter exactement {length} caractères", "common.error.invalid-number": "Doit être un nombre", "common.error.field-required": "Ce champ est obligatoire" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/hr-HR.ts b/frontend/src/i18n/translations/hr-HR.ts index 473b9f4..ddf9ec2 100644 --- a/frontend/src/i18n/translations/hr-HR.ts +++ b/frontend/src/i18n/translations/hr-HR.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenId Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Poništi", + "common.button.download": "Preuzmi", + "common.button.copy": "Kopiraj", + "common.button.copy-link": "Kopiraj vezu", + "common.button.preview": "Pregled", + "common.button.edit": "Uredi", + "common.button.profile": "Profil", + "common.button.shares": "Dijeljenja", "common.button.save": "Spremi", "common.button.create": "Kreiraj", "common.button.submit": "Pošalji", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Mora imati točno {length} znakova", "common.error.invalid-number": "Mora biti broj", "common.error.field-required": "Polje je obavezno" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/hu-HU.ts b/frontend/src/i18n/translations/hu-HU.ts index 56a978b..890d297 100644 --- a/frontend/src/i18n/translations/hu-HU.ts +++ b/frontend/src/i18n/translations/hu-HU.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Infó", + "common.button.undo": "Visszavonás", + "common.button.download": "Letöltés", + "common.button.copy": "Másolás", + "common.button.copy-link": "Hivatkozás másolása", + "common.button.preview": "Előnézet", + "common.button.edit": "Szerkesztés", + "common.button.profile": "Profil", + "common.button.shares": "Megosztások", "common.button.save": "Mentés", "common.button.create": "Létrehozás", "common.button.submit": "Küldés", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Pontosan {length} karakter szükséges", "common.error.invalid-number": "Számot kell megadnia", "common.error.field-required": "Ez egy kötelező mező" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/it-IT.ts b/frontend/src/i18n/translations/it-IT.ts index 6e242bf..9f41345 100644 --- a/frontend/src/i18n/translations/it-IT.ts +++ b/frontend/src/i18n/translations/it-IT.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenId Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Annulla", + "common.button.download": "Scarica", + "common.button.copy": "Copia", + "common.button.copy-link": "Copia link", + "common.button.preview": "Anteprima", + "common.button.edit": "Modifica", + "common.button.profile": "Profilo", + "common.button.shares": "Condivisioni", "common.button.save": "Salva", "common.button.create": "Crea", "common.button.submit": "Invia", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Deve essere esattamente {length} caratteri", "common.error.invalid-number": "Deve essere un numero", "common.error.field-required": "Questo campo è obbligatorio" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/ja-JP.ts b/frontend/src/i18n/translations/ja-JP.ts index 768e64b..6f76b4c 100644 --- a/frontend/src/i18n/translations/ja-JP.ts +++ b/frontend/src/i18n/translations/ja-JP.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "情報", + "common.button.undo": "元に戻す", + "common.button.download": "ダウンロード", + "common.button.copy": "コピー", + "common.button.copy-link": "リンクをコピー", + "common.button.preview": "プレビュー", + "common.button.edit": "編集", + "common.button.profile": "プロフィール", + "common.button.shares": "共有", "common.button.save": "保存", "common.button.create": "作成", "common.button.submit": "送信", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "{length} 文字である必要があります", "common.error.invalid-number": "数字でなければなりません", "common.error.field-required": "これは必須項目です" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/ko-KR.ts b/frontend/src/i18n/translations/ko-KR.ts index a65231c..0004ff2 100644 --- a/frontend/src/i18n/translations/ko-KR.ts +++ b/frontend/src/i18n/translations/ko-KR.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "디스코드", "error.param.provider_oidc": "OpenID 연결", // Common translations + "common.button.info": "정보", + "common.button.undo": "실행 취소", + "common.button.download": "다운로드", + "common.button.copy": "복사", + "common.button.copy-link": "링크 복사", + "common.button.preview": "미리보기", + "common.button.edit": "편집", + "common.button.profile": "프로필", + "common.button.shares": "공유", "common.button.save": "저장", "common.button.create": "새로 만들기", "common.button.submit": "제출", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "{length} 자 이어야 합니다.", "common.error.invalid-number": "숫자만 가능합니다.", "common.error.field-required": "이 필드는 필수입니다" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/nl-BE.ts b/frontend/src/i18n/translations/nl-BE.ts index ae59bd5..6306b15 100644 --- a/frontend/src/i18n/translations/nl-BE.ts +++ b/frontend/src/i18n/translations/nl-BE.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Ongedaan maken", + "common.button.download": "Downloaden", + "common.button.copy": "Kopiëren", + "common.button.copy-link": "Link kopiëren", + "common.button.preview": "Voorbeeld", + "common.button.edit": "Bewerken", + "common.button.profile": "Profiel", + "common.button.shares": "Delen", "common.button.save": "Opslaan", "common.button.create": "Aanmaken", "common.button.submit": "Verzenden", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Moet precies {length} tekens bevatten", "common.error.invalid-number": "Moet een getal zijn", "common.error.field-required": "Dit veld is verplicht" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/pl-PL.ts b/frontend/src/i18n/translations/pl-PL.ts index adc81f4..711cea1 100644 --- a/frontend/src/i18n/translations/pl-PL.ts +++ b/frontend/src/i18n/translations/pl-PL.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Cofnij", + "common.button.download": "Pobierz", + "common.button.copy": "Kopiuj", + "common.button.copy-link": "Kopiuj link", + "common.button.preview": "Podgląd", + "common.button.edit": "Edytuj", + "common.button.profile": "Profil", + "common.button.shares": "Udostępnienia", "common.button.save": "Zapisz", "common.button.create": "Utwórz", "common.button.submit": "Prześlij", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Musi mieć dokładnie {length} znaków", "common.error.invalid-number": "Musi być liczbą", "common.error.field-required": "To pole jest wymagane" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/pt-BR.ts b/frontend/src/i18n/translations/pt-BR.ts index 66821ce..0e13f2f 100644 --- a/frontend/src/i18n/translations/pt-BR.ts +++ b/frontend/src/i18n/translations/pt-BR.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Desfazer", + "common.button.download": "Baixar", + "common.button.copy": "Copiar", + "common.button.copy-link": "Copiar link", + "common.button.preview": "Visualizar", + "common.button.edit": "Editar", + "common.button.profile": "Perfil", + "common.button.shares": "Compartilhamentos", "common.button.save": "Salvar", "common.button.create": "Criar", "common.button.submit": "Submeter", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Deve ter exatamente {length} caracteres", "common.error.invalid-number": "Tem que ser um número", "common.error.field-required": "Este campo é obrigatório" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/ru-RU.ts b/frontend/src/i18n/translations/ru-RU.ts index 6472aa4..8a75c9f 100644 --- a/frontend/src/i18n/translations/ru-RU.ts +++ b/frontend/src/i18n/translations/ru-RU.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Инфо", + "common.button.undo": "Отменить", + "common.button.download": "Скачать", + "common.button.copy": "Копировать", + "common.button.copy-link": "Копировать ссылку", + "common.button.preview": "Просмотр", + "common.button.edit": "Редактировать", + "common.button.profile": "Профиль", + "common.button.shares": "Общие", "common.button.save": "Сохранить", "common.button.create": "Создать", "common.button.submit": "Отправить", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Должно быть ровно {length} символов", "common.error.invalid-number": "Должно быть числом", "common.error.field-required": "Поле обязательно для заполнения" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/sl-SI.ts b/frontend/src/i18n/translations/sl-SI.ts index 096d8fb..7ae65bd 100644 --- a/frontend/src/i18n/translations/sl-SI.ts +++ b/frontend/src/i18n/translations/sl-SI.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Razveljavi", + "common.button.download": "Prenesi", + "common.button.copy": "Kopiraj", + "common.button.copy-link": "Kopiraj povezavo", + "common.button.preview": "Predogled", + "common.button.edit": "Uredi", + "common.button.profile": "Profil", + "common.button.shares": "Deljenja", "common.button.save": "Shrani", "common.button.create": "Ustvari", "common.button.submit": "Pošlji", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Dolžina mora biti točno {length} znakov", "common.error.invalid-number": "Mora biti številka", "common.error.field-required": "To polje je obvezno" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/sr-CS.ts b/frontend/src/i18n/translations/sr-CS.ts index 62036fc..6a9dad4 100644 --- a/frontend/src/i18n/translations/sr-CS.ts +++ b/frontend/src/i18n/translations/sr-CS.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenId Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Opozovi", + "common.button.download": "Preuzmi", + "common.button.copy": "Kopiraj", + "common.button.copy-link": "Kopiraj vezu", + "common.button.preview": "Pregled", + "common.button.edit": "Uredi", + "common.button.profile": "Profil", + "common.button.shares": "Deljenja", "common.button.save": "Sačuvaj", "common.button.create": "Napravi", "common.button.submit": "Pošalji", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Mora da ima tačno {length} znakova", "common.error.invalid-number": "Mora biti broj", "common.error.field-required": "Polje je obavezno" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/sr-SP.ts b/frontend/src/i18n/translations/sr-SP.ts index bf7ee43..df9c94b 100644 --- a/frontend/src/i18n/translations/sr-SP.ts +++ b/frontend/src/i18n/translations/sr-SP.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Инфо", + "common.button.undo": "Опозови", + "common.button.download": "Преузми", + "common.button.copy": "Копирај", + "common.button.copy-link": "Копирај везу", + "common.button.preview": "Преглед", + "common.button.edit": "Уреди", + "common.button.profile": "Профил", + "common.button.shares": "Дељења", "common.button.save": "Сачувај", "common.button.create": "Направи", "common.button.submit": "Пошаљи", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Мора да има тачно {length} знакова", "common.error.invalid-number": "Мора бити број", "common.error.field-required": "Поље је обавезно" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/sv-SE.ts b/frontend/src/i18n/translations/sv-SE.ts index 301db78..236b420 100644 --- a/frontend/src/i18n/translations/sv-SE.ts +++ b/frontend/src/i18n/translations/sv-SE.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Info", + "common.button.undo": "Ångra", + "common.button.download": "Ladda ned", + "common.button.copy": "Kopiera", + "common.button.copy-link": "Kopiera länk", + "common.button.preview": "Förhandsgranska", + "common.button.edit": "Redigera", + "common.button.profile": "Profil", + "common.button.shares": "Delningar", "common.button.save": "Spara", "common.button.create": "Skapa", "common.button.submit": "Skicka", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Måste vara exakt {length} tecken långt", "common.error.invalid-number": "Måste vara ett tal", "common.error.field-required": "Obligatoriskt fält" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/th-TH.ts b/frontend/src/i18n/translations/th-TH.ts index d25e13c..04304b4 100644 --- a/frontend/src/i18n/translations/th-TH.ts +++ b/frontend/src/i18n/translations/th-TH.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "ข้อมูล", + "common.button.undo": "เลิกทำ", + "common.button.download": "ดาวน์โหลด", + "common.button.copy": "คัดลอก", + "common.button.copy-link": "คัดลอกลิงก์", + "common.button.preview": "แสดงตัวอย่าง", + "common.button.edit": "แก้ไข", + "common.button.profile": "โปรไฟล์", + "common.button.shares": "การแชร์", "common.button.save": "บันทึก", "common.button.create": "สร้าง", "common.button.submit": "ส่ง", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "ต้องมีความยาว {length} ตัวอักษร", "common.error.invalid-number": "ต้องเป็นตัวเลข", "common.error.field-required": "ต้องกรอกข้อมูลนี้" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/tr-TR.ts b/frontend/src/i18n/translations/tr-TR.ts index 82b96b4..9f504b6 100644 --- a/frontend/src/i18n/translations/tr-TR.ts +++ b/frontend/src/i18n/translations/tr-TR.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Bilgi", + "common.button.undo": "Geri Al", + "common.button.download": "İndir", + "common.button.copy": "Kopyala", + "common.button.copy-link": "Bağlantıyı kopyala", + "common.button.preview": "Önizleme", + "common.button.edit": "Düzenle", + "common.button.profile": "Profil", + "common.button.shares": "Paylaşımlar", "common.button.save": "Kaydet", "common.button.create": "Oluştur", "common.button.submit": "Gönder", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Tam olarak {length} karakter olmalıdır", "common.error.invalid-number": "Bir sayı olmalıdır", "common.error.field-required": "Bu alan gereklidir" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/uk-UA.ts b/frontend/src/i18n/translations/uk-UA.ts index a5f9d5d..f86c6aa 100644 --- a/frontend/src/i18n/translations/uk-UA.ts +++ b/frontend/src/i18n/translations/uk-UA.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID підключення", // Common translations + "common.button.info": "Інфо", + "common.button.undo": "Скасувати", + "common.button.download": "Завантажити", + "common.button.copy": "Копіювати", + "common.button.copy-link": "Копіювати посилання", + "common.button.preview": "Перегляд", + "common.button.edit": "Редагувати", + "common.button.profile": "Профіль", + "common.button.shares": "Спільні", "common.button.save": "Зберегти", "common.button.create": "Створити", "common.button.submit": "Відправити", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Повинно бути рівно {length} символів", "common.error.invalid-number": "Повинно бути числом", "common.error.field-required": "Поле обов'язкове для заповнення" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/vi-VN.ts b/frontend/src/i18n/translations/vi-VN.ts index 430999b..a4daf3a 100644 --- a/frontend/src/i18n/translations/vi-VN.ts +++ b/frontend/src/i18n/translations/vi-VN.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "Thông tin", + "common.button.undo": "Hoàn tác", + "common.button.download": "Tải xuống", + "common.button.copy": "Sao chép", + "common.button.copy-link": "Sao chép liên kết", + "common.button.preview": "Xem trước", + "common.button.edit": "Chỉnh sửa", + "common.button.profile": "Hồ sơ", + "common.button.shares": "Chia sẻ", "common.button.save": "Lưu", "common.button.create": "Tạo", "common.button.submit": "Submit", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "Bằng {length} kí tự", "common.error.invalid-number": "Phải là số", "common.error.field-required": "Trường bắt buộc" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/zh-CN.ts b/frontend/src/i18n/translations/zh-CN.ts index bbd6235..c746e67 100644 --- a/frontend/src/i18n/translations/zh-CN.ts +++ b/frontend/src/i18n/translations/zh-CN.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "信息", + "common.button.undo": "撤销", + "common.button.download": "下载", + "common.button.copy": "复制", + "common.button.copy-link": "复制链接", + "common.button.preview": "预览", + "common.button.edit": "编辑", + "common.button.profile": "个人资料", + "common.button.shares": "分享", "common.button.save": "保存", "common.button.create": "创建", "common.button.submit": "提交", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "必须为 {length} 个字符", "common.error.invalid-number": "必须为数字", "common.error.field-required": "必填项" -}; \ No newline at end of file +}; diff --git a/frontend/src/i18n/translations/zh-TW.ts b/frontend/src/i18n/translations/zh-TW.ts index afe831d..cba1e1f 100644 --- a/frontend/src/i18n/translations/zh-TW.ts +++ b/frontend/src/i18n/translations/zh-TW.ts @@ -502,6 +502,15 @@ export default { "error.param.provider_discord": "Discord", "error.param.provider_oidc": "OpenID Connect", // Common translations + "common.button.info": "資訊", + "common.button.undo": "復原", + "common.button.download": "下載", + "common.button.copy": "複製", + "common.button.copy-link": "複製連結", + "common.button.preview": "預覽", + "common.button.edit": "編輯", + "common.button.profile": "個人資料", + "common.button.shares": "分享", "common.button.save": "儲存", "common.button.create": "建立", "common.button.submit": "送出", @@ -531,4 +540,4 @@ export default { "common.error.exact-length": "必須為 {length} 個字元", "common.error.invalid-number": "必須為數字", "common.error.field-required": "必填" -}; \ No newline at end of file +}; From 89976f08b866fff7830c60a776f3e6a0cfe51125 Mon Sep 17 00:00:00 2001 From: Noor Chasib Date: Tue, 8 Apr 2025 17:28:20 -0700 Subject: [PATCH 4/7] fix: change button size --- frontend/src/components/header/ActionAvatar.tsx | 2 +- frontend/src/components/header/NavbarShareMenu.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/header/ActionAvatar.tsx b/frontend/src/components/header/ActionAvatar.tsx index 9d0dd91..0681fb8 100644 --- a/frontend/src/components/header/ActionAvatar.tsx +++ b/frontend/src/components/header/ActionAvatar.tsx @@ -13,7 +13,7 @@ const ActionAvatar = () => { From 94ba1f2a99e058e493070552c5195a527c32c582 Mon Sep 17 00:00:00 2001 From: Noor Chasib Date: Thu, 10 Apr 2025 21:01:22 -0700 Subject: [PATCH 5/7] feat(ui): Add tooltips and remove text from ActionIcons --- frontend/src/components/share/FileList.tsx | 63 ++++--- frontend/src/components/upload/FileList.tsx | 51 ++++-- frontend/src/pages/account/reverseShares.tsx | 126 ++++++++------ frontend/src/pages/account/shares.tsx | 172 ++++++++++++------- 4 files changed, 251 insertions(+), 161 deletions(-) diff --git a/frontend/src/components/share/FileList.tsx b/frontend/src/components/share/FileList.tsx index 0692b91..3d5baed 100644 --- a/frontend/src/components/share/FileList.tsx +++ b/frontend/src/components/share/FileList.tsx @@ -1,11 +1,12 @@ import { + ActionIcon, Box, - Button, Group, Skeleton, Stack, Table, TextInput, + Tooltip, } from "@mantine/core"; import { useClipboard } from "@mantine/hooks"; import { useModals } from "@mantine/modals"; @@ -116,34 +117,50 @@ const FileList = ({ {shareService.doesFileSupportPreview(file.name) && ( - + + showFilePreviewModal(share.id, file, modals) + } + > + + + )} {!share.hasPassword && ( - + copyFileLink(file)}> + + + )} - + { + await shareService.downloadFile(share.id, file.id); + }} + > + + + diff --git a/frontend/src/components/upload/FileList.tsx b/frontend/src/components/upload/FileList.tsx index ea8f30a..bd87b2c 100644 --- a/frontend/src/components/upload/FileList.tsx +++ b/frontend/src/components/upload/FileList.tsx @@ -1,10 +1,11 @@ -import { Button, Table } from "@mantine/core"; +import { ActionIcon, Table, Tooltip } from "@mantine/core"; import { TbTrash } from "react-icons/tb"; import { GrUndo } from "react-icons/gr"; import { FileListItem } from "../../types/File.type"; import { byteToHumanSizeString } from "../../utils/fileSize.util"; import UploadProgressIndicator from "./UploadProgressIndicator"; import { FormattedMessage } from "react-intl"; +import useTranslate from "../../hooks/useTranslate.hook"; const FileListRow = ({ file, @@ -23,7 +24,7 @@ const FileListRow = ({ : onRemove && !file.deleted; const restorable = onRestore && !uploadable && !!file.deleted; // maybe undefined, force boolean const deleted = !uploadable && !!file.deleted; - + const t = useTranslate(); return ( {byteToHumanSizeString(+file.size)} {removable && ( - + + + + )} {uploading && ( )} {restorable && ( - + + + + )} diff --git a/frontend/src/pages/account/reverseShares.tsx b/frontend/src/pages/account/reverseShares.tsx index 7824a97..dd1a923 100644 --- a/frontend/src/pages/account/reverseShares.tsx +++ b/frontend/src/pages/account/reverseShares.tsx @@ -200,64 +200,80 @@ const MyShares = () => { - - + { + modals.openConfirmModal({ + title: t( + "account.reverseShares.modal.delete.title", + ), + children: ( + + + + ), + confirmProps: { + color: "red", + }, + labels: { + confirm: t("common.button.delete"), + cancel: t("common.button.cancel"), + }, + onConfirm: () => { + shareService.removeReverseShare( + reverseShare.id, + ); + setReverseShares( + reverseShares.filter( + (item) => item.id !== reverseShare.id, + ), + ); + }, + }); + }} + > + + + diff --git a/frontend/src/pages/account/shares.tsx b/frontend/src/pages/account/shares.tsx index 4775ad8..e80a72f 100644 --- a/frontend/src/pages/account/shares.tsx +++ b/frontend/src/pages/account/shares.tsx @@ -1,4 +1,5 @@ import { + ActionIcon, Box, Button, Center, @@ -8,6 +9,7 @@ import { Table, Text, Title, + Tooltip, } from "@mantine/core"; import { useClipboard } from "@mantine/hooks"; import { useModals } from "@mantine/modals"; @@ -119,81 +121,121 @@ const MyShares = () => { - + + + + - - - + { + modals.openConfirmModal({ + title: t("account.shares.modal.delete.title", { + share: share.id, + }), + children: ( + + + + ), + confirmProps: { + color: "red", + }, + labels: { + confirm: t("common.button.delete"), + cancel: t("common.button.cancel"), + }, + onConfirm: () => { + shareService.remove(share.id); + setShares( + shares.filter((item) => item.id !== share.id), + ); + }, + }); + }} + > + + + From 0850e9e9e50757fb8f7a362830d0d212dc441459 Mon Sep 17 00:00:00 2001 From: Noor Chasib Date: Thu, 10 Apr 2025 21:10:53 -0700 Subject: [PATCH 6/7] feat(ui): Add text labels to action buttons for clarity --- frontend/src/components/share/FileList.tsx | 7 ++++++- frontend/src/components/upload/FileList.tsx | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/share/FileList.tsx b/frontend/src/components/share/FileList.tsx index 3d5baed..d6fdcb3 100644 --- a/frontend/src/components/share/FileList.tsx +++ b/frontend/src/components/share/FileList.tsx @@ -125,6 +125,7 @@ const FileList = ({ events={{ hover: true, focus: false, touch: true }} > showFilePreviewModal(share.id, file, modals) } @@ -141,7 +142,10 @@ const FileList = ({ label={t("common.button.copy-link")} events={{ hover: true, focus: false, touch: true }} > - copyFileLink(file)}> + copyFileLink(file)} + > @@ -154,6 +158,7 @@ const FileList = ({ events={{ hover: true, focus: false, touch: true }} > { await shareService.downloadFile(share.id, file.id); }} diff --git a/frontend/src/components/upload/FileList.tsx b/frontend/src/components/upload/FileList.tsx index bd87b2c..964c6b7 100644 --- a/frontend/src/components/upload/FileList.tsx +++ b/frontend/src/components/upload/FileList.tsx @@ -25,6 +25,7 @@ const FileListRow = ({ const restorable = onRestore && !uploadable && !!file.deleted; // maybe undefined, force boolean const deleted = !uploadable && !!file.deleted; const t = useTranslate(); + return ( Date: Thu, 10 Apr 2025 21:26:24 -0700 Subject: [PATCH 7/7] feat(ui): Add text labels to action buttons for clarity --- frontend/src/components/share/DownloadAllButton.tsx | 3 ++- frontend/src/components/share/FileList.tsx | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/share/DownloadAllButton.tsx b/frontend/src/components/share/DownloadAllButton.tsx index f5e581a..664b229 100644 --- a/frontend/src/components/share/DownloadAllButton.tsx +++ b/frontend/src/components/share/DownloadAllButton.tsx @@ -39,7 +39,8 @@ const DownloadAllButton = ({ shareId }: { shareId: string }) => { return (