From 8096bef5419a240c3b25ea55e95a82fb5c8da252 Mon Sep 17 00:00:00 2001 From: Aaron Greenspan Date: Thu, 21 Jan 2021 10:53:48 -0700 Subject: [PATCH] ui: copy --- .../modals/os-welcome/os-welcome.page.html | 2 +- .../app/services/startup-alerts.notifier.ts | 22 ++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ui/src/app/modals/os-welcome/os-welcome.page.html b/ui/src/app/modals/os-welcome/os-welcome.page.html index 9c4a49860..d867f76f2 100644 --- a/ui/src/app/modals/os-welcome/os-welcome.page.html +++ b/ui/src/app/modals/os-welcome/os-welcome.page.html @@ -16,7 +16,7 @@ Additionally, it draws a distinction between services that are designed to be launched inside the browser and those that are designed to run in the background

- 0.2.8 also introduces automatic checks for OS updates. With this enabled, each time you visit your embassy you will be notified if a new OS version is available. This setting can be edited in your Embassy Config page. + 0.2.8 also introduces automatic update checks. With this enabled, each time you visit your embassy you will be notified if new Embassy OS or service versions are available. This setting can be edited in your Embassy Config page. Auto Check for Updates diff --git a/ui/src/app/services/startup-alerts.notifier.ts b/ui/src/app/services/startup-alerts.notifier.ts index a000f1958..0ea89b1c6 100644 --- a/ui/src/app/services/startup-alerts.notifier.ts +++ b/ui/src/app/services/startup-alerts.notifier.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core' -import { AlertController, ModalController, NavController } from '@ionic/angular' +import { AlertController, IonicSafeString, ModalController, NavController } from '@ionic/angular' import { OSWelcomePage } from '../modals/os-welcome/os-welcome.page' import { S9Server } from '../models/server-model' import { displayEmver } from '../pipes/emver.pipe' @@ -28,7 +28,7 @@ export class StartupAlertsNotifier { // Then, since we await acc before c.display(res), each promise executing gets hung awaiting the display of the previous run async runChecks (server: Readonly): Promise { await this.checks - .filter(c => c.shouldRun(server) && !c.hasRun) + .filter(c => !c.hasRun && c.shouldRun(server)) .reduce(async (previousDisplay, c) => { let checkRes try { @@ -37,8 +37,8 @@ export class StartupAlertsNotifier { return console.error(`Exception in ${c.name} check:`, e) } c.hasRun = true - if (!checkRes) return true const displayRes = await previousDisplay + if (!checkRes) return true if (displayRes) return c.display(checkRes) }, Promise.resolve(true)) } @@ -124,7 +124,13 @@ export class StartupAlertsNotifier { const alert = await this.alertCtrl.create({ backdropDismiss: true, header: 'Updates Available!', - message: 'New service updates are available in the Marketplace.', + message: new IonicSafeString( + `

+
New service updates are available in the Marketplace.
+
You can disable these checks in your Embassy Config
+
+ ` + ), buttons: [ { text: 'Cancel', @@ -149,7 +155,13 @@ export class StartupAlertsNotifier { const alert = await this.alertCtrl.create({ backdropDismiss: true, header: 'New EmbassyOS Version!', - message: `Update EmbassyOS to version ${displayEmver(versionLatest)}?`, + message: new IonicSafeString( + `
+
Update EmbassyOS to version ${displayEmver(versionLatest)}?
+
You can disable these checks in your Embassy Config
+
+ ` + ), buttons: [ { text: 'Not now',