Merge branch '1.0-develop' into develop
This commit is contained in:
commit
3f7e2a565f
1 changed files with 6 additions and 0 deletions
|
@ -73,6 +73,11 @@ export default () => {
|
||||||
const isTransferring = ServerContext.useStoreState(state => state.server.data!.isTransferring);
|
const isTransferring = ServerContext.useStoreState(state => state.server.data!.isTransferring);
|
||||||
const [history, setHistory] = usePersistedState<string[]>(`${serverId}:command_history`, []);
|
const [history, setHistory] = usePersistedState<string[]>(`${serverId}:command_history`, []);
|
||||||
const [historyIndex, setHistoryIndex] = useState(-1);
|
const [historyIndex, setHistoryIndex] = useState(-1);
|
||||||
|
// SearchBarAddon has hardcoded z-index: 999 :(
|
||||||
|
const zIndex = `
|
||||||
|
.xterm-search-bar__addon {
|
||||||
|
z-index: 10;
|
||||||
|
}`;
|
||||||
|
|
||||||
const handleConsoleOutput = (line: string, prelude = false) =>
|
const handleConsoleOutput = (line: string, prelude = false) =>
|
||||||
terminal.writeln((prelude ? TERMINAL_PRELUDE : '') + line.replace(/(?:\r\n|\r|\n)$/im, '') + '\u001b[0m');
|
terminal.writeln((prelude ? TERMINAL_PRELUDE : '') + line.replace(/(?:\r\n|\r|\n)$/im, '') + '\u001b[0m');
|
||||||
|
@ -133,6 +138,7 @@ export default () => {
|
||||||
|
|
||||||
terminal.open(ref.current);
|
terminal.open(ref.current);
|
||||||
fitAddon.fit();
|
fitAddon.fit();
|
||||||
|
searchBar.addNewStyle(zIndex);
|
||||||
|
|
||||||
// Add support for capturing keys
|
// Add support for capturing keys
|
||||||
terminal.attachCustomKeyEventHandler((e: KeyboardEvent) => {
|
terminal.attachCustomKeyEventHandler((e: KeyboardEvent) => {
|
||||||
|
|
Loading…
Reference in a new issue