From 7b530297ac37122ead00a15864e16a73a5547d04 Mon Sep 17 00:00:00 2001 From: nongyehong <2439646234@qq.com> Date: Mon, 4 Nov 2024 21:47:36 +0800 Subject: [PATCH] =?UTF-8?q?perf(component):=20:zap:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增添加好友功能 --- src-tauri/gen/schemas/windows-schema.json | 2 +- src/components/common/AddFriendsModal.vue | 89 +++++++++++++++++++ src/components/common/ContextMenu.vue | 21 ++++- src/components/rightBox/ApplyList.vue | 59 ++++++++++++ src/components/rightBox/Details.vue | 2 +- src/components/rightBox/chatBox/ChatMain.vue | 7 +- .../rightBox/chatBox/ChatSidebar.vue | 10 ++- src/enums/index.ts | 2 + src/hooks/useChatMain.ts | 37 +++++++- src/layout/index.vue | 16 +++- src/layout/left/components/ActionList.vue | 9 +- .../{InfoPopover.vue => InfoEdit.vue} | 0 src/layout/left/hook.ts | 6 +- src/layout/left/index.vue | 4 +- src/layout/right/index.vue | 9 +- src/services/apis.ts | 5 +- src/services/request.ts | 14 ++- src/services/types.ts | 2 +- src/services/urls.ts | 4 +- src/stores/contacts.ts | 9 ++ src/stores/group.ts | 4 +- src/typings/components.d.ts | 4 + src/typings/options.d.ts | 2 + src/views/homeWindow/FriendsList.vue | 21 ++++- src/views/homeWindow/message/index.vue | 3 +- .../homeWindow/more/settings/General.vue | 4 +- 26 files changed, 306 insertions(+), 39 deletions(-) create mode 100644 src/components/common/AddFriendsModal.vue create mode 100644 src/components/rightBox/ApplyList.vue rename src/layout/left/components/{InfoPopover.vue => InfoEdit.vue} (100%) diff --git a/src-tauri/gen/schemas/windows-schema.json b/src-tauri/gen/schemas/windows-schema.json index e0492c82..3f6b11f6 100644 --- a/src-tauri/gen/schemas/windows-schema.json +++ b/src-tauri/gen/schemas/windows-schema.json @@ -35,7 +35,7 @@ ], "definitions": { "Capability": { - "description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, \"platforms\": [\"macOS\",\"windows\"] } ```", + "description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, ], \"platforms\": [\"macOS\",\"windows\"] } ```", "type": "object", "required": ["identifier", "permissions"], "properties": { diff --git a/src/components/common/AddFriendsModal.vue b/src/components/common/AddFriendsModal.vue new file mode 100644 index 00000000..73e6977f --- /dev/null +++ b/src/components/common/AddFriendsModal.vue @@ -0,0 +1,89 @@ + + + + diff --git a/src/components/common/ContextMenu.vue b/src/components/common/ContextMenu.vue index d886ece8..41fe39bd 100644 --- a/src/components/common/ContextMenu.vue +++ b/src/components/common/ContextMenu.vue @@ -36,8 +36,8 @@ left: `${pos.posX}px`, top: `${pos.posY}px` }"> -