Merge branch 'hotfix/alpha.16' of github.com:Start9Labs/start-os into hotfix/alpha.16

This commit is contained in:
Aiden McClelland
2025-12-18 11:31:51 -07:00
7 changed files with 38 additions and 34 deletions

View File

@@ -48,7 +48,7 @@ import { HintPipe } from '../pipes/hint.pipe'
}
@if (!mobile) {
<tui-data-list *tuiTextfieldDropdown>
@for (item of items; track $index) {
@for (item of items; track item) {
<button
tuiOption
new

View File

@@ -50,7 +50,7 @@ import { InterfaceComponent } from './interface.component'
{{ 'Add' | i18n }}
</button>
</header>
@for (domain of privateDomains(); track $index) {
@for (domain of privateDomains(); track domain) {
<div tuiCell="s">
<span tuiTitle>{{ domain }}</span>
<button

View File

@@ -54,7 +54,7 @@ type OnionForm = {
{{ 'Add' | i18n }}
</button>
</header>
@for (domain of torDomains(); track $index) {
@for (domain of torDomains(); track domain) {
<div tuiCell="s">
<span tuiTitle>{{ domain }}</span>
<button

View File

@@ -5,9 +5,7 @@ import {
input,
} from '@angular/core'
import { i18nPipe } from '@start9labs/shared'
import { TuiLoader } from '@taiga-ui/core'
import { ServiceUptimeComponent } from 'src/app/routes/portal/routes/services/components/uptime.component'
import { getProgressText } from 'src/app/routes/portal/routes/services/pipes/install-progress.pipe'
import { PackageDataEntry } from 'src/app/services/patch-db/data-model'
import {
getInstalledPrimaryStatus,
@@ -19,29 +17,20 @@ import {
template: `
<header>{{ 'Status' | i18n }}</header>
<div>
@if (info()) {
<h3>
<tui-loader size="s" [inheritColor]="true" />
{{ 'Installing' | i18n }}
<h3 [class]="class()">
{{ text() || 'Unknown' | i18n }}
@if (text() === 'Task Required') {
<small>{{ 'See below' | i18n }}</small>
}
@if (rendering().showDots) {
<span class="loading-dots"></span>
{{ info() | i18n }}
</h3>
} @else {
<h3 [class]="class()">
{{ text() || 'Unknown' | i18n }}
@if (text() === 'Task Required') {
<small>{{ 'See below' | i18n }}</small>
}
}
@if (rendering().showDots) {
<span class="loading-dots"></span>
}
@if (pkg().statusInfo.started; as started) {
<service-uptime [started]="started" />
}
</h3>
}
@if (pkg().statusInfo.started; as started) {
<service-uptime [started]="started" />
}
</h3>
<ng-content />
</div>
`,
@@ -112,7 +101,7 @@ import {
`,
host: { class: 'g-card' },
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [TuiLoader, i18nPipe, ServiceUptimeComponent],
imports: [i18nPipe, ServiceUptimeComponent],
})
export class ServiceStatusComponent {
readonly pkg = input.required<PackageDataEntry>()
@@ -143,9 +132,4 @@ export class ServiceStatusComponent {
return null
}
})
protected readonly info = computed(
(progress = this.pkg().stateInfo.installingInfo?.progress.overall) =>
progress ? getProgressText(progress) : '',
)
}

View File

@@ -24,7 +24,7 @@ import { StatusComponent } from './status.component'
<td class="title">
<a [routerLink]="routerLink">{{ manifest.title }}</a>
</td>
<td [style.grid-area]="'3 / 2'">
<td class="status" [style.grid-area]="'3 / 2'">
<app-status [pkg]="pkg" [hasDepErrors]="hasError(depErrors)" />
</td>
<td class="version">{{ manifest.version }}</td>
@@ -69,6 +69,22 @@ import { StatusComponent } from './status.component'
display: none;
}
.title {
width: 21rem;
}
.status {
width: 21rem;
}
.uptime {
width: 13rem;
}
.version {
width: 21rem;
}
:host-context(tui-root._mobile) {
position: relative;
display: grid;

View File

@@ -57,7 +57,7 @@ import { RouterLink } from '@angular/router'
[appTable]="[null, 'Name', 'Status', 'Version', 'Uptime']"
[appTableSorters]="[null, name, status]"
>
@for (service of services() | tuiTableSort; track service) {
@for (service of services() | tuiTableSort; track $index) {
<tr
appService
[pkg]="service"

View File

@@ -22,6 +22,10 @@ export function renderPkgStatus(pkg: PackageDataEntry): PackageStatus {
}
export function getInstalledBaseStatus(statusInfo: T.StatusInfo): BaseStatus {
if (statusInfo.error) {
return 'error'
}
if (
statusInfo.desired.main === 'running' &&
(!statusInfo.started ||