chore: cleanup - show spinner on service list when transitioning

config add new list items to end and auto scroll

remove js engine artifacts

fix view button in notification toast
This commit is contained in:
Matt Hill
2022-06-09 13:01:39 -06:00
committed by Lucy C
parent 7916a2352f
commit 8e9d2b5314
15 changed files with 87 additions and 49 deletions

View File

@@ -1,10 +1,18 @@
<ion-icon
*ngIf="pkg.error; else bulb"
*ngIf="pkg.error; else noError"
class="warning-icon"
name="warning-outline"
size="small"
color="warning"
></ion-icon>
<ng-template #bulb>
<div class="bulb" [style.background-color]="color"></div>
<ng-template #noError>
<ion-spinner
*ngIf="pkg.transitioning; else bulb"
class="spinner"
size="small"
color="primary"
></ion-spinner>
<ng-template #bulb>
<div class="bulb" [style.background-color]="color"></div>
</ng-template>
</ng-template>

View File

@@ -18,3 +18,10 @@
background-color: rgba(255, 213, 52, 0.1);
box-shadow: 0 0 4px 4px rgba(255, 213, 52, 0.1);
}
.spinner {
position: absolute !important;
left: 6px !important;
top: 6px !important;
width: 18px;
}

View File

@@ -1,5 +1,4 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
import { AlertController } from '@ionic/angular'
import {
HealthResult,
PackageDataEntry,
@@ -20,8 +19,6 @@ export class AppShowHealthChecksComponent {
HealthResult = HealthResult
constructor(private readonly alertCtrl: AlertController) {}
isLoading(result: HealthResult): boolean {
return result === HealthResult.Starting || result === HealthResult.Loading
}

View File

@@ -12,7 +12,10 @@ import { ValueSpecObject } from 'src/app/pkg-config/config-types'
import { GenericFormPage } from 'src/app/modals/generic-form/generic-form.page'
import { PatchDbService } from '../../../services/patch-db/patch-db.service'
import { v4 } from 'uuid'
import { UIMarketplaceData } from '../../../services/patch-db/data-model'
import {
UIData,
UIMarketplaceData,
} from '../../../services/patch-db/data-model'
import { ConfigService } from '../../../services/config.service'
import { MarketplaceService } from 'src/app/services/marketplace.service'
import {
@@ -54,10 +57,10 @@ export class MarketplacesPage {
this.patch
.watch$('ui')
.pipe(
map(ui => ui.marketplace),
map((ui: UIData) => ui.marketplace),
distinctUntilChanged(),
)
.subscribe(mp => {
.subscribe((mp: UIMarketplaceData | undefined) => {
let marketplaces: Marketplaces = [
{
id: undefined,