From f02e2979c41c2965e70b301762ab3efb437d61bd Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Thu, 17 Aug 2023 14:47:58 +0200 Subject: [PATCH] refactor: run formatter --- .../src/components/account/LanguagePicker.tsx | 4 +- .../src/components/account/ThemeSwitcher.tsx | 4 +- .../account/showEnableTotpModal.tsx | 2 +- .../account/showReverseShareLinkModal.tsx | 2 +- .../account/showShareInformationsModal.tsx | 2 +- .../components/account/showShareLinkModal.tsx | 2 +- .../admin/configuration/AdminConfigInput.tsx | 2 +- .../admin/configuration/TestEmailButton.tsx | 2 +- .../admin/users/showCreateUserModal.tsx | 6 +- .../admin/users/showUpdateUserModal.tsx | 10 +- frontend/src/components/auth/SignUpForm.tsx | 2 +- .../modals/showCompletedReverseShareModal.tsx | 2 +- .../modals/showCreateReverseShareModal.tsx | 8 +- .../share/modals/showFilePreviewModal.tsx | 2 +- .../share/showEnterPasswordModal.tsx | 2 +- .../src/components/share/showErrorModal.tsx | 2 +- .../src/components/upload/CopyTextField.tsx | 2 +- frontend/src/components/upload/Dropzone.tsx | 4 +- .../modals/showCompletedUploadModal.tsx | 2 +- .../upload/modals/showCreateUploadModal.tsx | 14 +- frontend/src/hooks/useTranslate.hook.ts | 6 +- frontend/src/i18n/translations/da-DK.ts | 166 +++++++++----- frontend/src/i18n/translations/de-DE.ts | 190 +++++++++------ frontend/src/i18n/translations/es-ES.ts | 181 ++++++++++----- frontend/src/i18n/translations/fi-FI.ts | 179 ++++++++++----- frontend/src/i18n/translations/fr-FR.ts | 193 ++++++++++------ frontend/src/i18n/translations/pt-BR.ts | 217 ++++++++++++------ frontend/src/i18n/translations/ru-RU.ts | 175 +++++++++----- frontend/src/i18n/translations/zh-CN.ts | 88 ++++--- frontend/src/middleware.ts | 2 +- frontend/src/pages/404.tsx | 4 +- frontend/src/pages/_app.tsx | 4 +- frontend/src/pages/account/index.tsx | 16 +- frontend/src/pages/account/reverseShares.tsx | 22 +- frontend/src/pages/account/shares.tsx | 10 +- .../src/pages/admin/config/[category].tsx | 8 +- .../resetPassword/[resetPasswordToken].tsx | 2 +- .../src/pages/auth/resetPassword/index.tsx | 4 +- frontend/src/pages/share/[shareId]/index.tsx | 6 +- .../src/pages/upload/[reverseShareToken].tsx | 2 +- frontend/src/pages/upload/index.tsx | 16 +- frontend/src/services/auth.service.ts | 2 +- frontend/src/services/config.service.ts | 4 +- frontend/src/services/share.service.ts | 4 +- frontend/src/types/config.type.ts | 2 +- frontend/src/utils/date.util.ts | 6 +- frontend/src/utils/i18n.util.ts | 4 +- frontend/src/utils/toast.util.tsx | 2 +- 48 files changed, 1018 insertions(+), 573 deletions(-) diff --git a/frontend/src/components/account/LanguagePicker.tsx b/frontend/src/components/account/LanguagePicker.tsx index 95f0c6f..d62e93d 100644 --- a/frontend/src/components/account/LanguagePicker.tsx +++ b/frontend/src/components/account/LanguagePicker.tsx @@ -7,7 +7,7 @@ import { LOCALES } from "../../i18n/locales"; const LanguagePicker = () => { const t = useTranslate(); const [selectedLanguage, setSelectedLanguage] = useState( - getCookie("language")?.toString() + getCookie("language")?.toString(), ); const languages = Object.values(LOCALES).map((locale) => ({ @@ -23,7 +23,7 @@ const LanguagePicker = () => { setCookie("language", value, { sameSite: "lax", expires: new Date( - new Date().setFullYear(new Date().getFullYear() + 1) + new Date().setFullYear(new Date().getFullYear() + 1), ), }); location.reload(); diff --git a/frontend/src/components/account/ThemeSwitcher.tsx b/frontend/src/components/account/ThemeSwitcher.tsx index 3bcebee..59da4a5 100644 --- a/frontend/src/components/account/ThemeSwitcher.tsx +++ b/frontend/src/components/account/ThemeSwitcher.tsx @@ -14,7 +14,7 @@ import userPreferences from "../../utils/userPreferences.util"; const ThemeSwitcher = () => { const [colorScheme, setColorScheme] = useState( - userPreferences.get("colorScheme") + userPreferences.get("colorScheme"), ); const { toggleColorScheme } = useMantineColorScheme(); const systemColorScheme = useColorScheme(); @@ -26,7 +26,7 @@ const ThemeSwitcher = () => { userPreferences.set("colorScheme", value); setColorScheme(value); toggleColorScheme( - value == "system" ? systemColorScheme : (value as ColorScheme) + value == "system" ? systemColorScheme : (value as ColorScheme), ); }} data={[ diff --git a/frontend/src/components/account/showEnableTotpModal.tsx b/frontend/src/components/account/showEnableTotpModal.tsx index fb025db..5a3c35c 100644 --- a/frontend/src/components/account/showEnableTotpModal.tsx +++ b/frontend/src/components/account/showEnableTotpModal.tsx @@ -26,7 +26,7 @@ const showEnableTotpModal = ( qrCode: string; secret: string; password: string; - } + }, ) => { const t = translateOutsideContext(); return modals.openModal({ diff --git a/frontend/src/components/account/showReverseShareLinkModal.tsx b/frontend/src/components/account/showReverseShareLinkModal.tsx index 73ed193..8feae61 100644 --- a/frontend/src/components/account/showReverseShareLinkModal.tsx +++ b/frontend/src/components/account/showReverseShareLinkModal.tsx @@ -5,7 +5,7 @@ import { translateOutsideContext } from "../../hooks/useTranslate.hook"; const showReverseShareLinkModal = ( modals: ModalsContextProps, reverseShareToken: string, - appUrl: string + appUrl: string, ) => { const t = translateOutsideContext(); const link = `${appUrl}/upload/${reverseShareToken}`; diff --git a/frontend/src/components/account/showShareInformationsModal.tsx b/frontend/src/components/account/showShareInformationsModal.tsx index 4b1991d..b67492a 100644 --- a/frontend/src/components/account/showShareInformationsModal.tsx +++ b/frontend/src/components/account/showShareInformationsModal.tsx @@ -12,7 +12,7 @@ const showShareInformationsModal = ( modals: ModalsContextProps, share: MyShare, appUrl: string, - maxShareSize: number + maxShareSize: number, ) => { const t = translateOutsideContext(); const link = `${appUrl}/s/${share.id}`; diff --git a/frontend/src/components/account/showShareLinkModal.tsx b/frontend/src/components/account/showShareLinkModal.tsx index 34d30b7..4d360ca 100644 --- a/frontend/src/components/account/showShareLinkModal.tsx +++ b/frontend/src/components/account/showShareLinkModal.tsx @@ -5,7 +5,7 @@ import { translateOutsideContext } from "../../hooks/useTranslate.hook"; const showShareLinkModal = ( modals: ModalsContextProps, shareId: string, - appUrl: string + appUrl: string, ) => { const t = translateOutsideContext(); const link = `${appUrl}/s/${shareId}`; diff --git a/frontend/src/components/admin/configuration/AdminConfigInput.tsx b/frontend/src/components/admin/configuration/AdminConfigInput.tsx index 674a06a..6bf730d 100644 --- a/frontend/src/components/admin/configuration/AdminConfigInput.tsx +++ b/frontend/src/components/admin/configuration/AdminConfigInput.tsx @@ -21,7 +21,7 @@ const AdminConfigInput = ({ stringValue: configVariable.value ?? configVariable.defaultValue, textValue: configVariable.value ?? configVariable.defaultValue, numberValue: parseInt( - configVariable.value ?? configVariable.defaultValue + configVariable.value ?? configVariable.defaultValue, ), booleanValue: (configVariable.value ?? configVariable.defaultValue) == "true", diff --git a/frontend/src/components/admin/configuration/TestEmailButton.tsx b/frontend/src/components/admin/configuration/TestEmailButton.tsx index f1ee2af..e7af23f 100644 --- a/frontend/src/components/admin/configuration/TestEmailButton.tsx +++ b/frontend/src/components/admin/configuration/TestEmailButton.tsx @@ -33,7 +33,7 @@ const TestEmailButton = ({