mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
sdk db backups, wifi ux, release notes, minor copy
This commit is contained in:
@@ -202,7 +202,7 @@ export class ActionInputModal {
|
||||
|
||||
const message = `${this.i18n.transform('As a result of this change, the following services will no longer work properly and may crash')}:<ul>`
|
||||
const content =
|
||||
`${message}${breakages.map(id => `<li><b>${getManifest(packages[id]!).title}</b></li>`)}</ul>` as i18nKey
|
||||
`${message}${breakages.map(id => `<li><b>${getManifest(packages[id]!).title}</b></li>`).join('')}</ul>` as i18nKey
|
||||
|
||||
return firstValueFrom(
|
||||
this.dialog
|
||||
|
||||
@@ -26,6 +26,7 @@ import { PatchDB } from 'patch-db-client'
|
||||
import {
|
||||
catchError,
|
||||
defer,
|
||||
exhaustMap,
|
||||
finalize,
|
||||
first,
|
||||
map,
|
||||
@@ -34,7 +35,10 @@ import {
|
||||
of,
|
||||
Subject,
|
||||
switchMap,
|
||||
takeUntil,
|
||||
takeWhile,
|
||||
tap,
|
||||
timer,
|
||||
} from 'rxjs'
|
||||
import {
|
||||
FormComponent,
|
||||
@@ -184,7 +188,7 @@ export default class SystemWifiComponent {
|
||||
),
|
||||
this.refresh$.pipe(
|
||||
tap(() => this.refreshing.set(true)),
|
||||
switchMap(() =>
|
||||
exhaustMap(() =>
|
||||
this.getWifi$().pipe(finalize(() => this.refreshing.set(false))),
|
||||
),
|
||||
),
|
||||
@@ -205,6 +209,10 @@ export default class SystemWifiComponent {
|
||||
|
||||
try {
|
||||
await this.api.enableWifi({ enabled: enable })
|
||||
if (enable) {
|
||||
this.update$.next({ known: [], available: [] })
|
||||
this.pollForNetworks()
|
||||
}
|
||||
} catch (e: any) {
|
||||
this.errorService.handleError(e)
|
||||
} finally {
|
||||
@@ -259,6 +267,15 @@ export default class SystemWifiComponent {
|
||||
}
|
||||
}
|
||||
|
||||
private pollForNetworks(): void {
|
||||
timer(0, 500)
|
||||
.pipe(
|
||||
takeWhile(() => !this.wifi()?.available?.length),
|
||||
takeUntil(timer(5000)),
|
||||
)
|
||||
.subscribe(() => this.refresh$.next())
|
||||
}
|
||||
|
||||
private async confirmWifi(ssid: string): Promise<void> {
|
||||
const maxAttempts = 5
|
||||
let attempts = 0
|
||||
|
||||
@@ -71,13 +71,16 @@ export function getInstalledPrimaryStatus({
|
||||
tasks,
|
||||
statusInfo,
|
||||
}: T.PackageDataEntry): PrimaryStatus {
|
||||
const base = getInstalledBaseStatus(statusInfo)
|
||||
|
||||
if (
|
||||
!INACTIVE_STATUSES.includes(base) &&
|
||||
Object.values(tasks).some(t => t.active && t.task.severity === 'critical')
|
||||
) {
|
||||
return 'task-required'
|
||||
}
|
||||
|
||||
return getInstalledBaseStatus(statusInfo)
|
||||
return base
|
||||
}
|
||||
|
||||
function getHealthStatus(statusInfo: T.StatusInfo): T.HealthStatus | null {
|
||||
|
||||
Reference in New Issue
Block a user