diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 659d038..0673a4c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,11 +1,5 @@ name: Deploy to GitHub Pages - -on: - push: - branches: 'main' - - jobs: build_site: runs-on: ubuntu-latest diff --git a/src/lib/component/Textarea.svelte b/src/lib/component/Textarea.svelte index cad3b2a..6818d0e 100644 --- a/src/lib/component/Textarea.svelte +++ b/src/lib/component/Textarea.svelte @@ -2,7 +2,8 @@ export let text: string; export let bindValue: string | number | undefined; export let forValue: string; - export let required: boolean = false;; + export let required: boolean = false; + export let disabled: boolean = false;
@@ -40,7 +37,7 @@
${endotartnation} is not in the WA.
${endotarter} is not in the WA.
Searching for the nations in ${regionalXML.NATION.REGION} not being endorsed by ${endotartnation}, using the ${endotartsource}
Searching for the nations in ${regionalXML.NATION.REGION} not being endorsed by ${endotarter}, using the ${source}
Nations immune to endocap: ${whiteList.map((region) => region.trim()).join(', ')}
Could not find ${date} national dump, defaulting to the API.
Found ${date} national dump.
Parsing dump for endotarting...
${i+1}/${regionalWA.length} ${regionalWA[i]} not found, likely not in the dump yet` - } + const nations = (xml.NATIONS.NATION as Array).filter(nation => String(nation.NAME).toLowerCase().replace(/ /g, '_') === (regionalWA[i].toLowerCase()))[0]; + ({ NAME, ENDORSEMENTS } = nations) } - if (NAME && ENDORSEMENTS) { - if (endotartnation.toLowerCase().replaceAll(' ', '_') === String(NAME).toLowerCase().replaceAll(' ', '_')) { - progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is the endotart nation.` - } else if (limit) { - if (whiteList.includes(regionalWA[i])) { - progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is in your immune nations.` - } else if (ENDORSEMENTS.length < limit && !ENDORSEMENTS.includes(endotartnation.toLowerCase().replaceAll(' ', '_')) && regionalWA[i] !== endotartnation.toLowerCase().replaceAll(' ', '_')) { - progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is not being endorsed by ${endotartnation}.` - } else if (ENDORSEMENTS.length > limit) { - progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} has more than ${limit} endorsements.` - } else { - progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is already endorsed by ${endotartnation}.` - } + if (endotartnation.toLowerCase().replaceAll(' ', '_') === String(NAME).toLowerCase().replaceAll(' ', '_')) { + progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is the endotart nation.` + } else if (limit) { + if (whiteList.includes(regionalWA[i])) { + progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is in your immune nations.` + } else if (ENDORSEMENTS.length < limit && !ENDORSEMENTS.includes(endotartnation.toLowerCase().replaceAll(' ', '_')) && regionalWA[i] !== endotartnation.toLowerCase().replaceAll(' ', '_')) { + progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is not being endorsed by ${endotartnation}.` + } else if (ENDORSEMENTS.length > limit) { + progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} has more than ${limit} endorsements.` + } else { + progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is already endorsed by ${endotartnation}.` + } + } else { + if (!ENDORSEMENTS.includes(endotartnation.toLowerCase().replaceAll(' ', '_')) && regionalWA[i] !== endotartnation.toLowerCase().replaceAll(' ', '_')) { + progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is not being endorsed by ${endotartnation}.` } else { - if (!ENDORSEMENTS.includes(endotartnation.toLowerCase().replaceAll(' ', '_')) && regionalWA[i] !== endotartnation.toLowerCase().replaceAll(' ', '_')) { - progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is not being endorsed by ${endotartnation}.` - } else { - progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is already endorsed by ${endotartnation}.` - } + progress += `${i+1}/${regionalWA.length} ${regionalWA[i]} is already endorsed by ${endotartnation}.` } } } - progress += `Finished searching ${regionalXML.NATION.REGION} for nations not being endorsed by ${endotartnation}` + progress += `Finished searching ${regionalXML.NATION.REGION} for nations not being endorsed by ${endotarter}` stoppable = false; } @@ -114,13 +123,13 @@ Specify a nation and get all the regionmates they are not endorsing. - - - + + + Source - + @@ -138,4 +147,4 @@ - +
${i+1}/${regionalWA.length} ${regionalWA[i]} is the endotart nation.
${i+1}/${regionalWA.length} ${regionalWA[i]} is in your immune nations.
${i+1}/${regionalWA.length} ${regionalWA[i]} is not being endorsed by ${endotartnation}.
${i+1}/${regionalWA.length} ${regionalWA[i]} has more than ${limit} endorsements.
${i+1}/${regionalWA.length} ${regionalWA[i]} is already endorsed by ${endotartnation}.
Finished searching ${regionalXML.NATION.REGION} for nations not being endorsed by ${endotartnation}
Finished searching ${regionalXML.NATION.REGION} for nations not being endorsed by ${endotarter}
Specify a nation and get all the regionmates they are not endorsing.