mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
style(sso-login): (Auth) [PM-26535] Make SSO Button Primary if ssoRequired (#16757)
When SSO is required: - Make the SSO button primary - Add a tooltip to the disabled buttons When SSO is not required: - SSO button remains secondary - No tooltip on the buttons Feature Flags enabled: pm-22110-disable-alternate-login-methods
This commit is contained in:
@@ -31,6 +31,9 @@
|
|||||||
"useSingleSignOn": {
|
"useSingleSignOn": {
|
||||||
"message": "Use single sign-on"
|
"message": "Use single sign-on"
|
||||||
},
|
},
|
||||||
|
"yourOrganizationRequiresSingleSignOn": {
|
||||||
|
"message": "Your organization requires single sign-on."
|
||||||
|
},
|
||||||
"welcomeBack": {
|
"welcomeBack": {
|
||||||
"message": "Welcome back"
|
"message": "Welcome back"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -771,6 +771,9 @@
|
|||||||
"useSingleSignOn": {
|
"useSingleSignOn": {
|
||||||
"message": "Use single sign-on"
|
"message": "Use single sign-on"
|
||||||
},
|
},
|
||||||
|
"yourOrganizationRequiresSingleSignOn": {
|
||||||
|
"message": "Your organization requires single sign-on."
|
||||||
|
},
|
||||||
"submit": {
|
"submit": {
|
||||||
"message": "Submit"
|
"message": "Submit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1314,6 +1314,9 @@
|
|||||||
"useSingleSignOn": {
|
"useSingleSignOn": {
|
||||||
"message": "Use single sign-on"
|
"message": "Use single sign-on"
|
||||||
},
|
},
|
||||||
|
"yourOrganizationRequiresSingleSignOn": {
|
||||||
|
"message": "Your organization requires single sign-on."
|
||||||
|
},
|
||||||
"welcomeBack": {
|
"welcomeBack": {
|
||||||
"message": "Welcome back"
|
"message": "Welcome back"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -44,6 +44,8 @@
|
|||||||
block
|
block
|
||||||
buttonType="primary"
|
buttonType="primary"
|
||||||
(click)="continuePressed()"
|
(click)="continuePressed()"
|
||||||
|
[bitTooltip]="ssoRequired ? ('yourOrganizationRequiresSingleSignOn' | i18n) : ''"
|
||||||
|
[addTooltipToDescribedby]="ssoRequired"
|
||||||
[disabled]="ssoRequired"
|
[disabled]="ssoRequired"
|
||||||
>
|
>
|
||||||
{{ "continue" | i18n }}
|
{{ "continue" | i18n }}
|
||||||
@@ -59,6 +61,8 @@
|
|||||||
block
|
block
|
||||||
buttonType="secondary"
|
buttonType="secondary"
|
||||||
(click)="handleLoginWithPasskeyClick()"
|
(click)="handleLoginWithPasskeyClick()"
|
||||||
|
[bitTooltip]="ssoRequired ? ('yourOrganizationRequiresSingleSignOn' | i18n) : ''"
|
||||||
|
[addTooltipToDescribedby]="ssoRequired"
|
||||||
[disabled]="ssoRequired"
|
[disabled]="ssoRequired"
|
||||||
>
|
>
|
||||||
<i class="bwi bwi-passkey tw-mr-1" aria-hidden="true"></i>
|
<i class="bwi bwi-passkey tw-mr-1" aria-hidden="true"></i>
|
||||||
@@ -67,7 +71,13 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- Button to Login with SSO -->
|
<!-- Button to Login with SSO -->
|
||||||
<button type="button" bitButton block buttonType="secondary" (click)="handleSsoClick()">
|
<button
|
||||||
|
type="button"
|
||||||
|
bitButton
|
||||||
|
block
|
||||||
|
[buttonType]="ssoRequired ? 'primary' : 'secondary'"
|
||||||
|
(click)="handleSsoClick()"
|
||||||
|
>
|
||||||
<i class="bwi bwi-provider tw-mr-1" aria-hidden="true"></i>
|
<i class="bwi bwi-provider tw-mr-1" aria-hidden="true"></i>
|
||||||
{{ "useSingleSignOn" | i18n }}
|
{{ "useSingleSignOn" | i18n }}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ import {
|
|||||||
IconButtonModule,
|
IconButtonModule,
|
||||||
LinkModule,
|
LinkModule,
|
||||||
ToastService,
|
ToastService,
|
||||||
|
TooltipDirective,
|
||||||
} from "@bitwarden/components";
|
} from "@bitwarden/components";
|
||||||
|
|
||||||
import { LoginComponentService, PasswordPolicies } from "./login-component.service";
|
import { LoginComponentService, PasswordPolicies } from "./login-component.service";
|
||||||
@@ -82,6 +83,7 @@ export enum LoginUiState {
|
|||||||
JslibModule,
|
JslibModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
RouterModule,
|
RouterModule,
|
||||||
|
TooltipDirective,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class LoginComponent implements OnInit, OnDestroy {
|
export class LoginComponent implements OnInit, OnDestroy {
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export * from "./table";
|
|||||||
export * from "./tabs";
|
export * from "./tabs";
|
||||||
export * from "./toast";
|
export * from "./toast";
|
||||||
export * from "./toggle-group";
|
export * from "./toggle-group";
|
||||||
|
export * from "./tooltip";
|
||||||
export * from "./typography";
|
export * from "./typography";
|
||||||
export * from "./utils";
|
export * from "./utils";
|
||||||
export * from "./stepper";
|
export * from "./stepper";
|
||||||
|
|||||||
Reference in New Issue
Block a user