mirror of
https://github.com/pterodactyl/panel.git
synced 2025-02-01 03:11:35 +01:00
Limit per server command history to 32.
This commit is contained in:
parent
a4d3e7db1b
commit
6e4261b3a7
@ -97,7 +97,7 @@ export default () => {
|
||||
|
||||
const command = e.currentTarget.value;
|
||||
if (e.key === 'Enter' && command.length > 0) {
|
||||
setHistory(prevHistory => [ command, ...prevHistory! ]);
|
||||
setHistory(prevHistory => [ command, ...prevHistory! ].slice(0, 32));
|
||||
setHistoryIndex(-1);
|
||||
|
||||
instance && instance.send('send command', command);
|
||||
|
Loading…
x
Reference in New Issue
Block a user