1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

[CL-850] Remove anon layout default icon and require either icon or no icon (#16433)

This commit is contained in:
Vicki League
2025-10-20 14:07:48 -04:00
committed by GitHub
parent 22eb49aed1
commit d2c6757626
24 changed files with 129 additions and 103 deletions

View File

@@ -25,13 +25,9 @@ export interface AnonLayoutWrapperData {
*/
pageSubtitle?: string | Translation | null;
/**
* The optional icon to display on the page.
* The icon to display on the page. Pass null to hide the icon.
*/
pageIcon?: Icon | null;
/**
* Hides the default Bitwarden shield icon.
*/
hideIcon?: boolean;
pageIcon: Icon | null;
/**
* Optional flag to either show the optional environment selector (false) or just a readonly hostname (true).
*/
@@ -59,11 +55,10 @@ export class AnonLayoutWrapperComponent implements OnInit {
protected pageTitle?: string | null;
protected pageSubtitle?: string | null;
protected pageIcon?: Icon | null;
protected pageIcon: Icon | null = null;
protected showReadonlyHostname?: boolean | null;
protected maxWidth?: AnonLayoutMaxWidth | null;
protected hideCardWrapper?: boolean | null;
protected hideIcon?: boolean | null;
protected hideBackgroundIllustration?: boolean | null;
constructor(
@@ -115,10 +110,6 @@ export class AnonLayoutWrapperComponent implements OnInit {
this.pageIcon = firstChildRouteData["pageIcon"];
}
if (firstChildRouteData["hideIcon"] !== undefined) {
this.hideIcon = firstChildRouteData["hideIcon"];
}
this.showReadonlyHostname = Boolean(firstChildRouteData["showReadonlyHostname"]);
this.maxWidth = firstChildRouteData["maxWidth"];
this.hideCardWrapper = Boolean(firstChildRouteData["hideCardWrapper"]);
@@ -129,12 +120,12 @@ export class AnonLayoutWrapperComponent implements OnInit {
this.anonLayoutWrapperDataService
.anonLayoutWrapperData$()
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((data: AnonLayoutWrapperData) => {
.subscribe((data: Partial<AnonLayoutWrapperData>) => {
this.setAnonLayoutWrapperData(data);
});
}
private setAnonLayoutWrapperData(data: AnonLayoutWrapperData) {
private setAnonLayoutWrapperData(data: Partial<AnonLayoutWrapperData>) {
if (!data) {
return;
}
@@ -166,11 +157,6 @@ export class AnonLayoutWrapperComponent implements OnInit {
if (data.hideBackgroundIllustration !== undefined) {
this.hideBackgroundIllustration = data.hideBackgroundIllustration;
}
if (data.hideIcon !== undefined) {
this.hideIcon = data.hideIcon;
}
if (data.maxWidth !== undefined) {
this.maxWidth = data.maxWidth;
}
@@ -197,7 +183,6 @@ export class AnonLayoutWrapperComponent implements OnInit {
this.showReadonlyHostname = null;
this.maxWidth = null;
this.hideCardWrapper = null;
this.hideIcon = null;
this.hideBackgroundIllustration = null;
}
}