diff --git a/packages/shared/components/Idle.svelte b/packages/shared/components/Idle.svelte index f51c8d7f9d7..692de5d6bd1 100644 --- a/packages/shared/components/Idle.svelte +++ b/packages/shared/components/Idle.svelte @@ -10,13 +10,17 @@ function handleEvent() { clearTimeout(timeout) - timeout = setTimeout(lock, $activeProfile.settings.lockScreenTimeout * 60 * 1000) + if ($activeProfile) { + timeout = setTimeout(lock, $activeProfile.settings.lockScreenTimeout * 60 * 1000) + } } function lock() { api.lockStronghold({ onSuccess() { - destroyActor($activeProfile.id) + if ($activeProfile) { + destroyActor($activeProfile.id) + } resetWallet() resetRouter() }, diff --git a/packages/shared/components/Spinner.svelte b/packages/shared/components/Spinner.svelte new file mode 100644 index 00000000000..808b3956a92 --- /dev/null +++ b/packages/shared/components/Spinner.svelte @@ -0,0 +1,18 @@ + + +{#if busy || message} +
+ {#if busy} + + {/if} + {#if message} + {message} + {/if} +
+{/if} diff --git a/packages/shared/components/index.js b/packages/shared/components/index.js index 9f9ffb14fd3..8867b949757 100644 --- a/packages/shared/components/index.js +++ b/packages/shared/components/index.js @@ -36,6 +36,7 @@ export { default as SecurityTile } from './SecurityTile.svelte' export { default as Idle } from './Idle.svelte' export { default as ToastContainer } from './ToastContainer.svelte' export { default as ProgressBar } from './ProgressBar.svelte' +export { default as Spinner } from './Spinner.svelte' export * from './modals' // Charts diff --git a/packages/shared/components/inputs/Checkbox.svelte b/packages/shared/components/inputs/Checkbox.svelte index e9dc7b417a8..fd479a8ba57 100644 --- a/packages/shared/components/inputs/Checkbox.svelte +++ b/packages/shared/components/inputs/Checkbox.svelte @@ -41,6 +41,7 @@ diff --git a/packages/shared/components/popups/DeleteProfile.svelte b/packages/shared/components/popups/DeleteProfile.svelte new file mode 100644 index 00000000000..a009242f693 --- /dev/null +++ b/packages/shared/components/popups/DeleteProfile.svelte @@ -0,0 +1,60 @@ + + +{locale('popups.deleteProfile.title')} +
+ {locale('popups.deleteProfile.confirmation')} +
+
+ + +
diff --git a/packages/shared/components/popups/Index.svelte b/packages/shared/components/popups/Index.svelte index f41b5ba5020..853120a85aa 100644 --- a/packages/shared/components/popups/Index.svelte +++ b/packages/shared/components/popups/Index.svelte @@ -12,6 +12,7 @@ import RemoveNode from './RemoveNode.svelte' import Busy from './Busy.svelte' import ErrorLog from './ErrorLog.svelte' + import DeleteProfile from './DeleteProfile.svelte' export let locale = 'en' export let type = undefined @@ -30,7 +31,8 @@ addNode: AddNode, removeNode: RemoveNode, busy: Busy, - errorLog: ErrorLog + errorLog: ErrorLog, + deleteProfile: DeleteProfile } const onkey = (e) => { diff --git a/packages/shared/locales/en.json b/packages/shared/locales/en.json index 9966176ade2..b6f7f0f3fb7 100644 --- a/packages/shared/locales/en.json +++ b/packages/shared/locales/en.json @@ -330,6 +330,10 @@ "errorLog": { "title": "Error Log", "empty": "The error log is empty." + }, + "deleteProfile": { + "title": "Delete profile", + "confirmation": "Are you sure you want to delete this profile, this operation cannot be undone?" } }, "charts": { @@ -490,7 +494,18 @@ "transferBroadcasting": "Broadcasting transaction", "transferComplete": "Transfer complete", "creatingAccount": "Creating account, please wait...", - "updatingAccount": "Updating account, please wait..." + "updatingAccount": "Updating account, please wait...", + "accountSyncing": "Account is syncing", + "accountSyncComplete": "Account sync complete", + "passwordUpdating": "Updating password...", + "passwordSuccess": "Updated password successfully", + "passwordFailed": "Updating password failed", + "exportingStronghold": "Exporting stronghold...", + "exportingStrongholdSuccess": "Exported stronghold successfully", + "exportingStrongholdFailed": "Exported stronghold failed", + "pinCodeUpdating": "Updating PIN code...", + "pinCodeSuccess": "Updated PIN code successfully", + "pinCodeFailed": "Updating PIN code failed" }, "dates": { "today": "Today", diff --git a/packages/shared/routes/dashboard/settings/views/Security.svelte b/packages/shared/routes/dashboard/settings/views/Security.svelte index 42012ec402c..4b028a632bd 100644 --- a/packages/shared/routes/dashboard/settings/views/Security.svelte +++ b/packages/shared/routes/dashboard/settings/views/Security.svelte @@ -1,14 +1,14 @@ @@ -199,7 +270,10 @@
{locale('views.settings.exportStronghold.title')} {locale('views.settings.exportStronghold.description')} - +
+ + +

@@ -224,7 +298,7 @@ showRevealToggle {locale} placeholder={locale('general.currentPassword')} - autofocus /> + disabled={passwordChangeBusy} /> + placeholder={locale('general.newPassword')} + disabled={passwordChangeBusy} /> - - + placeholder={locale('general.confirmNewPassword')} + disabled={passwordChangeBusy} /> + +
+ + +

@@ -264,7 +347,8 @@ {locale} maxlength="6" numeric - placeholder={locale('views.settings.changePincode.currentPincode')} /> + placeholder={locale('views.settings.changePincode.currentPincode')} + disabled={pinCodeBusy} /> + placeholder={locale('views.settings.changePincode.newPincode')} + disabled={pinCodeBusy} /> - + placeholder={locale('views.settings.changePincode.confirmNewPincode')} + disabled={pinCodeBusy} /> +
+ + +

{locale('views.settings.deleteProfile.title')} {locale('views.settings.deleteProfile.description')} - +