From 6ab5dd648ca3e1d248c841deedca58b19890215c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 4 Oct 2022 21:44:56 -0700 Subject: tip slider progress fill --- src/components/Tip.svelte | 34 ++++++++++++++++++---------- src/routes/[username]/dashboard/+page.svelte | 23 +++++++++++-------- src/routes/invoice/[id]/paid/+page.svelte | 3 --- src/routes/register/+page.server.js | 4 ++-- 4 files changed, 37 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/components/Tip.svelte b/src/components/Tip.svelte index 093fef46..9beee3af 100644 --- a/src/components/Tip.svelte +++ b/src/components/Tip.svelte @@ -73,13 +73,12 @@ -

{$t('invoice.addTipq')}

+

{$t('invoice.addTipq')}

{#if !showCustomAmount} -
- {f(tipAmount, currency)}{`(${s(tip)} SAT)`} - {Math.round(tipPercent)}% +
+ {f(tipAmount, currency)} + {`(${s(tip)} SAT)`} +
{Math.round(tipPercent)}%
(showMobileTip = false)} /> @@ -157,7 +157,13 @@ width: 100%; height: 6px; border-radius: 5px; - background: #eaecef; + background: linear-gradient( + to right, + black 0%, + black var(--bgPercent), + #F5F7FA var(--bgPercent), + #F5F7FA 100% + ); outline: none; } @@ -168,18 +174,22 @@ #slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; - width: 25px; - height: 25px; + width: 20px; + height: 20px; border-radius: 50%; background: black; cursor: pointer; } #slider::-moz-range-thumb { - width: 25px; - height: 25px; + width: 20px; + height: 20px; border-radius: 50%; background: black; cursor: pointer; } + + #slider.slider-track::-moz-range-progress { + background: black; + } diff --git a/src/routes/[username]/dashboard/+page.svelte b/src/routes/[username]/dashboard/+page.svelte index 667c4749..8d77b699 100644 --- a/src/routes/[username]/dashboard/+page.svelte +++ b/src/routes/[username]/dashboard/+page.svelte @@ -53,10 +53,6 @@
-

- {$t('user.dashboard.accountBalance')} -

- {$selectedRate ? f(accountBalanceFiat, user.currency) @@ -73,12 +69,19 @@ >{$t('user.dashboard.receive')} - - - + {#if user.account.balance > 0} + + + + {:else} + + + + {/if}
diff --git a/src/routes/invoice/[id]/paid/+page.svelte b/src/routes/invoice/[id]/paid/+page.svelte index 1b212a92..9479f0aa 100644 --- a/src/routes/invoice/[id]/paid/+page.svelte +++ b/src/routes/invoice/[id]/paid/+page.svelte @@ -1,7 +1,5 @@