chore: upgrade dependencies
This commit is contained in:
@@ -13,16 +13,15 @@ const AdminConfigTable = () => {
|
||||
|
||||
const [configVariables, setConfigVariables] = useState<AdminConfigType[]>([]);
|
||||
|
||||
const getConfigVariables = () => {
|
||||
setIsLoading(true);
|
||||
configService.listForAdmin().then((configVariables) => {
|
||||
const getConfigVariables = async () => {
|
||||
await configService.listForAdmin().then((configVariables) => {
|
||||
setConfigVariables(configVariables);
|
||||
setIsLoading(false);
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getConfigVariables();
|
||||
setIsLoading(true);
|
||||
getConfigVariables().then(() => setIsLoading(false));
|
||||
}, []);
|
||||
|
||||
const skeletonRows = [...Array(9)].map((c, i) => (
|
||||
@@ -61,7 +60,6 @@ const AdminConfigTable = () => {
|
||||
<Code>{element.key}</Code> {element.secret && <TbLock />}{" "}
|
||||
<br />
|
||||
<Text size="xs" color="dimmed">
|
||||
{" "}
|
||||
{element.description}
|
||||
</Text>
|
||||
</td>
|
||||
|
||||
@@ -45,6 +45,12 @@ const Dropzone = ({
|
||||
return (
|
||||
<div className={classes.wrapper}>
|
||||
<MantineDropzone
|
||||
// Temporary fix for Dropzone issue (https://github.com/mantinedev/mantine/issues/3115)
|
||||
getFilesFromEvent={(e) => {
|
||||
return Promise.resolve([
|
||||
...((e.target as EventTarget & HTMLInputElement)?.files as any),
|
||||
]);
|
||||
}}
|
||||
maxSize={parseInt(config.get("MAX_FILE_SIZE"))}
|
||||
onReject={(e) => {
|
||||
toast.error(e[0].errors[0].message);
|
||||
@@ -52,15 +58,11 @@ const Dropzone = ({
|
||||
disabled={isUploading}
|
||||
openRef={openRef as ForwardedRef<() => void>}
|
||||
onDrop={(files) => {
|
||||
if (files.length > 100) {
|
||||
toast.error("You can't upload more than 100 files per share.");
|
||||
} else {
|
||||
const newFiles = files.map((file) => {
|
||||
(file as FileUpload).uploadingProgress = 0;
|
||||
return file as FileUpload;
|
||||
});
|
||||
setFiles(newFiles);
|
||||
}
|
||||
const newFiles = files.map((file) => {
|
||||
(file as FileUpload).uploadingProgress = 0;
|
||||
return file as FileUpload;
|
||||
});
|
||||
setFiles(newFiles);
|
||||
}}
|
||||
className={classes.dropzone}
|
||||
radius="md"
|
||||
|
||||
@@ -40,7 +40,7 @@ const Setup = () => {
|
||||
mb={70}
|
||||
mt="lg"
|
||||
>
|
||||
Let me in!
|
||||
Let me in
|
||||
</Button>
|
||||
</Stack>
|
||||
</>
|
||||
|
||||
@@ -80,7 +80,7 @@ const uploadFile = async (
|
||||
const response = await api.post(`shares/${shareId}/files`, formData, {
|
||||
onUploadProgress: (progressEvent) => {
|
||||
const uploadingProgress = Math.round(
|
||||
(100 * progressEvent.loaded) / progressEvent.total
|
||||
(100 * progressEvent.loaded) / (progressEvent.total ?? 1)
|
||||
);
|
||||
if (uploadingProgress < 100) progressCallBack(uploadingProgress);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user