mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
save
This commit is contained in:
committed by
Aiden McClelland
parent
7417bfdbfa
commit
833941b031
@@ -3,11 +3,13 @@ import { CommonModule } from '@angular/common'
|
||||
import { IonicModule } from '@ionic/angular'
|
||||
import { OSWelcomePage } from './os-welcome.page'
|
||||
import { SharingModule } from 'src/app/modules/sharing.module'
|
||||
import { FormsModule } from '@angular/forms'
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
IonicModule,
|
||||
FormsModule,
|
||||
SharingModule,
|
||||
],
|
||||
declarations: [OSWelcomePage],
|
||||
|
||||
@@ -18,7 +18,14 @@
|
||||
<p>
|
||||
0.2.8 is a small but important update designed to enhance awareness around potential pitfalls of using certain services.
|
||||
It introduces warnings for installing, uninstalling, backing up, and restoring backups of stateful services such as LND or c-lightning.
|
||||
0.2.8 introduces automatic checks for updates, a setting that can be enabled or disabled in your Embassy config, and it also 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>
|
||||
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.
|
||||
<ion-item style="--border-radius: var(--icon-border-radius); margin-top: 15px">
|
||||
<ion-label>Auto Check for Updates</ion-label>
|
||||
<ion-toggle slot="end" [(ngModel)]="autoCheckUpdates"></ion-toggle>
|
||||
</ion-item>
|
||||
</p>
|
||||
|
||||
<div style="margin-top: 30px">
|
||||
@@ -33,7 +40,7 @@
|
||||
|
||||
<div class="close-button">
|
||||
<ion-button fill="outline" (click)="dismiss()">
|
||||
Close
|
||||
Begin
|
||||
</ion-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { Component, Input } from '@angular/core'
|
||||
import { ModalController } from '@ionic/angular'
|
||||
import { ServerModel } from 'src/app/models/server-model'
|
||||
import { ApiService } from 'src/app/services/api/api.service'
|
||||
import { LoaderService } from 'src/app/services/loader.service'
|
||||
import { pauseFor } from 'src/app/util/misc.util'
|
||||
|
||||
@Component({
|
||||
selector: 'os-welcome',
|
||||
@@ -9,11 +13,24 @@ import { ModalController } from '@ionic/angular'
|
||||
export class OSWelcomePage {
|
||||
@Input() version: string
|
||||
|
||||
autoCheckUpdates = true
|
||||
|
||||
constructor (
|
||||
private readonly modalCtrl: ModalController,
|
||||
private readonly apiService: ApiService,
|
||||
private readonly serverModel: ServerModel,
|
||||
private readonly loader: LoaderService,
|
||||
) { }
|
||||
|
||||
dismiss () {
|
||||
this.modalCtrl.dismiss()
|
||||
async dismiss () {
|
||||
await this.loader.displayDuringP(
|
||||
this.apiService
|
||||
.patchServerConfig('autoCheckUpdates', this.autoCheckUpdates)
|
||||
.then(() => this.serverModel.update({ autoCheckUpdates: this.autoCheckUpdates }))
|
||||
.then(() => pauseFor(600000))
|
||||
.catch(console.error),
|
||||
).then(
|
||||
() => this.modalCtrl.dismiss({ autoCheckUpdates: this.autoCheckUpdates })
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user