From 7f6101a24df0db86f33c3217e52838f09a25286d Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Tue, 9 Nov 2021 00:19:50 -0300
Subject: add provider/ remove provider

---
 .../anastasis-webui/src/pages/home/SecretSelectionScreen.tsx | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'packages/anastasis-webui/src/pages/home/SecretSelectionScreen.tsx')

diff --git a/packages/anastasis-webui/src/pages/home/SecretSelectionScreen.tsx b/packages/anastasis-webui/src/pages/home/SecretSelectionScreen.tsx
index cf38d3f18..b1ec2856a 100644
--- a/packages/anastasis-webui/src/pages/home/SecretSelectionScreen.tsx
+++ b/packages/anastasis-webui/src/pages/home/SecretSelectionScreen.tsx
@@ -3,12 +3,14 @@ import { useState } from "preact/hooks";
 import { AsyncButton } from "../../components/AsyncButton";
 import { NumberInput } from "../../components/fields/NumberInput";
 import { useAnastasisContext } from "../../context/anastasis";
+import { AddingProviderScreen } from "./AddingProviderScreen";
 import { AnastasisClientFrame } from "./index";
 
 export function SecretSelectionScreen(): VNode {
   const [selectingVersion, setSelectingVersion] = useState<boolean>(false);
   const reducer = useAnastasisContext()
 
+  const [manageProvider, setManageProvider] = useState(false)
   const currentVersion = (reducer?.currentReducerState
     && ("recovery_document" in reducer.currentReducerState)
     && reducer.currentReducerState.recovery_document?.version) || 0;
@@ -49,6 +51,10 @@ export function SecretSelectionScreen(): VNode {
     />
   }
 
+  if (manageProvider) {
+    return <AddingProviderScreen onCancel={() => setManageProvider(false)} />
+  }
+
   return (
     <AnastasisClientFrame title="Recovery: Select secret">
       <div class="columns">
@@ -69,6 +75,12 @@ export function SecretSelectionScreen(): VNode {
         </div>
         <div class="column">
           <p>Secret found, you can select another version or continue to the challenges solving</p>
+          <p class="block">
+            <button class="button is-info" onClick={() => setManageProvider(true)}>
+              Manage recovery providers
+            </button>
+          </p>
+
         </div>
       </div>
     </AnastasisClientFrame>
-- 
cgit v1.2.3

