Add database to server endpoints, move modals, add forget pw to db
All checks were successful
Build Crate / build (push) Successful in 1m45s
All checks were successful
Build Crate / build (push) Successful in 1m45s
This commit is contained in:
@@ -76,6 +76,19 @@ fn login_form_capsule<G: Html>(
|
||||
}
|
||||
};
|
||||
|
||||
let handle_register = move |_event: Event| {
|
||||
#[cfg(client)]
|
||||
{
|
||||
spawn_local_scoped(cx, async move {
|
||||
let global_state = Reactor::<G>::from_cx(cx).get_global_state::<AppStateRx>(cx);
|
||||
global_state.modals_open.register.set(OpenState::Open);
|
||||
// Close modal
|
||||
state.reset();
|
||||
global_state.modals_open.login.set(OpenState::Closed);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
let handle_log_in = move |_event: Event| {
|
||||
#[cfg(client)]
|
||||
{
|
||||
@@ -155,11 +168,11 @@ fn login_form_capsule<G: Html>(
|
||||
}},
|
||||
false => view!{cx, },
|
||||
})
|
||||
a (on:click = handle_forgot_password, class="text-sm text-blue-700 hover:underline dark:text-blue-500"){"Lost Password?"}
|
||||
button (on:click = handle_forgot_password, class="text-sm text-blue-700 hover:underline dark:text-blue-500"){"Lost Password?"}
|
||||
}
|
||||
button (on:click = handle_log_in, class="w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"){"Log in"}
|
||||
div (class="text-sm font-medium text-gray-500 dark:text-gray-300"){
|
||||
a (class="text-blue-700 hover:underline dark:text-blue-500"){"Create account"}
|
||||
button (on:click = handle_register, class="text-blue-700 hover:underline dark:text-blue-500"){"Create account"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user