ui: os-welcome 029

This commit is contained in:
Aaron Greenspan
2021-02-04 12:23:42 -07:00
committed by Aiden McClelland
parent 44def3be85
commit 327c79350e
4 changed files with 10 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
<ion-header>
<ion-toolbar>
<ion-title >
<ion-label style="font-size: 20px;" class="ion-text-wrap">Welcome to {{ version }}!</ion-label>
<ion-label style="font-size: 20px;" class="ion-text-wrap">Welcome to 0.2.9!</ion-label>
</ion-title>
</ion-toolbar>
</ion-header>
@@ -9,7 +9,7 @@
<ion-content class="ion-padding">
<div style="display: flex; flex-direction: column; justify-content: space-between; height: 100%">
<h2>Highlights</h2>
<p>
<p class="main-content">
0.2.9 introduces LAN support for services running on the Embassy. A service's LAN address (.local URL) can be accessed while connected to the same network.
This is useful for two reasons: (1) LAN connections are significantly faster than Tor, and (2) if the Tor network is experiencing connectivity issues, you will not be locked out of your services.
</p>

View File

@@ -3,6 +3,10 @@
display: flex;
justify-content: center;
align-items: center;
height: 100%;
min-height: 100px;
}
.main-content {
height: 100%;
color: var(--ion-color-medium);
}

View File

@@ -12,24 +12,17 @@ import { ConfigService } from 'src/app/services/config.service'
export class OSWelcomePage {
@Input() version: string
autoCheckUpdates = true
constructor (
private readonly modalCtrl: ModalController,
private readonly apiService: ApiService,
private readonly serverModel: ServerModel,
private readonly config: ConfigService,
) { }
async dismiss () {
this.apiService
.patchServerConfig('autoCheckUpdates', this.autoCheckUpdates)
.then(() => this.serverModel.update({ autoCheckUpdates: this.autoCheckUpdates }))
.then(() => this.apiService.acknowledgeOSWelcome(this.config.version))
.catch(console.error)
this.apiService.acknowledgeOSWelcome(this.config.version).catch(console.error)
// return false to skip subsequent alert modals (e.g. check for updates modals)
// return true to show subsequent alert modals
return this.modalCtrl.dismiss(this.autoCheckUpdates)
return this.modalCtrl.dismiss(true)
}
}

View File

@@ -11,7 +11,7 @@ import { mockApiAppAvailableFull, mockApiAppAvailableVersionInfo, mockApiAppInst
//@TODO consider moving to test folders.
@Injectable()
export class MockApiService extends ApiService {
welcomeAck = true
welcomeAck = false
constructor (
private readonly appModel: AppModel,