From 5cbb35f659665615efe555d668d92c4d72b417bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E7=94=B0=E5=BC=98?= <1240092443@qq.com> Date: Tue, 29 Oct 2024 09:21:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?add:=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/auto-imports.d.ts | 3 +- frontend/components.d.ts | 1 + frontend/src/components/chat/Chat.vue | 231 ++++++---- frontend/src/components/chat/ChatBox.vue | 341 +++++++------- frontend/src/components/chat/ChatMenu.vue | 8 +- frontend/src/components/chat/ChatMessage.vue | 26 +- frontend/src/components/chat/ChatMsgList.vue | 199 +++++--- frontend/src/components/chat/ChatUserList.vue | 268 ++++++++--- .../src/components/chat/ChatUserSetting.vue | 1 - frontend/src/components/chat/chatUserInfo.vue | 79 ++++ frontend/src/stores/chat.ts | 435 ++++++++++++++---- frontend/src/stores/db.ts | 39 +- 12 files changed, 1150 insertions(+), 481 deletions(-) create mode 100644 frontend/src/components/chat/chatUserInfo.vue diff --git a/frontend/auto-imports.d.ts b/frontend/auto-imports.d.ts index eab6be6..d0c217f 100644 --- a/frontend/auto-imports.d.ts +++ b/frontend/auto-imports.d.ts @@ -3,6 +3,7 @@ // @ts-nocheck // noinspection JSUnusedGlobalSymbols // Generated by unplugin-auto-import +// biome-ignore lint: disable export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] @@ -70,6 +71,6 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' import('vue') } diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 35ff343..819d793 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -26,6 +26,7 @@ declare module 'vue' { ChatMessage: typeof import('./src/components/chat/ChatMessage.vue')['default'] ChatMsgList: typeof import('./src/components/chat/ChatMsgList.vue')['default'] ChatNav: typeof import('./src/components/localchat/ChatNav.vue')['default'] + ChatUserInfo: typeof import('./src/components/chat/chatUserInfo.vue')['default'] ChatUserList: typeof import('./src/components/chat/ChatUserList.vue')['default'] ChatUserSetting: typeof import('./src/components/chat/ChatUserSetting.vue')['default'] ChatWorkList: typeof import('./src/components/chat/ChatWorkList.vue')['default'] diff --git a/frontend/src/components/chat/Chat.vue b/frontend/src/components/chat/Chat.vue index 4f8eab5..058407d 100644 --- a/frontend/src/components/chat/Chat.vue +++ b/frontend/src/components/chat/Chat.vue @@ -1,115 +1,144 @@ \ No newline at end of file + diff --git a/frontend/src/components/chat/ChatBox.vue b/frontend/src/components/chat/ChatBox.vue index 4d9fc64..318e13c 100644 --- a/frontend/src/components/chat/ChatBox.vue +++ b/frontend/src/components/chat/ChatBox.vue @@ -1,173 +1,204 @@ \ No newline at end of file + .no-message-container { + height: 100%; + margin: 120px auto; + text-align: center; + justify-content: center; + } + diff --git a/frontend/src/components/chat/ChatMenu.vue b/frontend/src/components/chat/ChatMenu.vue index aa86def..2439900 100644 --- a/frontend/src/components/chat/ChatMenu.vue +++ b/frontend/src/components/chat/ChatMenu.vue @@ -3,6 +3,10 @@ import {ref} from "vue"; import { useChatStore } from "@/stores/chat"; import {Setting as SettingIcon} from "@element-plus/icons-vue"; const store = useChatStore() +const getOnline = () => { + store.getOnlineUsers() + store.setCurrentNavId(1) +}