From 3b081ff0f432de1aac0b9c49333fe80e29da5dff Mon Sep 17 00:00:00 2001 From: RockYang Date: Mon, 29 Apr 2024 09:39:23 +0800 Subject: [PATCH] opt: add chat config for mobile chat session --- web/src/assets/css/mobile/chat-list.styl | 17 +----- web/src/assets/css/mobile/chat-session.styl | 8 ++- web/src/assets/css/mobile/model-select.styl | 16 ++++++ web/src/views/Index.vue | 5 ++ web/src/views/mobile/ChatSession.vue | 63 ++++++++++++++++++++- 5 files changed, 89 insertions(+), 20 deletions(-) create mode 100644 web/src/assets/css/mobile/model-select.styl diff --git a/web/src/assets/css/mobile/chat-list.styl b/web/src/assets/css/mobile/chat-list.styl index 50517900..c1cbd386 100644 --- a/web/src/assets/css/mobile/chat-list.styl +++ b/web/src/assets/css/mobile/chat-list.styl @@ -34,19 +34,4 @@ } } -.van-popup { - .picker-option { - display flex - width 100% - padding 0 10px - overflow hidden - height 20px - text-overflow ellipsis - - .van-image { - width 20px; - height 20px; - margin-right 5px - } - } -} \ No newline at end of file +@import "model-select.styl" \ No newline at end of file diff --git a/web/src/assets/css/mobile/chat-session.styl b/web/src/assets/css/mobile/chat-session.styl index c39983be..25aa54d0 100644 --- a/web/src/assets/css/mobile/chat-session.styl +++ b/web/src/assets/css/mobile/chat-session.styl @@ -1,6 +1,10 @@ .mobile-chat { .van-nav-bar { position static + + .setting { + font-size 18px + } } .chat-list-wrapper { @@ -81,4 +85,6 @@ background #232425; } } -} \ No newline at end of file +} + +@import "model-select.styl" \ No newline at end of file diff --git a/web/src/assets/css/mobile/model-select.styl b/web/src/assets/css/mobile/model-select.styl new file mode 100644 index 00000000..8b3de473 --- /dev/null +++ b/web/src/assets/css/mobile/model-select.styl @@ -0,0 +1,16 @@ +.van-popup { + .picker-option { + display flex + width 100% + padding 0 10px + overflow hidden + height 20px + text-overflow ellipsis + + .van-image { + width 20px; + height 20px; + margin-right 5px + } + } +} \ No newline at end of file diff --git a/web/src/views/Index.vue b/web/src/views/Index.vue index fb60766e..edcd4a59 100644 --- a/web/src/views/Index.vue +++ b/web/src/views/Index.vue @@ -66,9 +66,14 @@ import {useRouter} from "vue-router"; import FooterBar from "@/components/FooterBar.vue"; import {httpGet} from "@/utils/http"; import {ElMessage} from "element-plus"; +import {isMobile} from "@/utils/libs"; const router = useRouter() +if (isMobile()) { + router.push("/mobile") +} + const title = ref("Geek-AI 创作系统") const logo = ref("/images/logo.png") const slogan = ref("我辈之人,先干为敬,陪您先把 AI 用起来") diff --git a/web/src/views/mobile/ChatSession.vue b/web/src/views/mobile/ChatSession.vue index 0c78e6df..ebc0037f 100644 --- a/web/src/views/mobile/ChatSession.vue +++ b/web/src/views/mobile/ChatSession.vue @@ -1,7 +1,7 @@