0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-10 07:02:39 +00:00

aah, i forgot to add the latest commit

This commit is contained in:
Víctor Losada Hernández
2025-08-21 16:53:36 +02:00
parent 320f1e120f
commit dd46a059c5

View File

@@ -34,16 +34,11 @@ const NewBrew = ()=>{
} }
const type = file.name.split('.').pop().toLowerCase(); const type = file.name.split('.').pop().toLowerCase();
if(type === 'txt') {
alert( alert(`This file is invalid: ${!type ? "Missing file extension" :`.${type} files are not supported`}. Only .txt files exported from the Homebrewery are allowed.`);
`This file type is correct, but it is not from the homebrewery or has been tampered with, please try with a correct file or report this as an issue if you think it is a mistake.`
);
} else if(!type) { console.log(file);
alert('This file is invalid, please, enter a valid file');
console.log(file);
} else {
alert(`This is a .${type} file, only .txt files are allowed`);
}
}; };
reader.readAsText(file); reader.readAsText(file);
}; };