Feature/cloud backups (#889)

* cifs for cloud backups on lan

* password spelling fix

* fix spelling and fix rpc method

* fix other methods

* remove old code and rename method

* add support for cifs backup targets

wip

cifs api

simplify idiom

add doc comment

wip

wip

should work™

* add password hash to server info

* fix type

* fix types for cifs

* minor fixes for cifs feature

* fix rpc structure

* fix copy, address some TODOs

* add subcommand

* backup path and navigation

* wizard edits

* rebased success page

* wiz conflicts resolved

* current change actually

* only unsub if done

* no fileter if necessary

* fix copy for cifs old password

* setup complete (#913)

* setup complete

* minor fixes

* setup.complete

* complete bool

* setup-wizard: complete boolean

Co-authored-by: Matt Hill <matthewonthemoon@gmail.com>
Co-authored-by: Drew Ansbacher <drew.ansbacher@spiredigital.com>
Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com>
This commit is contained in:
Aiden McClelland
2021-12-07 11:51:04 -07:00
parent 6ee0bf8636
commit e6fb74a800
140 changed files with 3968 additions and 2399 deletions

View File

@@ -3,7 +3,7 @@ import { AlertController, LoadingController, ModalController } from '@ionic/angu
import { SSHKey } from 'src/app/services/api/api.types'
import { ErrorToastService } from 'src/app/services/error-toast.service'
import { ApiService } from 'src/app/services/api/embassy-api.service'
import { GenericInputComponent } from 'src/app/modals/generic-input/generic-input.component'
import { GenericInputComponent, GenericInputOptions } from 'src/app/modals/generic-input/generic-input.component'
@Component({
selector: 'ssh-keys',
@@ -40,23 +40,37 @@ export class SSHKeysPage {
async presentModalAdd () {
const { name, description } = sshSpec
const options: GenericInputOptions = {
title: name,
message: description,
label: name,
submitFn: (pk: string) => this.add(pk),
}
const modal = await this.modalCtrl.create({
component: GenericInputComponent,
componentProps: {
title: name,
message: description,
label: name,
loadingText: 'Saving',
submitFn: (pk: string) => this.add(pk),
},
componentProps: { options },
cssClass: 'alertlike-modal',
})
await modal.present()
}
async add (pubkey: string): Promise<void> {
const key = await this.embassyApi.addSshKey({ key: pubkey })
this.sshKeys.push(key)
const loader = await this.loadingCtrl.create({
spinner: 'lines',
message: 'Saving...',
cssClass: 'loader',
})
await loader.present()
try {
const key = await this.embassyApi.addSshKey({ key: pubkey })
this.sshKeys.push(key)
} catch (e) {
throw new Error(e)
} finally {
loader.dismiss()
}
}
async presentAlertDelete (i: number) {