Fixed show password icon on login page. Fixes #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 09:00:54 +02:00
co-authored by Claude Opus 5.5
parent ec73351405
commit 1d5da2a6bf
+5 -2
View File
@@ -10,6 +10,7 @@ use crate::locales::trl;
pub fn Login() -> impl IntoView { pub fn Login() -> impl IntoView {
let login = ServerAction::<Login>::new(); let login = ServerAction::<Login>::new();
let login_val = Signal::derive(move || login.value().get()); let login_val = Signal::derive(move || login.value().get());
let show_password = RwSignal::new(false);
view! { view! {
<Link rel="stylesheet" href="/vendor/css/pages/page-auth.css" /> <Link rel="stylesheet" href="/vendor/css/pages/page-auth.css" />
<div class="authentication-wrapper authentication-basic container-p-y"> <div class="authentication-wrapper authentication-basic container-p-y">
@@ -50,13 +51,15 @@ pub fn Login() -> impl IntoView {
</div> </div>
<div class="input-group input-group-merge"> <div class="input-group input-group-merge">
<input <input
type="password" type=move || if show_password.get() {"text"} else {"password"}
id="password" id="password"
class="form-control" class="form-control"
name="password" name="password"
aria-describedby="password" aria-describedby="password"
/> />
<span class="input-group-text cursor-pointer"><i class="bx bx-hide"></i></span> <span class="input-group-text cursor-pointer" on:click=move |_| show_password.update(|show| *show = !*show)>
<i class=move || if show_password.get() {"bx bx-show"} else {"bx bx-hide"}></i>
</span>
</div> </div>
</div> </div>
<div class="mb-3"> <div class="mb-3">