3x-ui/web/assets/js/model/setting.js

68 lines
2 KiB
JavaScript
Raw Normal View History

2023-12-05 17:13:36 +00:00
class AllSetting {
constructor(data) {
this.webListen = "";
this.webDomain = "";
2023-12-10 14:06:42 +00:00
this.webPort = 2053;
2023-12-05 17:13:36 +00:00
this.webCertFile = "";
this.webKeyFile = "";
this.webBasePath = "/";
2024-09-12 07:41:24 +00:00
this.sessionMaxAge = 60;
2024-07-01 19:11:42 +00:00
this.pageSize = 50;
2024-08-06 19:17:12 +00:00
this.expireDiff = 0;
this.trafficDiff = 0;
2023-12-08 19:31:17 +00:00
this.remarkModel = "-ieo";
this.datepicker = "gregorian";
2023-12-05 17:13:36 +00:00
this.tgBotEnable = false;
this.tgBotToken = "";
this.tgBotProxy = "";
this.tgBotAPIServer = "";
2023-12-05 17:13:36 +00:00
this.tgBotChatId = "";
this.tgRunTime = "@daily";
this.tgBotBackup = false;
2024-08-06 19:17:12 +00:00
this.tgBotLoginNotify = true;
this.tgCpu = 80;
2023-12-10 14:06:42 +00:00
this.tgLang = "en-US";
this.twoFactorEnable = false;
this.twoFactorToken = "";
2023-12-10 14:06:42 +00:00
this.xrayTemplateConfig = "";
2023-12-05 17:13:36 +00:00
this.subEnable = false;
this.subTitle = "";
2023-12-05 17:13:36 +00:00
this.subListen = "";
this.subPort = 2096;
2023-12-05 17:13:36 +00:00
this.subPath = "/sub/";
this.subJsonPath = "/json/";
2023-12-05 17:13:36 +00:00
this.subDomain = "";
this.externalTrafficInformEnable = false;
this.externalTrafficInformURI = "";
2023-12-05 17:13:36 +00:00
this.subCertFile = "";
this.subKeyFile = "";
2024-08-06 19:17:12 +00:00
this.subUpdates = 12;
2023-12-05 17:13:36 +00:00
this.subEncrypt = true;
2024-08-06 19:17:12 +00:00
this.subShowInfo = true;
this.subURI = "";
this.subJsonURI = "";
this.subJsonFragment = "";
this.subJsonNoises = "";
this.subJsonMux = "";
this.subJsonRules = "";
this.dbType = "sqlite";
this.dbHost = "localhost";
this.dbPort = 5432;
this.dbName = "x_ui";
this.dbUser = "x_ui";
this.dbPassword = "";
this.dbSSLMode = "disable";
this.dbTimeZone = "UTC";
2025-01-11 14:13:49 +00:00
this.timeLocation = "Local";
2023-12-05 17:13:36 +00:00
if (data == null) {
return
}
ObjectUtil.cloneProps(this, data);
}
equals(other) {
return ObjectUtil.equals(this, other);
}
}