mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
fix text alignment and double firing of page download
This commit is contained in:
committed by
Aiden McClelland
parent
397a71cb0d
commit
806a1ee5df
@@ -6,15 +6,17 @@
|
||||
<div style="padding-bottom: 32px;">
|
||||
<img src="assets/png/logo.png" style="max-width: 240px;" />
|
||||
</div>
|
||||
<success (onDownload)="download()"></success>
|
||||
<ion-card *ngIf="!stateService.embassyLoaded" color="dark">
|
||||
|
||||
<success [hidden]="!stateService.embassyLoaded" (onDownload)="download()"></success>
|
||||
|
||||
<ion-card [hidden]="stateService.embassyLoaded" color="dark">
|
||||
<ion-card-header>
|
||||
<ion-card-title style="font-size: 40px;">Initializing Embassy</ion-card-title>
|
||||
<ion-card-subtitle>Progress: {{ progress | async }}%</ion-card-subtitle>
|
||||
<ion-card-subtitle>Progress: {{ progress }}%</ion-card-subtitle>
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content class="ion-margin">
|
||||
<ion-progress-bar color="primary" style="max-width: 700px; margin: auto; padding-bottom: 20px; margin-bottom: 40px;" [value]="(progress | async) / 100"></ion-progress-bar>
|
||||
<ion-progress-bar color="primary" style="max-width: 700px; margin: auto; padding-bottom: 20px; margin-bottom: 40px;" [value]="progress / 100"></ion-progress-bar>
|
||||
<p class="ion-text-start">After completion, you will be prompted to download a file from your Embassy. Save the file somewhere safe, it is the easiest way to recover your Embassy's addresses and SSL certificate in case you lose them.</p>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { interval, Observable } from 'rxjs'
|
||||
import { finalize, take } from 'rxjs/operators'
|
||||
import { interval, Observable, Subscription } from 'rxjs'
|
||||
import { delay, finalize, take, tap } from 'rxjs/operators'
|
||||
import { StateService } from 'src/app/services/state.service'
|
||||
|
||||
@Component({
|
||||
@@ -9,22 +9,31 @@ import { StateService } from 'src/app/services/state.service'
|
||||
styleUrls: ['init.page.scss'],
|
||||
})
|
||||
export class InitPage {
|
||||
progress: Observable<number>
|
||||
showSuccess = false
|
||||
progress: number
|
||||
sub: Subscription
|
||||
|
||||
constructor (
|
||||
public readonly stateService: StateService,
|
||||
) { }
|
||||
|
||||
ngOnInit () {
|
||||
this.progress = interval(130)
|
||||
this.sub = interval(130)
|
||||
.pipe(
|
||||
take(101),
|
||||
finalize(() => {
|
||||
this.stateService.embassyLoaded = true
|
||||
setTimeout(() => this.download(), 500)
|
||||
tap(num => {
|
||||
this.progress = num
|
||||
}),
|
||||
)
|
||||
finalize(() => {
|
||||
setTimeout(() => {
|
||||
this.stateService.embassyLoaded = true
|
||||
this.download()
|
||||
}, 500)
|
||||
}),
|
||||
).subscribe()
|
||||
}
|
||||
|
||||
ngOnDestroy () {
|
||||
if (this.sub) this.sub.unsubscribe()
|
||||
}
|
||||
|
||||
download () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<ion-card [ngClass]="!stateService.embassyLoaded ? 'hiddenPage' : ''" color="dark">
|
||||
<ion-card color="dark">
|
||||
<ion-card-header class="ion-text-center" color="success">
|
||||
<ion-icon style="font-size: 80px;" name="checkmark-circle-outline"></ion-icon>
|
||||
<ion-card-title>Setup Complete!</ion-card-title>
|
||||
@@ -25,7 +25,7 @@
|
||||
'transition': 'max-height 0.4s ease-out'
|
||||
}"
|
||||
>
|
||||
<div class="ion-padding">
|
||||
<div class="ion-padding ion-text-start">
|
||||
<p>
|
||||
To use your Embassy over Tor, visit its unique Tor address from any Tor-enabled browser.
|
||||
For a list of recommended browsers, click <a href="https://docs.start9.com/user-manual/connecting.html" target="_blank" rel="noreferrer"><b>here</b></a>.
|
||||
@@ -64,7 +64,7 @@
|
||||
'transition': 'max-height 0.4s ease-out'
|
||||
}"
|
||||
>
|
||||
<div class="ion-padding">
|
||||
<div class="ion-padding ion-text-start">
|
||||
<p>To use your Embassy locally, you must:</p>
|
||||
<ol>
|
||||
<li>Currently be connected to the same Local Area Network (LAN) as your Embassy.</li>
|
||||
|
||||
@@ -27,7 +27,3 @@ a {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.hiddenPage {
|
||||
display: none;
|
||||
}
|
||||
Reference in New Issue
Block a user