From a1d1fe776310b2629cc6afec6635c77cf617741b Mon Sep 17 00:00:00 2001 From: RockYang Date: Thu, 25 Jan 2024 14:07:10 +0800 Subject: [PATCH] opt: refactor chat session page for mobile device --- web/src/assets/css/mobile/chat-session.css | 2 +- web/src/assets/css/mobile/chat-session.styl | 2 +- web/src/components/mobile/ChatReply.vue | 84 +++++++++-- web/src/router.js | 7 +- web/src/utils/libs.js | 31 ++++ web/src/views/ChatExport.vue | 1 - web/src/views/ChatPlus.vue | 33 +--- web/src/views/admin/Users.vue | 2 +- web/src/views/mobile/ChatExport.vue | 159 ++++++++++++++++++++ web/src/views/mobile/ChatSession.vue | 107 +++++++------ 10 files changed, 324 insertions(+), 104 deletions(-) create mode 100644 web/src/views/mobile/ChatExport.vue diff --git a/web/src/assets/css/mobile/chat-session.css b/web/src/assets/css/mobile/chat-session.css index ca21ccaa..ef993ae0 100644 --- a/web/src/assets/css/mobile/chat-session.css +++ b/web/src/assets/css/mobile/chat-session.css @@ -16,7 +16,7 @@ } .mobile-chat .chat-box-wrapper .van-sticky .van-cell-group--inset .van-cell .icon-box .van-icon { font-size: 24px; - margin: 10px 0; + margin-left: 10px; } .mobile-chat .chat-box-wrapper .van-sticky .van-cell-group--inset .van-cell .button-voice { padding: 0 5px; diff --git a/web/src/assets/css/mobile/chat-session.styl b/web/src/assets/css/mobile/chat-session.styl index 9d6dbf89..fa7bfb46 100644 --- a/web/src/assets/css/mobile/chat-session.styl +++ b/web/src/assets/css/mobile/chat-session.styl @@ -22,7 +22,7 @@ .icon-box { .van-icon { font-size 24px - margin 10px 0 + margin-left 10px } } diff --git a/web/src/components/mobile/ChatReply.vue b/web/src/components/mobile/ChatReply.vue index 21c43a28..e2aa8e3a 100644 --- a/web/src/components/mobile/ChatReply.vue +++ b/web/src/components/mobile/ChatReply.vue @@ -7,7 +7,7 @@
-
+
@@ -34,17 +34,6 @@ const props = defineProps({ default: '/images/gpt-icon.png', } }); - -const contentRef = ref(null) -onMounted(() => { - const clipboard = new Clipboard(contentRef.value); - clipboard.on('success', () => { - showNotify({type: 'success', message: '复制成功', duration: 1000}) - }) - clipboard.on('error', () => { - showNotify({type: 'danger', message: '复制失败', duration: 2000}) - }) -}) \ No newline at end of file diff --git a/web/src/views/mobile/ChatSession.vue b/web/src/views/mobile/ChatSession.vue index 72ed540b..233984a2 100644 --- a/web/src/views/mobile/ChatSession.vue +++ b/web/src/views/mobile/ChatSession.vue @@ -48,14 +48,6 @@ :icon="item.icon" :org-content="item.orgContent" :tokens="item['tokens']"/> - @@ -87,18 +79,19 @@ - + +