基本功能复刻完成
This commit is contained in:
@@ -195,105 +195,7 @@ func PluginUserAddIPv6SyncPassword(c *gin.Context) {
|
||||
SuccessMessage(c, "Password synced to IPv6 account", true)
|
||||
}
|
||||
|
||||
func AdminConfigFetch(c *gin.Context) {
|
||||
Success(c, gin.H{
|
||||
"invite": gin.H{
|
||||
"invite_force": service.MustGetBool("invite_force", false),
|
||||
"invite_commission": service.MustGetInt("invite_commission", 10),
|
||||
"invite_gen_limit": service.MustGetInt("invite_gen_limit", 5),
|
||||
"invite_never_expire": service.MustGetBool("invite_never_expire", false),
|
||||
"commission_first_time_enable": service.MustGetBool("commission_first_time_enable", true),
|
||||
"commission_auto_check_enable": service.MustGetBool("commission_auto_check_enable", true),
|
||||
"commission_withdraw_limit": service.MustGetInt("commission_withdraw_limit", 100),
|
||||
"withdraw_close_enable": service.MustGetBool("withdraw_close_enable", false),
|
||||
"commission_distribution_enable": service.MustGetBool("commission_distribution_enable", false),
|
||||
"commission_distribution_l1": service.MustGetInt("commission_distribution_l1", 0),
|
||||
"commission_distribution_l2": service.MustGetInt("commission_distribution_l2", 0),
|
||||
"commission_distribution_l3": service.MustGetInt("commission_distribution_l3", 0),
|
||||
},
|
||||
"site": gin.H{
|
||||
"logo": service.MustGetString("logo", ""),
|
||||
"force_https": service.MustGetBool("force_https", false),
|
||||
"stop_register": service.MustGetBool("stop_register", false),
|
||||
"app_name": service.MustGetString("app_name", "XBoard"),
|
||||
"app_description": service.MustGetString("app_description", "XBoard is best!"),
|
||||
"app_url": service.GetAppURL(),
|
||||
"subscribe_url": service.MustGetString("subscribe_url", ""),
|
||||
"try_out_enable": service.MustGetBool("try_out_enable", false),
|
||||
"try_out_plan_id": service.MustGetInt("try_out_plan_id", 0),
|
||||
"try_out_hour": service.MustGetInt("try_out_hour", 1),
|
||||
"tos_url": service.MustGetString("tos_url", ""),
|
||||
"currency": service.MustGetString("currency", "CNY"),
|
||||
"currency_symbol": service.MustGetString("currency_symbol", "¥"),
|
||||
"ticket_must_wait_reply": service.MustGetBool("ticket_must_wait_reply", false),
|
||||
},
|
||||
"subscribe": gin.H{
|
||||
"plan_change_enable": service.MustGetBool("plan_change_enable", true),
|
||||
"reset_traffic_method": service.MustGetInt("reset_traffic_method", 0),
|
||||
"surplus_enable": service.MustGetBool("surplus_enable", true),
|
||||
"new_order_event_id": service.MustGetInt("new_order_event_id", 0),
|
||||
"renew_order_event_id": service.MustGetInt("renew_order_event_id", 0),
|
||||
"change_order_event_id": service.MustGetInt("change_order_event_id", 0),
|
||||
"show_info_to_server_enable": service.MustGetBool("show_info_to_server_enable", false),
|
||||
"show_protocol_to_server_enable": service.MustGetBool("show_protocol_to_server_enable", false),
|
||||
"subscribe_path": service.MustGetString("subscribe_path", "s"),
|
||||
},
|
||||
"frontend": gin.H{
|
||||
"frontend_theme": service.MustGetString("frontend_theme", "Xboard"),
|
||||
"frontend_theme_sidebar": service.MustGetString("frontend_theme_sidebar", "light"),
|
||||
"frontend_theme_header": service.MustGetString("frontend_theme_header", "dark"),
|
||||
"frontend_theme_color": service.MustGetString("frontend_theme_color", "default"),
|
||||
"frontend_background_url": service.MustGetString("frontend_background_url", ""),
|
||||
},
|
||||
"server": gin.H{
|
||||
"server_token": service.MustGetString("server_token", ""),
|
||||
"server_pull_interval": service.MustGetInt("server_pull_interval", 60),
|
||||
"server_push_interval": service.MustGetInt("server_push_interval", 60),
|
||||
"device_limit_mode": service.MustGetInt("device_limit_mode", 0),
|
||||
"server_ws_enable": service.MustGetBool("server_ws_enable", true),
|
||||
"server_ws_url": service.MustGetString("server_ws_url", ""),
|
||||
},
|
||||
"email": gin.H{
|
||||
"email_template": service.MustGetString("email_template", "default"),
|
||||
"email_host": service.MustGetString("email_host", ""),
|
||||
"email_port": service.MustGetString("email_port", ""),
|
||||
"email_username": service.MustGetString("email_username", ""),
|
||||
"email_password": service.MustGetString("email_password", ""),
|
||||
"email_encryption": service.MustGetString("email_encryption", ""),
|
||||
"email_from_address": service.MustGetString("email_from_address", ""),
|
||||
"remind_mail_enable": service.MustGetBool("remind_mail_enable", false),
|
||||
},
|
||||
"telegram": gin.H{
|
||||
"telegram_bot_enable": service.MustGetBool("telegram_bot_enable", false),
|
||||
"telegram_bot_token": service.MustGetString("telegram_bot_token", ""),
|
||||
"telegram_webhook_url": service.MustGetString("telegram_webhook_url", ""),
|
||||
"telegram_discuss_link": service.MustGetString("telegram_discuss_link", ""),
|
||||
},
|
||||
"app": gin.H{
|
||||
"windows_version": service.MustGetString("windows_version", ""),
|
||||
"windows_download_url": service.MustGetString("windows_download_url", ""),
|
||||
"macos_version": service.MustGetString("macos_version", ""),
|
||||
"macos_download_url": service.MustGetString("macos_download_url", ""),
|
||||
"android_version": service.MustGetString("android_version", ""),
|
||||
"android_download_url": service.MustGetString("android_download_url", ""),
|
||||
},
|
||||
"safe": gin.H{
|
||||
"email_verify": service.MustGetBool("email_verify", false),
|
||||
"safe_mode_enable": service.MustGetBool("safe_mode_enable", false),
|
||||
"secure_path": service.GetAdminSecurePath(),
|
||||
"email_whitelist_enable": service.MustGetBool("email_whitelist_enable", false),
|
||||
"email_whitelist_suffix": service.MustGetString("email_whitelist_suffix", ""),
|
||||
"email_gmail_limit_enable": service.MustGetBool("email_gmail_limit_enable", false),
|
||||
"captcha_enable": service.MustGetBool("captcha_enable", false),
|
||||
"register_limit_by_ip_enable": service.MustGetBool("register_limit_by_ip_enable", false),
|
||||
"register_limit_count": service.MustGetInt("register_limit_count", 3),
|
||||
"register_limit_expire": service.MustGetInt("register_limit_expire", 60),
|
||||
"password_limit_enable": service.MustGetBool("password_limit_enable", true),
|
||||
"password_limit_count": service.MustGetInt("password_limit_count", 5),
|
||||
"password_limit_expire": service.MustGetInt("password_limit_expire", 60),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
func AdminSystemStatus(c *gin.Context) {
|
||||
Success(c, gin.H{
|
||||
|
||||
Reference in New Issue
Block a user