mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
ui: copy
This commit is contained in:
committed by
Aiden McClelland
parent
b8d84c5fc2
commit
8096bef541
@@ -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
|
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
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
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.
|
||||||
<ion-item lines="none" style="--border-radius: var(--icon-border-radius); margin-top: 15px">
|
<ion-item lines="none" style="--border-radius: var(--icon-border-radius); margin-top: 15px">
|
||||||
<ion-label>Auto Check for Updates</ion-label>
|
<ion-label>Auto Check for Updates</ion-label>
|
||||||
<ion-toggle slot="end" [(ngModel)]="autoCheckUpdates"></ion-toggle>
|
<ion-toggle slot="end" [(ngModel)]="autoCheckUpdates"></ion-toggle>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core'
|
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 { OSWelcomePage } from '../modals/os-welcome/os-welcome.page'
|
||||||
import { S9Server } from '../models/server-model'
|
import { S9Server } from '../models/server-model'
|
||||||
import { displayEmver } from '../pipes/emver.pipe'
|
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
|
// 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<S9Server>): Promise<void> {
|
async runChecks (server: Readonly<S9Server>): Promise<void> {
|
||||||
await this.checks
|
await this.checks
|
||||||
.filter(c => c.shouldRun(server) && !c.hasRun)
|
.filter(c => !c.hasRun && c.shouldRun(server))
|
||||||
.reduce(async (previousDisplay, c) => {
|
.reduce(async (previousDisplay, c) => {
|
||||||
let checkRes
|
let checkRes
|
||||||
try {
|
try {
|
||||||
@@ -37,8 +37,8 @@ export class StartupAlertsNotifier {
|
|||||||
return console.error(`Exception in ${c.name} check:`, e)
|
return console.error(`Exception in ${c.name} check:`, e)
|
||||||
}
|
}
|
||||||
c.hasRun = true
|
c.hasRun = true
|
||||||
if (!checkRes) return true
|
|
||||||
const displayRes = await previousDisplay
|
const displayRes = await previousDisplay
|
||||||
|
if (!checkRes) return true
|
||||||
if (displayRes) return c.display(checkRes)
|
if (displayRes) return c.display(checkRes)
|
||||||
}, Promise.resolve(true))
|
}, Promise.resolve(true))
|
||||||
}
|
}
|
||||||
@@ -124,7 +124,13 @@ export class StartupAlertsNotifier {
|
|||||||
const alert = await this.alertCtrl.create({
|
const alert = await this.alertCtrl.create({
|
||||||
backdropDismiss: true,
|
backdropDismiss: true,
|
||||||
header: 'Updates Available!',
|
header: 'Updates Available!',
|
||||||
message: 'New service updates are available in the Marketplace.',
|
message: new IonicSafeString(
|
||||||
|
`<div style="display: flex; flex-direction: column; justify-content: space-around; min-height: 100px">
|
||||||
|
<div>New service updates are available in the Marketplace.</div>
|
||||||
|
<div style="font-size:x-small">You can disable these checks in your Embassy Config</div>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
),
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: 'Cancel',
|
text: 'Cancel',
|
||||||
@@ -149,7 +155,13 @@ export class StartupAlertsNotifier {
|
|||||||
const alert = await this.alertCtrl.create({
|
const alert = await this.alertCtrl.create({
|
||||||
backdropDismiss: true,
|
backdropDismiss: true,
|
||||||
header: 'New EmbassyOS Version!',
|
header: 'New EmbassyOS Version!',
|
||||||
message: `Update EmbassyOS to version ${displayEmver(versionLatest)}?`,
|
message: new IonicSafeString(
|
||||||
|
`<div style="display: flex; flex-direction: column; justify-content: space-around; min-height: 100px">
|
||||||
|
<div>Update EmbassyOS to version ${displayEmver(versionLatest)}?</div>
|
||||||
|
<div style="font-size:x-small">You can disable these checks in your Embassy Config</div>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
),
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: 'Not now',
|
text: 'Not now',
|
||||||
|
|||||||
Reference in New Issue
Block a user