diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-18 14:56:04 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-18 14:56:04 +0300 |
| commit | 59ea2645db827335a0689d2fb7aeeef4e52af52b (patch) | |
| tree | a52caa80571fef4919c3df59a4bceacd60ba6aa6 /web/html | |
| parent | 8c8d280f147ce4e8f604080d1dbf066332e55efc (diff) | |
new: subJsonEnable
after this subEnable by default is true
and subJsonEnable is false
Diffstat (limited to 'web/html')
| -rw-r--r-- | web/html/inbounds.html | 6 | ||||
| -rw-r--r-- | web/html/modals/inbound_info_modal.html | 4 | ||||
| -rw-r--r-- | web/html/modals/qrcode_modal.html | 6 | ||||
| -rw-r--r-- | web/html/settings.html | 4 | ||||
| -rw-r--r-- | web/html/settings/panel/subscription/general.html | 7 | ||||
| -rw-r--r-- | web/html/settings/panel/subscription/subpage.html | 4 |
6 files changed, 22 insertions, 9 deletions
diff --git a/web/html/inbounds.html b/web/html/inbounds.html index 1c48480d..5f17c98b 100644 --- a/web/html/inbounds.html +++ b/web/html/inbounds.html @@ -736,10 +736,11 @@ refreshing: false, refreshInterval: Number(localStorage.getItem("refreshInterval")) || 5000, subSettings: { - enable: false, + enable: true, subTitle: '', subURI: '', subJsonURI: '', + subJsonEnable: false, }, remarkModel: '-ieo', datepicker: 'gregorian', @@ -795,7 +796,8 @@ enable: subEnable, subTitle: subTitle, subURI: subURI, - subJsonURI: subJsonURI + subJsonURI: subJsonURI, + subJsonEnable: subJsonEnable, }; this.pageSize = pageSize; this.remarkModel = remarkModel; diff --git a/web/html/modals/inbound_info_modal.html b/web/html/modals/inbound_info_modal.html index 5112ec1c..55d9919c 100644 --- a/web/html/modals/inbound_info_modal.html +++ b/web/html/modals/inbound_info_modal.html @@ -308,7 +308,7 @@ </tr-info-title> <a :href="[[ infoModal.subLink ]]" target="_blank">[[ infoModal.subLink ]]</a> </tr-info-row> - <tr-info-row class="tr-info-row"> + <tr-info-row class="tr-info-row" v-if="app.subSettings.subJsonEnable"> <tr-info-title class="tr-info-title"> <a-tag color="purple">Json Link</a-tag> <a-tooltip title='{{ i18n "copy" }}'> @@ -548,7 +548,7 @@ if (this.clientSettings) { if (this.clientSettings.subId) { this.subLink = this.genSubLink(this.clientSettings.subId); - this.subJsonLink = this.genSubJsonLink(this.clientSettings.subId); + this.subJsonLink = app.subSettings.subJsonEnable ? this.genSubJsonLink(this.clientSettings.subId) : ''; } } this.visible = true; diff --git a/web/html/modals/qrcode_modal.html b/web/html/modals/qrcode_modal.html index ef438b74..cdbb585b 100644 --- a/web/html/modals/qrcode_modal.html +++ b/web/html/modals/qrcode_modal.html @@ -30,7 +30,7 @@ </tr-qr-bg-inner> </tr-qr-bg> </tr-qr-box> - <tr-qr-box class="qr-box"> + <tr-qr-box class="qr-box" v-if="app.subSettings.subJsonEnable"> <a-tag color="purple" class="qr-tag"><span>{{ i18n "pages.settings.subSettings"}} Json</span></a-tag> <tr-qr-bg class="qr-bg-sub"> <tr-qr-bg-inner class="qr-bg-sub-inner"> @@ -262,7 +262,9 @@ if (qrModal.client && qrModal.client.subId) { qrModal.subId = qrModal.client.subId; this.setQrCode("qrCode-sub", this.genSubLink(qrModal.subId)); - this.setQrCode("qrCode-subJson", this.genSubJsonLink(qrModal.subId)); + if (app.subSettings.subJsonEnable) { + this.setQrCode("qrCode-subJson", this.genSubJsonLink(qrModal.subId)); + } } qrModal.qrcodes.forEach((element, index) => { this.setQrCode("qrCode-" + index, element.link); diff --git a/web/html/settings.html b/web/html/settings.html index 0c88f518..22ad3907 100644 --- a/web/html/settings.html +++ b/web/html/settings.html @@ -79,7 +79,7 @@ </template> {{ template "settings/panel/subscription/general" . }} </a-tab-pane> - <a-tab-pane key="5" v-if="allSetting.subEnable" :style="{ paddingTop: '20px' }"> + <a-tab-pane key="5" v-if="allSetting.subJsonEnable" :style="{ paddingTop: '20px' }"> <template #tab> <a-icon type="code"></a-icon> <span>{{ i18n "pages.settings.subSettings" }} (JSON)</span> @@ -523,6 +523,8 @@ if (this.allSetting.subEnable) { subPath = this.allSetting.subURI.length > 0 ? new URL(this.allSetting.subURI).pathname : this.allSetting.subPath; if (subPath == '/sub/') alerts.push('{{ i18n "secAlertSubURI" }}'); + } + if (this.allSetting.subJsonEnable) { subJsonPath = this.allSetting.subJsonURI.length > 0 ? new URL(this.allSetting.subJsonURI).pathname : this.allSetting.subJsonPath; if (subJsonPath == '/json/') alerts.push('{{ i18n "secAlertSubJsonURI" }}'); } diff --git a/web/html/settings/panel/subscription/general.html b/web/html/settings/panel/subscription/general.html index b6e616dd..e3481df7 100644 --- a/web/html/settings/panel/subscription/general.html +++ b/web/html/settings/panel/subscription/general.html @@ -9,6 +9,13 @@ </template> </a-setting-list-item> <a-setting-list-item paddings="small"> + <template #title>JSON Subscription</template> + <template #description>{{ i18n "pages.settings.subJsonEnable"}}</template> + <template #control> + <a-switch v-model="allSetting.subJsonEnable"></a-switch> + </template> + </a-setting-list-item> + <a-setting-list-item paddings="small"> <template #title>{{ i18n "pages.settings.subTitle"}}</template> <template #description>{{ i18n "pages.settings.subTitleDesc"}}</template> <template #control> diff --git a/web/html/settings/panel/subscription/subpage.html b/web/html/settings/panel/subscription/subpage.html index c9cf241f..6d56496b 100644 --- a/web/html/settings/panel/subscription/subpage.html +++ b/web/html/settings/panel/subscription/subpage.html @@ -56,7 +56,7 @@ <a-space direction="vertical" align="center"> <a-row type="flex" :gutter="[8,8]" justify="center" style="width:100%"> - <a-col :xs="24" :sm="12" + <a-col :xs="24" :sm="app.subJsonUrl ? 12 : 24" style="text-align:center;"> <tr-qr-box class="qr-box"> <a-tag color="purple" @@ -75,7 +75,7 @@ </tr-qr-bg> </tr-qr-box> </a-col> - <a-col :xs="24" :sm="12" + <a-col v-if="app.subJsonUrl" :xs="24" :sm="12" style="text-align:center;"> <tr-qr-box class="qr-box"> <a-tag color="purple" |
