diff options
Diffstat (limited to 'web/html')
| -rw-r--r-- | web/html/common/qrcode_modal.html | 2 | ||||
| -rw-r--r-- | web/html/xui/inbound_info_modal.html | 2 | ||||
| -rw-r--r-- | web/html/xui/inbounds.html | 4 | ||||
| -rw-r--r-- | web/html/xui/settings.html | 48 |
4 files changed, 53 insertions, 3 deletions
diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html index 0df369ff..4be7997d 100644 --- a/web/html/common/qrcode_modal.html +++ b/web/html/common/qrcode_modal.html @@ -35,7 +35,7 @@ this.client = client; this.subId = ''; this.qrcodes = []; - this.inbound.genAllLinks(this.dbInbound.remark, client).forEach(l => { + this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, client).forEach(l => { this.qrcodes.push({ remark: l.remark, link: l.link diff --git a/web/html/xui/inbound_info_modal.html b/web/html/xui/inbound_info_modal.html index e92fc874..bd1fea72 100644 --- a/web/html/xui/inbound_info_modal.html +++ b/web/html/xui/inbound_info_modal.html @@ -264,7 +264,7 @@ this.clientSettings = this.inbound.clients ? this.inbound.clients[index] : null; this.isExpired = this.inbound.clients ? this.inbound.isExpiry(index): this.dbInbound.isExpiry; this.clientStats = this.inbound.clients ? this.dbInbound.clientStats.find(row => row.email === this.clientSettings.email) : []; - this.links = this.inbound.genAllLinks(this.dbInbound.remark, this.clientSettings); + this.links = this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, this.clientSettings); if (this.clientSettings) { if (this.clientSettings.subId) { this.subLink = this.genSubLink(this.clientSettings.subId); diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 31595f00..14371631 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -556,6 +556,7 @@ enable : false, subURI : '' }, + remarkModel: '-ieo', tgBotEnable: false, pageSize: 0, isMobile: window.innerWidth <= 768, @@ -600,6 +601,7 @@ subURI: subURI }; this.pageSize = pageSize; + this.remarkModel = remarkModel; } }, setInbounds(dbInbounds) { @@ -1191,7 +1193,7 @@ exportAllLinks() { let copyText = []; for (const dbInbound of this.dbInbounds) { - copyText.push(dbInbound.genInboundLinks); + copyText.push(dbInbound.genInboundLinks(this.remarkModel)); } txtModal.show('{{ i18n "pages.inbounds.export"}}', copyText.join('\r\n'), 'All-Inbounds'); }, diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index 24cef2af..f40b20a5 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -105,6 +105,28 @@ <a-tabs default-active-key="1"> <a-tab-pane key="1" tab='{{ i18n "pages.settings.panelSettings"}}'> <a-list item-layout="horizontal"> + <a-list-item> + <a-row style="padding: 20px"> + <a-col :lg="24" :xl="12"> + <a-list-item-meta title='{{ i18n "pages.settings.remarkModel"}}'> + <template slot="description">{{ i18n "pages.settings.sampleRemark"}}: <i>#[[ remarkSample ]]</i></template> + </a-list-item-meta> + </a-col> + <a-col :lg="24" :xl="12"> + <a-input-group style="width: 100%;"> + <a-select style="padding-right: .5rem; min-width: 80%; width: auto;" + mode="multiple" + v-model="remarkModel" + :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option v-for="(value, key) in remarkModels" :value="key">[[ value ]]</a-select-option> + </a-select> + <a-select style="width: 20%;" v-model="remarkSeparator" :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option v-for="key in remarkSeparators" :value="key">[[ key ]]</a-select-option> + </a-select> + </a-input-group> + </a-col> + </a-row> + </a-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.panelListeningIP"}}' desc='{{ i18n "pages.settings.panelListeningIPDesc"}}' v-model="allSetting.webListen"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.panelListeningDomain"}}' desc='{{ i18n "pages.settings.panelListeningDomainDesc"}}' v-model="allSetting.webDomain"></setting-list-item> <setting-list-item type="number" title='{{ i18n "pages.settings.panelPort"}}' desc='{{ i18n "pages.settings.panelPortDesc"}}' v-model="allSetting.webPort" :min="0"></setting-list-item> @@ -272,6 +294,31 @@ saveBtnDisable: true, user: {}, lang: getLang(), + showAlert: false, + remarkModels: {i:'Inbound',e:'Email',o:'Other'}, + remarkSeparators: [' ','-','_','@',':','~','|',',','.','/'], + remarkSample: '', + get remarkModel() { + rm = this.allSetting.remarkModel; + return rm.length>1 ? rm.substring(1).split('') : []; + }, + set remarkModel(value) { + rs = this.allSetting.remarkModel[0]; + this.allSetting.remarkModel = rs + value.join(''); + this.changeRemarkSample(); + }, + get remarkSeparator() { + return this.allSetting.remarkModel.length > 1 ? this.allSetting.remarkModel.charAt(0) : '-'; + }, + set remarkSeparator(value) { + this.allSetting.remarkModel = value + this.allSetting.remarkModel.substring(1); + this.changeRemarkSample(); + }, + changeRemarkSample(){ + sample = [] + this.remarkModel.forEach(r => sample.push(this.remarkModels[r])); + this.remarkSample = sample.length == 0 ? '' : sample.join(this.remarkSeparator); + } }, methods: { loading(spinning = true) { @@ -284,6 +331,7 @@ if (msg.success) { this.oldAllSetting = new AllSetting(msg.obj); this.allSetting = new AllSetting(msg.obj); + app.changeRemarkSample(); this.saveBtnDisable = true; } await this.fetchUserSecret(); |
