diff --git a/web/projects/ui/src/app/pages/server-routes/server-routing.module.ts b/web/projects/ui/src/app/pages/server-routes/server-routing.module.ts index e7eb43aad..945f1b1c9 100644 --- a/web/projects/ui/src/app/pages/server-routes/server-routing.module.ts +++ b/web/projects/ui/src/app/pages/server-routes/server-routing.module.ts @@ -76,7 +76,7 @@ const routes: Routes = [ import('./ssh-keys/ssh-keys.module').then(m => m.SSHKeysPageModule), }, { - path: 'wifi', + path: 'wireless', loadChildren: () => import('./wifi/wifi.module').then(m => m.WifiPageModule), }, diff --git a/web/projects/ui/src/app/pages/server-routes/server-show/server-show.page.html b/web/projects/ui/src/app/pages/server-routes/server-show/server-show.page.html index 01ecf897e..d6adc15d1 100644 --- a/web/projects/ui/src/app/pages/server-routes/server-show/server-show.page.html +++ b/web/projects/ui/src/app/pages/server-routes/server-show/server-show.page.html @@ -50,8 +50,7 @@ - this.navCtrl.navigateForward(['wifi'], { relativeTo: this.route }), + this.navCtrl.navigateForward(['wireless'], { + relativeTo: this.route, + }), detail: true, disabled$: of(false), }, diff --git a/web/projects/ui/src/app/pages/server-routes/wifi/wifi.page.html b/web/projects/ui/src/app/pages/server-routes/wifi/wifi.page.html index 08387fcbc..1ddb44225 100644 --- a/web/projects/ui/src/app/pages/server-routes/wifi/wifi.page.html +++ b/web/projects/ui/src/app/pages/server-routes/wifi/wifi.page.html @@ -3,8 +3,8 @@ - WiFi Settings - + Wireless Settings + Refresh @@ -13,163 +13,149 @@ - - - - - - -

WiFi is deprecated

-

- WiFi will be eliminated from StartOS in version v0.4.0, expected soon. - Before then, we highly recommend switching your server to a direct, - Ethernet connection, which is faster and more reliable. If using - Ethernet is not possible for you, we recommend using a WiFi extender - instead. -

-
- - Learn More - - -
+ + + + Country - Country - - - - - - {{ wifi.country }} - {{ this.countries[wifi.country] }} - - Select Country - - - - - Saved Networks - - - - - - - - - - Available Networks - - - - - - - - - - - - - - Saved Networks - + -
- - {{ ssid.key }} - - - - + + + {{ wifi.country }} - {{ this.countries[wifi.country] }} + + Select Country
- Available Networks - + + + Saved Networks + + + + + + + + + + Available Networks + + + + + + + + + + + + + + Saved Networks + - {{ avWifi.ssid }} +
+ + {{ ssid.key }}
+ + Available Networks + + + {{ avWifi.ssid }} + + + + + + + + + + Join Another Network + +
- - - - Join Another Network - - -
-
+
+ +

No wireless interface detected.

+
+
diff --git a/web/projects/ui/src/app/pages/server-routes/wifi/wifi.page.ts b/web/projects/ui/src/app/pages/server-routes/wifi/wifi.page.ts index 0a1f6a7d9..5d722b482 100644 --- a/web/projects/ui/src/app/pages/server-routes/wifi/wifi.page.ts +++ b/web/projects/ui/src/app/pages/server-routes/wifi/wifi.page.ts @@ -9,11 +9,14 @@ import { WINDOW } from '@ng-web-apis/common' import { ErrorService, LoadingService, pauseFor } from '@start9labs/shared' import { CT } from '@start9labs/start-sdk' import { TuiDialogOptions } from '@taiga-ui/core' +import { PatchDB } from 'patch-db-client' import { FormComponent, FormContext } from 'src/app/components/form.component' import { RR } from 'src/app/services/api/api.types' import { ApiService } from 'src/app/services/api/embassy-api.service' import { ConfigService } from 'src/app/services/config.service' +import { ConnectionService } from 'src/app/services/connection.service' import { FormDialogService } from 'src/app/services/form-dialog.service' +import { DataModel } from 'src/app/services/patch-db/data-model' export interface WiFiForm { ssid: string @@ -31,6 +34,7 @@ export class WifiPage { countries = require('../../../util/countries.json') as { [key: string]: string } + readonly hasWifi$ = this.patch.watch$('serverInfo', 'wifi', 'interface') constructor( private readonly api: ApiService, @@ -41,6 +45,8 @@ export class WifiPage { private readonly errorService: ErrorService, private readonly actionCtrl: ActionSheetController, private readonly config: ConfigService, + private readonly patch: PatchDB, + readonly connection$: ConnectionService, @Inject(WINDOW) private readonly windowRef: Window, ) {}