use mode in console message

This commit is contained in:
Shin'ya Ueoka 2017-10-08 18:41:44 +09:00
parent f6996a2274
commit b0d2b53281
11 changed files with 36 additions and 43 deletions

View file

@ -72,14 +72,14 @@ export default class ConsoleComponent {
update() {
let state = this.store.getState();
if (!this.prevState.commandShown && state.commandShown) {
if (this.prevState.mode !== 'command' && state.mode === 'command') {
this.showCommand(state.commandText);
} else if (!state.commandShown) {
} else if (state.mode !== 'command') {
this.hideCommand();
}
if (state.errorShown) {
this.setErrorText(state.errorText);
if (state.mode === 'error') {
this.setErrorText(state.messageText);
this.showError();
} else {
this.hideError();