Browse Source

rename scss variable to sso_enabled

pull/6153/head
Stefan Melmuk 5 days ago
parent
commit
dce8e37d73
No known key found for this signature in database GPG Key ID: 817020C608FE9C09
  1. 2
      src/api/web.rs
  2. 12
      src/static/templates/scss/vaultwarden.scss.hbs

2
src/api/web.rs

@ -61,7 +61,7 @@ fn vaultwarden_css() -> Cached<Css<String>> {
"mail_enabled": CONFIG.mail_enabled(), "mail_enabled": CONFIG.mail_enabled(),
"sends_allowed": CONFIG.sends_allowed(), "sends_allowed": CONFIG.sends_allowed(),
"signup_disabled": CONFIG.is_signup_disabled(), "signup_disabled": CONFIG.is_signup_disabled(),
"sso_disabled": !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(), "yubico_enabled": CONFIG._enable_yubico() && CONFIG.yubico_client_id().is_some() && CONFIG.yubico_secret_key().is_some(),
}); });

12
src/static/templates/scss/vaultwarden.scss.hbs

@ -21,21 +21,21 @@ a[href$="/settings/sponsored-families"] {
} }
/* Hide the sso `Email` input field */ /* Hide the sso `Email` input field */
{{#if sso_disabled}} {{#if (not sso_enabled)}}
.vw-email-sso { .vw-email-sso {
@extend %vw-hide; @extend %vw-hide;
} }
{{/if}} {{/if}}
/* Hide the default/continue `Email` input field */ /* Hide the default/continue `Email` input field */
{{#if (not sso_disabled)}} {{#if sso_enabled}}
.vw-email-continue { .vw-email-continue {
@extend %vw-hide; @extend %vw-hide;
} }
{{/if}} {{/if}}
/* Hide the `Continue` button on the login page */ /* Hide the `Continue` button on the login page */
{{#if (not sso_disabled)}} {{#if sso_enabled}}
.vw-continue-login { .vw-continue-login {
@extend %vw-hide; @extend %vw-hide;
} }
@ -43,7 +43,7 @@ a[href$="/settings/sponsored-families"] {
/* Hide the `Enterprise Single Sign-On` button on the login page */ /* Hide the `Enterprise Single Sign-On` button on the login page */
{{#if (webver ">=2025.5.1")}} {{#if (webver ">=2025.5.1")}}
{{#if sso_disabled}} {{#if (not sso_enabled)}}
.vw-sso-login { .vw-sso-login {
@extend %vw-hide; @extend %vw-hide;
} }
@ -71,7 +71,7 @@ app-root ng-component > form > div:nth-child(1) > div > button[buttontype="secon
/* Hide the or text followed by the two buttons hidden above */ /* Hide the or text followed by the two buttons hidden above */
{{#if (webver ">=2025.5.1")}} {{#if (webver ">=2025.5.1")}}
{{#if (or sso_disabled sso_only)}} {{#if (or (not sso_enabled) sso_only)}}
.vw-or-text { .vw-or-text {
@extend %vw-hide; @extend %vw-hide;
} }
@ -83,7 +83,7 @@ app-root ng-component > form > div:nth-child(1) > div:nth-child(3) > div:nth-chi
{{/if}} {{/if}}
/* Hide the `Other` button on the login page */ /* Hide the `Other` button on the login page */
{{#if (or sso_disabled sso_only)}} {{#if (or (not sso_enabled) sso_only)}}
.vw-other-login { .vw-other-login {
@extend %vw-hide; @extend %vw-hide;
} }

Loading…
Cancel
Save