diff --git a/web/projects/marketplace/src/components/menu/menu.component.scss b/web/projects/marketplace/src/components/menu/menu.component.scss index d4ab0817f..760aef902 100644 --- a/web/projects/marketplace/src/components/menu/menu.component.scss +++ b/web/projects/marketplace/src/components/menu/menu.component.scss @@ -54,7 +54,6 @@ header { } store-icon { - margin-bottom: 0.75rem; border-radius: 100%; height: 64px; } diff --git a/web/projects/shared/src/components/initializing/logs-window.component.ts b/web/projects/shared/src/components/initializing/logs-window.component.ts index e6279cb07..04f793409 100644 --- a/web/projects/shared/src/components/initializing/logs-window.component.ts +++ b/web/projects/shared/src/components/initializing/logs-window.component.ts @@ -48,6 +48,6 @@ export class LogsWindowComponent { } onBottom(entries: readonly IntersectionObserverEntry[]) { - this.scroll = entries[entries.length - 1].isIntersecting + this.scroll = !!entries[entries.length - 1]?.isIntersecting } } diff --git a/web/projects/shared/src/pipes/unit-conversion/unit-conversion.pipe.ts b/web/projects/shared/src/pipes/unit-conversion/unit-conversion.pipe.ts index afdc48c48..cf149ac8c 100644 --- a/web/projects/shared/src/pipes/unit-conversion/unit-conversion.pipe.ts +++ b/web/projects/shared/src/pipes/unit-conversion/unit-conversion.pipe.ts @@ -25,9 +25,12 @@ export function convertBytes(bytes: number): string { export class DurationToSecondsPipe implements PipeTransform { transform(duration?: string | null): number { if (!duration) return 0 - const [, num, , unit] = - duration.match(/^([0-9]*(\.[0-9]+)?)(ns|µs|ms|s|m|d)$/) || [] - return Number(num) * unitsToSeconds[unit] + + const regex = /^([0-9]*(\.[0-9]+)?)(ns|µs|ms|s|m|d)$/ + const [, num, , unit] = duration.match(regex) || [] + const multiplier = (unit && unitsToSeconds[unit]) || NaN + + return unit ? Number(num) * multiplier : NaN } } diff --git a/web/projects/shared/styles/shared.scss b/web/projects/shared/styles/shared.scss index b4be91ecc..3833f2b0b 100644 --- a/web/projects/shared/styles/shared.scss +++ b/web/projects/shared/styles/shared.scss @@ -294,13 +294,3 @@ a { margin-right: 0.5rem; } } - -h1, -h2, -h3, -h4, -h5, -h6, -hr { - margin: 0; -} diff --git a/web/projects/ui/src/app/app.component.ts b/web/projects/ui/src/app/app.component.ts index d51e3b675..24d7c04c9 100644 --- a/web/projects/ui/src/app/app.component.ts +++ b/web/projects/ui/src/app/app.component.ts @@ -42,7 +42,7 @@ export class AppComponent implements OnInit { ngOnInit() { this.patch.watch$('ui').subscribe(({ name, language }) => { this.title.setTitle(name || 'StartOS') - this.i18n.setLanguage(language) + this.i18n.setLanguage(language || 'english') }) } } diff --git a/web/projects/ui/src/app/app.providers.ts b/web/projects/ui/src/app/app.providers.ts index a6cdf76c3..e73746cb4 100644 --- a/web/projects/ui/src/app/app.providers.ts +++ b/web/projects/ui/src/app/app.providers.ts @@ -114,6 +114,6 @@ export function appInitializer(): () => void { auth.init() localStorage.init() router.initialNavigation() - i18n.setLanguage(i18n.language) + i18n.setLanguage(i18n.language || 'english') } } diff --git a/web/projects/ui/src/app/i18n/i18n.service.ts b/web/projects/ui/src/app/i18n/i18n.service.ts index f40f92b57..85f7d3a83 100644 --- a/web/projects/ui/src/app/i18n/i18n.service.ts +++ b/web/projects/ui/src/app/i18n/i18n.service.ts @@ -13,7 +13,7 @@ export class i18nService extends TuiLanguageSwitcherService { readonly loading = signal(false) - override setLanguage(language: TuiLanguageName): void { + override setLanguage(language: TuiLanguageName = 'english'): void { if (this.language === language) { return } diff --git a/web/projects/ui/src/app/routes/diagnostic/logs/logs.page.html b/web/projects/ui/src/app/routes/diagnostic/logs/logs.page.html index 86a5b7303..df2def9fc 100644 --- a/web/projects/ui/src/app/routes/diagnostic/logs/logs.page.html +++ b/web/projects/ui/src/app/routes/diagnostic/logs/logs.page.html @@ -11,7 +11,7 @@
@if (loading) { diff --git a/web/projects/ui/src/app/routes/portal/components/form/form-multiselect/form-multiselect.component.ts b/web/projects/ui/src/app/routes/portal/components/form/form-multiselect/form-multiselect.component.ts index 9056e1e0f..f0b5a7934 100644 --- a/web/projects/ui/src/app/routes/portal/components/form/form-multiselect/form-multiselect.component.ts +++ b/web/projects/ui/src/app/routes/portal/components/form/form-multiselect/form-multiselect.component.ts @@ -16,7 +16,8 @@ export class FormMultiselectComponent extends Control< private readonly isDisabled = (item: string) => Array.isArray(this.spec.disabled) && - this.spec.disabled.includes(this.inverted[item]) + !!this.inverted[item] && + this.spec.disabled.includes(this.inverted[item]!) private readonly isExceedingLimit = (item: string) => !!this.spec.maxLength && @@ -44,6 +45,6 @@ export class FormMultiselectComponent extends Control< @tuiPure private memoize(value: null | readonly string[]): string[] { - return value?.map(key => this.spec.values[key]) || [] + return value?.map(key => this.spec.values[key] || '') || [] } } diff --git a/web/projects/ui/src/app/routes/portal/components/form/form-select/form-select.component.ts b/web/projects/ui/src/app/routes/portal/components/form/form-select/form-select.component.ts index ac478a4d1..832a12489 100644 --- a/web/projects/ui/src/app/routes/portal/components/form/form-select/form-select.component.ts +++ b/web/projects/ui/src/app/routes/portal/components/form/form-select/form-select.component.ts @@ -14,7 +14,8 @@ export class FormSelectComponent extends Control { readonly disabledItemHandler = (item: string) => Array.isArray(this.spec.disabled) && - this.spec.disabled.includes(this.inverted[item]) + !!this.inverted[item] && + this.spec.disabled.includes(this.inverted[item]!) get disabled(): boolean { return typeof this.spec.disabled === 'string' diff --git a/web/projects/ui/src/app/routes/portal/components/form/form-union/form-union.component.html b/web/projects/ui/src/app/routes/portal/components/form/form-union/form-union.component.html index 1cb5bfe57..513007d65 100644 --- a/web/projects/ui/src/app/routes/portal/components/form/form-union/form-union.component.html +++ b/web/projects/ui/src/app/routes/portal/components/form/form-union/form-union.component.html @@ -6,6 +6,6 @@ diff --git a/web/projects/ui/src/app/routes/portal/components/form/form-union/form-union.component.ts b/web/projects/ui/src/app/routes/portal/components/form/form-union/form-union.component.ts index e8602eeb0..9d889a9fa 100644 --- a/web/projects/ui/src/app/routes/portal/components/form/form-union/form-union.component.ts +++ b/web/projects/ui/src/app/routes/portal/components/form/form-union/form-union.component.ts @@ -38,11 +38,11 @@ export class FormUnionComponent implements OnChanges { @tuiPure onUnion(union: string) { - this.values[this.union] = this.form.control.controls['value'].value + this.values[this.union] = this.form.control.controls['value']?.value this.form.control.setControl( 'value', this.formService.getFormGroup( - union ? this.spec.variants[union].spec : {}, + union ? this.spec.variants[union]?.spec || {} : {}, [], this.values[union], ), diff --git a/web/projects/ui/src/app/routes/portal/components/interfaces/clearnet.component.ts b/web/projects/ui/src/app/routes/portal/components/interfaces/clearnet.component.ts index 13ff087e5..1c7eed0b3 100644 --- a/web/projects/ui/src/app/routes/portal/components/interfaces/clearnet.component.ts +++ b/web/projects/ui/src/app/routes/portal/components/interfaces/clearnet.component.ts @@ -71,22 +71,14 @@ type ClearnetForm = { Make {{ isPublic() ? 'private' : 'public' }} @if (clearnet().length) { - + } @if (clearnet().length) { - +
@for (address of clearnet(); track $index) { - - +
{{ address.label }}{{ address.acme | acme }}{{ address.acme | acme }} {{ address.url | mask }}