mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
cleaning up
This commit is contained in:
committed by
Aiden McClelland
parent
eb03d1ed04
commit
7aaeefc180
@@ -2,7 +2,7 @@ import { Component } from '@angular/core'
|
||||
import { isPlatform, LoadingController, ToastController } from '@ionic/angular'
|
||||
import { copyToClipboard } from 'src/app/util/web.util'
|
||||
import { ConfigService } from 'src/app/services/config.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy/embassy-api.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { PatchDbService } from 'src/app/services/patch-db/patch-db.service'
|
||||
import { Subscription } from 'rxjs'
|
||||
import { ErrorToastService } from 'src/app/services/error-toast.service'
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
</ion-item>
|
||||
|
||||
<ion-item-divider>Other Sessions</ion-item-divider>
|
||||
<div *ngFor="let session of sessionInfo.sessions | keyvalue : asIsOrder">
|
||||
<ion-item *ngIf="session.key !== sessionInfo.current">
|
||||
<div *ngFor="let session of sessionInfo.sessions | keyvalue : asIsOrder;">
|
||||
<ion-item
|
||||
[id]="session.key"
|
||||
*ngIf="session.key !== sessionInfo.current"
|
||||
>
|
||||
<ion-icon slot="start" [name]="getPlatformIcon(session.value.metadata.platforms)"></ion-icon>
|
||||
<ion-label class="ion-text-wrap">
|
||||
<h1>{{ getPlatformName(session.value.metadata.platforms) }}</h1>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
.hide {
|
||||
max-height: 0px !important;
|
||||
transition: max-height .5s ease-out;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { AlertController, LoadingController } from '@ionic/angular'
|
||||
import { ErrorToastService } from 'src/app/services/error-toast.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy/embassy-api.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { PlatformType, RR } from 'src/app/services/api/api.types'
|
||||
|
||||
@Component({
|
||||
@@ -30,7 +30,7 @@ export class SessionsPage {
|
||||
}
|
||||
}
|
||||
|
||||
async presentAlertKill (hash: string) {
|
||||
async presentAlertKill (id: string) {
|
||||
const alert = await this.alertCtrl.create({
|
||||
backdropDismiss: false,
|
||||
header: 'Caution',
|
||||
@@ -43,7 +43,7 @@ export class SessionsPage {
|
||||
{
|
||||
text: 'Kill',
|
||||
handler: () => {
|
||||
this.kill(hash)
|
||||
this.kill(id)
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -51,7 +51,7 @@ export class SessionsPage {
|
||||
await alert.present()
|
||||
}
|
||||
|
||||
async kill (hash: string): Promise<void> {
|
||||
async kill (id: string): Promise<void> {
|
||||
const loader = await this.loadingCtrl.create({
|
||||
spinner: 'lines',
|
||||
message: 'Killing session...',
|
||||
@@ -60,8 +60,8 @@ export class SessionsPage {
|
||||
await loader.present()
|
||||
|
||||
try {
|
||||
await this.embassyApi.killSessions({ hashes: [hash] })
|
||||
delete this.sessionInfo.sessions[hash]
|
||||
await this.embassyApi.killSessions({ ids: [id] })
|
||||
delete this.sessionInfo.sessions[id]
|
||||
} catch (e) {
|
||||
this.errToast.present(e)
|
||||
} finally {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core'
|
||||
import { BehaviorSubject } from 'rxjs'
|
||||
import { SSHKeys } from 'src/app/services/api/api.types'
|
||||
import { ApiService } from 'src/app/services/api/embassy/embassy-api.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { LoadingController, ModalController } from '@ionic/angular'
|
||||
import { ApiService } from 'src/app/services/api/embassy/embassy-api.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { BackupConfirmationComponent } from 'src/app/modals/backup-confirmation/backup-confirmation.component'
|
||||
import { DiskInfo } from 'src/app/services/api/api.types'
|
||||
import { ErrorToastService } from 'src/app/services/error-toast.service'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, ViewChild } from '@angular/core'
|
||||
import { ApiService } from 'src/app/services/api/embassy/embassy-api.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { IonContent } from '@ionic/angular'
|
||||
import { ErrorToastService } from 'src/app/services/error-toast.service'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, ViewChild } from '@angular/core'
|
||||
import { IonContent } from '@ionic/angular'
|
||||
import { Metrics } from 'src/app/services/api/api.types'
|
||||
import { ApiService } from 'src/app/services/api/embassy/embassy-api.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { ErrorToastService } from 'src/app/services/error-toast.service'
|
||||
import { pauseFor } from 'src/app/util/misc.util'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { AlertController, LoadingController, NavController } from '@ionic/angular'
|
||||
import { ApiService } from 'src/app/services/api/embassy/embassy-api.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { ActivatedRoute } from '@angular/router'
|
||||
import { ErrorToastService } from 'src/app/services/error-toast.service'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { LoadingController, NavController } from '@ionic/angular'
|
||||
import { ApiService } from 'src/app/services/api/embassy/embassy-api.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { WifiService } from '../wifi.service'
|
||||
import { ErrorToastService } from 'src/app/services/error-toast.service'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { ActionSheetController, LoadingController } from '@ionic/angular'
|
||||
import { ApiService } from 'src/app/services/api/embassy/embassy-api.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { ActionSheetButton } from '@ionic/core'
|
||||
import { WifiService } from './wifi.service'
|
||||
import { WiFiInfo } from 'src/app/services/patch-db/data-model'
|
||||
|
||||
Reference in New Issue
Block a user