diff --git a/api/config.sample.toml b/api/config.sample.toml
index 4f2819a6..eb33a5d7 100644
--- a/api/config.sample.toml
+++ b/api/config.sample.toml
@@ -18,7 +18,7 @@ TikaHost = "http://tika:9998"
DB = 0
[ApiConfig] # 微博热搜,今日头条等函数服务 API 配置,此为第三方插件服务,如需使用请联系作者开通
- ApiURL = ""
+ ApiURL = "https://sapi.geekai.me"
AppId = ""
Token = ""
diff --git a/api/core/types/config.go b/api/core/types/config.go
index a31be482..1158b684 100644
--- a/api/core/types/config.go
+++ b/api/core/types/config.go
@@ -228,4 +228,5 @@ type SystemConfig struct {
SdNegPrompt string `json:"sd_neg_prompt"` // SD 默认反向提示词
IndexBgURL string `json:"index_bg_url"` // 前端首页背景图片
+ Copyright string `json:"copyright"` // 版权信息
}
diff --git a/api/handler/admin/config_handler.go b/api/handler/admin/config_handler.go
index 584b026b..66ee2a27 100644
--- a/api/handler/admin/config_handler.go
+++ b/api/handler/admin/config_handler.go
@@ -50,6 +50,7 @@ func (h *ConfigHandler) Update(c *gin.Context) {
Content string `json:"content,omitempty"`
Updated bool `json:"updated,omitempty"`
} `json:"config"`
+ ConfigBak types.SystemConfig `json:"config_bak,omitempty"`
}
if err := c.ShouldBindJSON(&data); err != nil {
@@ -57,6 +58,12 @@ func (h *ConfigHandler) Update(c *gin.Context) {
return
}
+ // ONLY authorized user can change the copyright
+ if (data.Key == "system" && data.Config.Copyright != data.ConfigBak.Copyright) && !h.licenseService.GetLicense().Configs.DeCopy {
+ resp.ERROR(c, "您无权修改版权信息,请先联系作者获取授权")
+ return
+ }
+
value := utils.JsonEncode(&data.Config)
config := model.Config{Key: data.Key, Config: value}
res := h.DB.FirstOrCreate(&config, model.Config{Key: data.Key})
diff --git a/deploy/conf/config.toml b/deploy/conf/config.toml
index fee98bc8..2b834a43 100644
--- a/deploy/conf/config.toml
+++ b/deploy/conf/config.toml
@@ -21,7 +21,7 @@ TikaHost = "http://tika:9998"
DB = 0
[ApiConfig]
- ApiURL = "http://service.r9it.com:9001"
+ ApiURL = "http://sapi.geekai.me"
AppId = ""
Token = ""
diff --git a/web/.env.development b/web/.env.development
index 23f5535c..ba889b03 100644
--- a/web/.env.development
+++ b/web/.env.development
@@ -6,6 +6,6 @@ VUE_APP_ADMIN_USER=admin
VUE_APP_ADMIN_PASS=admin123
VUE_APP_KEY_PREFIX=ChatPLUS_DEV_
VUE_APP_TITLE="Geek-AI 创作系统"
-VUE_APP_VERSION=v4.1.0
+VUE_APP_VERSION=v4.1.1
VUE_APP_DOCS_URL=https://docs.geekai.me
VUE_APP_GIT_URL=https://github.com/yangjian102621/geekai
diff --git a/web/.env.production b/web/.env.production
index 6a07e76e..6e3a7049 100644
--- a/web/.env.production
+++ b/web/.env.production
@@ -1,7 +1,6 @@
VUE_APP_API_HOST=
VUE_APP_WS_HOST=
VUE_APP_KEY_PREFIX=ChatPLUS_
-VUE_APP_TITLE="Geek-AI 创作系统"
-VUE_APP_VERSION=v4.1.0
+VUE_APP_VERSION=v4.1.1
VUE_APP_DOCS_URL=https://docs.geekai.me
VUE_APP_GIT_URL=https://github.com/yangjian102621/geekai
diff --git a/web/src/components/FooterBar.vue b/web/src/components/FooterBar.vue
index f2e106a5..671adf31 100644
--- a/web/src/components/FooterBar.vue
+++ b/web/src/components/FooterBar.vue
@@ -1,22 +1,43 @@