File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/views/components/providerForm Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,9 @@ import useFormManage from '@/composables/useFormManage.js'
103103import useFormRegist from ' @/composables/useFormRegist.js'
104104import AddonForm from ' ../baseForm/AddonsForm.vue'
105105import BooleanForm from ' ../baseForm/BooleanForm.vue'
106+ import { Base64 } from ' js-base64'
107+
108+ const needDecodeConfigKeys = [' server-config-file-content' , ' agent-config-file-content' ]
106109
107110const props = defineProps ({
108111 desc: {
@@ -139,6 +142,12 @@ watch(
139142 dashboardUI .value = true
140143 }
141144 // Compatible with older versions end
145+ needDecodeConfigKeys .forEach ((k ) => {
146+ const v = form .config [k]
147+ if (v) {
148+ form .config [k] = Base64 .decode (v)
149+ }
150+ })
142151 },
143152 { immediate: true }
144153)
@@ -166,6 +175,12 @@ const getForm = () => {
166175 if (dashboardUI .value ) {
167176 f .config .enable .push (' explorer' )
168177 }
178+ needDecodeConfigKeys .forEach ((k ) => {
179+ const v = f .config [k]? .trim ()
180+ if (v) {
181+ f .config [k] = Base64 .encode (v)
182+ }
183+ })
169184 return [
170185 { path: ' config' , value: f .config },
171186 { path: ' options' , value: f .options }
You can’t perform that action at this time.
0 commit comments