diff --git a/desktop/src/main.cjs b/desktop/src/main.cjs index a2321bc..25524c6 100644 --- a/desktop/src/main.cjs +++ b/desktop/src/main.cjs @@ -611,6 +611,25 @@ function registerWindowIpc() { return getCloseBehavior(); } }); + + ipcMain.handle("dialog:chooseDirectory", async (_event, options) => { + try { + const result = await dialog.showOpenDialog({ + title: String(options?.title || "选择文件夹"), + properties: ["openDirectory", "createDirectory"], + }); + return { + canceled: !!result?.canceled, + filePaths: Array.isArray(result?.filePaths) ? result.filePaths : [], + }; + } catch (err) { + logMain(`[main] dialog:chooseDirectory failed: ${err?.message || err}`); + return { + canceled: true, + filePaths: [], + }; + } + }); } async function main() { diff --git a/desktop/src/preload.cjs b/desktop/src/preload.cjs index 1f1eea2..f40b33d 100644 --- a/desktop/src/preload.cjs +++ b/desktop/src/preload.cjs @@ -11,4 +11,6 @@ contextBridge.exposeInMainWorld("wechatDesktop", { getCloseBehavior: () => ipcRenderer.invoke("app:getCloseBehavior"), setCloseBehavior: (behavior) => ipcRenderer.invoke("app:setCloseBehavior", String(behavior || "")), + + chooseDirectory: (options = {}) => ipcRenderer.invoke("dialog:chooseDirectory", options), }); diff --git a/frontend/assets/css/tailwind.css b/frontend/assets/css/tailwind.css index 96d1bc2..3bce7b4 100644 --- a/frontend/assets/css/tailwind.css +++ b/frontend/assets/css/tailwind.css @@ -730,35 +730,39 @@ } .header-btn { - @apply flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg bg-white border border-gray-200 text-gray-700 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed; + @apply flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-md bg-white border border-gray-200 text-gray-700 transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed shadow-sm; } .header-btn:hover:not(:disabled) { - @apply bg-gray-50 border-gray-300; + @apply bg-gray-50 border-gray-300 shadow; } .header-btn:active:not(:disabled) { - @apply bg-gray-100; + @apply bg-gray-100 scale-95; + } + + .header-btn svg { + @apply w-3.5 h-3.5; } .header-btn-icon { - @apply w-8 h-8 flex items-center justify-center rounded-lg bg-white border border-gray-200 text-gray-600 transition-all duration-200; + @apply w-8 h-8 flex items-center justify-center rounded-lg bg-transparent border border-transparent text-gray-600 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed; } .header-btn-icon:hover { - @apply bg-gray-50 border-gray-300 text-gray-800; + @apply bg-transparent border-transparent text-gray-800; } .header-btn-icon-active { - @apply bg-[#03C160]/10 border-[#03C160] text-[#03C160]; + @apply bg-transparent border-transparent text-[#03C160]; } .header-btn-icon-active:hover { - @apply bg-[#03C160]/15; + @apply bg-transparent; } .message-filter-select { - @apply text-xs px-2 py-1.5 rounded-lg bg-white border border-gray-200 text-gray-700 focus:outline-none focus:ring-2 focus:ring-[#03C160]/20 focus:border-[#03C160] transition-all disabled:opacity-50 disabled:cursor-not-allowed; + @apply text-xs px-2 py-1.5 rounded-lg bg-transparent border-0 text-gray-700 focus:outline-none focus:ring-0 transition-all disabled:opacity-50 disabled:cursor-not-allowed; } /* 搜索侧边栏样式 */ diff --git a/frontend/pages/chat/[[username]].vue b/frontend/pages/chat/[[username]].vue index 3bda422..03bf0de 100644 --- a/frontend/pages/chat/[[username]].vue +++ b/frontend/pages/chat/[[username]].vue @@ -60,6 +60,26 @@ + +
+
+
+ +
+
+
+ + + +
+
+ +
+
-
+
@@ -199,7 +237,7 @@