new: subJsonEnable

after this subEnable by default is true
and subJsonEnable is false
This commit is contained in:
mhsanaei committed 2025-09-18 13:56:04 +02:00 Unverified
1 parent 8c8d280f14
commit 59ea2645db
26 files changed
+97 -32

No files matched your search

+2 -1
View File
@@ -26,7 +26,8 @@ class AllSetting {
this.twoFactorEnable = false;
this.twoFactorToken = "";
this.xrayTemplateConfig = "";
this.subEnable = false;
this.subEnable = true;
this.subJsonEnable = false;
this.subTitle = "";
this.subListen = "";
this.subPort = 2096;
+4 -1
View File
@@ -101,7 +101,10 @@
if (sj) this.app.subJsonUrl = sj;
drawQR(this.app.subUrl);
try {
new QRious({ element: document.getElementById('qrcode-subjson'), value: this.app.subJsonUrl || '', size: 220 });
const elJson = document.getElementById('qrcode-subjson');
if (elJson && this.app.subJsonUrl) {
new QRious({ element: elJson, value: this.app.subJsonUrl, size: 220 });
}
} catch (e) { /* ignore */ }
this._onResize = () => { this.viewportWidth = window.innerWidth; };
window.addEventListener('resize', this._onResize);
+1
View File
@@ -42,6 +42,7 @@ type AllSetting struct {
TwoFactorEnable bool `json:"twoFactorEnable" form:"twoFactorEnable"`
TwoFactorToken string `json:"twoFactorToken" form:"twoFactorToken"`
SubEnable bool `json:"subEnable" form:"subEnable"`
SubJsonEnable bool `json:"subJsonEnable" form:"subJsonEnable"`
SubTitle string `json:"subTitle" form:"subTitle"`
SubListen string `json:"subListen" form:"subListen"`
SubPort int `json:"subPort" form:"subPort"`
Loaded 3 of 26 files, more files were not shown because too many files have changed in this diff. Show more