aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-11-22 10:57:00 -0800
committerAdam Soltys <[email protected]>2023-11-22 10:57:00 -0800
commit56372bbdd867e59797ae58692e2906440e96669e (patch)
tree4070f1c9d84ef3c095d325798310ea64e90439aa /src
parentb02510b1b0721f34c189a8d9681c375aa5487d26 (diff)
downloadcoinos-ui-56372bbdd867e59797ae58692e2906440e96669e.tar.gz
coinos-ui-56372bbdd867e59797ae58692e2906440e96669e.zip
auto withdrawal toggle
Diffstat (limited to 'src')
-rw-r--r--src/components/Toggle.svelte2
-rw-r--r--src/locales/en.json4
-rw-r--r--src/routes/(app)/[username]/settings/[...tab]/_security.svelte14
3 files changed, 17 insertions, 3 deletions
diff --git a/src/components/Toggle.svelte b/src/components/Toggle.svelte
index 3516e48b..7b75dcc1 100644
--- a/src/components/Toggle.svelte
+++ b/src/components/Toggle.svelte
@@ -6,6 +6,6 @@
<label for={id} class="inline-flex relative items-center mr-5 cursor-pointer">
<input type="checkbox" bind:checked={value} {id} name={id} class="sr-only peer" />
<div
- class="w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-gray-300 dark:peer-focus:ring-gray-800 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-gray-600"
+ class="w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-gray-300 dark:peer-focus:ring-gray-800 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-green-300"
/>
</label>
diff --git a/src/locales/en.json b/src/locales/en.json
index 056fb5f5..40376ea1 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -197,7 +197,9 @@
"placeholder": "Paste a bitcoin address, lightning invoice or coinos username"
},
"settings": {
- "seedDescription": "This seed phrase is used to derive your cold storage auto-withdraw addresses and nostr keys unless you provide your own keys",
+ "autoWithdrawal": "Auto withdrawal",
+ "autoDescription": "With auto withdrawal enabled any funds over the threshold amount will automatically be moved into your self-custodial wallet.",
+ "seedDescription": "This seed phrase is used to derive your auto withdrawal addresses and nostr keys unless you provide your own keys",
"seedPhrase": "Seed phrase",
"hideSeed": "Hide seed phrase",
"revealSeed": "Reveal seed phrase",
diff --git a/src/routes/(app)/[username]/settings/[...tab]/_security.svelte b/src/routes/(app)/[username]/settings/[...tab]/_security.svelte
index c9b1756c..d7fb3229 100644
--- a/src/routes/(app)/[username]/settings/[...tab]/_security.svelte
+++ b/src/routes/(app)/[username]/settings/[...tab]/_security.svelte
@@ -2,7 +2,7 @@
import { getMnemonic } from '$lib/nostr';
import { tick } from 'svelte';
import { t } from '$lib/translations';
- import { Pin, Icon, Qr } from '$comp';
+ import { Pin, Icon, Qr, Toggle } from '$comp';
import { copy, post, success, fail } from '$lib/utils';
import { pin as current } from '$lib/store';
import { invalidate } from '$app/navigation';
@@ -245,3 +245,15 @@
</button>
{/if}
</div>
+
+<div>
+ <div class="flex justify-between items-center">
+ <span class="font-bold">{$t('user.settings.autoWithdrawal')}</span>
+ <Toggle id="prompt" bind:value={user.prompt} />
+ </div>
+ <p class="text-secondary mb-4">
+ {$t('user.settings.autoDescription')}
+ </p>
+
+
+</div>