Fix order of command
This commit is contained in:
parent
64dea63457
commit
92470bd346
|
@ -65,7 +65,7 @@ export const processes = {
|
||||||
export const COMMANDS = createRequestTypes('COMMANDS');
|
export const COMMANDS = createRequestTypes('COMMANDS');
|
||||||
export const commands = {
|
export const commands = {
|
||||||
post: (command) => action(COMMANDS[REQUEST], {command}),
|
post: (command) => action(COMMANDS[REQUEST], {command}),
|
||||||
success: (command) => action(COMMANDS[SUCCESS], {commands: [command]}),
|
success: (command) => action(COMMANDS[SUCCESS], {commands: [{timestamp: new Date().getTime(), ...command}]}),
|
||||||
failure: (error) => action(COMMANDS[FAILURE], {error})
|
failure: (error) => action(COMMANDS[FAILURE], {error})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
.console--results {
|
.console--results {
|
||||||
height: 200px;
|
height: 200px;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
background-color: #000000;
|
||||||
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ class Console extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleChange(event) {
|
handleChange(event) {
|
||||||
|
event.preventDefault();
|
||||||
this.setState({value: event.target.value});
|
this.setState({value: event.target.value});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,9 @@ const sorter = {
|
||||||
},
|
},
|
||||||
messages: function(a, b) {
|
messages: function(a, b) {
|
||||||
return a.time - b.time;
|
return a.time - b.time;
|
||||||
|
},
|
||||||
|
commands: function(a, b) {
|
||||||
|
return b.timestamp - a.timestamp;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue