View updates
This commit is contained in:
@@ -50,11 +50,10 @@ export class LoginPageComponent implements OnInit {
|
||||
email: responsePayload.email,
|
||||
avatar: responsePayload.picture
|
||||
});
|
||||
await this.auth$.getAPIToken(response.credential);
|
||||
this.auth$.ping();
|
||||
this.ngZone$.run(() => {
|
||||
this.router$.navigate(['/app']);
|
||||
});
|
||||
await this.auth$.getAPIToken(response.credential);
|
||||
} catch (e) {
|
||||
console.error('Get user error', e);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ export class LoaderInterceptor implements HttpInterceptor {
|
||||
private tasks: number = 0;
|
||||
|
||||
constructor(
|
||||
private _data: DataService
|
||||
private data$: DataService
|
||||
) { }
|
||||
|
||||
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
|
||||
@@ -29,14 +29,14 @@ export class LoaderInterceptor implements HttpInterceptor {
|
||||
addTask() {
|
||||
this.tasks++;
|
||||
if (this.tasks === 1) {
|
||||
this._data.showLoader.next(true);
|
||||
this.data$.showLoader.next(true);
|
||||
}
|
||||
}
|
||||
|
||||
removeTask() {
|
||||
this.tasks--;
|
||||
if (this.tasks === 0) {
|
||||
this._data.showLoader.next(false);
|
||||
this.data$.showLoader.next(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<div class="loading-container" *ngIf="loading">
|
||||
<img class="loading-img" src="../../assets/loader.gif" />
|
||||
</div>
|
||||
<div class="flip-container" *ngIf="device$.flipPhone">
|
||||
</div>
|
||||
<div class="flip-container" *ngIf="device$.flipPhone">
|
||||
<div class="flip-msg">
|
||||
Obróć telefon.<br>
|
||||
<mat-icon>screen_rotation</mat-icon>
|
||||
Obróć telefon.<br>
|
||||
<mat-icon>screen_rotation</mat-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-container">
|
||||
<mat-toolbar color="primary">
|
||||
<button mat-icon-button (click)="snav.toggle()">
|
||||
|
||||
@@ -26,7 +26,7 @@ export class MainViewComponent {
|
||||
public device$: DeviceService,
|
||||
private router$: Router,
|
||||
private swUpdate$: SwUpdate,
|
||||
) {
|
||||
) {
|
||||
this.swUpdate$.versionUpdates.subscribe(() => {
|
||||
this.reloadApp();
|
||||
});
|
||||
@@ -37,11 +37,10 @@ export class MainViewComponent {
|
||||
});
|
||||
|
||||
//listen to loading subject
|
||||
data$.showLoader.pipe(delay(0)).subscribe(loading => {
|
||||
data$.showLoader.subscribe(loading => {
|
||||
this.loading = loading;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
reloadApp() {
|
||||
document.location.reload();
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 54 KiB |
@@ -5,8 +5,8 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
api: {
|
||||
url: "http://localhost:5400/api"
|
||||
//url: "https://diuna.bim-it.pl/api"
|
||||
//url: "http://localhost:5400/api"
|
||||
url: "https://diuna.bim-it.pl/api"
|
||||
},
|
||||
google: {
|
||||
clientId: "107631825312-bkfe438ehr9k9ecb2h76g802tj6advma.apps.googleusercontent.com"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "Diuna",
|
||||
"short_name": "Diuna",
|
||||
"theme_color": "#FF9800",
|
||||
"background_color": "#FF9800",
|
||||
"background_color": "#fafafa",
|
||||
"display": "standalone",
|
||||
"scope": "./",
|
||||
"start_url": "./",
|
||||
|
||||
Reference in New Issue
Block a user