Hopefully the last small tweaks and fixes to transfer logs
This commit is contained in:
parent
8d297a0918
commit
5668a780e2
3 changed files with 14 additions and 10 deletions
|
@ -67,6 +67,7 @@ export default () => {
|
|||
const { connected, instance } = ServerContext.useStoreState(state => state.socket);
|
||||
const [ canSendCommands ] = usePermissions([ 'control.console' ]);
|
||||
const serverId = ServerContext.useStoreState(state => state.server.data!.id);
|
||||
const isTransferring = ServerContext.useStoreState(state => state.server.data!.isTransferring)
|
||||
const [ history, setHistory ] = usePersistedState<string[]>(`${serverId}:command_history`, []);
|
||||
const [ historyIndex, setHistoryIndex ] = useState(-1);
|
||||
|
||||
|
@ -165,7 +166,10 @@ export default () => {
|
|||
|
||||
useEffect(() => {
|
||||
if (connected && instance) {
|
||||
// terminal.clear();
|
||||
// Do not clear the console if the server is being transferred.
|
||||
if (!isTransferring) {
|
||||
terminal.clear();
|
||||
}
|
||||
|
||||
instance.addListener('status', handlePowerChangeEvent);
|
||||
instance.addListener('console output', handleConsoleOutput);
|
||||
|
|
Reference in a new issue