From 932f03e377a345340595f636f819e0e71324fd44 Mon Sep 17 00:00:00 2001 From: I Made Setia Baruna Date: Mon, 1 Feb 2021 01:56:26 +0800 Subject: [PATCH] Add detail to wish counter --- src/components/Select.svelte | 2 +- src/components/WishCounterAddModal.svelte | 107 +++++++++++++++ src/components/WishCounterHowToModal.svelte | 79 +++++++---- src/routes/wish/_counter.svelte | 145 +++++++++++++++++++- src/stores/saveManager.js | 20 ++- 5 files changed, 317 insertions(+), 36 deletions(-) create mode 100644 src/components/WishCounterAddModal.svelte diff --git a/src/components/Select.svelte b/src/components/Select.svelte index 88a8c7a0..bf1752b3 100644 --- a/src/components/Select.svelte +++ b/src/components/Select.svelte @@ -6,7 +6,7 @@ const dispatch = createEventDispatcher(); - export let className; + export let className = ''; export let icon = null; export let options; export let placeholder = 'Select...'; diff --git a/src/components/WishCounterAddModal.svelte b/src/components/WishCounterAddModal.svelte new file mode 100644 index 00000000..be1a7272 --- /dev/null +++ b/src/components/WishCounterAddModal.svelte @@ -0,0 +1,107 @@ + + +
+

Add Pull Detail

+ +
+
+

At Pity:

+ +
+ {#if isEdit} +
+
+ +
+
+ + +
+
+ {:else} +
+ + +
+ {/if} +
diff --git a/src/components/WishCounterHowToModal.svelte b/src/components/WishCounterHowToModal.svelte index 50ce77c8..308a44a1 100644 --- a/src/components/WishCounterHowToModal.svelte +++ b/src/components/WishCounterHowToModal.svelte @@ -11,44 +11,62 @@ Press +1 when you get - 3 - + 3 +

Press - Get 4 - + Get 4 + when you get - 4 - + 4 +

Press - Get 5 - + Get 5 + when you get - 5 - + 5 +

It will automatically add the lifetime pulls, - 5 - + 5 + and - 4 - + 4 + pity

When the - 4 - + 4 + pity reach 10, it will automatically reset to 0

When the - 5 - + 5 + pity reach 90, it will automatically reset to 0

@@ -56,15 +74,28 @@ For when you do 10 pulls Wish, press the +10 button, - but the pity counter won't be accurate, because there is no way to tell when the drop - 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. + but the pity counter won't be accurate, because there is no way to tell when the drop 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!
+
+ Press the arrow on the bottom to see your pulls detail. A popup will show when you get 5 + + or + 4 + . Or you can add or edit the table manually. +
diff --git a/src/routes/wish/_counter.svelte b/src/routes/wish/_counter.svelte index 7e16d718..a1f730bf 100644 --- a/src/routes/wish/_counter.svelte +++ b/src/routes/wish/_counter.svelte @@ -1,21 +1,31 @@