mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
remove ssh, deprecate wifi (#2859)
This commit is contained in:
@@ -16,7 +16,6 @@ export default {
|
||||
acme: 'ACME',
|
||||
wifi: 'WiFi',
|
||||
sessions: 'Active Sessions',
|
||||
ssh: 'SSH',
|
||||
password: 'Change Password',
|
||||
},
|
||||
general: {
|
||||
|
||||
@@ -18,7 +18,6 @@ export default {
|
||||
acme: 'ACME',
|
||||
wifi: 'WiFi',
|
||||
sessions: 'Sesiones Activas',
|
||||
ssh: 'SSH',
|
||||
password: 'Cambiar Contraseña',
|
||||
},
|
||||
general: {
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
import { ChangeDetectionStrategy, Component, inject } from '@angular/core'
|
||||
import { toSignal } from '@angular/core/rxjs-interop'
|
||||
import { RouterLink } from '@angular/router'
|
||||
import { ErrorService, LoadingService } from '@start9labs/shared'
|
||||
import { ISB, utils } from '@start9labs/start-sdk'
|
||||
import { TuiButton, TuiLink, TuiLoader, TuiTitle } from '@taiga-ui/core'
|
||||
import {
|
||||
TuiButton,
|
||||
TuiIcon,
|
||||
TuiLink,
|
||||
TuiLoader,
|
||||
TuiTitle,
|
||||
} from '@taiga-ui/core'
|
||||
import { TuiCell, TuiHeader } from '@taiga-ui/layout'
|
||||
import { PatchDB } from 'patch-db-client'
|
||||
import { map } from 'rxjs'
|
||||
@@ -10,11 +17,16 @@ import { FormComponent } from 'src/app/routes/portal/components/form.component'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { FormDialogService } from 'src/app/services/form-dialog.service'
|
||||
import { DataModel } from 'src/app/services/patch-db/data-model'
|
||||
import { TitleDirective } from 'src/app/services/title.service'
|
||||
import { knownACME, toAcmeName } from 'src/app/utils/acme'
|
||||
import { configBuilderToSpec } from 'src/app/utils/configBuilderToSpec'
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
<ng-container *title>
|
||||
<a routerLink=".." tuiIconButton iconStart="@tui.arrow-left">Back</a>
|
||||
ACME
|
||||
</ng-container>
|
||||
<header tuiHeader>
|
||||
<hgroup tuiTitle>
|
||||
<h3>ACME</h3>
|
||||
@@ -86,7 +98,16 @@ import { configBuilderToSpec } from 'src/app/utils/configBuilderToSpec'
|
||||
`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [TuiButton, TuiLoader, TuiCell, TuiTitle, TuiHeader, TuiLink],
|
||||
imports: [
|
||||
TuiButton,
|
||||
TuiLoader,
|
||||
TuiCell,
|
||||
TuiTitle,
|
||||
TuiHeader,
|
||||
TuiLink,
|
||||
RouterLink,
|
||||
TitleDirective,
|
||||
],
|
||||
})
|
||||
export default class SystemAcmeComponent {
|
||||
private readonly formDialog = inject(FormDialogService)
|
||||
|
||||
@@ -10,7 +10,7 @@ import { from, map, merge, Observable, Subject } from 'rxjs'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { Session } from 'src/app/services/api/api.types'
|
||||
import { TitleDirective } from 'src/app/services/title.service'
|
||||
import { SSHTableComponent } from './table.component'
|
||||
import { SessionsTableComponent } from './table.component'
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
@@ -56,7 +56,7 @@ import { SSHTableComponent } from './table.component'
|
||||
imports: [
|
||||
CommonModule,
|
||||
TuiButton,
|
||||
SSHTableComponent,
|
||||
SessionsTableComponent,
|
||||
TuiLet,
|
||||
RouterLink,
|
||||
TitleDirective,
|
||||
|
||||
@@ -136,7 +136,7 @@ import { PlatformInfoPipe } from './platform-info.pipe'
|
||||
TableComponent,
|
||||
],
|
||||
})
|
||||
export class SSHTableComponent<T extends Session> implements OnChanges {
|
||||
export class SessionsTableComponent<T extends Session> implements OnChanges {
|
||||
readonly selected$ = new BehaviorSubject<readonly T[]>([])
|
||||
|
||||
@Input()
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
TuiDialogOptions,
|
||||
TuiLink,
|
||||
TuiLoader,
|
||||
TuiNotification,
|
||||
TuiTitle,
|
||||
} from '@taiga-ui/core'
|
||||
import { TuiSwitch } from '@taiga-ui/kit'
|
||||
@@ -41,24 +42,18 @@ import { wifiSpec } from './wifi.const'
|
||||
WiFi
|
||||
</ng-container>
|
||||
<header tuiHeader>
|
||||
<hgroup tuiTitle>
|
||||
<h3>WiFi</h3>
|
||||
<p tuiSubtitle>
|
||||
Adding WiFi credentials to StartOS allows you to remove the Ethernet
|
||||
cable and move the device anywhere you want. StartOS will
|
||||
automatically connect to available networks.
|
||||
<a
|
||||
tuiLink
|
||||
href="https://docs.start9.com/latest/user-manual/wifi"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
appearance="action-grayscale"
|
||||
iconEnd="@tui.external-link"
|
||||
[pseudo]="true"
|
||||
[textContent]="'View instructions'"
|
||||
></a>
|
||||
</p>
|
||||
</hgroup>
|
||||
<tui-notification appearance="negative">
|
||||
<div tuiTitle>
|
||||
Deprecated
|
||||
<div tuiSubtitle>
|
||||
WiFi support will be removed in StartOS v0.4.1. If you do not have
|
||||
access to Ethernet, you can use a WiFi extender to connect to the
|
||||
local network, then connect your server to the extender via
|
||||
Ethernet. Please contact Start9 support with any questions or
|
||||
concerns.
|
||||
</div>
|
||||
</div>
|
||||
</tui-notification>
|
||||
</header>
|
||||
@if (status()?.interface) {
|
||||
<section class="g-card">
|
||||
@@ -127,6 +122,7 @@ import { wifiSpec } from './wifi.const'
|
||||
TuiHeader,
|
||||
TuiTitle,
|
||||
TuiLink,
|
||||
TuiNotification,
|
||||
],
|
||||
})
|
||||
export default class SystemWifiComponent {
|
||||
|
||||
@@ -8,6 +8,9 @@ import { i18nPipe } from 'src/app/i18n/i18n.pipe'
|
||||
import { BadgeService } from 'src/app/services/badge.service'
|
||||
import { TitleDirective } from 'src/app/services/title.service'
|
||||
import { SYSTEM_MENU } from './system.const'
|
||||
import { PatchDB } from 'patch-db-client'
|
||||
import { DataModel } from 'src/app/services/patch-db/data-model'
|
||||
import { AsyncPipe } from '@angular/common'
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
@@ -22,6 +25,11 @@ import { SYSTEM_MENU } from './system.const'
|
||||
tuiCell="s"
|
||||
routerLinkActive="active"
|
||||
[routerLink]="page.item.split('.').at(-1)"
|
||||
[style.display]="
|
||||
!(wifiEnabled$ | async) && page.item === 'system.outlet.wifi'
|
||||
? 'none'
|
||||
: null
|
||||
"
|
||||
>
|
||||
<tui-icon [icon]="page.icon" />
|
||||
<span tuiTitle>
|
||||
@@ -116,9 +124,16 @@ import { SYSTEM_MENU } from './system.const'
|
||||
TitleDirective,
|
||||
TuiBadgeNotification,
|
||||
i18nPipe,
|
||||
AsyncPipe,
|
||||
],
|
||||
})
|
||||
export class SystemComponent {
|
||||
readonly menu = SYSTEM_MENU
|
||||
readonly badge = toSignal(inject(BadgeService).getCount('/portal/system'))
|
||||
readonly wifiEnabled$ = inject<PatchDB<DataModel>>(PatchDB).watch$(
|
||||
'serverInfo',
|
||||
'network',
|
||||
'wifi',
|
||||
'enabled',
|
||||
)
|
||||
}
|
||||
|
||||
@@ -38,10 +38,6 @@ export const SYSTEM_MENU = [
|
||||
icon: '@tui.clock',
|
||||
item: 'system.outlet.sessions',
|
||||
},
|
||||
{
|
||||
icon: '@tui.terminal',
|
||||
item: 'system.outlet.ssh',
|
||||
},
|
||||
{
|
||||
icon: '@tui.key',
|
||||
item: 'system.outlet.password',
|
||||
|
||||
@@ -53,10 +53,6 @@ export default [
|
||||
path: 'sessions',
|
||||
loadComponent: () => import('./routes/sessions/sessions.component'),
|
||||
},
|
||||
{
|
||||
path: 'ssh',
|
||||
loadComponent: () => import('./routes/ssh/ssh.component'),
|
||||
},
|
||||
{
|
||||
path: 'password',
|
||||
loadComponent: () => import('./routes/password/password.component'),
|
||||
|
||||
@@ -149,10 +149,6 @@ export namespace RR {
|
||||
|
||||
// wifi
|
||||
|
||||
// @TODO remove for 040, set at server scope
|
||||
// export type SetWifiCountryReq = { country: string }
|
||||
// export type SetWifiCountryRes = null
|
||||
|
||||
export type GetWifiReq = {}
|
||||
export type GetWifiRes = {
|
||||
ssids: {
|
||||
|
||||
@@ -34,7 +34,7 @@ export const mockPatchData: DataModel = {
|
||||
lastBackup: new Date(new Date().valueOf() - 604800001).toISOString(),
|
||||
network: {
|
||||
wifi: {
|
||||
enabled: false,
|
||||
enabled: true,
|
||||
interface: 'wlan0',
|
||||
ssids: [],
|
||||
selected: null,
|
||||
|
||||
Reference in New Issue
Block a user