diff --git a/frontend/src/views/domain/DomainAdd.vue b/frontend/src/views/domain/DomainAdd.vue index ede6c36d..b3af1f54 100644 --- a/frontend/src/views/domain/DomainAdd.vue +++ b/frontend/src/views/domain/DomainAdd.vue @@ -12,7 +12,7 @@ import {useRouter} from 'vue-router' const {$gettext, interpolate} = useGettext() const config = reactive({name: ''}) -let ngx_config = reactive({ +const ngx_config = reactive({ servers: [{ directives: [], locations: [] diff --git a/frontend/src/views/domain/ngx_conf/LocationEditor.vue b/frontend/src/views/domain/ngx_conf/LocationEditor.vue index 345d0c44..f92412bf 100644 --- a/frontend/src/views/domain/ngx_conf/LocationEditor.vue +++ b/frontend/src/views/domain/ngx_conf/LocationEditor.vue @@ -2,6 +2,7 @@ import CodeEditor from '@/components/CodeEditor' import {useGettext} from 'vue3-gettext' import {reactive, ref} from 'vue' +import {DeleteOutlined} from '@ant-design/icons-vue' const {$gettext} = useGettext() @@ -24,7 +25,9 @@ function add() { function save() { adding.value = false - props.locations?.push(location) + props.locations?.push({ + ...location + }) } function remove(index: number) { @@ -45,7 +48,19 @@ function remove(index: number) { - +
+ + + + + + +
@@ -73,5 +88,12 @@ function remove(index: number) { .ant-card { margin: 10px 0; box-shadow: unset; + + .input-wrapper { + display: flex; + gap: 10px; + align-items: center; + width: 100%; + } } diff --git a/frontend/src/views/domain/ngx_conf/NgxConfigEditor.vue b/frontend/src/views/domain/ngx_conf/NgxConfigEditor.vue index 5601cea0..bede9e8e 100644 --- a/frontend/src/views/domain/ngx_conf/NgxConfigEditor.vue +++ b/frontend/src/views/domain/ngx_conf/NgxConfigEditor.vue @@ -20,6 +20,7 @@ const name = ref(route.params.name) function change_tls(r: any) { if (r) { // deep copy servers[0] to servers[1] + console.log(props.ngx_config) const server = JSON.parse(JSON.stringify(props.ngx_config.servers[0])) props.ngx_config.servers.push(server) @@ -143,7 +144,7 @@ const autoCertRef = computed({