feat: redesign service route (#2835)

* feat: redesign service route

* chore: more changes

* remove automated backups and fix interface addresses

* fix rpc methods and slightly better mocks

---------

Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
Alex Inkin
2025-02-25 19:33:35 +04:00
committed by GitHub
parent 1b006599cf
commit 7fff9579c0
70 changed files with 2437 additions and 2325 deletions

View File

@@ -10,7 +10,7 @@ import { RouterModule } from '@angular/router'
<a tuiCell [routerLink]="disabled ? null : '/attach'">
<tui-icon icon="@tui.box" />
<span tuiTitle>
<span class="g-success">Use Existing Drive</span>
<span class="g-positive">Use Existing Drive</span>
<span tuiSubtitle>
Attach an existing StartOS data drive (not a backup)
</span>

View File

@@ -33,7 +33,7 @@ import { StateService } from 'src/app/services/state.service'
<a tuiCell [routerLink]="error || recover ? null : '/storage'">
<tui-icon icon="@tui.plus" />
<span tuiTitle>
<span class="g-success">Start Fresh</span>
<span class="g-positive">Start Fresh</span>
<span tuiSubtitle>
Get started with a brand new Start9 server
</span>

View File

@@ -34,7 +34,7 @@ import { StateService } from 'src/app/services/state.service'
@for (d of drives; track d) {
<button tuiCell [drive]="d" [disabled]="isSmall(d)" (click)="select(d)">
@if (isSmall(d)) {
<span tuiSubtitle class="g-error">Drive capacity too small</span>
<span tuiSubtitle class="g-negative">Drive capacity too small</span>
}
</button>
}

View File

@@ -21,7 +21,7 @@ import { StateService } from 'src/app/services/state.service'
@if (isKiosk) {
<section tuiCardLarge>
<h1 class="heading">
<tui-icon icon="@tui.check-square" class="g-success" />
<tui-icon icon="@tui.check-square" class="g-positive" />
Setup Complete!
</h1>
<button tuiButton (click)="exitKiosk()" iconEnd="@tui.log-in">
@@ -31,7 +31,7 @@ import { StateService } from 'src/app/services/state.service'
} @else if (lanAddress) {
<section tuiCardLarge>
<h1 class="heading">
<tui-icon icon="@tui.check-square" class="g-success" />
<tui-icon icon="@tui.check-square" class="g-positive" />
Setup Complete!
</h1>
@if (stateService.setupType === 'restore') {
@@ -122,7 +122,7 @@ export default class SuccessPage implements AfterViewInit {
this.document.location.hostname,
)
torAddress?: string
torAddresses?: string[]
lanAddress?: string
cert?: string
disableLogin = this.stateService.setupType === 'fresh'
@@ -136,8 +136,8 @@ export default class SuccessPage implements AfterViewInit {
const lanAddress = this.document.getElementById('lan-addr')
const html = this.documentation?.nativeElement.innerHTML || ''
if (torAddress) torAddress.innerHTML = this.torAddress!
if (lanAddress) lanAddress.innerHTML = this.lanAddress!
if (torAddress) torAddress.innerHTML = this.torAddresses?.join('\n') || ''
if (lanAddress) lanAddress.innerHTML = this.lanAddress || ''
this.document
.getElementById('cert')
@@ -158,7 +158,9 @@ export default class SuccessPage implements AfterViewInit {
try {
const ret = await this.api.complete()
if (!this.isKiosk) {
this.torAddress = ret.torAddress.replace(/^https:/, 'http:')
this.torAddresses = ret.torAddresses.map(a =>
a.replace(/^https:/, 'http:'),
)
this.lanAddress = ret.lanAddress.replace(/^https:/, 'http:')
this.cert = ret.rootCa