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