From 8d3fd97d6b20022f050ed3969f30db97c003ba78 Mon Sep 17 00:00:00 2001 From: I Made Setia Baruna Date: Wed, 13 Jan 2021 15:33:09 +0800 Subject: [PATCH] Add wish counter manual edit --- src/components/Input.svelte | 2 +- src/components/WishCounterHowToModal.svelte | 9 ++- src/routes/wish/_counter.svelte | 90 +++++++++++++++------ 3 files changed, 76 insertions(+), 25 deletions(-) diff --git a/src/components/Input.svelte b/src/components/Input.svelte index 51628441..19a86ed7 100644 --- a/src/components/Input.svelte +++ b/src/components/Input.svelte @@ -32,5 +32,5 @@ {max} on:change on:input={handleInput} - class={`w-full ${icon ? 'pl-12' : 'pl-4'} pr-4 text-white placeholder-gray-500 leading-none bg-transparent border-none focus:outline-none`} /> + class={`w-full ${icon ? 'pl-12' : 'pl-4'} min-h-full pr-4 text-white placeholder-gray-500 leading-none bg-transparent border-none focus:outline-none`} /> diff --git a/src/components/WishCounterHowToModal.svelte b/src/components/WishCounterHowToModal.svelte index 3674e07f..50ce77c8 100644 --- a/src/components/WishCounterHowToModal.svelte +++ b/src/components/WishCounterHowToModal.svelte @@ -1,5 +1,5 @@ @@ -60,4 +60,11 @@ occur (maybe you got it on the 1st or even the 10th). To make the counter still accurate, you need to check it on the history table and add it 1 by 1 like you do 1 pull Wish. +
+ You can also press + + button to edit the values manually! +
diff --git a/src/routes/wish/_counter.svelte b/src/routes/wish/_counter.svelte index 8271c3d5..7e16d718 100644 --- a/src/routes/wish/_counter.svelte +++ b/src/routes/wish/_counter.svelte @@ -1,18 +1,26 @@
-

{name}

+
+

{name}

+ +
-
+
Lifetime Pulls - {total} + {#if isEdit} + + {:else}{total}{/if}
-
+
5 Pity
Guaranteed at 90
- {legendary} + {#if isEdit} + + {:else}{legendary}{/if}
-
+
4 Pity
Guaranteed at 10
- {rare} -
-
- - -
-
- - - + {#if isEdit} + + {:else}{rare}{/if}
+ {#if isEdit} + + {:else} +
+ + +
+
+ + + +
+ {/if}