diff --git a/libs/components/src/anon-layout/anon-layout.component.html b/libs/components/src/anon-layout/anon-layout.component.html index 2999a615cdd..c4996666eb7 100644 --- a/libs/components/src/anon-layout/anon-layout.component.html +++ b/libs/components/src/anon-layout/anon-layout.component.html @@ -15,29 +15,29 @@
- +

- {{ title }} + {{ title() }}

- {{ title }} + {{ title() }}

-
{{ subtitle }}
+
{{ subtitle() }}
(undefined); + readonly title = input(); + readonly subtitle = input(); + icon = model(); + readonly showReadonlyHostname = input(false); readonly hideLogo = input(false); readonly hideFooter = input(false); readonly hideIcon = input(false); @@ -53,20 +45,16 @@ export class AnonLayoutComponent implements OnInit, OnChanges { /** * Max width of the title area content * - * @default null + * @default undefined */ - // TODO: Skipped for migration because: - // Your application code writes to the input. This prevents migration. - @Input() titleAreaMaxWidth?: "md"; + titleAreaMaxWidth = model<"md">(); /** * Max width of the layout content * * @default 'md' */ - // TODO: Skipped for migration because: - // Your application code writes to the input. This prevents migration. - @Input() maxWidth: "md" | "3xl" = "md"; + maxWidth = model<"md" | "3xl">("md"); protected logo = BitwardenLogo; protected year = "2024"; @@ -86,20 +74,20 @@ export class AnonLayoutComponent implements OnInit, OnChanges { } async ngOnInit() { - this.maxWidth = this.maxWidth ?? "md"; - this.titleAreaMaxWidth = this.titleAreaMaxWidth ?? null; + this.maxWidth.set(this.maxWidth() ?? "md"); + this.titleAreaMaxWidth.set(this.titleAreaMaxWidth() ?? null); this.hostname = (await firstValueFrom(this.environmentService.environment$)).getHostname(); this.version = await this.platformUtilsService.getApplicationVersion(); // If there is no icon input, then use the default icon - if (this.icon == null) { - this.icon = BitwardenShield; + if (this.icon() == null) { + this.icon.set(BitwardenShield); } } async ngOnChanges(changes: SimpleChanges) { if (changes.maxWidth) { - this.maxWidth = changes.maxWidth.currentValue ?? "md"; + this.maxWidth.set(changes.maxWidth.currentValue ?? "md"); } } }