diff --git a/backend/src/share/share.service.ts b/backend/src/share/share.service.ts
index 321e1559..4a46c280 100644
--- a/backend/src/share/share.service.ts
+++ b/backend/src/share/share.service.ts
@@ -278,7 +278,7 @@ export class ShareService {
share?.security?.password &&
!(await argon.verify(share.security.password, password))
) {
- throw new ForbiddenException("Wrong password");
+ throw new ForbiddenException("Wrong password", "wrong_password");
}
if (share.security?.maxViews && share.security.maxViews <= share.views) {
diff --git a/frontend/src/components/account/showEnableTotpModal.tsx b/frontend/src/components/account/showEnableTotpModal.tsx
index 4bacaa59..2073236e 100644
--- a/frontend/src/components/account/showEnableTotpModal.tsx
+++ b/frontend/src/components/account/showEnableTotpModal.tsx
@@ -7,7 +7,6 @@ import {
Stack,
Text,
TextInput,
- Title,
Tooltip,
} from "@mantine/core";
import { useForm, yupResolver } from "@mantine/form";
@@ -27,7 +26,7 @@ const showEnableTotpModal = (
}
) => {
return modals.openModal({
- title:
Enable TOTP,
+ title: "Enable TOTP",
children: (
),
diff --git a/frontend/src/components/admin/users/showCreateUserModal.tsx b/frontend/src/components/admin/users/showCreateUserModal.tsx
index 727b0a35..cf6a094b 100644
--- a/frontend/src/components/admin/users/showCreateUserModal.tsx
+++ b/frontend/src/components/admin/users/showCreateUserModal.tsx
@@ -5,7 +5,6 @@ import {
Stack,
Switch,
TextInput,
- Title,
} from "@mantine/core";
import { useForm, yupResolver } from "@mantine/form";
import { ModalsContextProps } from "@mantine/modals/lib/context";
@@ -19,7 +18,7 @@ const showCreateUserModal = (
getUsers: () => void
) => {
return modals.openModal({
- title: Create user,
+ title: "Create user",
children: (
Promise
) => {
return modals.openModal({
closeOnClickOutside: false,
withCloseButton: false,
closeOnEscape: false,
- title: (
- <>
- Password required
-
- This access this share please enter the password for the share.
-
- >
- ),
+ title: "Password required",
children: ,
});
};
-const Body = ({ submitCallback }: { submitCallback: any }) => {
+const Body = ({
+ submitCallback,
+}: {
+ submitCallback: (password: string) => Promise;
+}) => {
const [password, setPassword] = useState("");
const [passwordWrong, setPasswordWrong] = useState(false);
return (
- <>
-
- setPasswordWrong(false)}
- onChange={(e) => setPassword(e.target.value)}
- value={password}
- />
-
-
- >
+
+
+ This access this share please enter the password for the share.
+
+
+
+
);
};
diff --git a/frontend/src/components/share/showErrorModal.tsx b/frontend/src/components/share/showErrorModal.tsx
index c0c27831..72f01719 100644
--- a/frontend/src/components/share/showErrorModal.tsx
+++ b/frontend/src/components/share/showErrorModal.tsx
@@ -1,4 +1,4 @@
-import { Button, Stack, Text, Title } from "@mantine/core";
+import { Button, Stack, Text } from "@mantine/core";
import { useModals } from "@mantine/modals";
import { ModalsContextProps } from "@mantine/modals/lib/context";
import { useRouter } from "next/router";
@@ -12,7 +12,7 @@ const showErrorModal = (
closeOnClickOutside: false,
withCloseButton: false,
closeOnEscape: false,
- title: {title},
+ title: title,
children: ,
});
diff --git a/frontend/src/components/upload/modals/showCompletedUploadModal.tsx b/frontend/src/components/upload/modals/showCompletedUploadModal.tsx
index a03ed9ea..43c5fd18 100644
--- a/frontend/src/components/upload/modals/showCompletedUploadModal.tsx
+++ b/frontend/src/components/upload/modals/showCompletedUploadModal.tsx
@@ -1,11 +1,4 @@
-import {
- ActionIcon,
- Button,
- Stack,
- Text,
- TextInput,
- Title,
-} from "@mantine/core";
+import { ActionIcon, Button, Stack, Text, TextInput } from "@mantine/core";
import { useClipboard } from "@mantine/hooks";
import { useModals } from "@mantine/modals";
import { ModalsContextProps } from "@mantine/modals/lib/context";
@@ -24,11 +17,7 @@ const showCompletedUploadModal = (
closeOnClickOutside: false,
withCloseButton: false,
closeOnEscape: false,
- title: (
-
- Share ready
-
- ),
+ title: "Share ready",
children: