mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
Frontend fixes/improvements (#2950)
* fix Tor logs actually fetching od logs * chore: switch from `mime-types` to `mime` for browser environment support (#2951) * change V2 s9pk title to Legacy * show warning for domains when not public, disable launch too --------- Co-authored-by: Alex Inkin <alexander@inkin.ru> Co-authored-by: Mariusz Kogen <k0gen@pm.me>
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
TuiDataList,
|
||||
TuiIcon,
|
||||
TuiLink,
|
||||
TuiNotification,
|
||||
} from '@taiga-ui/core'
|
||||
import { TuiTooltip } from '@taiga-ui/kit'
|
||||
import { PatchDB } from 'patch-db-client'
|
||||
@@ -66,12 +67,25 @@ type ClearnetForm = {
|
||||
</a>
|
||||
</ng-template>
|
||||
@if (clearnet().length) {
|
||||
<button tuiButton iconStart="@tui.plus" (click)="add()">
|
||||
<button
|
||||
tuiButton
|
||||
iconStart="@tui.plus"
|
||||
[style.margin-inline-start]="'auto'"
|
||||
(click)="add()"
|
||||
>
|
||||
{{ 'Add' | i18n }}
|
||||
</button>
|
||||
}
|
||||
</header>
|
||||
@if (clearnet().length) {
|
||||
@if (!isPublic()) {
|
||||
<tui-notification appearance="negative" [style.margin-bottom]="'1rem'">
|
||||
{{
|
||||
'To publish clearnet domains, you must click "Make Public", above.'
|
||||
| i18n
|
||||
}}
|
||||
</tui-notification>
|
||||
}
|
||||
<table [appTable]="['ACME', 'URL', null]">
|
||||
@for (address of clearnet(); track $index) {
|
||||
<tr>
|
||||
@@ -79,7 +93,11 @@ type ClearnetForm = {
|
||||
{{ interface.value().addSsl ? (address.acme | acme) : '-' }}
|
||||
</td>
|
||||
<td>{{ address.url | mask }}</td>
|
||||
<td actions [href]="address.url" [disabled]="!isRunning()">
|
||||
<td
|
||||
actions
|
||||
[href]="address.url"
|
||||
[disabled]="!isRunning() || !isPublic()"
|
||||
>
|
||||
@if (address.isDomain) {
|
||||
<button
|
||||
tuiIconButton
|
||||
@@ -129,6 +147,7 @@ type ClearnetForm = {
|
||||
InterfaceActionsComponent,
|
||||
i18nPipe,
|
||||
DocsLinkDirective,
|
||||
TuiNotification,
|
||||
],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
@@ -143,6 +162,7 @@ export class InterfaceClearnetComponent {
|
||||
|
||||
readonly clearnet = input.required<readonly ClearnetAddress[]>()
|
||||
readonly isRunning = input.required<boolean>()
|
||||
readonly isPublic = input.required<boolean>()
|
||||
|
||||
readonly acme = toSignal(
|
||||
inject<PatchDB<DataModel>>(PatchDB)
|
||||
|
||||
@@ -27,6 +27,7 @@ import { MappedServiceInterface } from './interface.utils'
|
||||
</button>
|
||||
<section
|
||||
[clearnet]="value().addresses.clearnet"
|
||||
[isPublic]="value().public"
|
||||
[isRunning]="isRunning()"
|
||||
></section>
|
||||
<section [tor]="value().addresses.tor" [isRunning]="isRunning()"></section>
|
||||
|
||||
@@ -3,7 +3,6 @@ import { i18nPipe } from '@start9labs/shared'
|
||||
import { LogsComponent } from 'src/app/routes/portal/components/logs/logs.component'
|
||||
import { RR } from 'src/app/services/api/api.types'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
|
||||
import { LogsHeaderComponent } from '../components/header.component'
|
||||
|
||||
@Component({
|
||||
@@ -31,10 +30,4 @@ export default class SystemKernelComponent {
|
||||
|
||||
protected readonly fetch = (params: RR.GetServerLogsReq) =>
|
||||
this.api.getKernelLogs(params)
|
||||
|
||||
log = {
|
||||
title: 'Kernel Logs',
|
||||
subtitle: 'Diagnostics for drivers and other kernel processes',
|
||||
icon: '@tui.square-chevron-right',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,10 +30,4 @@ export default class SystemOSComponent {
|
||||
|
||||
protected readonly fetch = (params: RR.GetServerLogsReq) =>
|
||||
this.api.getServerLogs(params)
|
||||
|
||||
log = {
|
||||
title: 'Kernel Logs',
|
||||
subtitle: 'Diagnostics for drivers and other kernel processes',
|
||||
icon: '@tui.square-chevron-right',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,14 +26,8 @@ export default class SystemOSComponent {
|
||||
private readonly api = inject(ApiService)
|
||||
|
||||
protected readonly follow = (params: RR.FollowServerLogsReq) =>
|
||||
this.api.followServerLogs(params)
|
||||
this.api.followTorLogs(params)
|
||||
|
||||
protected readonly fetch = (params: RR.GetServerLogsReq) =>
|
||||
this.api.getServerLogs(params)
|
||||
|
||||
log = {
|
||||
title: 'Kernel Logs',
|
||||
subtitle: 'Diagnostics for drivers and other kernel processes',
|
||||
icon: '@tui.square-chevron-right',
|
||||
}
|
||||
this.api.getTorLogs(params)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user