mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-28 07:13:12 +08:00
hide password hints via CSS (#6726)
This commit is contained in:
@@ -60,11 +60,12 @@ fn vaultwarden_css() -> Cached<Css<String>> {
|
|||||||
"mail_2fa_enabled": CONFIG._enable_email_2fa(),
|
"mail_2fa_enabled": CONFIG._enable_email_2fa(),
|
||||||
"mail_enabled": CONFIG.mail_enabled(),
|
"mail_enabled": CONFIG.mail_enabled(),
|
||||||
"sends_allowed": CONFIG.sends_allowed(),
|
"sends_allowed": CONFIG.sends_allowed(),
|
||||||
|
"password_hints_allowed": CONFIG.password_hints_allowed(),
|
||||||
"signup_disabled": CONFIG.is_signup_disabled(),
|
"signup_disabled": CONFIG.is_signup_disabled(),
|
||||||
"sso_enabled": CONFIG.sso_enabled(),
|
"sso_enabled": CONFIG.sso_enabled(),
|
||||||
"sso_only": CONFIG.sso_enabled() && CONFIG.sso_only(),
|
"sso_only": CONFIG.sso_enabled() && CONFIG.sso_only(),
|
||||||
"yubico_enabled": CONFIG._enable_yubico() && CONFIG.yubico_client_id().is_some() && CONFIG.yubico_secret_key().is_some(),
|
|
||||||
"webauthn_2fa_supported": CONFIG.is_webauthn_2fa_supported(),
|
"webauthn_2fa_supported": CONFIG.is_webauthn_2fa_supported(),
|
||||||
|
"yubico_enabled": CONFIG._enable_yubico() && CONFIG.yubico_client_id().is_some() && CONFIG.yubico_secret_key().is_some(),
|
||||||
});
|
});
|
||||||
|
|
||||||
let scss = match CONFIG.render_template("scss/vaultwarden.scss", &css_options) {
|
let scss = match CONFIG.render_template("scss/vaultwarden.scss", &css_options) {
|
||||||
|
|||||||
@@ -192,6 +192,19 @@ bit-nav-item[route="sends"] {
|
|||||||
@extend %vw-hide;
|
@extend %vw-hide;
|
||||||
}
|
}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
|
{{#unless password_hints_allowed}}
|
||||||
|
/* Hide password hints if not allowed */
|
||||||
|
a[routerlink="/hint"],
|
||||||
|
{{#if (webver "<2025.12.2")}}
|
||||||
|
app-change-password > form > .form-group:nth-child(5),
|
||||||
|
auth-input-password > form > bit-form-field:nth-child(4) {
|
||||||
|
{{else}}
|
||||||
|
.vw-password-hint {
|
||||||
|
{{/if}}
|
||||||
|
@extend %vw-hide;
|
||||||
|
}
|
||||||
|
{{/unless}}
|
||||||
/**** End Dynamic Vaultwarden Changes ****/
|
/**** End Dynamic Vaultwarden Changes ****/
|
||||||
/**** Include a special user stylesheet for custom changes ****/
|
/**** Include a special user stylesheet for custom changes ****/
|
||||||
{{#if load_user_scss}}
|
{{#if load_user_scss}}
|
||||||
|
|||||||
Reference in New Issue
Block a user