Updates to account, ui, etc

This commit is contained in:
2025-05-13 22:57:29 -04:00
parent a273d4134b
commit abfa6b534c
38 changed files with 781 additions and 215 deletions

View File

@@ -25,4 +25,4 @@
font-size: var(--mantine-font-size-sm);
color: var(--mantine-color-dimmed);
margin-top: var(--mantine-spacing-xs);
}
}

View File

@@ -20,9 +20,9 @@ export function AirportDrop() {
setLoading(true);
try {
const formData = new FormData();
files.forEach(file => {
files.forEach((file) => {
formData.append('files', file, file.name);
})
});
await importAirports(formData);
} catch (error) {
console.error('Upload error:', error);
@@ -31,12 +31,12 @@ export function AirportDrop() {
}
}}
className={classes.dropzone}
radius="md"
radius='md'
accept={['application/JSON']}
maxSize={30 * 1024 ** 2}
>
<div style={{ pointerEvents: 'none' }}>
<Group justify="center">
<Group justify='center'>
<Dropzone.Accept>
<IconDownload size={50} color={theme.colors.blue[6]} stroke={1.5} />
</Dropzone.Accept>
@@ -48,22 +48,22 @@ export function AirportDrop() {
</Dropzone.Idle>
</Group>
<Text ta="center" fw={700} fz="lg" mt="xl">
<Text ta='center' fw={700} fz='lg' mt='xl'>
<Dropzone.Accept>Drop files here</Dropzone.Accept>
<Dropzone.Reject>Json file less than 30mb</Dropzone.Reject>
<Dropzone.Idle>Upload JSON</Dropzone.Idle>
</Text>
<Text className={classes.description}>
Drag&apos;n&apos;drop files here to upload. We can accept only <i>.json</i> files that
are less than 30mb in size.
Drag&apos;n&apos;drop files here to upload. We can accept only <i>.json</i> files that are less than 30mb in
size.
</Text>
</div>
</Dropzone>
<Button className={classes.control} size="md" radius="xl" onClick={() => openRef.current?.()}>
<Button className={classes.control} size='md' radius='xl' onClick={() => openRef.current?.()}>
Select files
</Button>
</div>
);
}
}