From 28a17a80ec0c4a0f82e8acfca351651d762b3ec9 Mon Sep 17 00:00:00 2001 From: konstpic <156318483+konstpic@users.noreply.github.com> Date: Sun, 28 Sep 2025 22:00:16 +0300 Subject: feat: add ldap component (#3568) * add ldap component * fix: fix russian comments, tls cert verify default true * feat: remove replaces go mod for local dev --- web/html/settings.html | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'web/html/settings.html') diff --git a/web/html/settings.html b/web/html/settings.html index 22ad3907..26b936fa 100644 --- a/web/html/settings.html +++ b/web/html/settings.html @@ -119,6 +119,7 @@ saveBtnDisable: true, user: {}, lang: LanguageManager.getLanguage(), + inboundOptions: [], remarkModels: { i: 'Inbound', e: 'Email', o: 'Other' }, remarkSeparators: [' ', '-', '_', '@', ':', '~', '|', ',', '.', '/'], datepickerList: [{ name: 'Gregorian (Standard)', value: 'gregorian' }, { name: 'Jalalian (شمسی)', value: 'jalalian' }], @@ -242,6 +243,17 @@ this.saveBtnDisable = true; } }, + async loadInboundTags() { + const msg = await HttpUtil.get("/panel/api/inbounds/list"); + if (msg && msg.success && Array.isArray(msg.obj)) { + this.inboundOptions = msg.obj.map(ib => ({ + label: `${ib.tag} (${ib.protocol}@${ib.port})`, + value: ib.tag, + })); + } else { + this.inboundOptions = []; + } + }, async updateAllSetting() { this.loading(true); const msg = await HttpUtil.post("/panel/setting/update", this.allSetting); @@ -368,6 +380,15 @@ }, }, computed: { + ldapInboundTagList: { + get: function() { + const csv = this.allSetting.ldapInboundTags || ""; + return csv.length ? csv.split(',').map(s => s.trim()).filter(Boolean) : []; + }, + set: function(list) { + this.allSetting.ldapInboundTags = Array.isArray(list) ? list.join(',') : ''; + } + }, fragment: { get: function () { return this.allSetting?.subJsonFragment != ""; }, set: function (v) { @@ -534,7 +555,7 @@ }, async mounted() { await this.getAllSetting(); - + await this.loadInboundTags(); while (true) { await PromiseUtil.sleep(1000); this.saveBtnDisable = this.oldAllSetting.equals(this.allSetting); -- cgit v1.2.3