From dcbaf1e7e42490dc71b1acf1aa8e5278eb471fc1 Mon Sep 17 00:00:00 2001 From: Lazy <2211717435@qq.com> Date: Wed, 13 Dec 2023 11:45:56 +0800 Subject: [PATCH] Feat: edit raw file --- .../src/widgets/instance/ServerConfigFile.vue | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/frontend/src/widgets/instance/ServerConfigFile.vue b/frontend/src/widgets/instance/ServerConfigFile.vue index 6268856e..b7c02c55 100644 --- a/frontend/src/widgets/instance/ServerConfigFile.vue +++ b/frontend/src/widgets/instance/ServerConfigFile.vue @@ -11,6 +11,7 @@ import { toUnicode } from "@/tools/common"; import Loading from "@/components/Loading.vue"; import configComponent from "@/components/InstanceConfigEditor.vue"; import { DownOutlined } from "@ant-design/icons-vue"; +import FileEditor from "./dialogs/FileEditor.vue"; const props = defineProps<{ card: LayoutCard; @@ -92,6 +93,11 @@ const save = async () => { } }; +const FileEditorDialog = ref>(); +const toEditRawFile = () => { + FileEditorDialog.value?.openDialog(configPath ?? "", configName ?? ""); +}; + const refresh = async () => { await render(); message.success(t("TXT_CODE_7863f28d")); @@ -119,16 +125,16 @@ onMounted(async () => { {{ t("TXT_CODE_d080f2d7") }} - + {{ t("TXT_CODE_1f61e5a3") }}