diff --git a/web/html/xui/dns_modal.html b/web/html/xui/dns_modal.html
index 8d0c3631..0abde2f3 100644
--- a/web/html/xui/dns_modal.html
+++ b/web/html/xui/dns_modal.html
@@ -52,60 +52,17 @@
if (typeof dnsServer == 'object') {
this.dnsServer = dnsServer;
} else {
- this.dnsServer.address = dnsServer ?? '';
+ this.dnsServer = {
+ address: dnsServer ?? "",
+ domains: [],
+ queryStrategy: 'UseIP',
+ }
}
} else {
this.dnsServer = {
address: "localhost",
domains: [],
queryStrategy: 'UseIP',
-
- },
- ok() {
- domains = dnsModal.dnsServer.domains.filter(d => d.length>0);
- dnsModal.dnsServer.domains = domains;
- newDnsServer = domains.length > 0 ? dnsModal.dnsServer : dnsModal.dnsServer.address;
- ObjectUtil.execute(dnsModal.confirm, newDnsServer);
- },
- show({ title='', okText='{{ i18n "confirm" }}', dnsServer, confirm=(dnsServer)=>{}, isEdit=false }) {
- this.title = title;
- this.okText = okText;
- this.confirm = confirm;
- this.visible = true;
- if(isEdit) {
- if (typeof dnsServer == 'object'){
- this.dnsServer = dnsServer;
- } else {
- this.dnsServer = {
- address: dnsServer ?? "",
- domains: [],
- queryStrategy: 'UseIP',
- }
- }
- } else {
- this.dnsServer = {
- address: "localhost",
- domains: [],
- queryStrategy: 'UseIP',
- }
- }
- this.isEdit = isEdit;
- },
- close() {
- dnsModal.visible = false;
- },
- };
-
- new Vue({
- delimiters: ['[[', ']]'],
- el: '#dns-modal',
- data: {
- dnsModal: dnsModal,
- },
- computed: {
- isAdvanced: {
- get: function () { return dnsModal.dnsServer.domains.length>0 }
- }
}
}
this.isEdit = isEdit;
@@ -129,4 +86,4 @@
}
});
-{{end}}
+{{end}}
\ No newline at end of file