diff --git a/frontend/README.md b/frontend/README.md index fcee5d680..f41ad89fb 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -63,7 +63,7 @@ This section enables you to run a local frontend with a remote backend (eg. host 2. Create a proxy configuration file from the sample: ```sh -cp proxy.conf.json.sample proxy.conf.json +cp proxy.conf-sample.json proxy.conf.json ``` 3. Change the target address to desired IP address in `proxy.conf.json` diff --git a/frontend/projects/marketplace/src/pages/show/package/package.component.html b/frontend/projects/marketplace/src/pages/show/package/package.component.html index 2bbaab1ed..b0557b89a 100644 --- a/frontend/projects/marketplace/src/pages/show/package/package.component.html +++ b/frontend/projects/marketplace/src/pages/show/package/package.component.html @@ -1,22 +1,12 @@ - - - -
- -
-

{{ pkg.manifest.title }}

-

{{ pkg.manifest.version | displayEmver }}

- -
-
-
- - - -
- -
+
+ +
+

{{ pkg.manifest.title }}

+

{{ pkg.manifest.version | displayEmver }}

+ +
+
diff --git a/frontend/projects/marketplace/src/pages/show/package/package.component.scss b/frontend/projects/marketplace/src/pages/show/package/package.component.scss index 8a5e41408..cca766e55 100644 --- a/frontend/projects/marketplace/src/pages/show/package/package.component.scss +++ b/frontend/projects/marketplace/src/pages/show/package/package.component.scss @@ -1,25 +1,38 @@ .header { - padding: 2%; -} - -.logo { - min-width: 15%; - max-width: 18%; + padding: 16px; } .text { - margin-left: 5%; display: inline-block; vertical-align: top; } +.logo { + width: 80px; + margin-right: 16px; +} + .title { margin: 0 0 0 -2px; - font-size: calc(20px + 3vw); + font-size: 36px; } .version { padding: 4px 0 12px 0; margin: 0; - font-size: calc(10px + 1vw); + font-size: 18px; +} + +@media (min-width: 1000px) { + .logo { + width: 140px; + } + + .title { + font-size: 64px; + } + + .version { + font-size: 32px; + } } diff --git a/frontend/projects/ui/src/app/components/status/status.component.html b/frontend/projects/ui/src/app/components/status/status.component.html index 53bc8ef14..2f42db493 100644 --- a/frontend/projects/ui/src/app/components/status/status.component.html +++ b/frontend/projects/ui/src/app/components/status/status.component.html @@ -18,13 +18,12 @@ > - + Installing - {{ installProgress }}% - - - Finalizing install. This could take a minute - - + {{ progress }} +

diff --git a/frontend/projects/ui/src/app/components/status/status.component.module.ts b/frontend/projects/ui/src/app/components/status/status.component.module.ts index 349e5e1fb..ea093b8e9 100644 --- a/frontend/projects/ui/src/app/components/status/status.component.module.ts +++ b/frontend/projects/ui/src/app/components/status/status.component.module.ts @@ -3,10 +3,16 @@ import { CommonModule } from '@angular/common' import { IonicModule } from '@ionic/angular' import { UnitConversionPipesModule } from '@start9labs/shared' import { StatusComponent } from './status.component' +import { InstallProgressPipeModule } from 'src/app/pipes/install-progress/install-progress.module' @NgModule({ declarations: [StatusComponent], - imports: [CommonModule, IonicModule, UnitConversionPipesModule], + imports: [ + CommonModule, + IonicModule, + UnitConversionPipesModule, + InstallProgressPipeModule, + ], exports: [StatusComponent], }) export class StatusComponentModule {} diff --git a/frontend/projects/ui/src/app/components/status/status.component.ts b/frontend/projects/ui/src/app/components/status/status.component.ts index bed2cd3bf..7252c48b5 100644 --- a/frontend/projects/ui/src/app/components/status/status.component.ts +++ b/frontend/projects/ui/src/app/components/status/status.component.ts @@ -1,4 +1,5 @@ import { Component, Input } from '@angular/core' +import { InstallProgress } from 'src/app/services/patch-db/data-model' import { PrimaryRendering, PrimaryStatus, @@ -19,6 +20,6 @@ export class StatusComponent { @Input() style?: string = 'regular' @Input() weight?: string = 'normal' @Input() disconnected?: boolean = false - @Input() installProgress?: number + @Input() installProgress?: InstallProgress @Input() sigtermTimeout?: string | null = null } diff --git a/frontend/projects/ui/src/app/pages/apps-routes/app-list/app-list-pkg/app-list-pkg.component.html b/frontend/projects/ui/src/app/pages/apps-routes/app-list/app-list-pkg/app-list-pkg.component.html index 3913387e9..456d76baa 100644 --- a/frontend/projects/ui/src/app/pages/apps-routes/app-list/app-list-pkg/app-list-pkg.component.html +++ b/frontend/projects/ui/src/app/pages/apps-routes/app-list/app-list-pkg/app-list-pkg.component.html @@ -13,7 +13,7 @@

{{ manifest.title }}

{{ pkg.entry.manifest.title }} diff --git a/frontend/projects/ui/src/app/pages/apps-routes/app-show/app-show.page.ts b/frontend/projects/ui/src/app/pages/apps-routes/app-show/app-show.page.ts index 526381506..4557a68ab 100644 --- a/frontend/projects/ui/src/app/pages/apps-routes/app-show/app-show.page.ts +++ b/frontend/projects/ui/src/app/pages/apps-routes/app-show/app-show.page.ts @@ -1,8 +1,10 @@ import { ChangeDetectionStrategy, Component } from '@angular/core' import { NavController } from '@ionic/angular' import { PatchDbService } from 'src/app/services/patch-db/patch-db.service' -import { PackageDataEntry } from 'src/app/services/patch-db/data-model' -import { PackageState } from 'src/app/types/package-state' +import { + PackageDataEntry, + PackageState, +} from 'src/app/services/patch-db/data-model' import { PackageStatus, PrimaryStatus, diff --git a/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-progress/app-show-progress.component.html b/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-progress/app-show-progress.component.html index 8365f7345..3134cee5e 100644 --- a/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-progress/app-show-progress.component.html +++ b/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-progress/app-show-progress.component.html @@ -1,20 +1,20 @@ -

Downloading: {{ installProgress.downloadProgress }}%

+

Downloading: {{ progressData.downloadProgress }}%

-

Validating: {{ installProgress.validateProgress }}%

+

Validating: {{ progressData.validateProgress }}%

-

Unpacking: {{ installProgress.unpackProgress }}%

+

Unpacking: {{ progressData.unpackProgress }}%

diff --git a/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-progress/app-show-progress.component.ts b/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-progress/app-show-progress.component.ts index 63974f821..572271c1e 100644 --- a/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-progress/app-show-progress.component.ts +++ b/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-progress/app-show-progress.component.ts @@ -1,6 +1,8 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core' -import { PackageDataEntry } from 'src/app/services/patch-db/data-model' -import { InstallProgress } from 'src/app/types/install-progress' +import { + InstallProgress, + PackageDataEntry, +} from 'src/app/services/patch-db/data-model' import { ProgressData } from 'src/app/types/progress-data' @Component({ @@ -14,18 +16,18 @@ export class AppShowProgressComponent { pkg: PackageDataEntry @Input() - installProgress: ProgressData + progressData: ProgressData get unpackingBuffer(): number { - return this.installProgress.validateProgress === 100 && - !this.installProgress.unpackProgress + return this.progressData.validateProgress === 100 && + !this.progressData.unpackProgress ? 0 : 1 } get validationBuffer(): number { - return this.installProgress.downloadProgress === 100 && - !this.installProgress.validateProgress + return this.progressData.downloadProgress === 100 && + !this.progressData.validateProgress ? 0 : 1 } diff --git a/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-status/app-show-status.component.html b/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-status/app-show-status.component.html index 3f0c3bf42..a3f896766 100644 --- a/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-status/app-show-status.component.html +++ b/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-status/app-show-status.component.html @@ -5,7 +5,7 @@ size="x-large" weight="500" [disconnected]="connectionFailure" - [installProgress]="(pkg | installState)?.totalProgress" + [installProgress]="pkg['install-progress']" [rendering]="PR[status.primary]" [sigtermTimeout]="pkg.manifest.main['sigterm-timeout']" >
diff --git a/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-status/app-show-status.component.ts b/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-status/app-show-status.component.ts index c53914c20..d1e9cb9e1 100644 --- a/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-status/app-show-status.component.ts +++ b/frontend/projects/ui/src/app/pages/apps-routes/app-show/components/app-show-status/app-show-status.component.ts @@ -8,10 +8,10 @@ import { import { InterfaceDef, PackageDataEntry, + PackageState, Status, } from 'src/app/services/patch-db/data-model' import { ErrorToastService } from '@start9labs/shared' -import { PackageState } from 'src/app/types/package-state' import { wizardModal } from 'src/app/components/install-wizard/install-wizard.component' import { AlertController, diff --git a/frontend/projects/ui/src/app/pages/apps-routes/app-show/pipes/install-state.pipe.ts b/frontend/projects/ui/src/app/pages/apps-routes/app-show/pipes/progress-data.pipe.ts similarity index 83% rename from frontend/projects/ui/src/app/pages/apps-routes/app-show/pipes/install-state.pipe.ts rename to frontend/projects/ui/src/app/pages/apps-routes/app-show/pipes/progress-data.pipe.ts index fb00d5a18..1e5397648 100644 --- a/frontend/projects/ui/src/app/pages/apps-routes/app-show/pipes/install-state.pipe.ts +++ b/frontend/projects/ui/src/app/pages/apps-routes/app-show/pipes/progress-data.pipe.ts @@ -4,9 +4,9 @@ import { ProgressData } from 'src/app/types/progress-data' import { packageLoadingProgress } from 'src/app/util/package-loading-progress' @Pipe({ - name: 'installState', + name: 'progressData', }) -export class InstallStatePipe implements PipeTransform { +export class ProgressDataPipe implements PipeTransform { transform(pkg: PackageDataEntry): ProgressData | null { return packageLoadingProgress(pkg['install-progress']) } diff --git a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show-controls/marketplace-show-controls.component.html b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show-controls/marketplace-show-controls.component.html index db4b41e77..ef14808db 100644 --- a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show-controls/marketplace-show-controls.component.html +++ b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show-controls/marketplace-show-controls.component.html @@ -1,33 +1,46 @@ - - - - - Update - - - Downgrade - - +
+ + View Installed + + + - Reinstall + Update + + Downgrade + + + + Reinstall + + - - - Install - + + + Install + + +
diff --git a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show-controls/marketplace-show-controls.component.ts b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show-controls/marketplace-show-controls.component.ts index 2599ddb9f..7f111a6a7 100644 --- a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show-controls/marketplace-show-controls.component.ts +++ b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show-controls/marketplace-show-controls.component.ts @@ -6,10 +6,10 @@ import { } from '@start9labs/marketplace' import { pauseFor } from '@start9labs/shared' -import { PackageState } from 'src/app/types/package-state' import { Manifest, PackageDataEntry, + PackageState, } from 'src/app/services/patch-db/data-model' import { wizardModal } from 'src/app/components/install-wizard/install-wizard.component' import { WizardBaker } from 'src/app/components/install-wizard/prebaked-wizards' @@ -18,6 +18,7 @@ import { LocalStorageService } from 'src/app/services/local-storage.service' @Component({ selector: 'marketplace-show-controls', templateUrl: 'marketplace-show-controls.component.html', + styleUrls: ['./marketplace-show-controls.page.scss'], changeDetection: ChangeDetectionStrategy.OnPush, }) export class MarketplaceShowControlsComponent { diff --git a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show-controls/marketplace-show-controls.page.scss b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show-controls/marketplace-show-controls.page.scss new file mode 100644 index 000000000..cee1bd49f --- /dev/null +++ b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show-controls/marketplace-show-controls.page.scss @@ -0,0 +1,19 @@ +ion-button::part(native) { + font-size: 17px; +} + +ion-button { + height: 44px; + margin: 16px; +} + +@media (min-width: 1000px) { + + .action-buttons { + display: flex; + } + + ion-button { + width: 240px; + } +} \ No newline at end of file diff --git a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show.page.html b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show.page.html index 77fdc975c..b7078bd0d 100644 --- a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show.page.html +++ b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-show/marketplace-show.page.html @@ -3,37 +3,11 @@ - - - - - - - View Service - - - - + + diff --git a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.component.html b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.component.html index 8f012b3f6..1a82a2137 100644 --- a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.component.html +++ b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.component.html @@ -21,7 +21,7 @@
Installing diff --git a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.component.ts b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.component.ts index 0db949b0d..b3d51fb07 100644 --- a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.component.ts +++ b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.component.ts @@ -1,6 +1,8 @@ import { Component, Input } from '@angular/core' -import { PackageState } from 'src/app/types/package-state' -import { PackageDataEntry } from 'src/app/services/patch-db/data-model' +import { + PackageDataEntry, + PackageState, +} from 'src/app/services/patch-db/data-model' @Component({ selector: 'marketplace-status', diff --git a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.module.ts b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.module.ts index 5568b26c4..8a7151f40 100644 --- a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.module.ts +++ b/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/marketplace-status.module.ts @@ -3,12 +3,17 @@ import { NgModule } from '@angular/core' import { IonicModule } from '@ionic/angular' import { EmverPipesModule } from '@start9labs/shared' -import { InstallProgressPipe } from './install-progress.pipe' +import { InstallProgressPipeModule } from '../../../pipes/install-progress/install-progress.module' import { MarketplaceStatusComponent } from './marketplace-status.component' @NgModule({ - imports: [CommonModule, IonicModule, EmverPipesModule], - declarations: [MarketplaceStatusComponent, InstallProgressPipe], + imports: [ + CommonModule, + IonicModule, + EmverPipesModule, + InstallProgressPipeModule, + ], + declarations: [MarketplaceStatusComponent], exports: [MarketplaceStatusComponent], }) export class MarketplaceStatusModule {} diff --git a/frontend/projects/ui/src/app/pipes/install-progress/install-progress.module.ts b/frontend/projects/ui/src/app/pipes/install-progress/install-progress.module.ts new file mode 100644 index 000000000..caf6a76f8 --- /dev/null +++ b/frontend/projects/ui/src/app/pipes/install-progress/install-progress.module.ts @@ -0,0 +1,8 @@ +import { NgModule } from '@angular/core' +import { InstallProgressPipe } from './install-progress.pipe' + +@NgModule({ + declarations: [InstallProgressPipe], + exports: [InstallProgressPipe], +}) +export class InstallProgressPipeModule {} diff --git a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/install-progress.pipe.ts b/frontend/projects/ui/src/app/pipes/install-progress/install-progress.pipe.ts similarity index 52% rename from frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/install-progress.pipe.ts rename to frontend/projects/ui/src/app/pipes/install-progress/install-progress.pipe.ts index 1d731bf93..e340c527d 100644 --- a/frontend/projects/ui/src/app/pages/marketplace-routes/marketplace-status/install-progress.pipe.ts +++ b/frontend/projects/ui/src/app/pipes/install-progress/install-progress.pipe.ts @@ -1,13 +1,13 @@ import { Pipe, PipeTransform } from '@angular/core' -import { InstallProgress } from 'src/app/types/install-progress' +import { InstallProgress } from 'src/app/services/patch-db/data-model' import { packageLoadingProgress } from 'src/app/util/package-loading-progress' @Pipe({ - name: 'installProgress', + name: 'installProgressDisplay', }) export class InstallProgressPipe implements PipeTransform { - transform(loadData?: InstallProgress): string { - const totalProgress = packageLoadingProgress(loadData)?.totalProgress || 0 + transform(installProgress?: InstallProgress): string { + const totalProgress = packageLoadingProgress(installProgress)?.totalProgress || 0 return totalProgress < 99 ? totalProgress + '%' : 'finalizing' } diff --git a/frontend/projects/ui/src/app/pipes/launchable/launchable.pipe.ts b/frontend/projects/ui/src/app/pipes/launchable/launchable.pipe.ts index 100c0eed9..be1d5218d 100644 --- a/frontend/projects/ui/src/app/pipes/launchable/launchable.pipe.ts +++ b/frontend/projects/ui/src/app/pipes/launchable/launchable.pipe.ts @@ -1,8 +1,8 @@ import { Pipe, PipeTransform } from '@angular/core' -import { PackageState } from 'src/app/types/package-state' import { InterfaceDef, PackageMainStatus, + PackageState, } from 'src/app/services/patch-db/data-model' import { ConfigService } from '../../services/config.service' diff --git a/frontend/projects/ui/src/app/services/api/api.fixures.ts b/frontend/projects/ui/src/app/services/api/api.fixures.ts index b3e995cdc..c45e6b9fb 100644 --- a/frontend/projects/ui/src/app/services/api/api.fixures.ts +++ b/frontend/projects/ui/src/app/services/api/api.fixures.ts @@ -1,10 +1,10 @@ -import { PackageState } from 'src/app/types/package-state' import { DependencyErrorType, DockerIoFormat, Manifest, PackageDataEntry, PackageMainStatus, + PackageState, } from 'src/app/services/patch-db/data-model' import { Log, diff --git a/frontend/projects/ui/src/app/services/api/embassy-mock-api.service.ts b/frontend/projects/ui/src/app/services/api/embassy-mock-api.service.ts index 0f740b535..b10516660 100644 --- a/frontend/projects/ui/src/app/services/api/embassy-mock-api.service.ts +++ b/frontend/projects/ui/src/app/services/api/embassy-mock-api.service.ts @@ -2,13 +2,13 @@ import { Injectable } from '@angular/core' import { pauseFor } from '@start9labs/shared' import { ApiService } from './embassy-api.service' import { PatchOp, Update, Operation, RemoveOperation } from 'patch-db-client' -import { PackageState } from 'src/app/types/package-state' -import { InstallProgress } from 'src/app/types/install-progress' import { DataModel, DependencyErrorType, + InstallProgress, PackageDataEntry, PackageMainStatus, + PackageState, ServerStatus, } from 'src/app/services/patch-db/data-model' import { CifsBackupTarget, Log, RR, WithRevision } from './api.types' @@ -690,7 +690,14 @@ export class MockApiService extends ApiService { params: RR.DryUninstallPackageReq, ): Promise { await pauseFor(2000) - return {} + return { + lnd: { + dependency: 'bitcoind', + error: { + type: DependencyErrorType.NotRunning, + }, + }, + } } async uninstallPackageRaw( diff --git a/frontend/projects/ui/src/app/services/api/mock-patch.ts b/frontend/projects/ui/src/app/services/api/mock-patch.ts index f2f44dda5..03524c3e6 100644 --- a/frontend/projects/ui/src/app/services/api/mock-patch.ts +++ b/frontend/projects/ui/src/app/services/api/mock-patch.ts @@ -1,4 +1,3 @@ -import { PackageState } from 'src/app/types/package-state' import { DataModel, DependencyErrorType, @@ -6,6 +5,7 @@ import { HealthResult, Manifest, PackageMainStatus, + PackageState, } from 'src/app/services/patch-db/data-model' export const mockPatchData: DataModel = { @@ -445,7 +445,7 @@ export const mockPatchData: DataModel = { 'donation-url': null, alerts: { install: null, - uninstall: null, + uninstall: undefined, restore: 'If this is a duplicate instance of the same LND node, you may loose your funds.', start: 'Starting LND is good for your health.', diff --git a/frontend/projects/ui/src/app/services/config.service.ts b/frontend/projects/ui/src/app/services/config.service.ts index c7de8d843..32bf618d1 100644 --- a/frontend/projects/ui/src/app/services/config.service.ts +++ b/frontend/projects/ui/src/app/services/config.service.ts @@ -1,10 +1,10 @@ import { Injectable } from '@angular/core' import { WorkspaceConfig } from '@start9labs/shared' -import { PackageState } from 'src/app/types/package-state' import { InterfaceDef, PackageDataEntry, PackageMainStatus, + PackageState, } from 'src/app/services/patch-db/data-model' const { diff --git a/frontend/projects/ui/src/app/services/patch-db/data-model.ts b/frontend/projects/ui/src/app/services/patch-db/data-model.ts index 98f06f7ca..0d5e94d40 100644 --- a/frontend/projects/ui/src/app/services/patch-db/data-model.ts +++ b/frontend/projects/ui/src/app/services/patch-db/data-model.ts @@ -2,8 +2,6 @@ import { ConfigSpec } from 'src/app/pkg-config/config-types' import { Url } from '@start9labs/shared' import { MarketplaceManifest } from '@start9labs/marketplace' import { BasicInfo } from 'src/app/pages/developer-routes/developer-menu/form-info' -import { PackageState } from 'src/app/types/package-state' -import { InstallProgress } from 'src/app/types/install-progress' export interface DataModel { 'server-info': ServerInfo @@ -86,6 +84,14 @@ export interface PackageDataEntry { 'install-progress'?: InstallProgress // exists when: installing, updating } +export enum PackageState { + Installing = 'installing', + Installed = 'installed', + Updating = 'updating', + Removing = 'removing', + Restoring = 'restoring', +} + export interface InstalledPackageDataEntry { status: Status manifest: Manifest @@ -356,3 +362,13 @@ export interface DependencyErrorHealthChecksFailed { export interface DependencyErrorTransitive { type: DependencyErrorType.Transitive } + +export interface InstallProgress { + readonly size: number | null + readonly downloaded: number + readonly 'download-complete': boolean + readonly validated: number + readonly 'validation-complete': boolean + readonly unpacked: number + readonly 'unpack-complete': boolean +} diff --git a/frontend/projects/ui/src/app/services/pkg-status-rendering.service.ts b/frontend/projects/ui/src/app/services/pkg-status-rendering.service.ts index adf14d229..914c54fd3 100644 --- a/frontend/projects/ui/src/app/services/pkg-status-rendering.service.ts +++ b/frontend/projects/ui/src/app/services/pkg-status-rendering.service.ts @@ -1,8 +1,8 @@ import { isEmptyObject } from '@start9labs/shared' -import { PackageState } from 'src/app/types/package-state' import { PackageDataEntry, PackageMainStatus, + PackageState, Status, } from 'src/app/services/patch-db/data-model' diff --git a/frontend/projects/ui/src/app/types/install-progress.ts b/frontend/projects/ui/src/app/types/install-progress.ts deleted file mode 100644 index 58b1f6286..000000000 --- a/frontend/projects/ui/src/app/types/install-progress.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface InstallProgress { - readonly size: number | null - readonly downloaded: number - readonly 'download-complete': boolean - readonly validated: number - readonly 'validation-complete': boolean - readonly unpacked: number - readonly 'unpack-complete': boolean -} diff --git a/frontend/projects/ui/src/app/types/package-state.ts b/frontend/projects/ui/src/app/types/package-state.ts deleted file mode 100644 index e5bad9c2e..000000000 --- a/frontend/projects/ui/src/app/types/package-state.ts +++ /dev/null @@ -1,7 +0,0 @@ -export enum PackageState { - Installing = 'installing', - Installed = 'installed', - Updating = 'updating', - Removing = 'removing', - Restoring = 'restoring', -} diff --git a/frontend/projects/ui/src/app/util/package-loading-progress.ts b/frontend/projects/ui/src/app/util/package-loading-progress.ts index 4eb0353e2..3c699dfd3 100644 --- a/frontend/projects/ui/src/app/util/package-loading-progress.ts +++ b/frontend/projects/ui/src/app/util/package-loading-progress.ts @@ -1,6 +1,6 @@ import { isEmptyObject } from '@start9labs/shared' -import { InstallProgress } from 'src/app/types/install-progress' import { ProgressData } from 'src/app/types/progress-data' +import { InstallProgress } from '../services/patch-db/data-model' export function packageLoadingProgress( loadData?: InstallProgress, diff --git a/frontend/proxy.conf-sample.json b/frontend/proxy.conf-sample.json new file mode 100644 index 000000000..7c4053c78 --- /dev/null +++ b/frontend/proxy.conf-sample.json @@ -0,0 +1,16 @@ +{ + "/rpc/v1": { + "target": "http:///rpc/v1" + }, + "/ws/*": { + "target": "http://", + "secure": false, + "ws": true + }, + "/public/*": { + "target": "http:///public", + "pathRewrite": { + "^/public": "" + } + } +} diff --git a/frontend/proxy.conf.json.sample b/frontend/proxy.conf.json.sample deleted file mode 100644 index e97124bd2..000000000 --- a/frontend/proxy.conf.json.sample +++ /dev/null @@ -1,14 +0,0 @@ -{ - "/rpc/v1": { - "target": "http://localhost:8100/rpc/v1" - }, - "/ws": { - "target": "http://localhost:8100/ws" - }, - "/public/*": { - "target": "http://localhost:8100/public", - "pathRewrite": { - "^/public": "" - } - } -} \ No newline at end of file