aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-09-26 09:24:05 -0300
committerSebastian <sebasjm@gmail.com>2022-09-26 09:24:15 -0300
commit93dbf2c2c99fa5225f20b3b78593b97b8115668e (patch)
tree39dab3e18e9ec60eb83477745fd40c3f238e7112
parent50a1308ce213f1df6c093f4542c5225718bbf000 (diff)
showing restore and save, but removing from the ending state
-rw-r--r--packages/anastasis-webui/src/components/menu/SideBar.tsx46
-rw-r--r--packages/anastasis-webui/src/pages/home/StartScreen.tsx4
2 files changed, 28 insertions, 22 deletions
diff --git a/packages/anastasis-webui/src/components/menu/SideBar.tsx b/packages/anastasis-webui/src/components/menu/SideBar.tsx
index 4c1d085ee..91b49f9ce 100644
--- a/packages/anastasis-webui/src/components/menu/SideBar.tsx
+++ b/packages/anastasis-webui/src/components/menu/SideBar.tsx
@@ -177,16 +177,19 @@ export function Sidebar({ mobile }: Props): VNode {
<span class="menu-item-label"><Translate>Truth Paying</Translate></span>
</div>
</li> */}
- {/* <li>
- <div class="buttons ml-4">
- <button
- class="button is-primary is-right"
- onClick={saveSession}
- >
- Save backup session
- </button>
- </div>
- </li> */}
+ {reducer.currentReducerState.backup_state !==
+ BackupStates.BackupFinished && (
+ <li>
+ <div class="buttons ml-4">
+ <button
+ class="button is-primary is-right"
+ onClick={saveSession}
+ >
+ Save backup session
+ </button>
+ </div>
+ </li>
+ )}
</Fragment>
) : (
reducer.currentReducerState?.reducer_type === "recovery" && (
@@ -265,16 +268,19 @@ export function Sidebar({ mobile }: Props): VNode {
</span>
</div>
</li>
- {/* <li>
- <div class="buttons ml-4">
- <button
- class="button is-primary is-right"
- onClick={saveSession}
- >
- Save recovery session
- </button>
- </div>
- </li> */}
+ {reducer.currentReducerState.recovery_state !==
+ RecoveryStates.RecoveryFinished && (
+ <li>
+ <div class="buttons ml-4">
+ <button
+ class="button is-primary is-right"
+ onClick={saveSession}
+ >
+ Save recovery session
+ </button>
+ </div>
+ </li>
+ )}
</Fragment>
)
)}
diff --git a/packages/anastasis-webui/src/pages/home/StartScreen.tsx b/packages/anastasis-webui/src/pages/home/StartScreen.tsx
index b9c4e57b7..03399cfba 100644
--- a/packages/anastasis-webui/src/pages/home/StartScreen.tsx
+++ b/packages/anastasis-webui/src/pages/home/StartScreen.tsx
@@ -50,14 +50,14 @@ export function StartScreen(): VNode {
<span>Recover a secret</span>
</button>
- {/* <FileButton
+ <FileButton
label="Restore a session"
onChange={(content) => {
if (content?.type === "application/json") {
reducer.importState(content.content);
}
}}
- /> */}
+ />
{/* <button class="button">
<div class="icon"><i class="mdi mdi-file" /></div>