remove loading section in BrawlView
This commit is contained in:
parent
a19e541e1e
commit
96aa4f83b9
2 changed files with 0 additions and 7 deletions
|
@ -11,7 +11,6 @@ export class BrawlViewModel extends EventEmitter {
|
||||||
this._storageFactory = storageFactory;
|
this._storageFactory = storageFactory;
|
||||||
this._clock = clock;
|
this._clock = clock;
|
||||||
|
|
||||||
this._loading = false;
|
|
||||||
this._error = null;
|
this._error = null;
|
||||||
this._sessionViewModel = null;
|
this._sessionViewModel = null;
|
||||||
this._loginViewModel = null;
|
this._loginViewModel = null;
|
||||||
|
@ -75,8 +74,6 @@ export class BrawlViewModel extends EventEmitter {
|
||||||
get activeSection() {
|
get activeSection() {
|
||||||
if (this._error) {
|
if (this._error) {
|
||||||
return "error";
|
return "error";
|
||||||
} else if(this._loading) {
|
|
||||||
return "loading";
|
|
||||||
} else if (this._sessionViewModel) {
|
} else if (this._sessionViewModel) {
|
||||||
return "session";
|
return "session";
|
||||||
} else if (this._loginViewModel) {
|
} else if (this._loginViewModel) {
|
||||||
|
@ -86,11 +83,9 @@ export class BrawlViewModel extends EventEmitter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_setSection(setter) {
|
_setSection(setter) {
|
||||||
// clear all members the activeSection depends on
|
// clear all members the activeSection depends on
|
||||||
this._error = null;
|
this._error = null;
|
||||||
this._loading = false;
|
|
||||||
this._sessionViewModel = null;
|
this._sessionViewModel = null;
|
||||||
this._loginViewModel = null;
|
this._loginViewModel = null;
|
||||||
this._sessionPickerViewModel = null;
|
this._sessionPickerViewModel = null;
|
||||||
|
|
|
@ -16,8 +16,6 @@ export class BrawlView {
|
||||||
switch (this._vm.activeSection) {
|
switch (this._vm.activeSection) {
|
||||||
case "error":
|
case "error":
|
||||||
return new StatusView({header: "Something went wrong", message: this._vm.errorText});
|
return new StatusView({header: "Something went wrong", message: this._vm.errorText});
|
||||||
case "loading":
|
|
||||||
return new StatusView({header: "Loading", message: this._vm.loadingText});
|
|
||||||
case "session":
|
case "session":
|
||||||
return new SessionView(this._vm.sessionViewModel);
|
return new SessionView(this._vm.sessionViewModel);
|
||||||
case "login":
|
case "login":
|
||||||
|
|
Reference in a new issue