refactor: run formatter

This commit is contained in:
Elias Schneider
2024-11-26 20:58:32 +01:00
parent e86f93830b
commit 3df80acff9
6 changed files with 19 additions and 19 deletions

View File

@@ -26,7 +26,7 @@ const showEnableTotpModal = (
qrCode: string; qrCode: string;
secret: string; secret: string;
password: string; password: string;
} },
) => { ) => {
const t = translateOutsideContext(); const t = translateOutsideContext();
return modals.openModal({ return modals.openModal({

View File

@@ -89,7 +89,7 @@ const ManageShareTable = ({
onClick={() => { onClick={() => {
if (window.isSecureContext) { if (window.isSecureContext) {
clipboard.copy( clipboard.copy(
`${window.location.origin}/s/${share.id}` `${window.location.origin}/s/${share.id}`,
); );
toast.success(t("common.notify.copied-link")); toast.success(t("common.notify.copied-link"));
} else { } else {

View File

@@ -13,7 +13,7 @@ function CopyTextField(props: { link: string }) {
const [checkState, setCheckState] = useState(false); const [checkState, setCheckState] = useState(false);
const [textClicked, setTextClicked] = useState(false); const [textClicked, setTextClicked] = useState(false);
const timerRef = useRef<number | ReturnType<typeof setTimeout> | undefined>( const timerRef = useRef<number | ReturnType<typeof setTimeout> | undefined>(
undefined undefined,
); );
const copyLink = () => { const copyLink = () => {

View File

@@ -76,7 +76,7 @@ const MyShares = () => {
modals, modals,
config.get("smtp.enabled"), config.get("smtp.enabled"),
config.get("share.maxExpiration"), config.get("share.maxExpiration"),
getReverseShares getReverseShares,
) )
} }
leftIcon={<TbPlus size={20} />} leftIcon={<TbPlus size={20} />}
@@ -133,10 +133,10 @@ const MyShares = () => {
<Text size="sm"> <Text size="sm">
{reverseShare.shares.length == 1 {reverseShare.shares.length == 1
? `1 ${t( ? `1 ${t(
"account.reverseShares.table.count.singular" "account.reverseShares.table.count.singular",
)}` )}`
: `${reverseShare.shares.length} ${t( : `${reverseShare.shares.length} ${t(
"account.reverseShares.table.count.plural" "account.reverseShares.table.count.plural",
)}`} )}`}
</Text> </Text>
</Accordion.Control> </Accordion.Control>
@@ -158,10 +158,10 @@ const MyShares = () => {
onClick={() => { onClick={() => {
if (window.isSecureContext) { if (window.isSecureContext) {
clipboard.copy( clipboard.copy(
`${window.location.origin}/s/${share.id}` `${window.location.origin}/s/${share.id}`,
); );
toast.success( toast.success(
t("common.notify.copied-link") t("common.notify.copied-link"),
); );
} else { } else {
showShareLinkModal(modals, share.id); showShareLinkModal(modals, share.id);
@@ -197,13 +197,13 @@ const MyShares = () => {
clipboard.copy( clipboard.copy(
`${window.location.origin}/upload/${ `${window.location.origin}/upload/${
reverseShare.token reverseShare.token
}` }`,
); );
toast.success(t("common.notify.copied-link")); toast.success(t("common.notify.copied-link"));
} else { } else {
showReverseShareLinkModal( showReverseShareLinkModal(
modals, modals,
reverseShare.token reverseShare.token,
); );
} }
}} }}
@@ -217,7 +217,7 @@ const MyShares = () => {
onClick={() => { onClick={() => {
modals.openConfirmModal({ modals.openConfirmModal({
title: t( title: t(
"account.reverseShares.modal.delete.title" "account.reverseShares.modal.delete.title",
), ),
children: ( children: (
<Text size="sm"> <Text size="sm">
@@ -235,8 +235,8 @@ const MyShares = () => {
shareService.removeReverseShare(reverseShare.id); shareService.removeReverseShare(reverseShare.id);
setReverseShares( setReverseShares(
reverseShares.filter( reverseShares.filter(
(item) => item.id !== reverseShare.id (item) => item.id !== reverseShare.id,
) ),
); );
}, },
}); });

View File

@@ -108,7 +108,7 @@ const MyShares = () => {
showShareInformationsModal( showShareInformationsModal(
modals, modals,
share, share,
parseInt(config.get("share.maxSize")) parseInt(config.get("share.maxSize")),
); );
}} }}
> >
@@ -121,7 +121,7 @@ const MyShares = () => {
onClick={() => { onClick={() => {
if (window.isSecureContext) { if (window.isSecureContext) {
clipboard.copy( clipboard.copy(
`${window.location.origin}/s/${share.id}` `${window.location.origin}/s/${share.id}`,
); );
toast.success(t("common.notify.copied-link")); toast.success(t("common.notify.copied-link"));
} else { } else {
@@ -155,7 +155,7 @@ const MyShares = () => {
onConfirm: () => { onConfirm: () => {
shareService.remove(share.id); shareService.remove(share.id);
setShares( setShares(
shares.filter((item) => item.id !== share.id) shares.filter((item) => item.id !== share.id),
); );
}, },
}); });

View File

@@ -77,7 +77,7 @@ export default function AppShellDemo() {
} }
const index = updatedConfigVariables.findIndex( const index = updatedConfigVariables.findIndex(
(item) => item.key === configVariable.key (item) => item.key === configVariable.key,
); );
if (index > -1) { if (index > -1) {
@@ -144,7 +144,7 @@ export default function AppShellDemo() {
<Title order={6}> <Title order={6}>
<FormattedMessage <FormattedMessage
id={`admin.config.${camelToKebab( id={`admin.config.${camelToKebab(
configVariable.key configVariable.key,
)}`} )}`}
/> />
</Title> </Title>
@@ -159,7 +159,7 @@ export default function AppShellDemo() {
> >
<FormattedMessage <FormattedMessage
id={`admin.config.${camelToKebab( id={`admin.config.${camelToKebab(
configVariable.key configVariable.key,
)}.description`} )}.description`}
values={{ br: <br /> }} values={{ br: <br /> }}
/> />