From 289ba1156a8035fafa7c1ab0bee9ab3c8ad2881f Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Wed, 28 Jan 2026 20:00:41 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Enhance=20UI=20styling=20and=20add?= =?UTF-8?q?=20file=20size=20check=20with=20error=20handling=20for=20large?= =?UTF-8?q?=20raw=20gamemaster=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/GamemasterExplorer.vue | 86 ++++++++++++------- 1 file changed, 56 insertions(+), 30 deletions(-) diff --git a/code/websites/pokedex.online/src/views/GamemasterExplorer.vue b/code/websites/pokedex.online/src/views/GamemasterExplorer.vue index d97e8e0..012ecdf 100644 --- a/code/websites/pokedex.online/src/views/GamemasterExplorer.vue +++ b/code/websites/pokedex.online/src/views/GamemasterExplorer.vue @@ -450,6 +450,16 @@ async function loadFile() { loading.value = true; error.value = null; + // Check if raw file is too large (> 50MB) + if (selectedFile.value === '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).'; + loading.value = false; + return; + } + } + let data; switch (selectedFile.value) { case 'pokemon': @@ -726,11 +736,17 @@ onMounted(() => {