ui: adds a banner to the marketplace page when an OS update is detected

This commit is contained in:
Aaron Greenspan
2021-01-08 14:52:43 -07:00
committed by Aiden McClelland
parent 6da3c7e326
commit 89ff5de01b
11 changed files with 136 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ import { SharingModule } from '../../../modules/sharing.module'
import { PwaBackComponentModule } from 'src/app/components/pwa-back-button/pwa-back.component.module'
import { BadgeMenuComponentModule } from 'src/app/components/badge-menu-button/badge-menu.component.module'
import { StatusComponentModule } from 'src/app/components/status/status.component.module'
import { UpdateOsBannerComponentModule } from 'src/app/components/update-os-banner/update-os-banner.component.module'
const routes: Routes = [
@@ -25,6 +26,7 @@ const routes: Routes = [
SharingModule,
PwaBackComponentModule,
BadgeMenuComponentModule,
UpdateOsBannerComponentModule,
],
declarations: [AppAvailableListPage],
})

View File

@@ -5,10 +5,10 @@
<badge-menu-button></badge-menu-button>
</ion-buttons>
</ion-toolbar>
<update-os-banner></update-os-banner>
</ion-header>
<ion-content class="ion-padding-bottom">
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content pullingIcon="lines" refreshingSpinner="lines"></ion-refresher-content>
</ion-refresher>

View File

@@ -7,6 +7,7 @@ import { PropertySubjectId, initPropertySubject } from 'src/app/util/property-su
import { Subscription, BehaviorSubject, combineLatest } from 'rxjs'
import { take } from 'rxjs/operators'
import { markAsLoadingDuringP } from 'src/app/services/loader.service'
import { OsUpdateService } from 'src/app/services/os-update.service'
@Component({
selector: 'app-available-list',
@@ -24,6 +25,7 @@ export class AppAvailableListPage {
private readonly apiService: ApiService,
private readonly appModel: AppModel,
private readonly zone: NgZone,
private readonly osUpdateService: OsUpdateService,
) { }
async ngOnInit () {
@@ -33,6 +35,7 @@ export class AppAvailableListPage {
markAsLoadingDuringP(this.$loading$, Promise.all([
this.getApps(),
this.osUpdateService.checkForUpdates(), // checks for an os update, banner component renders conditionally
pauseFor(600),
]))
}

View File

@@ -153,7 +153,7 @@ export class ServerShowPage {
const alert = await this.alertCtrl.create({
backdropDismiss: false,
header: 'Confirm',
message: `Are you sure you shut down your Embassy? To turn it back on, you will need to physically unplug the device and plug it back in.`,
message: `Are you sure you want to shut down your Embassy? To turn it back on, you will need to physically unplug the device and plug it back in.`,
buttons: [
{
text: 'Cancel',