From 3df80acff962f0e001872ac05ef6877acee9c60e Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Tue, 26 Nov 2024 20:58:32 +0100 Subject: [PATCH] refactor: run formatter --- .../account/showEnableTotpModal.tsx | 2 +- .../admin/shares/ManageShareTable.tsx | 2 +- .../src/components/upload/CopyTextField.tsx | 2 +- frontend/src/pages/account/reverseShares.tsx | 20 +++++++++---------- frontend/src/pages/account/shares.tsx | 6 +++--- .../src/pages/admin/config/[category].tsx | 6 +++--- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/frontend/src/components/account/showEnableTotpModal.tsx b/frontend/src/components/account/showEnableTotpModal.tsx index a180fe12..569f7a2e 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/admin/shares/ManageShareTable.tsx b/frontend/src/components/admin/shares/ManageShareTable.tsx index 3bba6e29..8e751213 100644 --- a/frontend/src/components/admin/shares/ManageShareTable.tsx +++ b/frontend/src/components/admin/shares/ManageShareTable.tsx @@ -89,7 +89,7 @@ const ManageShareTable = ({ onClick={() => { if (window.isSecureContext) { clipboard.copy( - `${window.location.origin}/s/${share.id}` + `${window.location.origin}/s/${share.id}`, ); toast.success(t("common.notify.copied-link")); } else { diff --git a/frontend/src/components/upload/CopyTextField.tsx b/frontend/src/components/upload/CopyTextField.tsx index 390996af..6165b5e0 100644 --- a/frontend/src/components/upload/CopyTextField.tsx +++ b/frontend/src/components/upload/CopyTextField.tsx @@ -13,7 +13,7 @@ function CopyTextField(props: { link: string }) { const [checkState, setCheckState] = useState(false); const [textClicked, setTextClicked] = useState(false); const timerRef = useRef | undefined>( - undefined + undefined, ); const copyLink = () => { diff --git a/frontend/src/pages/account/reverseShares.tsx b/frontend/src/pages/account/reverseShares.tsx index 4f3de32a..6f0577a2 100644 --- a/frontend/src/pages/account/reverseShares.tsx +++ b/frontend/src/pages/account/reverseShares.tsx @@ -76,7 +76,7 @@ const MyShares = () => { modals, config.get("smtp.enabled"), config.get("share.maxExpiration"), - getReverseShares + getReverseShares, ) } leftIcon={} @@ -133,10 +133,10 @@ const MyShares = () => { {reverseShare.shares.length == 1 ? `1 ${t( - "account.reverseShares.table.count.singular" + "account.reverseShares.table.count.singular", )}` : `${reverseShare.shares.length} ${t( - "account.reverseShares.table.count.plural" + "account.reverseShares.table.count.plural", )}`} @@ -158,10 +158,10 @@ const MyShares = () => { onClick={() => { if (window.isSecureContext) { clipboard.copy( - `${window.location.origin}/s/${share.id}` + `${window.location.origin}/s/${share.id}`, ); toast.success( - t("common.notify.copied-link") + t("common.notify.copied-link"), ); } else { showShareLinkModal(modals, share.id); @@ -197,13 +197,13 @@ const MyShares = () => { clipboard.copy( `${window.location.origin}/upload/${ reverseShare.token - }` + }`, ); toast.success(t("common.notify.copied-link")); } else { showReverseShareLinkModal( modals, - reverseShare.token + reverseShare.token, ); } }} @@ -217,7 +217,7 @@ const MyShares = () => { onClick={() => { modals.openConfirmModal({ title: t( - "account.reverseShares.modal.delete.title" + "account.reverseShares.modal.delete.title", ), children: ( @@ -235,8 +235,8 @@ const MyShares = () => { shareService.removeReverseShare(reverseShare.id); setReverseShares( reverseShares.filter( - (item) => item.id !== reverseShare.id - ) + (item) => item.id !== reverseShare.id, + ), ); }, }); diff --git a/frontend/src/pages/account/shares.tsx b/frontend/src/pages/account/shares.tsx index bb28b738..9864ba19 100644 --- a/frontend/src/pages/account/shares.tsx +++ b/frontend/src/pages/account/shares.tsx @@ -108,7 +108,7 @@ const MyShares = () => { showShareInformationsModal( modals, share, - parseInt(config.get("share.maxSize")) + parseInt(config.get("share.maxSize")), ); }} > @@ -121,7 +121,7 @@ const MyShares = () => { onClick={() => { if (window.isSecureContext) { clipboard.copy( - `${window.location.origin}/s/${share.id}` + `${window.location.origin}/s/${share.id}`, ); toast.success(t("common.notify.copied-link")); } else { @@ -155,7 +155,7 @@ const MyShares = () => { onConfirm: () => { shareService.remove(share.id); setShares( - shares.filter((item) => item.id !== share.id) + shares.filter((item) => item.id !== share.id), ); }, }); diff --git a/frontend/src/pages/admin/config/[category].tsx b/frontend/src/pages/admin/config/[category].tsx index 65da680d..80de5b4c 100644 --- a/frontend/src/pages/admin/config/[category].tsx +++ b/frontend/src/pages/admin/config/[category].tsx @@ -77,7 +77,7 @@ export default function AppShellDemo() { } const index = updatedConfigVariables.findIndex( - (item) => item.key === configVariable.key + (item) => item.key === configVariable.key, ); if (index > -1) { @@ -144,7 +144,7 @@ export default function AppShellDemo() { <FormattedMessage id={`admin.config.${camelToKebab( - configVariable.key + configVariable.key, )}`} /> @@ -159,7 +159,7 @@ export default function AppShellDemo() { > }} />