3x-ui/web/assets/js/model/setting.js
izzzzzi 2fbd1d860d feat: add PostgreSQL support and database configuration options
- Updated Docker configuration to support PostgreSQL as an alternative to SQLite.
- Enhanced DockerEntrypoint.sh to create a database environment file and test PostgreSQL connection.
- Introduced database setup functions in install.sh for PostgreSQL installation and configuration.
- Added database management options in x-ui.sh, including backup and switching between SQLite and PostgreSQL.
- Implemented database configuration retrieval in the web service and controller layers.
- Updated frontend settings to include database configuration options.
- Added translations for new database settings in multiple languages.
2025-05-23 02:00:06 +05:00

68 lines
No EOL
2 KiB
JavaScript

class AllSetting {
constructor(data) {
this.webListen = "";
this.webDomain = "";
this.webPort = 2053;
this.webCertFile = "";
this.webKeyFile = "";
this.webBasePath = "/";
this.sessionMaxAge = 60;
this.pageSize = 50;
this.expireDiff = 0;
this.trafficDiff = 0;
this.remarkModel = "-ieo";
this.datepicker = "gregorian";
this.tgBotEnable = false;
this.tgBotToken = "";
this.tgBotProxy = "";
this.tgBotAPIServer = "";
this.tgBotChatId = "";
this.tgRunTime = "@daily";
this.tgBotBackup = false;
this.tgBotLoginNotify = true;
this.tgCpu = 80;
this.tgLang = "en-US";
this.twoFactorEnable = false;
this.twoFactorToken = "";
this.xrayTemplateConfig = "";
this.subEnable = false;
this.subTitle = "";
this.subListen = "";
this.subPort = 2096;
this.subPath = "/sub/";
this.subJsonPath = "/json/";
this.subDomain = "";
this.externalTrafficInformEnable = false;
this.externalTrafficInformURI = "";
this.subCertFile = "";
this.subKeyFile = "";
this.subUpdates = 12;
this.subEncrypt = true;
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";
this.timeLocation = "Local";
if (data == null) {
return
}
ObjectUtil.cloneProps(this, data);
}
equals(other) {
return ObjectUtil.equals(this, other);
}
}