From 6c6bd9638b0d86150ecdb58247dd390b8cc33931 Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Wed, 16 Oct 2024 22:22:38 +0800 Subject: [PATCH] Remake rerun page --- src/locales/en.json | 3 +- src/routes/banners/index.svelte | 615 +++++++++++++++++++------------- 2 files changed, 367 insertions(+), 251 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 8e74bec9..1316a84d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -992,7 +992,8 @@ "sortByTime": "Sorted by first release", "sortByRerun": "Sorted by oldest re-run", "bannerTitle": "Character Release Timeline", - "bannerSubtitle": "See when the character is released and their last re-run" + "bannerSubtitle": "See when the character is released and their last re-run", + "showStandard": "Show Standard Banners" }, "tcg": { "title": "Genius Invokation TCG", diff --git a/src/routes/banners/index.svelte b/src/routes/banners/index.svelte index 68ff5882..08439456 100644 --- a/src/routes/banners/index.svelte +++ b/src/routes/banners/index.svelte @@ -1,4 +1,5 @@ @@ -238,85 +313,98 @@ +
-
+

{$t('calendar.bannerTitle')}

{$t('calendar.bannerSubtitle')}

-
-

- {$t(sort ? 'calendar.sortByRerun' : 'calendar.sortByTime')} -

- +
+ + + +
-
- - - - {#each versions as v} - - {/each} - - {#each rows as r, rowIndex} - - {#each r as col, index} - {#if col.char} - - {:else} - +
+ {#each versions as ver} +
+

{ver}

+
+
+
+ {/each} +
+ {#each [5, 4] as rarity} +
+ {#each lists[selectedType][rarity] as items} + {#if !standardItems[items[0][1].name] || showStandard} +
+ {#each items as [ver, item], index} +
- {/if} - {/each} -
- +
+ {item.name} + {#if items[index + 1]?.[1].patches > 2 || item.last || item.first} +
+ {#if !item.first} +

{item.patches} Version

+

{item.duration} Days

+ {:else} +

{ver}

+ {/if} +
+ {/if} +
+
+ {#if item.last} +

+ {$t(sources[selectedType][item.name].name)} +

+ {/if} +
+ {#if !item.first} +
+ {/if} + + {/each} + + {/if} {/each} - {#each rowsWep as r, rowIndex} - - {#each r as col, index} - {#if col.char} - - {:else} - - {/if} - {/each} - - - {/each} - -
{v.version}
onHover(index)} class="cell {hovered === index ? 'hovered' : ''}"> - {col.char} - onHover(index)} - class="cell {hovered === index ? 'hovered' : ''}" - style="background: {getColor(col.l, col.m)};">{col.l}{$t(names[rowIndex].name)}
onHover(index)} class="cell {hovered === index ? 'hovered' : ''}"> - {col.char} - onHover(index)} - class="cell {hovered === index ? 'hovered' : ''}" - style="background: {getColor(col.l, col.m)};">{col.l}{$t(namesWep[rowIndex].name)}
+
+ {/each}
+