diff --git a/common/constants.go b/common/constants.go
index 55cc793..9ce2003 100644
--- a/common/constants.go
+++ b/common/constants.go
@@ -45,6 +45,7 @@ var PasswordRegisterEnabled = true
var EmailVerificationEnabled = false
var GitHubOAuthEnabled = false
var WeChatAuthEnabled = false
+var TelegramOAuthEnabled = false
var TurnstileCheckEnabled = false
var RegisterEnabled = true
diff --git a/controller/misc.go b/controller/misc.go
index f99baa8..1aabb02 100644
--- a/controller/misc.go
+++ b/controller/misc.go
@@ -20,6 +20,8 @@ func GetStatus(c *gin.Context) {
"email_verification": common.EmailVerificationEnabled,
"github_oauth": common.GitHubOAuthEnabled,
"github_client_id": common.GitHubClientId,
+ "telegram_oauth": common.TelegramOAuthEnabled,
+ "telegram_bot_name": common.TelegramBotName,
"system_name": common.SystemName,
"logo": common.Logo,
"footer_html": common.Footer,
diff --git a/makefile b/makefile
index 1df2b5c..603f5aa 100644
--- a/makefile
+++ b/makefile
@@ -5,6 +5,10 @@ BACKEND_DIR = .
all: start-frontend start-backend
+build-frontend:
+ @echo "Building frontend..."
+ @cd $(FRONTEND_DIR) && npm install && DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build npm run build
+
# 启动前端开发服务器
start-frontend:
@echo "Starting frontend dev server..."
diff --git a/model/option.go b/model/option.go
index dcb4c34..2feb711 100644
--- a/model/option.go
+++ b/model/option.go
@@ -30,6 +30,7 @@ func InitOptionMap() {
common.OptionMap["PasswordRegisterEnabled"] = strconv.FormatBool(common.PasswordRegisterEnabled)
common.OptionMap["EmailVerificationEnabled"] = strconv.FormatBool(common.EmailVerificationEnabled)
common.OptionMap["GitHubOAuthEnabled"] = strconv.FormatBool(common.GitHubOAuthEnabled)
+ common.OptionMap["TelegramOAuthEnabled"] = strconv.FormatBool(common.TelegramOAuthEnabled)
common.OptionMap["WeChatAuthEnabled"] = strconv.FormatBool(common.WeChatAuthEnabled)
common.OptionMap["TurnstileCheckEnabled"] = strconv.FormatBool(common.TurnstileCheckEnabled)
common.OptionMap["RegisterEnabled"] = strconv.FormatBool(common.RegisterEnabled)
@@ -62,6 +63,8 @@ func InitOptionMap() {
common.OptionMap["TopupGroupRatio"] = common.TopupGroupRatio2JSONString()
common.OptionMap["GitHubClientId"] = ""
common.OptionMap["GitHubClientSecret"] = ""
+ common.OptionMap["TelegramBotToken"] = ""
+ common.OptionMap["TelegramBotName"] = ""
common.OptionMap["WeChatServerAddress"] = ""
common.OptionMap["WeChatServerToken"] = ""
common.OptionMap["WeChatAccountQRCodeImageURL"] = ""
@@ -151,6 +154,8 @@ func updateOptionMap(key string, value string) (err error) {
common.GitHubOAuthEnabled = boolValue
case "WeChatAuthEnabled":
common.WeChatAuthEnabled = boolValue
+ case "TelegramOAuthEnabled":
+ common.TelegramOAuthEnabled = boolValue
case "TurnstileCheckEnabled":
common.TurnstileCheckEnabled = boolValue
case "RegisterEnabled":
diff --git a/web/src/components/SystemSetting.js b/web/src/components/SystemSetting.js
index a8956b7..f5d87be 100644
--- a/web/src/components/SystemSetting.js
+++ b/web/src/components/SystemSetting.js
@@ -413,32 +413,6 @@ const SystemSetting = () => {
/>