diff --git a/api/handler/chatimpl/chat_handler.go b/api/handler/chatimpl/chat_handler.go index af69e717..c60df32e 100644 --- a/api/handler/chatimpl/chat_handler.go +++ b/api/handler/chatimpl/chat_handler.go @@ -478,7 +478,7 @@ func (h *ChatHandler) doRequest(ctx context.Context, req types.ApiRequest, platf request = request.WithContext(ctx) request.Header.Set("Content-Type", "application/json") var proxyURL string - if apiKey.ProxyURL != "" { // 使用代理 + if len(apiKey.ProxyURL) > 5 { // 使用代理 proxy, _ := url.Parse(apiKey.ProxyURL) client = &http.Client{ Transport: &http.Transport{ diff --git a/api/handler/function_handler.go b/api/handler/function_handler.go index cecbf057..e9eb57df 100644 --- a/api/handler/function_handler.go +++ b/api/handler/function_handler.go @@ -220,7 +220,7 @@ func (h *FunctionHandler) Dall3(c *gin.Context) { var res imgRes var errRes ErrRes var request *req.Request - if apiKey.ProxyURL != "" { + if len(apiKey.ProxyURL) > 5 { request = req.C().SetProxyURL(apiKey.ProxyURL).R() } else { request = req.C().R() diff --git a/api/utils/openai.go b/api/utils/openai.go index 9842e07e..584f0435 100644 --- a/api/utils/openai.go +++ b/api/utils/openai.go @@ -61,7 +61,7 @@ func OpenAIRequest(db *gorm.DB, prompt string) (string, error) { var response apiRes var errRes apiErrRes client := req.C() - if apiKey.ProxyURL != "" { + if len(apiKey.ProxyURL) > 5 { client.SetProxyURL(apiKey.ApiURL) } r, err := client.R().SetHeader("Content-Type", "application/json"). diff --git a/web/.env.development b/web/.env.development index d10ac654..330da87b 100644 --- a/web/.env.development +++ b/web/.env.development @@ -6,3 +6,4 @@ 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.0.2 diff --git a/web/.env.production b/web/.env.production index d558e88d..c6581695 100644 --- a/web/.env.production +++ b/web/.env.production @@ -2,3 +2,4 @@ VUE_APP_API_HOST= VUE_APP_WS_HOST= VUE_APP_KEY_PREFIX=ChatPLUS_ VUE_APP_TITLE="Geek-AI 创作系统" +VUE_APP_VERSION=v4.0.2 diff --git a/web/public/images/menu/app.png b/web/public/images/menu/app.png index 2785231c..f0307dd0 100644 Binary files a/web/public/images/menu/app.png and b/web/public/images/menu/app.png differ diff --git a/web/public/images/menu/chat.png b/web/public/images/menu/chat.png index bb484b5a..12e9f903 100644 Binary files a/web/public/images/menu/chat.png and b/web/public/images/menu/chat.png differ diff --git a/web/public/images/menu/mj.png b/web/public/images/menu/mj.png index 60f08535..97d91954 100644 Binary files a/web/public/images/menu/mj.png and b/web/public/images/menu/mj.png differ diff --git a/web/public/images/menu/sd.png b/web/public/images/menu/sd.png index 5b0d3815..fd918fbe 100644 Binary files a/web/public/images/menu/sd.png and b/web/public/images/menu/sd.png differ diff --git a/web/src/assets/css/image-mj.css b/web/src/assets/css/image-mj.css index 346f198c..9d362952 100644 --- a/web/src/assets/css/image-mj.css +++ b/web/src/assets/css/image-mj.css @@ -275,6 +275,13 @@ width: 20px; height: 20px; } +.page-mj .inner .task-list-box .task-list-inner .el-row.text-info { + width: 100%; + padding: 10px 0; +} +.page-mj .inner .task-list-box .task-list-inner .el-row.text-info .el-tag { + margin-right: 10px; +} .page-mj .inner .task-list-box .task-list-inner .submit-btn { display: flex; margin: 20px 0; @@ -282,12 +289,6 @@ .page-mj .inner .task-list-box .task-list-inner .submit-btn .el-button { width: 200px; } -.page-mj .inner .task-list-box .task-list-inner .submit-btn .text-info { - width: 100%; - display: flex; - justify-content: right; - align-items: center; -} .page-mj .inner .task-list-box .task-list-inner .job-list-box .running-job-list .job-item { width: 100%; padding: 2px; diff --git a/web/src/assets/css/image-sd.css b/web/src/assets/css/image-sd.css index 5ac1d564..00177432 100644 --- a/web/src/assets/css/image-sd.css +++ b/web/src/assets/css/image-sd.css @@ -53,6 +53,12 @@ padding-top: 5px; padding-bottom: 5px; } +.page-sd .inner .sd-box .sd-params .text-info { + padding: 10px; +} +.page-sd .inner .sd-box .sd-params .text-info .el-tag { + margin-right: 10px; +} .page-sd .inner .sd-box .submit-btn { padding: 10px 15px 0 15px; text-align: center; @@ -159,6 +165,13 @@ width: 20px; height: 20px; } +.page-sd .inner .task-list-box .task-list-inner .el-row.text-info { + width: 100%; + padding: 10px 0; +} +.page-sd .inner .task-list-box .task-list-inner .el-row.text-info .el-tag { + margin-right: 10px; +} .page-sd .inner .task-list-box .task-list-inner .submit-btn { display: flex; margin: 20px 0; @@ -166,12 +179,6 @@ .page-sd .inner .task-list-box .task-list-inner .submit-btn .el-button { width: 200px; } -.page-sd .inner .task-list-box .task-list-inner .submit-btn .text-info { - width: 100%; - display: flex; - justify-content: right; - align-items: center; -} .page-sd .inner .task-list-box .task-list-inner .job-list-box .running-job-list .job-item { width: 100%; padding: 2px; diff --git a/web/src/components/FileSelect.vue b/web/src/components/FileSelect.vue index 74d1e0ce..7fc05d0b 100644 --- a/web/src/components/FileSelect.vue +++ b/web/src/components/FileSelect.vue @@ -120,6 +120,10 @@ const removeFile = (file) => { const insertURL = (url) => { show.value = false + // 如果是相对路径,处理成绝对路径 + if (url.indexOf("http") === -1) { + url = location.protocol + "//" + location.host + url + } emits('selected', url) } diff --git a/web/src/components/FooterBar.vue b/web/src/components/FooterBar.vue index ce5d8173..15165d69 100644 --- a/web/src/components/FooterBar.vue +++ b/web/src/components/FooterBar.vue @@ -2,7 +2,9 @@
@@ -12,6 +14,7 @@ import {ref} from "vue"; const title = ref(process.env.VUE_APP_TITLE) +const version = ref(process.env.VUE_APP_VERSION) const author = ref('极客学长') diff --git a/web/src/components/Welcome.vue b/web/src/components/Welcome.vue index 91311aee..6af6c7f8 100644 --- a/web/src/components/Welcome.vue +++ b/web/src/components/Welcome.vue @@ -1,7 +1,7 @@