add .GLD file verification for drag and drop
This commit is contained in:
@@ -293,13 +293,21 @@ Mit freundlichen Grüßen,
|
||||
// drag and drop functionality
|
||||
let isDragging = $state(false);
|
||||
|
||||
function handleDrop(event) {
|
||||
async function handleDrop(event) {
|
||||
event.preventDefault();
|
||||
isDragging = false;
|
||||
|
||||
if (event.dataTransfer?.files?.length) {
|
||||
files = event.dataTransfer.files;
|
||||
}
|
||||
if (!(await check_valid_glb_file())) {
|
||||
formErrors = { file: 'Keine gültige .GLD-Datei' }
|
||||
// reset form fields etc.
|
||||
files = null;
|
||||
fileInput.value = '';
|
||||
} else {
|
||||
formErrors = { ...formErrors, file: ''}
|
||||
};
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user