Vadelius / swlsimNET

Combat-Simulator for Secret World Legends
Other
10 stars 7 forks source link

Display something is happening when simulation is in progress #67

Open niklasgs opened 6 years ago

niklasgs commented 6 years ago

When you press the submit button on Import view there is a few seconds where nothing happens. Previously in WPF we had a progressbar indicating the progress.

Add progressbar again or maybe just inactivate the sumbit button and display a text something is actually happening...

Vadelius commented 6 years ago

Context added => During this call in ClientApp/app/components/Import.component.ts

    onSubmit(): void {
        let formInput: any = this.myform.value;
        this.http
            .post("/api/values", formInput)
            .subscribe(
              <-- LOADING HERE (?) -->
                response => this.extractData(response, this.router),
                this.handleError
            );
    }

    private extractData(res: Response, router: Router) {
        let body = res.text();
        localStorage.setItem("Results", body);
        this.router.navigate(["/result"]);
    }