mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 09:44:45 +02: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;
|
const command = e.currentTarget.value;
|
||||||
if (e.key === 'Enter' && command.length > 0) {
|
if (e.key === 'Enter' && command.length > 0) {
|
||||||
setHistory(prevHistory => [ command, ...prevHistory! ]);
|
setHistory(prevHistory => [ command, ...prevHistory! ].slice(0, 32));
|
||||||
setHistoryIndex(-1);
|
setHistoryIndex(-1);
|
||||||
|
|
||||||
instance && instance.send('send command', command);
|
instance && instance.send('send command', command);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user