refactor: run formatter
This commit is contained in:
@@ -42,7 +42,7 @@ const Account = () => {
|
||||
username: yup
|
||||
.string()
|
||||
.min(3, t("common.error.too-short", { length: 3 })),
|
||||
})
|
||||
}),
|
||||
),
|
||||
});
|
||||
|
||||
@@ -61,7 +61,7 @@ const Account = () => {
|
||||
.string()
|
||||
.min(8, t("common.error.too-short", { length: 8 }))
|
||||
.required(t("common.error.field-required")),
|
||||
})
|
||||
}),
|
||||
),
|
||||
});
|
||||
|
||||
@@ -75,7 +75,7 @@ const Account = () => {
|
||||
.string()
|
||||
.min(8, t("common.error.too-short", { length: 8 }))
|
||||
.required(t("common.error.field-required")),
|
||||
})
|
||||
}),
|
||||
),
|
||||
});
|
||||
|
||||
@@ -92,7 +92,7 @@ const Account = () => {
|
||||
.min(6, t("common.error.exact-length", { length: 6 }))
|
||||
.max(6, t("common.error.exact-length", { length: 6 }))
|
||||
.matches(/^[0-9]+$/, { message: t("common.error.invalid-number") }),
|
||||
})
|
||||
}),
|
||||
),
|
||||
});
|
||||
|
||||
@@ -115,7 +115,7 @@ const Account = () => {
|
||||
email: values.email,
|
||||
})
|
||||
.then(() => toast.success(t("account.notify.info.success")))
|
||||
.catch(toast.axiosError)
|
||||
.catch(toast.axiosError),
|
||||
)}
|
||||
>
|
||||
<Stack>
|
||||
@@ -147,7 +147,7 @@ const Account = () => {
|
||||
toast.success(t("account.notify.password.success"));
|
||||
passwordForm.reset();
|
||||
})
|
||||
.catch(toast.axiosError)
|
||||
.catch(toast.axiosError),
|
||||
)}
|
||||
>
|
||||
<Stack>
|
||||
@@ -199,7 +199,7 @@ const Account = () => {
|
||||
<Stack>
|
||||
<PasswordInput
|
||||
description={t(
|
||||
"account.card.security.totp.disable.description"
|
||||
"account.card.security.totp.disable.description",
|
||||
)}
|
||||
label={t("account.card.password.title")}
|
||||
{...disableTotpForm.getInputProps("password")}
|
||||
@@ -241,7 +241,7 @@ const Account = () => {
|
||||
<PasswordInput
|
||||
label={t("account.card.password.title")}
|
||||
description={t(
|
||||
"account.card.security.totp.enable.description"
|
||||
"account.card.security.totp.enable.description",
|
||||
)}
|
||||
{...enableTotpForm.getInputProps("password")}
|
||||
/>
|
||||
|
||||
@@ -77,7 +77,7 @@ const MyShares = () => {
|
||||
showCreateReverseShareModal(
|
||||
modals,
|
||||
config.get("smtp.enabled"),
|
||||
getReverseShares
|
||||
getReverseShares,
|
||||
)
|
||||
}
|
||||
leftIcon={<TbPlus size={20} />}
|
||||
@@ -134,10 +134,10 @@ const MyShares = () => {
|
||||
<Text size="sm">
|
||||
{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",
|
||||
)}`}
|
||||
</Text>
|
||||
</Accordion.Control>
|
||||
@@ -158,15 +158,13 @@ const MyShares = () => {
|
||||
size={25}
|
||||
onClick={() => {
|
||||
if (window.isSecureContext) {
|
||||
clipboard.copy(
|
||||
`${appUrl}/s/${share.id}`
|
||||
);
|
||||
clipboard.copy(`${appUrl}/s/${share.id}`);
|
||||
toast.success(t("common.notify.copied"));
|
||||
} else {
|
||||
showShareLinkModal(
|
||||
modals,
|
||||
share.id,
|
||||
config.get("general.appUrl")
|
||||
config.get("general.appUrl"),
|
||||
);
|
||||
}
|
||||
}}
|
||||
@@ -200,14 +198,14 @@ const MyShares = () => {
|
||||
clipboard.copy(
|
||||
`${config.get("general.appUrl")}/upload/${
|
||||
reverseShare.token
|
||||
}`
|
||||
}`,
|
||||
);
|
||||
toast.success(t("common.notify.copied"));
|
||||
} else {
|
||||
showReverseShareLinkModal(
|
||||
modals,
|
||||
reverseShare.token,
|
||||
config.get("general.appUrl")
|
||||
config.get("general.appUrl"),
|
||||
);
|
||||
}
|
||||
}}
|
||||
@@ -221,7 +219,7 @@ const MyShares = () => {
|
||||
onClick={() => {
|
||||
modals.openConfirmModal({
|
||||
title: t(
|
||||
"account.reverseShares.modal.delete.title"
|
||||
"account.reverseShares.modal.delete.title",
|
||||
),
|
||||
children: (
|
||||
<Text size="sm">
|
||||
@@ -239,8 +237,8 @@ const MyShares = () => {
|
||||
shareService.removeReverseShare(reverseShare.id);
|
||||
setReverseShares(
|
||||
reverseShares.filter(
|
||||
(item) => item.id !== reverseShare.id
|
||||
)
|
||||
(item) => item.id !== reverseShare.id,
|
||||
),
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -119,7 +119,7 @@ const MyShares = () => {
|
||||
modals,
|
||||
share,
|
||||
config.get("general.appUrl"),
|
||||
parseInt(config.get("share.maxSize"))
|
||||
parseInt(config.get("share.maxSize")),
|
||||
);
|
||||
}}
|
||||
>
|
||||
@@ -132,16 +132,14 @@ const MyShares = () => {
|
||||
onClick={() => {
|
||||
if (window.isSecureContext) {
|
||||
clipboard.copy(
|
||||
`${config.get("general.appUrl")}/s/${
|
||||
share.id
|
||||
}`
|
||||
`${config.get("general.appUrl")}/s/${share.id}`,
|
||||
);
|
||||
toast.success(t("common.notify.copied"));
|
||||
} else {
|
||||
showShareLinkModal(
|
||||
modals,
|
||||
share.id,
|
||||
config.get("general.appUrl")
|
||||
config.get("general.appUrl"),
|
||||
);
|
||||
}
|
||||
}}
|
||||
@@ -172,7 +170,7 @@ const MyShares = () => {
|
||||
onConfirm: () => {
|
||||
shareService.remove(share.id);
|
||||
setShares(
|
||||
shares.filter((item) => item.id !== share.id)
|
||||
shares.filter((item) => item.id !== share.id),
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user