Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee68d8c
commit b79be2c
Showing
7 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from './update-stronghold' | ||
|
||
export { default as EnterPinView } from './EnterPinView.svelte' | ||
export { default as LoadProfileView } from './LoadProfileView.svelte' | ||
export { default as SelectProfileView } from './SelectProfileView.svelte' |
9 changes: 9 additions & 0 deletions
9
packages/desktop/views/login/views/update-stronghold/UpdateStrongholdRouter.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<script lang="ts"> | ||
import { UpdateStrongholdView } from './views' | ||
import { UpdateStrongholdRoute } from '@core/router/enums/login' | ||
import { updateStrongholdRoute } from '@core/router/subrouters/login' | ||
</script> | ||
|
||
{#if $updateStrongholdRoute === UpdateStrongholdRoute.Update} | ||
<UpdateStrongholdView /> | ||
{/if} |
3 changes: 3 additions & 0 deletions
3
packages/desktop/views/login/views/update-stronghold/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './views' | ||
|
||
export { default as UpdateStrongholdRouter } from './UpdateStrongholdRouter' |
55 changes: 55 additions & 0 deletions
55
packages/desktop/views/login/views/update-stronghold/views/UpdateStrongholdView.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<script lang="ts"> | ||
import { OnboardingLayout } from '@components' | ||
import { Animation, Button, PasswordInput, Text } from '@ui' | ||
import { HTMLButtonType, TextType } from '@ui/enums' | ||
import { localize } from '@core/i18n' | ||
import { unlockStronghold } from '@core/profile' | ||
import { loginRouter } from '@core/router' | ||
let password: string = '' | ||
let passwordError: string = '' | ||
async function onSubmit(): Promise<void> { | ||
try { | ||
await unlockStronghold(password) | ||
} catch (err) { | ||
passwordError = localize(err.message) ?? err.message | ||
return | ||
} | ||
return // TODO: implement update stronghold functionality | ||
} | ||
function onBackClick(): void { | ||
$loginRouter.previous() | ||
} | ||
</script> | ||
|
||
<OnboardingLayout {onBackClick}> | ||
<div slot="title"> | ||
<Text type={TextType.h2}> | ||
{localize('views.updateStronghold.update.title')} | ||
</Text> | ||
</div> | ||
<div slot="leftpane__content"> | ||
<Text secondary classes="mb-12"> | ||
{localize('views.updateStronghold.update.body')} | ||
</Text> | ||
<form on:submit|preventDefault={onSubmit} id="update-stronghold-form"> | ||
<PasswordInput bind:value={password} bind:error={passwordError} autofocus showRevealToggle /> | ||
</form> | ||
</div> | ||
<div slot="leftpane__action"> | ||
<Button | ||
type={HTMLButtonType.Submit} | ||
form="update-stronghold-form" | ||
classes="w-full" | ||
disabled={!password || !!passwordError} | ||
> | ||
{localize('actions.continue')} | ||
</Button> | ||
</div> | ||
<div slot="rightpane" class="w-full h-full flex justify-center bg-pastel-blue dark:bg-gray-900"> | ||
<Animation classes="setup-anim-aspect-ratio" animation="backup-recovery-phrase-desktop" /> | ||
</div> | ||
</OnboardingLayout> |
1 change: 1 addition & 0 deletions
1
packages/desktop/views/login/views/update-stronghold/views/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as UpdateStrongholdView } from './UpdateStrongholdView.svelte' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters