mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
[PM-9605] Extension AnonLayout wrapper component (#10338)
* setup extension component * setup extension service * update icon based on theme, adjust padding, service injection * override service * add stories * add current-account component * add ConfigService to storybook * use null checks for boolean data - otherwise false values are ignored * update translations * remove router implementation test * remove imports in main.background.ts * add showLogo to template * update icon usage * fix app-current-account storybook style issue
This commit is contained in:
@@ -106,7 +106,7 @@ export class AnonLayoutWrapperComponent implements OnInit, OnDestroy {
|
||||
this.pageIcon = data.pageIcon;
|
||||
}
|
||||
|
||||
if (data.showReadonlyHostname) {
|
||||
if (data.showReadonlyHostname != null) {
|
||||
this.showReadonlyHostname = data.showReadonlyHostname;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<main
|
||||
class="tw-flex tw-min-h-screen tw-w-full tw-mx-auto tw-flex-col tw-gap-7 tw-bg-background-alt tw-px-8 tw-pb-4 tw-pt-8 tw-text-main"
|
||||
class="tw-flex tw-min-h-screen tw-w-full tw-mx-auto tw-flex-col tw-gap-7 tw-bg-background-alt tw-px-8 tw-pb-4 tw-text-main"
|
||||
[ngClass]="{ 'tw-pt-0': decreaseTopPadding, 'tw-pt-8': !decreaseTopPadding }"
|
||||
>
|
||||
<bit-icon *ngIf="!hideLogo" [icon]="logo" class="tw-max-w-36"></bit-icon>
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ export class AnonLayoutComponent implements OnInit, OnChanges {
|
||||
@Input() showReadonlyHostname: boolean;
|
||||
@Input() hideLogo: boolean = false;
|
||||
@Input() hideFooter: boolean = false;
|
||||
@Input() decreaseTopPadding: boolean = false;
|
||||
/**
|
||||
* Max width of the layout content
|
||||
*
|
||||
|
||||
@@ -4,7 +4,7 @@ import { AnonLayoutWrapperDataService } from "./anon-layout-wrapper-data.service
|
||||
import { AnonLayoutWrapperData } from "./anon-layout-wrapper.component";
|
||||
|
||||
export class DefaultAnonLayoutWrapperDataService implements AnonLayoutWrapperDataService {
|
||||
private anonLayoutWrapperDataSubject = new Subject<AnonLayoutWrapperData>();
|
||||
protected anonLayoutWrapperDataSubject = new Subject<AnonLayoutWrapperData>();
|
||||
|
||||
setAnonLayoutWrapperData(data: AnonLayoutWrapperData): void {
|
||||
this.anonLayoutWrapperDataSubject.next(data);
|
||||
|
||||
Reference in New Issue
Block a user