-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework install progress types and pipes for clarity (#1513)
* rework install progress types and pipes for clarity * rework marketplace show display Co-authored-by: Matt Hill <matthill@Matt-M1.local>
- Loading branch information
Showing
37 changed files
with
221 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 12 additions & 22 deletions
34
frontend/projects/marketplace/src/pages/show/package/package.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,12 @@ | ||
<ion-grid> | ||
<ion-row> | ||
<ion-col sizeXs="12" sizeSm="12" sizeMd="9" sizeLg="9" sizeXl="9"> | ||
<div class="header montserrat"> | ||
<img | ||
class="logo" | ||
alt="" | ||
[src]="'data:image/png;base64,' + pkg.icon | trustUrl" | ||
/> | ||
<div class="text"> | ||
<h1 class="title">{{ pkg.manifest.title }}</h1> | ||
<p class="version">{{ pkg.manifest.version | displayEmver }}</p> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> | ||
</ion-col> | ||
<ion-col sizeMd="3" sizeXs="12" class="ion-align-self-center"> | ||
<ng-content select="[position=controls]"></ng-content> | ||
</ion-col> | ||
</ion-row> | ||
<ng-content select="ion-row"></ng-content> | ||
</ion-grid> | ||
<div class="header montserrat"> | ||
<img | ||
class="logo" | ||
alt="" | ||
[src]="'data:image/png;base64,' + pkg.icon | trustUrl" | ||
/> | ||
<div class="text"> | ||
<h1 class="title">{{ pkg.manifest.title }}</h1> | ||
<p class="version">{{ pkg.manifest.version | displayEmver }}</p> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> |
31 changes: 22 additions & 9 deletions
31
frontend/projects/marketplace/src/pages/show/package/package.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
frontend/projects/ui/src/app/pages/apps-routes/app-show/app-show.page.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
.../pages/apps-routes/app-show/components/app-show-progress/app-show-progress.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
<p>Downloading: {{ installProgress.downloadProgress }}%</p> | ||
<p>Downloading: {{ progressData.downloadProgress }}%</p> | ||
<ion-progress-bar | ||
[color]="getColor('download-complete')" | ||
[value]="installProgress.downloadProgress / 100" | ||
[buffer]="!installProgress.downloadProgress ? 0 : 1" | ||
[value]="progressData.downloadProgress / 100" | ||
[buffer]="!progressData.downloadProgress ? 0 : 1" | ||
></ion-progress-bar> | ||
|
||
<p>Validating: {{ installProgress.validateProgress }}%</p> | ||
<p>Validating: {{ progressData.validateProgress }}%</p> | ||
<ion-progress-bar | ||
[color]="getColor('validation-complete')" | ||
[value]="installProgress.validateProgress / 100" | ||
[value]="progressData.validateProgress / 100" | ||
[buffer]="validationBuffer" | ||
></ion-progress-bar> | ||
|
||
<p>Unpacking: {{ installProgress.unpackProgress }}%</p> | ||
<p>Unpacking: {{ progressData.unpackProgress }}%</p> | ||
<ion-progress-bar | ||
[color]="getColor('unpack-complete')" | ||
[value]="installProgress.unpackProgress / 100" | ||
[value]="progressData.unpackProgress / 100" | ||
[buffer]="unpackingBuffer" | ||
></ion-progress-bar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 39 additions & 26 deletions
65
...outes/marketplace-show/marketplace-show-controls/marketplace-show-controls.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
<ng-container *ngIf="localPkg; else install"> | ||
<!-- not installing, updating, or removing --> | ||
<ng-container *ngIf="localPkg.state === PackageState.Installed"> | ||
<ion-button | ||
*ngIf="(version | compareEmver: pkg.manifest.version) === -1" | ||
expand="block" | ||
(click)="presentModal('update')" | ||
> | ||
Update | ||
</ion-button> | ||
<ion-button | ||
*ngIf="(version | compareEmver: pkg.manifest.version) === 1" | ||
expand="block" | ||
color="warning" | ||
(click)="presentModal('downgrade')" | ||
> | ||
Downgrade | ||
</ion-button> | ||
<ng-container *ngIf="localStorageService.showDevTools$ | async"> | ||
<div class="action-buttons"> | ||
<ion-button | ||
*ngIf="localPkg" | ||
expand="block" | ||
color="primary" | ||
[routerLink]="['/services', pkg.manifest.id]" | ||
> | ||
View Installed | ||
</ion-button> | ||
<ng-container *ngIf="localPkg; else install"> | ||
<ng-container *ngIf="localPkg.state === PackageState.Installed"> | ||
<ion-button | ||
*ngIf="(version | compareEmver: pkg.manifest.version) === 0" | ||
*ngIf="(version | compareEmver: pkg.manifest.version) === -1" | ||
expand="block" | ||
(click)="tryInstall()" | ||
color="success" | ||
(click)="presentModal('update')" | ||
> | ||
Reinstall | ||
Update | ||
</ion-button> | ||
<ion-button | ||
*ngIf="(version | compareEmver: pkg.manifest.version) === 1" | ||
expand="block" | ||
color="warning" | ||
(click)="presentModal('downgrade')" | ||
> | ||
Downgrade | ||
</ion-button> | ||
<ng-container *ngIf="localStorageService.showDevTools$ | async"> | ||
<ion-button | ||
*ngIf="(version | compareEmver: pkg.manifest.version) === 0" | ||
expand="block" | ||
color="success" | ||
(click)="tryInstall()" | ||
> | ||
Reinstall | ||
</ion-button> | ||
</ng-container> | ||
</ng-container> | ||
</ng-container> | ||
</ng-container> | ||
|
||
<ng-template #install> | ||
<ion-button expand="block" (click)="tryInstall()">Install</ion-button> | ||
</ng-template> | ||
<ng-template #install> | ||
<ion-button expand="block" color="success" (click)="tryInstall()"> | ||
Install | ||
</ion-button> | ||
</ng-template> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.