From 67428517276d0e9a42b390d87169561605381b35 Mon Sep 17 00:00:00 2001 From: Gigi <47110839+DarthGigi@users.noreply.github.com> Date: Sat, 20 Jul 2024 12:57:51 +0200 Subject: [PATCH] feat: Add dungeons --- src/lib/sections/stats/Dungeons.svelte | 142 +++++++++++++++++++++++-- 1 file changed, 132 insertions(+), 10 deletions(-) diff --git a/src/lib/sections/stats/Dungeons.svelte b/src/lib/sections/stats/Dungeons.svelte index abf3cf4c4..418805527 100644 --- a/src/lib/sections/stats/Dungeons.svelte +++ b/src/lib/sections/stats/Dungeons.svelte @@ -1,14 +1,17 @@
@@ -38,18 +41,137 @@
- - + + +
-

Catacombs

+

Catacombs

- {#each Object.entries(dungeons.catacombs) as [floor, floorData]} - {floor} - {#each Object.entries(floorData) as [key, value]} - TODO + {#if dungeons.catacombs} + {#each dungeons.catacombs as catacomb} +
+
+ + + + + + + {catacomb.name} +
+ + + + +

Floor Stats

+
+ + {#each Object.entries(catacomb.stats) as [key, value]} + {#if typeof value === "object"} + + {:else} + + {/if} + {/each} + +
+ + {#if catacomb.best_run} + + + +

Best run

+
+ + {#each Object.entries(catacomb.best_run) as [key, value]} + {#if typeof value === "number"} + {#if key === "timestamp"} + + {formatDate(value, "dd MMMM yyyy 'at' HH:mm")} + + {:else} + + {/if} + {:else} + + {/if} + {/each} + +
+ {:else} +
This player has not played this floor.
+ {/if} +
+ {/each} + {:else} + This player has not played any Catacombs. + {/if} +
+
+ +
+

Master Catacombs

+
+ {#if dungeons.master_catacombs} + {#each dungeons.master_catacombs as catacomb} +
+
+ + + + + + + {catacomb.name} +
+ + + + +

Floor Stats

+
+ + {#each Object.entries(catacomb.stats) as [key, value]} + {#if typeof value === "object"} + + {:else} + + {/if} + {/each} + +
+ + {#if catacomb.best_run} + + + +

Best run

+
+ + {#each Object.entries(catacomb.best_run) as [key, value]} + {#if typeof value === "number"} + {#if key === "timestamp"} + + {formatDate(value, "dd MMMM yyyy 'at' HH:mm")} + + {:else} + + {/if} + {:else} + + {/if} + {/each} + +
+ {:else} +
This player has not played this floor.
+ {/if} +
{/each} - {/each} + {:else} + This player has not played any Master Catacombs. + {/if}
{/if}