mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 04:53:40 +00:00
Gateways, domains, and new service interface (#3001)
* add support for inbound proxies * backend changes * fix file type * proxy -> tunnel, implement backend apis * wip start-tunneld * add domains and gateways, remove routers, fix docs links * dont show hidden actions * show and test dns * edit instead of chnage acme and change gateway * refactor: domains page * refactor: gateways page * domains and acme refactor * certificate authorities * refactor public/private gateways * fix fe types * domains mostly finished * refactor: add file control to form service * add ip util to sdk * domains api + migration * start service interface page, WIP * different options for clearnet domains * refactor: styles for interfaces page * minor * better placeholder for no addresses * start sorting addresses * best address logic * comments * fix unnecessary export * MVP of service interface page * domains preferred * fix: address comments * only translations left * wip: start-tunnel & fix build * forms for adding domain, rework things based on new ideas * fix: dns testing * public domain, max width, descriptions for dns * nix StartOS domains, implement public and private domains at interface scope * restart tor instead of reset * better icon for restart tor * dns * fix sort functions for public and private domains * with todos * update types * clean up tech debt, bump dependencies * revert to ts-rs v9 * fix all types * fix dns form * add missing translations * it builds * fix: comments (#3009) * fix: comments * undo default --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> * fix: refactor legacy components (#3010) * fix: comments * fix: refactor legacy components * remove default again --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> * more translations * wip * fix deadlock * coukd work * simple renaming * placeholder for empty service interfaces table * honor hidden form values * remove logs * reason instead of description * fix dns * misc fixes * implement toggling gateways for service interface * fix showing dns records * move status column in service list * remove unnecessary truthy check * refactor: refactor forms components and remove legacy Taiga UI package (#3012) * handle wh file uploads * wip: debugging tor * socks5 proxy working * refactor: fix multiple comments (#3013) * refactor: fix multiple comments * styling changes, add documentation to sidebar * translations for dns page * refactor: subtle colors * rearrange service page --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> * fix file_stream and remove non-terminating test * clean up logs * support for sccache * fix gha sccache * more marketplace translations * install wizard clarity * stub hostnameInfo in migration * fix address info after setup, fix styling on SI page, new 040 release notes * remove tor logs from os * misc fixes * reset tor still not functioning... * update ts * minor styling and wording * chore: some fixes (#3015) * fix gateway renames * different handling for public domains * styling fixes * whole navbar should not be clickable on service show page * timeout getState request * remove links from changelog * misc fixes from pairing * use custom name for gateway in more places * fix dns parsing * closes #3003 * closes #2999 * chore: some fixes (#3017) * small copy change * revert hardcoded error for testing * dont require port forward if gateway is public * use old wan ip when not available * fix .const hanging on undefined * fix test * fix doc test * fix renames * update deps * allow specifying dependency metadata directly * temporarily make dependencies not cliackable in marketplace listings * fix socks bind * fix test --------- Co-authored-by: Aiden McClelland <me@drbonez.dev> Co-authored-by: waterplea <alexander@inkin.ru>
This commit is contained in:
@@ -4,7 +4,6 @@ import {
|
||||
computed,
|
||||
inject,
|
||||
input,
|
||||
Input,
|
||||
} from '@angular/core'
|
||||
import { TuiProgress } from '@taiga-ui/kit'
|
||||
import { LogsWindowComponent } from './logs-window.component'
|
||||
@@ -13,32 +12,25 @@ import { i18nPipe } from '../../i18n/i18n.pipe'
|
||||
@Component({
|
||||
selector: 'app-initializing',
|
||||
template: `
|
||||
@if (error(); as err) {
|
||||
<section>
|
||||
<h1>{{ 'Error initializing server' | i18n }}</h1>
|
||||
<p>{{ err }}</p>
|
||||
</section>
|
||||
} @else {
|
||||
<section>
|
||||
<h1 [style.font-size.rem]="2" [style.margin-bottom.rem]="2">
|
||||
{{
|
||||
setupType()
|
||||
? ('Setting up your server' | i18n)
|
||||
: ('Booting StartOS' | i18n)
|
||||
}}
|
||||
</h1>
|
||||
<div>
|
||||
{{ 'Progress' | i18n }}: {{ (progress().total * 100).toFixed(0) }}%
|
||||
</div>
|
||||
<progress
|
||||
tuiProgressBar
|
||||
[style.max-width.rem]="40"
|
||||
[style.margin]="'1rem auto'"
|
||||
[attr.value]="progress().total"
|
||||
></progress>
|
||||
<p [innerHTML]="message()"></p>
|
||||
</section>
|
||||
}
|
||||
<section>
|
||||
<h1 [style.font-size.rem]="2" [style.margin-bottom.rem]="2">
|
||||
{{
|
||||
initialSetup()
|
||||
? ('Setting up your server' | i18n)
|
||||
: ('Booting StartOS' | i18n)
|
||||
}}
|
||||
</h1>
|
||||
<div>
|
||||
{{ 'Progress' | i18n }}: {{ (progress().total * 100).toFixed(0) }}%
|
||||
</div>
|
||||
<progress
|
||||
tuiProgressBar
|
||||
[style.max-width.rem]="40"
|
||||
[style.margin]="'1rem auto'"
|
||||
[attr.value]="progress().total"
|
||||
></progress>
|
||||
<p [innerHTML]="message()"></p>
|
||||
</section>
|
||||
<logs-window />
|
||||
`,
|
||||
styles: `
|
||||
@@ -76,10 +68,7 @@ export class InitializingComponent {
|
||||
total: 0,
|
||||
message: '',
|
||||
})
|
||||
readonly setupType = input<
|
||||
'fresh' | 'restore' | 'attach' | 'transfer' | undefined
|
||||
>()
|
||||
readonly error = input<string>()
|
||||
readonly initialSetup = input(false)
|
||||
|
||||
readonly message = computed(() => {
|
||||
return (
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core'
|
||||
import { FormsModule } from '@angular/forms'
|
||||
import { TuiAutoFocus } from '@taiga-ui/cdk'
|
||||
import { TuiButton, TuiDialogContext } from '@taiga-ui/core'
|
||||
import { TuiInputModule, TuiTextfieldControllerModule } from '@taiga-ui/legacy'
|
||||
import {
|
||||
POLYMORPHEUS_CONTEXT,
|
||||
PolymorpheusComponent,
|
||||
} from '@taiga-ui/polymorpheus'
|
||||
import { TuiButton, TuiDialogContext, TuiTextfield } from '@taiga-ui/core'
|
||||
import { injectContext, PolymorpheusComponent } from '@taiga-ui/polymorpheus'
|
||||
import { i18nPipe } from '../i18n/i18n.pipe'
|
||||
import { i18nKey } from '../i18n/i18n.providers'
|
||||
|
||||
@@ -17,23 +13,36 @@ import { i18nKey } from '../i18n/i18n.providers'
|
||||
<p class="warning">{{ options.warning }}</p>
|
||||
}
|
||||
<form (ngSubmit)="submit(value.trim())">
|
||||
<tui-input
|
||||
tuiAutoFocus
|
||||
[tuiTextfieldLabelOutside]="!options.label"
|
||||
[tuiTextfieldCustomContent]="options.useMask ? toggle : ''"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
[(ngModel)]="value"
|
||||
>
|
||||
{{ options.label }}
|
||||
@if (options.required !== false && options.label) {
|
||||
<span>*</span>
|
||||
<tui-textfield>
|
||||
@if (options.label) {
|
||||
<label tuiLabel>
|
||||
{{ options.label }}
|
||||
@if (options.required !== false && options.label) {
|
||||
<span>*</span>
|
||||
}
|
||||
</label>
|
||||
}
|
||||
<input
|
||||
tuiTextfieldLegacy
|
||||
tuiTextfield
|
||||
tuiAutoFocus
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
[(ngModel)]="value"
|
||||
[class.masked]="options.useMask && masked && value"
|
||||
[placeholder]="options.placeholder || ''"
|
||||
/>
|
||||
</tui-input>
|
||||
@if (options.useMask) {
|
||||
<button
|
||||
tuiIconButton
|
||||
type="button"
|
||||
appearance="icon"
|
||||
title="Toggle masking"
|
||||
size="xs"
|
||||
class="button"
|
||||
[iconStart]="masked ? '@tui.eye' : '@tui.eye-off'"
|
||||
(click)="masked = !masked"
|
||||
></button>
|
||||
}
|
||||
</tui-textfield>
|
||||
<footer class="g-buttons">
|
||||
<button
|
||||
tuiButton
|
||||
@@ -48,19 +57,6 @@ import { i18nKey } from '../i18n/i18n.providers'
|
||||
</button>
|
||||
</footer>
|
||||
</form>
|
||||
|
||||
<ng-template #toggle>
|
||||
<button
|
||||
tuiIconButton
|
||||
type="button"
|
||||
appearance="icon"
|
||||
title="Toggle masking"
|
||||
size="xs"
|
||||
class="button"
|
||||
[iconStart]="masked ? '@tui.eye' : '@tui.eye-off'"
|
||||
(click)="masked = !masked"
|
||||
></button>
|
||||
</ng-template>
|
||||
`,
|
||||
styles: `
|
||||
.warning {
|
||||
@@ -76,25 +72,16 @@ import { i18nKey } from '../i18n/i18n.providers'
|
||||
-webkit-text-security: disc;
|
||||
}
|
||||
`,
|
||||
imports: [
|
||||
FormsModule,
|
||||
TuiInputModule,
|
||||
TuiButton,
|
||||
TuiTextfieldControllerModule,
|
||||
TuiAutoFocus,
|
||||
i18nPipe,
|
||||
],
|
||||
imports: [FormsModule, TuiButton, TuiTextfield, TuiAutoFocus, i18nPipe],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class PromptModal {
|
||||
private readonly context =
|
||||
injectContext<TuiDialogContext<string, PromptOptions>>()
|
||||
|
||||
masked = this.options.useMask
|
||||
value = this.options.initialValue || ''
|
||||
|
||||
constructor(
|
||||
@Inject(POLYMORPHEUS_CONTEXT)
|
||||
private readonly context: TuiDialogContext<string, PromptOptions>,
|
||||
) {}
|
||||
|
||||
get options(): PromptOptions {
|
||||
return this.context.data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user