diff options
| author | Adam Soltys <[email protected]> | 2023-11-22 10:57:00 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-11-22 10:57:00 -0800 |
| commit | 56372bbdd867e59797ae58692e2906440e96669e (patch) | |
| tree | 4070f1c9d84ef3c095d325798310ea64e90439aa /src | |
| parent | b02510b1b0721f34c189a8d9681c375aa5487d26 (diff) | |
| download | coinos-ui-56372bbdd867e59797ae58692e2906440e96669e.tar.gz coinos-ui-56372bbdd867e59797ae58692e2906440e96669e.zip | |
auto withdrawal toggle
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/Toggle.svelte | 2 | ||||
| -rw-r--r-- | src/locales/en.json | 4 | ||||
| -rw-r--r-- | src/routes/(app)/[username]/settings/[...tab]/_security.svelte | 14 |
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> |
