More tweaks

This commit is contained in:
Pieter Vander Vennet 2020-07-19 00:13:45 +02:00
parent fe4fa9dd0e
commit 5e0d54601c
8 changed files with 39 additions and 15 deletions

View file

@ -39,11 +39,10 @@ export class CenterMessageBox extends UIElement {
if (this._centermessage.data != "") {
return this._centermessage.data;
}
if (this._zoomInMore.data) {
return "Zoom in om de data te zien en te bewerken";
} else if (this._queryRunning.data) {
if (this._queryRunning.data) {
return "Data wordt geladen...";
} else if (this._zoomInMore.data) {
return "Zoom in om de data te zien en te bewerken";
}
return "Klaar!";
}

View file

@ -1,20 +1,24 @@
import {UIElement} from "./UIElement";
import {UIEventSource} from "./UIEventSource";
import {Changes} from "../Logic/Changes";
export class PendingChanges extends UIElement {
private _pendingChangesCount: UIEventSource<number>;
private _countdown: UIEventSource<number>;
private _isSaving: UIEventSource<boolean>;
constructor(pendingChangesCount: UIEventSource<number>,
countdown: UIEventSource<number>,
isSaving: UIEventSource<boolean>) {
super(pendingChangesCount);
this.ListenTo(isSaving);
constructor(changes: Changes,
countdown: UIEventSource<number>) {
super(changes.pendingChangesES);
this.ListenTo(changes.isSaving);
this.ListenTo(countdown);
this._pendingChangesCount = pendingChangesCount;
this._pendingChangesCount = changes.pendingChangesES;
this._countdown = countdown;
this._isSaving = isSaving;
this._isSaving = changes.isSaving;
this.onClick(() => {
changes.uploadAll();
})
}
protected InnerRender(): string {