show/hide password button

This commit is contained in:
2026-08-03 21:02:03 -04:00
parent fdbf40adac
commit cf6853d71e
4 changed files with 41 additions and 4 deletions
+2
View File
@@ -30,6 +30,7 @@ use crate::webauthn::WebAuthnService;
const STYLE_CSS: &[u8] = include_bytes!("../static/style.css");
const PASSKEY_LOGIN_JS: &[u8] = include_bytes!("../static/passkey-login.js");
const PASSKEY_REGISTER_JS: &[u8] = include_bytes!("../static/passkey-register.js");
const PASSWORD_TOGGLE_JS: &[u8] = include_bytes!("../static/password-toggle.js");
#[derive(Clone)]
pub struct AppState {
@@ -323,6 +324,7 @@ async fn static_asset(Path(path): Path<String>) -> Response {
"style.css" => ("text/css", STYLE_CSS),
"passkey-login.js" => ("application/javascript", PASSKEY_LOGIN_JS),
"passkey-register.js" => ("application/javascript", PASSKEY_REGISTER_JS),
"password-toggle.js" => ("application/javascript", PASSWORD_TOGGLE_JS),
_ => return StatusCode::NOT_FOUND.into_response(),
};
([(header::CONTENT_TYPE, mime)], data).into_response()