mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-14 10:26:19 +01:00
[PM-10799] Login UI Width (#10506)
* reset `maxWidth` attribute during page change * set default value for `maxWidth` if null or undefined is passed * implement `maxWidth` for extension implementation of Anon Layout
This commit is contained in:
parent
c3d7da06b8
commit
a6176aaf2c
@ -20,6 +20,7 @@
|
|||||||
[showReadonlyHostname]="showReadonlyHostname"
|
[showReadonlyHostname]="showReadonlyHostname"
|
||||||
[hideLogo]="true"
|
[hideLogo]="true"
|
||||||
[decreaseTopPadding]="true"
|
[decreaseTopPadding]="true"
|
||||||
|
[maxWidth]="maxWidth"
|
||||||
>
|
>
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
<router-outlet slot="secondary" name="secondary"></router-outlet>
|
<router-outlet slot="secondary" name="secondary"></router-outlet>
|
||||||
|
@ -189,6 +189,7 @@ export class ExtensionAnonLayoutWrapperComponent implements OnInit, OnDestroy {
|
|||||||
this.showAcctSwitcher = null;
|
this.showAcctSwitcher = null;
|
||||||
this.showBackButton = null;
|
this.showBackButton = null;
|
||||||
this.showLogo = null;
|
this.showLogo = null;
|
||||||
|
this.maxWidth = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
|
@ -129,6 +129,7 @@ export class AnonLayoutWrapperComponent implements OnInit, OnDestroy {
|
|||||||
this.pageSubtitle = null;
|
this.pageSubtitle = null;
|
||||||
this.pageIcon = null;
|
this.pageIcon = null;
|
||||||
this.showReadonlyHostname = null;
|
this.showReadonlyHostname = null;
|
||||||
|
this.maxWidth = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
|
@ -76,6 +76,10 @@ export class AnonLayoutComponent implements OnInit, OnChanges {
|
|||||||
const theme = await firstValueFrom(this.themeStateService.selectedTheme$);
|
const theme = await firstValueFrom(this.themeStateService.selectedTheme$);
|
||||||
await this.updateIcon(theme);
|
await this.updateIcon(theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (changes.maxWidth) {
|
||||||
|
this.maxWidth = changes.maxWidth.currentValue ?? "md";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async updateIcon(theme: string) {
|
private async updateIcon(theme: string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user