diff --git a/frontend/src/version.json b/frontend/src/version.json index dea0a5d6..09e0afa3 100644 --- a/frontend/src/version.json +++ b/frontend/src/version.json @@ -1 +1 @@ -{"version":"1.7.9","build_id":87,"total_build":157} \ No newline at end of file +{"version":"1.7.9","build_id":88,"total_build":158} \ No newline at end of file diff --git a/frontend/src/views/domain/DomainEdit.vue b/frontend/src/views/domain/DomainEdit.vue index e72ec409..69436c61 100644 --- a/frontend/src/views/domain/DomainEdit.vue +++ b/frontend/src/views/domain/DomainEdit.vue @@ -4,7 +4,7 @@ import CodeEditor from '@/components/CodeEditor/CodeEditor.vue' import NgxConfigEditor from '@/views/domain/ngx_conf/NgxConfigEditor' import {useGettext} from 'vue3-gettext' -import {computed, reactive, ref, watch} from 'vue' +import {computed, provide, reactive, ref, watch} from 'vue' import {useRoute, useRouter} from 'vue-router' import domain from '@/api/domain' import ngx from '@/api/ngx' @@ -124,7 +124,7 @@ const save = async () => { } } - domain.save(name.value, { + await domain.save(name.value, { name: filename.value || name.value, content: configText.value, overwrite: true }).then(r => { @@ -134,7 +134,6 @@ const save = async () => { }).catch(handle_parse_error).finally(() => { saving.value = false }) - } function enable() { @@ -165,6 +164,8 @@ function on_change_enabled(checked: boolean) { const editor_md = computed(() => history_chatgpt_record?.value?.length > 1 ? 16 : 24) const chat_md = computed(() => history_chatgpt_record?.value?.length > 1 ? 8 : 24) + +provide('save_site_config', save)