From 8dde7c4f5f9544b2926205f3a18f6bbb7d4f023a Mon Sep 17 00:00:00 2001 From: Zhang Minghan Date: Wed, 13 Mar 2024 20:26:59 +0800 Subject: [PATCH] fix: fix relay api auto fill route feat in serve_static mode --- README.md | 6 ++--- adapter/midjourney/chat.go | 2 +- app/src/assets/pages/share-manager.less | 9 +------ app/src/dialogs/ShareManagementDialog.tsx | 29 +++++++++++++---------- utils/config.go | 5 ++-- 5 files changed, 23 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 1d4a0e3..20b1f9f 100644 --- a/README.md +++ b/README.md @@ -277,10 +277,10 @@ Apache License 2.0 ## ❤ Sponsors [@Sh1n3zZ](https://github.com/Sh1n3zZ) [@4EvEr](https://github.com/3081394176) -- [晞云 LightXi](https://open.lightxi.com) 提供字体 CDN 支持 -- [BootCDN](https://bootcdn.cn) 和 [Static File](https://staticfile.org) 提供资源 CDN 支持 +- [LightXi](https://open.lightxi.com) Provide Font CDN support +- [BootCDN](https://bootcdn.cn) & [Static File](https://staticfile.org) Provide Resources CDN support -## 写在最后 +## At Last Chat Nio leans towards a one-stop service, integrating user chat interface and API intermediary and management projects. - Compared to projects like NextChat which are front-end and lightweight deployment-oriented, Chat Nio's advantages include more convenient cloud synchronization, account management, richer sharing functionalities, as well as a billing management system. - Compared to projects like OneAPI which are backend and lightweight deployment-oriented, Chat Nio's advantages include a richer user interface, a more comprehensive channel management system, richer user management, and the introduction of a subscription management system aimed at the user interface. diff --git a/adapter/midjourney/chat.go b/adapter/midjourney/chat.go index ead51a8..d87424c 100644 --- a/adapter/midjourney/chat.go +++ b/adapter/midjourney/chat.go @@ -101,7 +101,7 @@ func (c *ChatInstance) CreateStreamChatRequest(props *adaptercommon.ChatProps, c return callback(&globals.Chunk{Content: ""}) } - if progress == 0 { + if !begin { begin = true if err := callback(&globals.Chunk{Content: "```progress\n"}); err != nil { return err diff --git a/app/src/assets/pages/share-manager.less b/app/src/assets/pages/share-manager.less index 7de7208..d3feb86 100644 --- a/app/src/assets/pages/share-manager.less +++ b/app/src/assets/pages/share-manager.less @@ -1,11 +1,4 @@ .share-table { - max-height: 60vh; max-width: 85vw; - overflow: auto; - scrollbar-width: thin; - padding: 0 0.5rem; - - &::-webkit-scrollbar { - width: 0.5rem; - } + height: max-content; } diff --git a/app/src/dialogs/ShareManagementDialog.tsx b/app/src/dialogs/ShareManagementDialog.tsx index 02c09e3..1724c3e 100644 --- a/app/src/dialogs/ShareManagementDialog.tsx +++ b/app/src/dialogs/ShareManagementDialog.tsx @@ -38,6 +38,7 @@ import { } from "@/components/ui/dropdown-menu.tsx"; import { getSharedLink, SharingPreviewForm } from "@/api/sharing.ts"; import { openWindow } from "@/utils/device.ts"; +import { ScrollArea } from "@/components/ui/scroll-area.tsx"; type ShareTableProps = { data: SharingPreviewForm[]; @@ -55,7 +56,7 @@ function ShareTable({ data }: ShareTableProps) { }, [data]); return ( - +
ID @@ -130,18 +131,20 @@ function ShareManagementDialog() { dispatch(setDialog(open))}> - {t("share.manage")} - {data.length > 0 ? ( - - - - ) : ( - -

- {t("conversation.empty")} -

-
- )} + {t("share.manage")} + {data.length > 0 ? ( + + + + + + ) : ( + +

+ {t("conversation.empty")} +

+
+ )}