Skip to content

Commit

Permalink
adapting family protection in dns
Browse files Browse the repository at this point in the history
  • Loading branch information
alireza0 committed Feb 19, 2024
1 parent aae0011 commit 0829116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/html/xui/xray.html
Original file line number Diff line number Diff line change
Expand Up @@ -1291,14 +1291,14 @@
familyProtectSettings: {
get: function () {
if (!this.templateSettings || !this.templateSettings.dns || !this.templateSettings.dns.servers) return false;
return doAllItemsExist(this.templateSettings.dns.servers, this.settingsData.familyProtectDNS.servers);
return doAllItemsExist(this.settingsData.familyProtectDNS.servers, this.templateSettings.dns.servers);
},
set: function (newValue) {
newTemplateSettings = this.templateSettings;
if (newValue) {
newTemplateSettings.dns = this.settingsData.familyProtectDNS;
} else {
newTemplateSettings.dns?.servers?.filter(data => !this.settingsData.familyProtectDNS.servers.includes(data))
newTemplateSettings.dns.servers = newTemplateSettings.dns?.servers?.filter(data => !this.settingsData.familyProtectDNS.servers.includes(data))
}
this.templateSettings = newTemplateSettings;
},
Expand Down

0 comments on commit 0829116

Please sign in to comment.