From 4ac857da5b9555b1072b0fed3750cd5cfe6187a4 Mon Sep 17 00:00:00 2001 From: Angelillo15 Date: Fri, 4 Aug 2023 23:53:40 +0200 Subject: [PATCH] Added console --- resources/scripts/components/server/console/Console.tsx | 3 ++- resources/scripts/config.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 resources/scripts/config.ts diff --git a/resources/scripts/components/server/console/Console.tsx b/resources/scripts/components/server/console/Console.tsx index 25f07439f..f90a013b7 100644 --- a/resources/scripts/components/server/console/Console.tsx +++ b/resources/scripts/components/server/console/Console.tsx @@ -15,6 +15,7 @@ import { usePersistedState } from '@/plugins/usePersistedState'; import { SocketEvent, SocketRequest } from '@/components/server/events'; import classNames from 'classnames'; import { ChevronDoubleRightIcon } from '@heroicons/react/solid'; +import NookConfig from '@/config'; import 'xterm/css/xterm.css'; import styles from './style.module.css'; @@ -52,7 +53,7 @@ const terminalProps: ITerminalOptions = { }; export default () => { - const TERMINAL_PRELUDE = '\u001b[1m\u001b[33mcontainer@pterodactyl~ \u001b[0m'; + const TERMINAL_PRELUDE = `\u001b[1m\u001b[33m${NookConfig.TERMINAL_PRELUDE} \u001b[0m`; const ref = useRef(null); const terminal = useMemo(() => new Terminal({ ...terminalProps }), []); const fitAddon = new FitAddon(); diff --git a/resources/scripts/config.ts b/resources/scripts/config.ts new file mode 100644 index 000000000..1ff8156d7 --- /dev/null +++ b/resources/scripts/config.ts @@ -0,0 +1,3 @@ +export default { + TERMINAL_PRELUDE: 'container@nookure~ ', +};