mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
refactor: break ui up further down (#2292)
* refactor: break ui up further down * permit loading even when authed --------- Co-authored-by: Matt Hill <matthewonthemoon@gmail.com>
This commit is contained in:
committed by
Aiden McClelland
parent
7213d82f1b
commit
c3a52b3989
@@ -1,7 +1,14 @@
|
|||||||
import { Component, Input } from '@angular/core'
|
import { Component, Input } from '@angular/core'
|
||||||
import { ModalController } from '@ionic/angular'
|
import { ModalController } from '@ionic/angular'
|
||||||
import { defer, isObservable, Observable, of } from 'rxjs'
|
import {
|
||||||
import { catchError, ignoreElements, share } from 'rxjs/operators'
|
catchError,
|
||||||
|
ignoreElements,
|
||||||
|
share,
|
||||||
|
defer,
|
||||||
|
isObservable,
|
||||||
|
Observable,
|
||||||
|
of,
|
||||||
|
} from 'rxjs'
|
||||||
|
|
||||||
import { getErrorMessage } from '../../services/error-toast.service'
|
import { getErrorMessage } from '../../services/error-toast.service'
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ import {
|
|||||||
NgZone,
|
NgZone,
|
||||||
} from '@angular/core'
|
} from '@angular/core'
|
||||||
import { ResizeObserverService } from '@ng-web-apis/resize-observer'
|
import { ResizeObserverService } from '@ng-web-apis/resize-observer'
|
||||||
import { distinctUntilChanged, Observable } from 'rxjs'
|
import { distinctUntilChanged, map, Observable } from 'rxjs'
|
||||||
import { map } from 'rxjs/operators'
|
|
||||||
import { tuiZonefree } from '@taiga-ui/cdk'
|
import { tuiZonefree } from '@taiga-ui/cdk'
|
||||||
|
|
||||||
export type Step = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
export type Step = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { OperatorFunction } from 'rxjs'
|
import { map, OperatorFunction } from 'rxjs'
|
||||||
import { map } from 'rxjs/operators'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These utils are not used anywhere
|
* These utils are not used anywhere
|
||||||
|
|||||||
@@ -20,21 +20,19 @@ import {
|
|||||||
|
|
||||||
import { AppComponent } from './app.component'
|
import { AppComponent } from './app.component'
|
||||||
import { RoutingModule } from './routing.module'
|
import { RoutingModule } from './routing.module'
|
||||||
import { OSWelcomePageModule } from './modals/os-welcome/os-welcome.module'
|
import { OSWelcomePageModule } from './common/os-welcome/os-welcome.module'
|
||||||
import { GenericInputComponentModule } from './modals/generic-input/generic-input.component.module'
|
|
||||||
import { PreloaderModule } from './app/preloader/preloader.module'
|
import { PreloaderModule } from './app/preloader/preloader.module'
|
||||||
import { FooterModule } from './app/footer/footer.module'
|
import { FooterModule } from './app/footer/footer.module'
|
||||||
import { MenuModule } from './app/menu/menu.module'
|
import { MenuModule } from './app/menu/menu.module'
|
||||||
import { EnterModule } from './app/enter/enter.module'
|
import { EnterModule } from './app/enter/enter.module'
|
||||||
import { APP_PROVIDERS } from './app.providers'
|
import { APP_PROVIDERS } from './app.providers'
|
||||||
import { PatchDbModule } from './services/patch-db/patch-db.module'
|
import { PatchDbModule } from './services/patch-db/patch-db.module'
|
||||||
import { ToastContainerModule } from './components/toast-container/toast-container.module'
|
import { ToastContainerModule } from './common/toast-container/toast-container.module'
|
||||||
import { ConnectionBarComponentModule } from './components/connection-bar/connection-bar.component.module'
|
import { ConnectionBarComponentModule } from './app/connection-bar/connection-bar.component.module'
|
||||||
import { WidgetsPageModule } from 'src/app/apps/ui/pages/widgets/widgets.module'
|
import { WidgetsPageModule } from 'src/app/apps/ui/pages/widgets/widgets.module'
|
||||||
import { ServiceWorkerModule } from '@angular/service-worker'
|
import { ServiceWorkerModule } from '@angular/service-worker'
|
||||||
import { environment } from '../environments/environment'
|
import { environment } from '../environments/environment'
|
||||||
import { LoadingModule } from './modals/loading/loading.module'
|
import { LoadingModule } from './common/loading/loading.module'
|
||||||
import { FormPageModule } from './modals/form/form.module'
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppComponent],
|
declarations: [AppComponent],
|
||||||
@@ -51,7 +49,6 @@ import { FormPageModule } from './modals/form/form.module'
|
|||||||
EnterModule,
|
EnterModule,
|
||||||
OSWelcomePageModule,
|
OSWelcomePageModule,
|
||||||
MarkdownModule,
|
MarkdownModule,
|
||||||
GenericInputComponentModule,
|
|
||||||
MonacoEditorModule,
|
MonacoEditorModule,
|
||||||
SharedPipesModule,
|
SharedPipesModule,
|
||||||
PatchDbModule,
|
PatchDbModule,
|
||||||
@@ -73,7 +70,6 @@ import { FormPageModule } from './modals/form/form.module'
|
|||||||
registrationStrategy: 'registerWhenStable:30000',
|
registrationStrategy: 'registerWhenStable:30000',
|
||||||
}),
|
}),
|
||||||
LoadingModule,
|
LoadingModule,
|
||||||
FormPageModule,
|
|
||||||
],
|
],
|
||||||
providers: APP_PROVIDERS,
|
providers: APP_PROVIDERS,
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { ChangeDetectionStrategy, Component } from '@angular/core'
|
import { ChangeDetectionStrategy, Component } from '@angular/core'
|
||||||
import { heightCollapse } from 'src/app/util/animations'
|
|
||||||
import { PatchDB } from 'patch-db-client'
|
import { PatchDB } from 'patch-db-client'
|
||||||
import { map } from 'rxjs/operators'
|
import { map } from 'rxjs'
|
||||||
|
import { heightCollapse } from 'src/app/util/animations'
|
||||||
import { DataModel } from 'src/app/services/patch-db/data-model'
|
import { DataModel } from 'src/app/services/patch-db/data-model'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { RouterModule } from '@angular/router'
|
|||||||
import { IonicModule } from '@ionic/angular'
|
import { IonicModule } from '@ionic/angular'
|
||||||
import { MenuComponent } from './menu.component'
|
import { MenuComponent } from './menu.component'
|
||||||
import { SnekModule } from '../snek/snek.module'
|
import { SnekModule } from '../snek/snek.module'
|
||||||
import { ConnectionBarComponentModule } from 'src/app/components/connection-bar/connection-bar.component.module'
|
import { ConnectionBarComponentModule } from '../connection-bar/connection-bar.component.module'
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Component, HostListener, Input } from '@angular/core'
|
import { Component, HostListener, Input } from '@angular/core'
|
||||||
import { ModalController } from '@ionic/angular'
|
import { ModalController } from '@ionic/angular'
|
||||||
import { pauseFor } from '@start9labs/shared'
|
import { pauseFor } from '../../../../../shared/src/public-api'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'snake',
|
selector: 'snake',
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Directive, HostListener, Input } from '@angular/core'
|
import { Directive, HostListener, Input } from '@angular/core'
|
||||||
import { LoadingController, ModalController } from '@ionic/angular'
|
import { LoadingController, ModalController } from '@ionic/angular'
|
||||||
import { ErrorToastService } from '@start9labs/shared'
|
import { ErrorToastService } from '@start9labs/shared'
|
||||||
import { SnakePage } from 'src/app/modals/snake/snake.page'
|
|
||||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||||
|
import { SnakePage } from './snake.page'
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: 'img[appSnek]',
|
selector: 'img[appSnek]',
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import { NgModule } from '@angular/core'
|
import { NgModule } from '@angular/core'
|
||||||
|
import { CommonModule } from '@angular/common'
|
||||||
|
import { IonicModule } from '@ionic/angular'
|
||||||
|
|
||||||
import { SnakePageModule } from 'src/app/modals/snake/snake.module'
|
|
||||||
import { SnekDirective } from './snek.directive'
|
import { SnekDirective } from './snek.directive'
|
||||||
|
import { SnakePage } from './snake.page'
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [SnakePageModule],
|
imports: [CommonModule, IonicModule],
|
||||||
declarations: [SnekDirective],
|
declarations: [SnekDirective, SnakePage],
|
||||||
exports: [SnekDirective],
|
exports: [SnekDirective, SnakePage],
|
||||||
})
|
})
|
||||||
export class SnekModule {}
|
export class SnekModule {}
|
||||||
|
|||||||
@@ -5,10 +5,7 @@ import { BackupReportPage } from './backup-report.page'
|
|||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [BackupReportPage],
|
declarations: [BackupReportPage],
|
||||||
imports: [
|
imports: [CommonModule, IonicModule],
|
||||||
CommonModule,
|
|
||||||
IonicModule,
|
|
||||||
],
|
|
||||||
exports: [BackupReportPage],
|
exports: [BackupReportPage],
|
||||||
})
|
})
|
||||||
export class BackupReportPageModule { }
|
export class BackupReportPageModule {}
|
||||||
@@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<ion-item-group>
|
<ion-item-group>
|
||||||
<ion-item-divider
|
<ion-item-divider>
|
||||||
>Completed: {{ timestamp | date : 'medium' }}</ion-item-divider
|
Completed: {{ timestamp | date : 'medium' }}
|
||||||
>
|
</ion-item-divider>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<h2>System data</h2>
|
<h2>System data</h2>
|
||||||
@@ -29,10 +29,9 @@
|
|||||||
<ion-label>
|
<ion-label>
|
||||||
<h2>{{ pkg.key }}</h2>
|
<h2>{{ pkg.key }}</h2>
|
||||||
<p>
|
<p>
|
||||||
<ion-text [color]="pkg.value.error ? 'danger' : 'success'"
|
<ion-text [color]="pkg.value.error ? 'danger' : 'success'">
|
||||||
>{{ pkg.value.error ? 'Failed: ' + pkg.value.error : 'Succeeded'
|
{{ pkg.value.error ? 'Failed: ' + pkg.value.error : 'Succeeded' }}
|
||||||
}}</ion-text
|
</ion-text>
|
||||||
>
|
|
||||||
</p>
|
</p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-icon
|
<ion-icon
|
||||||
@@ -5,7 +5,6 @@ import { BackupReport } from 'src/app/services/api/api.types'
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'backup-report',
|
selector: 'backup-report',
|
||||||
templateUrl: './backup-report.page.html',
|
templateUrl: './backup-report.page.html',
|
||||||
styleUrls: ['./backup-report.page.scss'],
|
|
||||||
})
|
})
|
||||||
export class BackupReportPage {
|
export class BackupReportPage {
|
||||||
@Input() report!: BackupReport
|
@Input() report!: BackupReport
|
||||||
@@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common'
|
|||||||
import { ReactiveFormsModule } from '@angular/forms'
|
import { ReactiveFormsModule } from '@angular/forms'
|
||||||
import { TuiValueChangesModule } from '@taiga-ui/cdk'
|
import { TuiValueChangesModule } from '@taiga-ui/cdk'
|
||||||
import { TuiButtonModule, TuiModeModule } from '@taiga-ui/core'
|
import { TuiButtonModule, TuiModeModule } from '@taiga-ui/core'
|
||||||
import { FormModule } from 'src/app/components/form/form.module'
|
import { FormModule } from 'src/app/common/form/form.module'
|
||||||
import { FormPage } from './form.page'
|
import { FormPage } from './form.page'
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@@ -5,15 +5,15 @@ import {
|
|||||||
Input,
|
Input,
|
||||||
OnInit,
|
OnInit,
|
||||||
} from '@angular/core'
|
} from '@angular/core'
|
||||||
import { FormService } from 'src/app/services/form.service'
|
|
||||||
import { InputSpec } from '@start9labs/start-sdk/lib/config/configTypes'
|
import { InputSpec } from '@start9labs/start-sdk/lib/config/configTypes'
|
||||||
import { POLYMORPHEUS_CONTEXT } from '@tinkoff/ng-polymorpheus'
|
import { POLYMORPHEUS_CONTEXT } from '@tinkoff/ng-polymorpheus'
|
||||||
import { TuiDialogContext } from '@taiga-ui/core'
|
import { TuiDialogContext } from '@taiga-ui/core'
|
||||||
import { tuiMarkControlAsTouchedAndValidate } from '@taiga-ui/cdk'
|
import { tuiMarkControlAsTouchedAndValidate } from '@taiga-ui/cdk'
|
||||||
import { InvalidService } from '../../components/form/invalid.service'
|
|
||||||
import { TuiDialogFormService } from '@taiga-ui/kit'
|
import { TuiDialogFormService } from '@taiga-ui/kit'
|
||||||
import { FormGroup } from '@angular/forms'
|
import { FormGroup } from '@angular/forms'
|
||||||
import { compare, Operation } from 'fast-json-patch'
|
import { compare, Operation } from 'fast-json-patch'
|
||||||
|
import { InvalidService } from 'src/app/common/form/invalid.service'
|
||||||
|
import { FormService } from 'src/app/services/form.service'
|
||||||
|
|
||||||
export interface ActionButton<T> {
|
export interface ActionButton<T> {
|
||||||
text: string
|
text: string
|
||||||
@@ -1,13 +1,11 @@
|
|||||||
import { Component, inject, Input, ViewChild } from '@angular/core'
|
import { Component, inject, Input, ViewChild } from '@angular/core'
|
||||||
import { ModalController, IonicSafeString, IonInput } from '@ionic/angular'
|
import { ModalController, IonicSafeString, IonInput } from '@ionic/angular'
|
||||||
import { getErrorMessage, THEME } from '@start9labs/shared'
|
import { getErrorMessage, THEME } from '@start9labs/shared'
|
||||||
import { MaskPipe } from 'src/app/pipes/mask/mask.pipe'
|
import { mask } from 'src/app/util/mask'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'generic-input',
|
selector: 'generic-input',
|
||||||
templateUrl: './generic-input.component.html',
|
templateUrl: './generic-input.component.html',
|
||||||
styleUrls: ['./generic-input.component.scss'],
|
|
||||||
providers: [MaskPipe],
|
|
||||||
})
|
})
|
||||||
export class GenericInputComponent {
|
export class GenericInputComponent {
|
||||||
@ViewChild('mainInput') elem?: IonInput
|
@ViewChild('mainInput') elem?: IonInput
|
||||||
@@ -23,10 +21,7 @@ export class GenericInputComponent {
|
|||||||
|
|
||||||
readonly theme$ = inject(THEME)
|
readonly theme$ = inject(THEME)
|
||||||
|
|
||||||
constructor(
|
constructor(private readonly modalCtrl: ModalController) {}
|
||||||
private readonly modalCtrl: ModalController,
|
|
||||||
private readonly mask: MaskPipe,
|
|
||||||
) {}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
const defaultOptions: Partial<GenericInputOptions> = {
|
const defaultOptions: Partial<GenericInputOptions> = {
|
||||||
@@ -62,7 +57,7 @@ export class GenericInputComponent {
|
|||||||
.split('')
|
.split('')
|
||||||
.map(x => (x === '●' ? this.value[i++] : x))
|
.map(x => (x === '●' ? this.value[i++] : x))
|
||||||
.join('')
|
.join('')
|
||||||
this.maskedValue = this.mask.transform(this.value)
|
this.maskedValue = mask(this.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
p {
|
|
||||||
font-family: 'Courier New';
|
|
||||||
}
|
|
||||||
@@ -34,4 +34,4 @@ const routes: Routes = [
|
|||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes)],
|
||||||
exports: [RouterModule],
|
exports: [RouterModule],
|
||||||
})
|
})
|
||||||
export class BackupsRoutingModule {}
|
export class BackupsModule {}
|
||||||
@@ -5,12 +5,11 @@ import {
|
|||||||
PipeTransform,
|
PipeTransform,
|
||||||
} from '@angular/core'
|
} from '@angular/core'
|
||||||
import { PatchDB } from 'patch-db-client'
|
import { PatchDB } from 'patch-db-client'
|
||||||
import { take } from 'rxjs/operators'
|
import { take, Observable } from 'rxjs'
|
||||||
import {
|
import {
|
||||||
DataModel,
|
DataModel,
|
||||||
PackageMainStatus,
|
PackageMainStatus,
|
||||||
} from 'src/app/services/patch-db/data-model'
|
} from 'src/app/services/patch-db/data-model'
|
||||||
import { Observable } from 'rxjs'
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'backing-up',
|
selector: 'backing-up',
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
import { Directive, HostListener } from '@angular/core'
|
import { Directive, HostListener } from '@angular/core'
|
||||||
import { LoadingController, ModalController } from '@ionic/angular'
|
import { LoadingController, ModalController } from '@ionic/angular'
|
||||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||||
import { BackupSelectPage } from 'src/app/apps/ui/pages/backups-routes/modals/backup-select/backup-select.page'
|
|
||||||
import { TargetSelectPage } from '../modals/target-select/target-select.page'
|
import { TargetSelectPage } from '../modals/target-select/target-select.page'
|
||||||
import {
|
import {
|
||||||
CifsBackupTarget,
|
CifsBackupTarget,
|
||||||
DiskBackupTarget,
|
DiskBackupTarget,
|
||||||
} from 'src/app/services/api/api.types'
|
} from 'src/app/services/api/api.types'
|
||||||
|
import { BackupSelectPage } from '../modals/backup-select/backup-select.page'
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[backupCreate]',
|
selector: '[backupCreate]',
|
||||||
@@ -8,11 +8,11 @@ import { ApiService } from 'src/app/services/api/embassy-api.service'
|
|||||||
import {
|
import {
|
||||||
GenericInputComponent,
|
GenericInputComponent,
|
||||||
GenericInputOptions,
|
GenericInputOptions,
|
||||||
} from 'src/app/modals/generic-input/generic-input.component'
|
} from 'src/app/apps/ui/modals/generic-input/generic-input.component'
|
||||||
import { BackupInfo, BackupTarget } from 'src/app/services/api/api.types'
|
import { BackupInfo, BackupTarget } from 'src/app/services/api/api.types'
|
||||||
import { RecoverSelectPage } from 'src/app/apps/ui/pages/backups-routes/modals/recover-select/recover-select.page'
|
|
||||||
import * as argon2 from '@start9labs/argon2'
|
import * as argon2 from '@start9labs/argon2'
|
||||||
import { TargetSelectPage } from '../modals/target-select/target-select.page'
|
import { TargetSelectPage } from '../modals/target-select/target-select.page'
|
||||||
|
import { RecoverSelectPage } from '../modals/recover-select/recover-select.page'
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[backupRestore]',
|
selector: '[backupRestore]',
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
import { Component, Input } from '@angular/core'
|
import { Component, Input } from '@angular/core'
|
||||||
import { ModalController } from '@ionic/angular'
|
import { ModalController } from '@ionic/angular'
|
||||||
import { map } from 'rxjs/operators'
|
|
||||||
import { DataModel, PackageState } from 'src/app/services/patch-db/data-model'
|
|
||||||
import { PatchDB } from 'patch-db-client'
|
import { PatchDB } from 'patch-db-client'
|
||||||
import { firstValueFrom } from 'rxjs'
|
import { firstValueFrom, map } from 'rxjs'
|
||||||
|
import { DataModel, PackageState } from 'src/app/services/patch-db/data-model'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'backup-select',
|
selector: 'backup-select',
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
import { Pipe, PipeTransform } from '@angular/core'
|
import { Pipe, PipeTransform } from '@angular/core'
|
||||||
import { Emver } from '@start9labs/shared'
|
import { Emver } from '@start9labs/shared'
|
||||||
|
import { map, Observable } from 'rxjs'
|
||||||
import { PackageBackupInfo } from 'src/app/services/api/api.types'
|
import { PackageBackupInfo } from 'src/app/services/api/api.types'
|
||||||
import { ConfigService } from 'src/app/services/config.service'
|
import { ConfigService } from 'src/app/services/config.service'
|
||||||
import { PackageDataEntry } from 'src/app/services/patch-db/data-model'
|
import { PackageDataEntry } from 'src/app/services/patch-db/data-model'
|
||||||
import { Observable } from 'rxjs'
|
|
||||||
import { map } from 'rxjs/operators'
|
|
||||||
|
|
||||||
export interface AppRecoverOption extends PackageBackupInfo {
|
export interface AppRecoverOption extends PackageBackupInfo {
|
||||||
id: string
|
id: string
|
||||||
@@ -8,6 +8,7 @@ import {
|
|||||||
HasErrorPipe,
|
HasErrorPipe,
|
||||||
} from './backup-history.page'
|
} from './backup-history.page'
|
||||||
import { TargetPipesModule } from '../../pipes/target-pipes.module'
|
import { TargetPipesModule } from '../../pipes/target-pipes.module'
|
||||||
|
import { BackupReportPageModule } from 'src/app/apps/ui/modals/backup-report/backup-report.module'
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
@@ -17,12 +18,13 @@ const routes: Routes = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [BackupHistoryPage, DurationPipe, HasErrorPipe],
|
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
IonicModule,
|
IonicModule,
|
||||||
RouterModule.forChild(routes),
|
|
||||||
TargetPipesModule,
|
TargetPipesModule,
|
||||||
|
BackupReportPageModule,
|
||||||
|
RouterModule.forChild(routes),
|
||||||
],
|
],
|
||||||
|
declarations: [BackupHistoryPage, DurationPipe, HasErrorPipe],
|
||||||
})
|
})
|
||||||
export class BackupHistoryPageModule {}
|
export class BackupHistoryPageModule {}
|
||||||
@@ -5,7 +5,7 @@ import { LoadingController, ModalController } from '@ionic/angular'
|
|||||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||||
import { ErrorToastService } from '@start9labs/shared'
|
import { ErrorToastService } from '@start9labs/shared'
|
||||||
import { BehaviorSubject } from 'rxjs'
|
import { BehaviorSubject } from 'rxjs'
|
||||||
import { BackupReportPage } from 'src/app/modals/backup-report/backup-report.page'
|
import { BackupReportPage } from 'src/app/apps/ui/modals/backup-report/backup-report.page'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'backup-history',
|
selector: 'backup-history',
|
||||||
@@ -2,9 +2,10 @@ import { NgModule } from '@angular/core'
|
|||||||
import { RouterModule, Routes } from '@angular/router'
|
import { RouterModule, Routes } from '@angular/router'
|
||||||
import { CommonModule } from '@angular/common'
|
import { CommonModule } from '@angular/common'
|
||||||
import { IonicModule } from '@ionic/angular'
|
import { IonicModule } from '@ionic/angular'
|
||||||
import { BackupTargetsPage } from './backup-targets.page'
|
|
||||||
import { SkeletonListComponentModule } from 'src/app/components/skeleton-list/skeleton-list.component.module'
|
|
||||||
import { UnitConversionPipesModule } from '@start9labs/shared'
|
import { UnitConversionPipesModule } from '@start9labs/shared'
|
||||||
|
import { SkeletonListComponentModule } from 'src/app/common/skeleton-list/skeleton-list.component.module'
|
||||||
|
import { FormPageModule } from 'src/app/apps/ui/modals/form/form.module'
|
||||||
|
import { BackupTargetsPage } from './backup-targets.page'
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
@@ -18,9 +19,10 @@ const routes: Routes = [
|
|||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
IonicModule,
|
IonicModule,
|
||||||
RouterModule.forChild(routes),
|
|
||||||
SkeletonListComponentModule,
|
SkeletonListComponentModule,
|
||||||
UnitConversionPipesModule,
|
UnitConversionPipesModule,
|
||||||
|
FormPageModule,
|
||||||
|
RouterModule.forChild(routes),
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class BackupTargetsPageModule {}
|
export class BackupTargetsPageModule {}
|
||||||
@@ -15,17 +15,17 @@ import {
|
|||||||
} from '../../types/target-types'
|
} from '../../types/target-types'
|
||||||
import { BehaviorSubject, filter } from 'rxjs'
|
import { BehaviorSubject, filter } from 'rxjs'
|
||||||
import { TuiDialogService } from '@taiga-ui/core'
|
import { TuiDialogService } from '@taiga-ui/core'
|
||||||
import { ErrorService } from '@start9labs/shared'
|
|
||||||
import { FormDialogService } from 'src/app/services/form-dialog.service'
|
|
||||||
import { FormPage } from 'src/app/modals/form/form.page'
|
|
||||||
import { LoadingService } from 'src/app/modals/loading/loading.service'
|
|
||||||
import { TUI_PROMPT } from '@taiga-ui/kit'
|
import { TUI_PROMPT } from '@taiga-ui/kit'
|
||||||
import { configBuilderToSpec } from 'src/app/util/configBuilderToSpec'
|
import { ErrorService } from '@start9labs/shared'
|
||||||
import {
|
import {
|
||||||
InputSpec,
|
InputSpec,
|
||||||
unionSelectKey,
|
unionSelectKey,
|
||||||
unionValueKey,
|
unionValueKey,
|
||||||
} from '@start9labs/start-sdk/lib/config/configTypes'
|
} from '@start9labs/start-sdk/lib/config/configTypes'
|
||||||
|
import { FormDialogService } from 'src/app/services/form-dialog.service'
|
||||||
|
import { FormPage } from 'src/app/apps/ui/modals/form/form.page'
|
||||||
|
import { LoadingService } from 'src/app/common/loading/loading.service'
|
||||||
|
import { configBuilderToSpec } from 'src/app/util/configBuilderToSpec'
|
||||||
|
|
||||||
type BackupConfig =
|
type BackupConfig =
|
||||||
| {
|
| {
|
||||||
@@ -2,7 +2,9 @@ import { NgModule } from '@angular/core'
|
|||||||
import { RouterModule, Routes } from '@angular/router'
|
import { RouterModule, Routes } from '@angular/router'
|
||||||
import { CommonModule } from '@angular/common'
|
import { CommonModule } from '@angular/common'
|
||||||
import { IonicModule } from '@ionic/angular'
|
import { IonicModule } from '@ionic/angular'
|
||||||
import { BackupsPage } from './backups.page'
|
import { BadgeMenuComponentModule } from 'src/app/common/badge-menu-button/badge-menu.component.module'
|
||||||
|
import { InsecureWarningComponentModule } from 'src/app/common/insecure-warning/insecure-warning.module'
|
||||||
|
import { GenericInputComponentModule } from 'src/app/apps/ui/modals/generic-input/generic-input.component.module'
|
||||||
import { BackupCreateDirective } from '../../directives/backup-create.directive'
|
import { BackupCreateDirective } from '../../directives/backup-create.directive'
|
||||||
import { BackupRestoreDirective } from '../../directives/backup-restore.directive'
|
import { BackupRestoreDirective } from '../../directives/backup-restore.directive'
|
||||||
import {
|
import {
|
||||||
@@ -11,9 +13,8 @@ import {
|
|||||||
} from '../../components/backing-up/backing-up.component'
|
} from '../../components/backing-up/backing-up.component'
|
||||||
import { BackupSelectPageModule } from '../../modals/backup-select/backup-select.module'
|
import { BackupSelectPageModule } from '../../modals/backup-select/backup-select.module'
|
||||||
import { RecoverSelectPageModule } from '../../modals/recover-select/recover-select.module'
|
import { RecoverSelectPageModule } from '../../modals/recover-select/recover-select.module'
|
||||||
import { BadgeMenuComponentModule } from 'src/app/components/badge-menu-button/badge-menu.component.module'
|
|
||||||
import { InsecureWarningComponentModule } from 'src/app/components/insecure-warning/insecure-warning.module'
|
|
||||||
import { TargetPipesModule } from '../../pipes/target-pipes.module'
|
import { TargetPipesModule } from '../../pipes/target-pipes.module'
|
||||||
|
import { BackupsPage } from './backups.page'
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
@@ -32,6 +33,7 @@ const routes: Routes = [
|
|||||||
BadgeMenuComponentModule,
|
BadgeMenuComponentModule,
|
||||||
InsecureWarningComponentModule,
|
InsecureWarningComponentModule,
|
||||||
TargetPipesModule,
|
TargetPipesModule,
|
||||||
|
GenericInputComponentModule,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
BackupsPage,
|
BackupsPage,
|
||||||
@@ -3,8 +3,8 @@ import { CommonModule } from '@angular/common'
|
|||||||
import { IonicModule } from '@ionic/angular'
|
import { IonicModule } from '@ionic/angular'
|
||||||
import { RouterModule, Routes } from '@angular/router'
|
import { RouterModule, Routes } from '@angular/router'
|
||||||
import { HomePage } from './home.page'
|
import { HomePage } from './home.page'
|
||||||
import { BadgeMenuComponentModule } from 'src/app/components/badge-menu-button/badge-menu.component.module'
|
import { BadgeMenuComponentModule } from 'src/app/common/badge-menu-button/badge-menu.component.module'
|
||||||
import { WidgetListComponentModule } from 'src/app/components/widget-list/widget-list.component.module'
|
import { WidgetListComponentModule } from 'src/app/common/widget-list/widget-list.component.module'
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ import {
|
|||||||
SearchModule,
|
SearchModule,
|
||||||
SkeletonModule,
|
SkeletonModule,
|
||||||
} from '@start9labs/marketplace'
|
} from '@start9labs/marketplace'
|
||||||
import { BadgeMenuComponentModule } from 'src/app/components/badge-menu-button/badge-menu.component.module'
|
import { BadgeMenuComponentModule } from 'src/app/common/badge-menu-button/badge-menu.component.module'
|
||||||
|
import { StoreIconComponentModule } from 'src/app/common/store-icon/store-icon.component.module'
|
||||||
import { MarketplaceStatusModule } from '../marketplace-status/marketplace-status.module'
|
import { MarketplaceStatusModule } from '../marketplace-status/marketplace-status.module'
|
||||||
import { MarketplaceListPage } from './marketplace-list.page'
|
import { MarketplaceListPage } from './marketplace-list.page'
|
||||||
import { MarketplaceSettingsPageModule } from 'src/app/modals/marketplace-settings/marketplace-settings.module'
|
import { MarketplaceSettingsPageModule } from './marketplace-settings/marketplace-settings.module'
|
||||||
import { StoreIconComponentModule } from 'src/app/components/store-icon/store-icon.component.module'
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@ import { TuiDialogService } from '@taiga-ui/core'
|
|||||||
import { PolymorpheusComponent } from '@tinkoff/ng-polymorpheus'
|
import { PolymorpheusComponent } from '@tinkoff/ng-polymorpheus'
|
||||||
import { PatchDB } from 'patch-db-client'
|
import { PatchDB } from 'patch-db-client'
|
||||||
import { map } from 'rxjs'
|
import { map } from 'rxjs'
|
||||||
import { MarketplaceSettingsPage } from 'src/app/modals/marketplace-settings/marketplace-settings.page'
|
import { MarketplaceSettingsPage } from './marketplace-settings/marketplace-settings.page'
|
||||||
import { ConfigService } from 'src/app/services/config.service'
|
import { ConfigService } from 'src/app/services/config.service'
|
||||||
import { MarketplaceService } from 'src/app/services/marketplace.service'
|
import { MarketplaceService } from 'src/app/services/marketplace.service'
|
||||||
import { DataModel } from 'src/app/services/patch-db/data-model'
|
import { DataModel } from 'src/app/services/patch-db/data-model'
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
import { NgModule } from '@angular/core'
|
import { NgModule } from '@angular/core'
|
||||||
import { CommonModule } from '@angular/common'
|
import { CommonModule } from '@angular/common'
|
||||||
import { IonicModule } from '@ionic/angular'
|
import { IonicModule } from '@ionic/angular'
|
||||||
import { MarketplaceSettingsPage } from './marketplace-settings.page'
|
|
||||||
import { SharedPipesModule } from '@start9labs/shared'
|
import { SharedPipesModule } from '@start9labs/shared'
|
||||||
import { StoreIconComponentModule } from 'src/app/components/store-icon/store-icon.component.module'
|
|
||||||
import {
|
import {
|
||||||
TuiDataListModule,
|
TuiDataListModule,
|
||||||
TuiHostedDropdownModule,
|
TuiHostedDropdownModule,
|
||||||
TuiSvgModule,
|
TuiSvgModule,
|
||||||
} from '@taiga-ui/core'
|
} from '@taiga-ui/core'
|
||||||
|
import { StoreIconComponentModule } from 'src/app/common/store-icon/store-icon.component.module'
|
||||||
|
import { FormPageModule } from 'src/app/apps/ui/modals/form/form.module'
|
||||||
|
import { MarketplaceSettingsPage } from './marketplace-settings.page'
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -19,6 +20,7 @@ import {
|
|||||||
TuiHostedDropdownModule,
|
TuiHostedDropdownModule,
|
||||||
TuiDataListModule,
|
TuiDataListModule,
|
||||||
TuiSvgModule,
|
TuiSvgModule,
|
||||||
|
FormPageModule,
|
||||||
],
|
],
|
||||||
declarations: [MarketplaceSettingsPage],
|
declarations: [MarketplaceSettingsPage],
|
||||||
})
|
})
|
||||||
@@ -1,18 +1,17 @@
|
|||||||
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'
|
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'
|
||||||
import { ErrorService, sameUrl, toUrl } from '@start9labs/shared'
|
import { ErrorService, sameUrl, toUrl } from '@start9labs/shared'
|
||||||
import { AbstractMarketplaceService } from '@start9labs/marketplace'
|
import { AbstractMarketplaceService } from '@start9labs/marketplace'
|
||||||
import { TuiDialogService } from '@taiga-ui/core'
|
|
||||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
|
||||||
import { ValueSpecObject } from '@start9labs/start-sdk/lib/config/configTypes'
|
import { ValueSpecObject } from '@start9labs/start-sdk/lib/config/configTypes'
|
||||||
|
import { TuiDialogService } from '@taiga-ui/core'
|
||||||
|
import { TUI_PROMPT } from '@taiga-ui/kit'
|
||||||
import { PatchDB } from 'patch-db-client'
|
import { PatchDB } from 'patch-db-client'
|
||||||
|
import { combineLatest, filter, firstValueFrom, map, Subscription } from 'rxjs'
|
||||||
|
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||||
import { DataModel, UIStore } from 'src/app/services/patch-db/data-model'
|
import { DataModel, UIStore } from 'src/app/services/patch-db/data-model'
|
||||||
import { MarketplaceService } from 'src/app/services/marketplace.service'
|
import { MarketplaceService } from 'src/app/services/marketplace.service'
|
||||||
import { map } from 'rxjs/operators'
|
|
||||||
import { combineLatest, filter, firstValueFrom, Subscription } from 'rxjs'
|
|
||||||
import { FormDialogService } from 'src/app/services/form-dialog.service'
|
import { FormDialogService } from 'src/app/services/form-dialog.service'
|
||||||
import { FormPage } from '../form/form.page'
|
import { FormPage } from 'src/app/apps/ui/modals/form/form.page'
|
||||||
import { LoadingService } from '../loading/loading.service'
|
import { LoadingService } from 'src/app/common/loading/loading.service'
|
||||||
import { TUI_PROMPT } from '@taiga-ui/kit'
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'marketplace-settings',
|
selector: 'marketplace-settings',
|
||||||
@@ -3,8 +3,7 @@ import { ActivatedRoute } from '@angular/router'
|
|||||||
import { getPkgId } from '@start9labs/shared'
|
import { getPkgId } from '@start9labs/shared'
|
||||||
import { AbstractMarketplaceService } from '@start9labs/marketplace'
|
import { AbstractMarketplaceService } from '@start9labs/marketplace'
|
||||||
import { PatchDB } from 'patch-db-client'
|
import { PatchDB } from 'patch-db-client'
|
||||||
import { BehaviorSubject } from 'rxjs'
|
import { filter, shareReplay, switchMap, BehaviorSubject } from 'rxjs'
|
||||||
import { filter, shareReplay, switchMap } from 'rxjs/operators'
|
|
||||||
import { DataModel } from 'src/app/services/patch-db/data-model'
|
import { DataModel } from 'src/app/services/patch-db/data-model'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user