mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
ui: preload bold, remove getdots from dom after load
This commit is contained in:
committed by
Aiden McClelland
parent
d2a70a782b
commit
53db8fc4ec
@@ -129,7 +129,7 @@
|
||||
<ion-infinite-scroll-content loadingSpinner="lines"></ion-infinite-scroll-content>
|
||||
</ion-content>
|
||||
<ion-input></ion-input>
|
||||
<ion-input type="password" value="getdots"></ion-input>
|
||||
<ion-input *ngIf="untilLoaded" type="password" value="getdots"></ion-input>
|
||||
<ion-item></ion-item>
|
||||
<ion-item-divider></ion-item-divider>
|
||||
<ion-item-group></ion-item-group>
|
||||
@@ -148,6 +148,7 @@
|
||||
<ion-spinner name="dots"></ion-spinner>
|
||||
<ion-spinner name="lines"></ion-spinner>
|
||||
<ion-text></ion-text>
|
||||
<ion-text style="font-weight: bold">load bold</ion-text>
|
||||
<ion-textarea></ion-textarea>
|
||||
<ion-title></ion-title>
|
||||
<ion-toast></ion-toast>
|
||||
|
||||
@@ -3,7 +3,6 @@ import { ServerModel, ServerStatus } from './models/server-model'
|
||||
import { Storage } from '@ionic/storage'
|
||||
import { SyncDaemon } from './services/sync.service'
|
||||
import { AuthService, AuthState } from './services/auth.service'
|
||||
import { StartupAlertsNotifier } from './services/startup-alerts.notifier'
|
||||
import { ApiService } from './services/api/api.service'
|
||||
import { Router } from '@angular/router'
|
||||
import { BehaviorSubject, Observable } from 'rxjs'
|
||||
@@ -14,6 +13,7 @@ import { LoaderService } from './services/loader.service'
|
||||
import { Emver } from './services/emver.service'
|
||||
import { SplitPaneTracker } from './services/split-pane.service'
|
||||
import { LoadingOptions } from '@ionic/core'
|
||||
import { pauseFor } from './util/misc.util'
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -27,6 +27,7 @@ export class AppComponent {
|
||||
serverName$ : Observable<string>
|
||||
serverBadge$: Observable<number>
|
||||
selectedIndex = 0
|
||||
untilLoaded = true
|
||||
appPages = [
|
||||
{
|
||||
title: 'Services',
|
||||
@@ -66,7 +67,6 @@ export class AppComponent {
|
||||
private readonly alertCtrl: AlertController,
|
||||
private readonly loader: LoaderService,
|
||||
private readonly emver: Emver,
|
||||
private readonly globalAlertsNotifier: StartupAlertsNotifier,
|
||||
readonly splitPane: SplitPaneTracker,
|
||||
) {
|
||||
// set dark theme
|
||||
@@ -76,6 +76,10 @@ export class AppComponent {
|
||||
this.init()
|
||||
}
|
||||
|
||||
ionViewDidEnter(){
|
||||
pauseFor(500).then(() => this.untilLoaded = false)
|
||||
}
|
||||
|
||||
async init () {
|
||||
let fromFresh = true
|
||||
await this.storage.ready()
|
||||
@@ -182,7 +186,7 @@ export class AppComponent {
|
||||
await alert.present()
|
||||
}
|
||||
|
||||
splitPaneVisible (e) {
|
||||
splitPaneVisible (e: any) {
|
||||
this.splitPane.$menuFixedOpenOnLeft$.next(e.detail.visible)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import { mockApiAppAvailableFull, mockApiAppAvailableVersionInfo, mockApiAppInst
|
||||
//@TODO consider moving to test folders.
|
||||
@Injectable()
|
||||
export class MockApiService extends ApiService {
|
||||
welcomeAck = false
|
||||
welcomeAck = true
|
||||
|
||||
constructor (
|
||||
private readonly appModel: AppModel,
|
||||
@@ -409,8 +409,8 @@ const mockApiServer: () => ReqRes.GetServerRes = () => ({
|
||||
versionLatest: '0.2.9',
|
||||
status: ServerStatus.RUNNING,
|
||||
alternativeRegistryUrl: 'beta-registry.start9labs.com',
|
||||
welcomeAck: false,
|
||||
autoCheckUpdates: true,
|
||||
welcomeAck: true,
|
||||
autoCheckUpdates: false,
|
||||
specs: {
|
||||
'Tor Address': 'nfsnjkcnaskjnlkasnfahj7dh23fdnieqwjdnhjewbfijendiueqwbd.onion',
|
||||
'CPU': 'Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz',
|
||||
|
||||
@@ -30,14 +30,16 @@ export class StartupAlertsNotifier {
|
||||
await this.checks
|
||||
.filter(c => !c.hasRun && c.shouldRun(server))
|
||||
.reduce(async (previousDisplay, c) => {
|
||||
let checkRes
|
||||
let checkRes: any
|
||||
try {
|
||||
checkRes = await c.check(server)
|
||||
} catch (e) {
|
||||
return console.error(`Exception in ${c.name} check:`, e)
|
||||
console.error(`Exception in ${c.name} check:`, e)
|
||||
return true
|
||||
}
|
||||
c.hasRun = true
|
||||
const displayRes = await previousDisplay
|
||||
|
||||
if (!checkRes) return true
|
||||
if (displayRes) return c.display(checkRes)
|
||||
}, Promise.resolve(true))
|
||||
|
||||
Reference in New Issue
Block a user