diff --git a/setup-wizard/src/app/pages/init/init.page.html b/setup-wizard/src/app/pages/init/init.page.html index a7e8f2929..bb97e87e5 100644 --- a/setup-wizard/src/app/pages/init/init.page.html +++ b/setup-wizard/src/app/pages/init/init.page.html @@ -6,15 +6,17 @@
- - + + + + Initializing Embassy - Progress: {{ progress | async }}% + Progress: {{ progress }}% - +

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.

diff --git a/setup-wizard/src/app/pages/init/init.page.ts b/setup-wizard/src/app/pages/init/init.page.ts index 200985c23..cad4b99ea 100644 --- a/setup-wizard/src/app/pages/init/init.page.ts +++ b/setup-wizard/src/app/pages/init/init.page.ts @@ -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 - 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 () { diff --git a/setup-wizard/src/app/pages/success/success.page.html b/setup-wizard/src/app/pages/success/success.page.html index a83b5f07f..413d1689a 100644 --- a/setup-wizard/src/app/pages/success/success.page.html +++ b/setup-wizard/src/app/pages/success/success.page.html @@ -1,5 +1,5 @@ - + Setup Complete! @@ -25,7 +25,7 @@ 'transition': 'max-height 0.4s ease-out' }" > -
+

To use your Embassy over Tor, visit its unique Tor address from any Tor-enabled browser. For a list of recommended browsers, click here. @@ -64,7 +64,7 @@ 'transition': 'max-height 0.4s ease-out' }" > -

+

To use your Embassy locally, you must:

  1. Currently be connected to the same Local Area Network (LAN) as your Embassy.
  2. diff --git a/setup-wizard/src/app/pages/success/success.page.scss b/setup-wizard/src/app/pages/success/success.page.scss index 76545ec7e..b7afab096 100644 --- a/setup-wizard/src/app/pages/success/success.page.scss +++ b/setup-wizard/src/app/pages/success/success.page.scss @@ -27,7 +27,3 @@ a { font-size: 24px; } } - -.hiddenPage { - display: none; -} \ No newline at end of file