⚡ Improve readability of raw file size check and error message formatting
This commit is contained in:
@@ -452,9 +452,14 @@ async function loadFile() {
|
||||
|
||||
// Check if raw file is too large (> 50MB)
|
||||
if (selectedFile.value === 'raw') {
|
||||
const rawFile = status.value.available?.find(f => f.filename.includes('raw'));
|
||||
const rawFile = status.value.available?.find(f =>
|
||||
f.filename.includes('raw')
|
||||
);
|
||||
if (rawFile && rawFile.size > 50 * 1024 * 1024) {
|
||||
error.value = '⚠️ Raw gamemaster file is very large (' + formatSize(rawFile.size) + '). It may be slow to load. Try a specific file type instead (Pokemon, All Forms, or Moves).';
|
||||
error.value =
|
||||
'⚠️ Raw gamemaster file is very large (' +
|
||||
formatSize(rawFile.size) +
|
||||
'). It may be slow to load. Try a specific file type instead (Pokemon, All Forms, or Moves).';
|
||||
loading.value = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user