remove refreshLAN feature

This commit is contained in:
Matt Hill
2021-08-19 15:48:09 -06:00
committed by Aiden McClelland
parent 2475c08648
commit 038a7263f3
6 changed files with 0 additions and 77 deletions

View File

@@ -31,15 +31,6 @@
<p>Download and trust your Embassy's Root Certificate Authority to establish a secure connection on the LAN.</p>
</ion-label>
</ion-item>
<!-- Refresh Network -->
<ion-item button (click)="refreshLAN()" detail="false">
<ion-icon slot="start" name="refresh-outline" size="large"></ion-icon>
<ion-label>
<h1>Refresh LAN</h1>
<p>If you are having issues connecting to your Embassy over LAN, try refreshing your LAN services by clicking the button below.</p>
</ion-label>
</ion-item>
</ion-item-group>
<!-- hidden element for downloading cert -->

View File

@@ -1,8 +1,5 @@
import { Component } from '@angular/core'
import { LoadingController, ToastController } from '@ionic/angular'
import { ConfigService } from 'src/app/services/config.service'
import { ApiService } from 'src/app/services/api/embassy-api.service'
import { ErrorToastService } from 'src/app/services/error-toast.service'
@Component({
selector: 'lan',
@@ -14,11 +11,7 @@ export class LANPage {
lanDisabled: string
constructor (
private readonly toastCtrl: ToastController,
private readonly config: ConfigService,
private readonly loadingCtrl: LoadingController,
private readonly errToast: ErrorToastService,
private readonly embassyApi: ApiService,
) { }
ngOnInit () {
@@ -30,43 +23,4 @@ export class LANPage {
installCert (): void {
document.getElementById('install-cert').click()
}
async refreshLAN (): Promise<void> {
const loader = await this.loadingCtrl.create({
spinner: 'lines',
message: 'Refreshing LAN...',
cssClass: 'loader',
})
await loader.present()
try {
await this.embassyApi.refreshLan({ })
this.presentToastSuccess()
} catch (e) {
this.errToast.present(e)
} finally {
loader.dismiss()
}
}
private async presentToastSuccess (): Promise<void> {
const toast = await this.toastCtrl.create({
header: 'Success',
message: `LAN refreshed.`,
position: 'bottom',
duration: 3000,
buttons: [
{
side: 'start',
icon: 'close',
handler: () => {
return true
},
},
],
cssClass: 'success-toast',
})
await toast.present()
}
}

View File

@@ -42,11 +42,6 @@ export module RR {
export type ShutdownServerReq = { } // server.shutdown
export type ShutdownServerRes = null
// network
export type RefreshLanReq = { } // network.lan.refresh
export type RefreshLanRes = null
// sessions
export type GetSessionsReq = { } // sessions.list

View File

@@ -59,10 +59,6 @@ export abstract class ApiService implements Source<DataModel>, Http<DataModel> {
abstract shutdownServer (params: RR.ShutdownServerReq): Promise<RR.ShutdownServerRes>
// network
abstract refreshLan (params: RR.RefreshLanReq): Promise<RR.RefreshLanRes>
// marketplace URLs
abstract getEos (params: RR.GetMarketplaceEOSReq): Promise<RR.GetMarketplaceEOSRes>

View File

@@ -77,12 +77,6 @@ export class LiveApiService extends ApiService {
return this.http.rpcRequest({ method: 'server.shutdown', params })
}
// network
async refreshLan (params: RR.RefreshLanReq): Promise<RR.RefreshLanRes> {
return this.http.rpcRequest({ method: 'network.lan.refresh', params })
}
// marketplace URLs
async getEos (params: RR.GetMarketplaceEOSReq): Promise<RR.GetMarketplaceEOSRes> {

View File

@@ -136,13 +136,6 @@ export class MockApiService extends ApiService {
return null
}
// network
async refreshLan (params: RR.RefreshLanReq): Promise<RR.RefreshLanRes> {
await pauseFor(2000)
return null
}
// marketplace URLs
async getEos (params: RR.GetMarketplaceEOSReq): Promise<RR.GetMarketplaceEOSRes> {