From 1a285a69286c2d9221c5d2fa59cd8ad27d9d89c6 Mon Sep 17 00:00:00 2001 From: Suwings Date: Sat, 29 Jan 2022 13:55:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entity/instance/Instance_config.ts | 7 ++++++- src/entity/instance/instance.ts | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/entity/instance/Instance_config.ts b/src/entity/instance/Instance_config.ts index 9eeee12..9bdbe2f 100644 --- a/src/entity/instance/Instance_config.ts +++ b/src/entity/instance/Instance_config.ts @@ -44,6 +44,11 @@ export default class InstanceConfig { public fileCode: string = "utf-8"; public processType: string = "general"; + // terminal option + public terminalOption = { + haveColor: true + }; + // Event task public eventTask = { autoStart: false, @@ -61,7 +66,7 @@ export default class InstanceConfig { cpuUsage: null, maxSpace: null, io: null, - network: null, + network: null }; public pingConfig = { diff --git a/src/entity/instance/instance.ts b/src/entity/instance/instance.ts index 161abf3..2975731 100644 --- a/src/entity/instance/instance.ts +++ b/src/entity/instance/instance.ts @@ -148,6 +148,9 @@ export default class Instance extends EventEmitter { configureEntityParams(this.config.eventTask, cfg.eventTask, "autoRestart", Boolean); configureEntityParams(this.config.eventTask, cfg.eventTask, "ignore", Boolean); } + if (cfg.terminalOption) { + configureEntityParams(this.config.terminalOption, cfg.terminalOption, "haveColor", Boolean); + } StorageSubsystem.store("InstanceConfig", this.instanceUuid, this.config); }