From c631311e96b6ae96edc3a67777d2d4247e293169 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Thu, 30 Oct 2025 13:36:49 -0600 Subject: [PATCH] minor change toi viewing addresses and fix build --- web/angular.json | 9 ++--- .../interfaces/addresses/actions.component.ts | 33 ++++++++++++++--- .../addresses/addresses.component.ts | 2 +- .../interfaces/addresses/item.component.ts | 36 +++---------------- 4 files changed, 36 insertions(+), 44 deletions(-) diff --git a/web/angular.json b/web/angular.json index bb7ed158b..d3ab81cf0 100644 --- a/web/angular.json +++ b/web/angular.json @@ -377,13 +377,8 @@ "budgets": [ { "type": "initial", - "maximumWarning": "500kB", - "maximumError": "1MB" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "4kB", - "maximumError": "8kB" + "maximumWarning": "2mb", + "maximumError": "5mb" } ], "outputHashing": "all" diff --git a/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/actions.component.ts b/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/actions.component.ts index 7b2079b4b..9750e6475 100644 --- a/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/actions.component.ts +++ b/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/actions.component.ts @@ -5,7 +5,12 @@ import { input, output, } from '@angular/core' -import { CopyService, DialogService, i18nPipe } from '@start9labs/shared' +import { + CopyService, + DialogService, + i18nKey, + i18nPipe, +} from '@start9labs/shared' import { TUI_IS_MOBILE } from '@taiga-ui/cdk' import { TuiButton, @@ -22,6 +27,14 @@ import { InterfaceComponent } from '../interface.component' selector: 'td[actions]', template: `
+ @if (interface.value()?.type === 'ui') { {{ 'Actions' | i18n }} - @if (interface.value()?.type === 'ui') { @@ -125,12 +138,24 @@ export class AddressActionsComponent { readonly interface = inject(InterfaceComponent) readonly href = input.required() + readonly bullets = input.required() readonly disabled = input.required() - readonly onDetails = output() - open = false + viewDetails() { + this.dialog + .openAlert( + `
    ${this.bullets() + .map(b => `
  • ${b}
  • `) + .join('')}
` as i18nKey, + { + label: 'About this address' as i18nKey, + }, + ) + .subscribe() + } + showQR() { this.dialog .openComponent(new PolymorpheusComponent(QRModal), { diff --git a/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/addresses.component.ts b/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/addresses.component.ts index a4841dea7..a7562c728 100644 --- a/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/addresses.component.ts +++ b/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/addresses.component.ts @@ -12,7 +12,7 @@ import { InterfaceAddressItemComponent } from './item.component' selector: 'section[addresses]', template: `
{{ 'Addresses' | i18n }}
- +
@for (address of addresses()?.common; track $index) { } @empty { diff --git a/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/item.component.ts b/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/item.component.ts index 4231acd71..c6a1fff31 100644 --- a/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/item.component.ts +++ b/web/projects/ui/src/app/routes/portal/components/interfaces/addresses/item.component.ts @@ -1,11 +1,5 @@ -import { - ChangeDetectionStrategy, - Component, - input, - inject, -} from '@angular/core' -import { DialogService, i18nKey, i18nPipe } from '@start9labs/shared' -import { TuiButton } from '@taiga-ui/core' +import { ChangeDetectionStrategy, Component, input } from '@angular/core' +import { i18nPipe } from '@start9labs/shared' import { DisplayAddress } from '../interface.service' import { AddressActionsComponent } from './actions.component' import { TuiBadge } from '@taiga-ui/kit' @@ -14,16 +8,6 @@ import { TuiBadge } from '@taiga-ui/kit' selector: 'tr[address]', template: ` @if (address(); as address) { - } `, @@ -89,22 +73,10 @@ import { TuiBadge } from '@taiga-ui/kit' } } `, - imports: [i18nPipe, AddressActionsComponent, TuiButton, TuiBadge], + imports: [i18nPipe, AddressActionsComponent, TuiBadge], changeDetection: ChangeDetectionStrategy.OnPush, }) export class InterfaceAddressItemComponent { readonly address = input.required() readonly isRunning = input.required() - readonly dialog = inject(DialogService) - - viewDetails(bullets: string[]) { - this.dialog - .openAlert( - `
    ${bullets.map(b => `
  • ${b}
  • `).join('')}
` as i18nKey, - { - label: 'About this address' as i18nKey, - }, - ) - .subscribe() - } }
- - {{ address.type }} @if (address.access === 'public') { @@ -50,8 +34,8 @@ import { TuiBadge } from '@taiga-ui/kit' actions [disabled]="!isRunning()" [href]="address.url" + [bullets]="address.bullets" [style.width.rem]="5" - (onDetails)="viewDetails(address.bullets)" >