fix: showing start again in the last main screen

This commit is contained in:
Sebastian 2022-10-03 18:26:37 -03:00
parent 4707c88742
commit bbde2a9bb9
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1
3 changed files with 65 additions and 12 deletions

View File

@ -190,6 +190,19 @@ export function Sidebar({ mobile }: Props): VNode {
</div>
</li>
)}
{reducer.currentReducerState.backup_state !==
BackupStates.BackupFinished && (
<li>
<div class="buttons ml-4">
<button
class="button is-danger is-right"
onClick={() => reducer.reset()}
>
Reset session
</button>
</div>
</li>
)}
</Fragment>
) : (
reducer.currentReducerState?.reducer_type === "recovery" && (
@ -281,21 +294,25 @@ export function Sidebar({ mobile }: Props): VNode {
</div>
</li>
)}
{reducer.currentReducerState.recovery_state ===
RecoveryStates.RecoveryFinished ? (
<Fragment />
) : (
<li>
<div class="buttons ml-4">
<button
class="button is-danger is-right"
onClick={() => reducer.reset()}
>
Reset session
</button>
</div>
</li>
)}
</Fragment>
)
)}
{reducer.currentReducerState && (
<li>
<div class="buttons ml-4">
<button
class="button is-danger is-right"
onClick={() => reducer.reset()}
>
Start again
</button>
</div>
</li>
)}
{/* <li>
<div class="buttons ml-4">
<button class="button is-info is-right" >Manage providers</button>

View File

@ -57,6 +57,23 @@ export function BackupFinishedScreen(): VNode {
</div>
);
})}
<div
style={{
display: "flex",
justifyContent: "center",
}}
>
<p>
<div class="buttons ml-4">
<button
class="button is-primary is-right"
onClick={() => reducer.reset()}
>
Start again
</button>
</div>
</p>
</div>
</div>
)}
</AnastasisClientFrame>

View File

@ -95,11 +95,30 @@ export function RecoveryFinishedScreen(): VNode {
<span>Download content</span>
</a>
</div>
{plainText ? (
<div class="block">
<QR text={secret} />
</div>
) : undefined}
<div
style={{
display: "flex",
justifyContent: "center",
}}
>
<p>
<div class="buttons ml-4">
<button
class="button is-primary is-right"
onClick={() => reducer.reset()}
>
Start again
</button>
</div>
</p>
</div>
</AnastasisClientFrame>
);
}