mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
28 lines
769 B
TypeScript
28 lines
769 B
TypeScript
import { Component } from '@angular/core'
|
|
import { iosTransitionAnimation, NavController } from '@ionic/angular'
|
|
import { StateService } from 'src/app/services/state.service'
|
|
|
|
@Component({
|
|
selector: 'app-loading',
|
|
templateUrl: 'loading.page.html',
|
|
styleUrls: ['loading.page.scss'],
|
|
})
|
|
export class LoadingPage {
|
|
constructor(
|
|
public stateService: StateService,
|
|
private navCtrl: NavController
|
|
) {}
|
|
|
|
ngOnInit () {
|
|
this.stateService.pollDataTransferProgress()
|
|
const progSub = this.stateService.dataProgSubject.subscribe(async progress => {
|
|
if(progress === 1) {
|
|
progSub.unsubscribe()
|
|
await this.navCtrl.navigateForward(`/success`, { animationDirection: 'forward', animation: iosTransitionAnimation })
|
|
}
|
|
})
|
|
}
|
|
|
|
}
|
|
|