feat: added direct verification option in signup popup

This commit is contained in:
antifallobst 2023-10-08 14:11:45 +02:00
parent 815d5face5
commit 039cff2f2a
Signed by: antifallobst
GPG Key ID: 2B4F402172791BAF
2 changed files with 17 additions and 0 deletions

View File

@ -108,6 +108,13 @@ pub fn SignUp(props: &Props) -> Html {
cloned_state.set(data); cloned_state.set(data);
}); });
let cloned_state = state.clone();
let on_jump_to_verify = Callback::from(move |_| {
let mut state = cloned_state.deref().clone();
state.view = View::Verify;
cloned_state.set(state);
});
let cloned_state = state.clone(); let cloned_state = state.clone();
let on_sign_up_api_response = Callback::from(move |response: Result<()>| { let on_sign_up_api_response = Callback::from(move |response: Result<()>| {
let mut state = cloned_state.deref().clone(); let mut state = cloned_state.deref().clone();
@ -195,6 +202,10 @@ pub fn SignUp(props: &Props) -> Html {
<div class="center-x"> <div class="center-x">
<p class="auth-status">{&state.clone().deref().status}</p> <p class="auth-status">{&state.clone().deref().status}</p>
</div> </div>
<div class="center-x">
<p>{"Or "}<a onclick={on_jump_to_verify} class="link" ><b>{"verify"}</b></a>{" a requested account."}</p>
</div>
</form> </form>
}, },
View::Verify => html! { View::Verify => html! {

View File

@ -12,4 +12,10 @@
@keyframes spin { @keyframes spin {
0% { transform: rotate(0deg); } 0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); } 100% { transform: rotate(360deg); }
}
.link {
color: #690455;
text-decoration: #690455 underline;
cursor: pointer;
} }