From 27a18f1fc692f88d2673b134a859d6ff14549cd2 Mon Sep 17 00:00:00 2001 From: cc <98377878+hicccc77@users.noreply.github.com> Date: Sat, 14 Mar 2026 13:34:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BE=E7=89=87=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E6=B8=B2=E6=9F=93=EF=BC=9B=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E7=AE=A1=E9=81=93=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9B=E4=BC=98=E5=8C=96=E4=BA=86=E5=9B=BE=E7=89=87=E5=AF=86?= =?UTF-8?q?=E9=92=A5=E7=9B=B8=E5=85=B3=E9=85=8D=E7=BD=AE=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/main.ts | 9 ++-- electron/services/chatService.ts | 2 + electron/services/wcdbCore.ts | 6 +-- src/components/GlobalSessionMonitor.tsx | 1 - src/components/TitleBar.scss | 54 +++++++++++++++++++ src/components/TitleBar.tsx | 9 +++- src/pages/ChatPage.tsx | 18 +++---- src/pages/ImageWindow.scss | 70 ------------------------- src/pages/ImageWindow.tsx | 55 ++++++++++--------- src/pages/SettingsPage.tsx | 13 ++--- src/pages/WelcomePage.tsx | 13 ++--- 11 files changed, 117 insertions(+), 133 deletions(-) diff --git a/electron/main.ts b/electron/main.ts index bb6576f..46b96a9 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -660,17 +660,14 @@ function createImageViewerWindow(imagePath: string, liveVideoPath?: string) { nodeIntegration: false, webSecurity: false // 允许加载本地文件 }, - titleBarStyle: 'hidden', - titleBarOverlay: { - color: '#00000000', - symbolColor: '#ffffff', - height: 40 - }, + frame: false, show: false, backgroundColor: '#000000', autoHideMenuBar: true }) + setupCustomTitleBarWindow(win) + win.once('ready-to-show', () => { win.show() }) diff --git a/electron/services/chatService.ts b/electron/services/chatService.ts index 6f104fd..3a6741a 100644 --- a/electron/services/chatService.ts +++ b/electron/services/chatService.ts @@ -367,6 +367,8 @@ class ChatService { }) }) } + }) + } /** * 预热 media 数据库列表缓存(后台异步执行) diff --git a/electron/services/wcdbCore.ts b/electron/services/wcdbCore.ts index d664443..c118a79 100644 --- a/electron/services/wcdbCore.ts +++ b/electron/services/wcdbCore.ts @@ -190,8 +190,7 @@ export class WcdbCore { setTimeout(() => { if (!this.monitorCallback) return - this.monitorPipeClient = net.createConnection(this.monitorPipePath, () => { - }) + this.monitorPipeClient = net.createConnection(this.monitorPipePath, () => {}) let buffer = '' this.monitorPipeClient.on('data', (data: Buffer) => { @@ -210,8 +209,7 @@ export class WcdbCore { } }) - this.monitorPipeClient.on('error', () => { - }) + this.monitorPipeClient.on('error', () => {}) this.monitorPipeClient.on('close', () => { this.monitorPipeClient = null diff --git a/src/components/GlobalSessionMonitor.tsx b/src/components/GlobalSessionMonitor.tsx index 40d8243..a1abf71 100644 --- a/src/components/GlobalSessionMonitor.tsx +++ b/src/components/GlobalSessionMonitor.tsx @@ -46,7 +46,6 @@ export function GlobalSessionMonitor() { return () => { removeListener() } - } else { } return () => { } }, []) diff --git a/src/components/TitleBar.scss b/src/components/TitleBar.scss index b90b64c..8c3c9b8 100644 --- a/src/components/TitleBar.scss +++ b/src/components/TitleBar.scss @@ -36,6 +36,8 @@ font-size: 15px; font-weight: 500; color: var(--text-secondary); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } .title-sidebar-toggle { @@ -90,3 +92,55 @@ color: #fff; } } + +.image-controls { + display: flex; + align-items: center; + gap: 8px; + margin-right: auto; + padding-left: 16px; + -webkit-app-region: no-drag; + + button { + background: transparent; + border: none; + color: var(--text-secondary); + cursor: pointer; + padding: 6px; + border-radius: 4px; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s; + + &:hover { + background: var(--bg-tertiary); + color: var(--text-primary); + } + + &:disabled { + cursor: default; + opacity: 1; + } + + &.live-play-btn.active { + background: rgba(var(--primary-rgb, 76, 132, 255), 0.16); + color: var(--primary, #4c84ff); + } + } + + .scale-text { + min-width: 50px; + text-align: center; + color: var(--text-secondary); + font-size: 12px; + font-variant-numeric: tabular-nums; + } + + .divider { + width: 1px; + height: 14px; + background: var(--border-color); + margin: 0 4px; + } +} diff --git a/src/components/TitleBar.tsx b/src/components/TitleBar.tsx index d208eda..491a7ea 100644 --- a/src/components/TitleBar.tsx +++ b/src/components/TitleBar.tsx @@ -7,13 +7,17 @@ interface TitleBarProps { sidebarCollapsed?: boolean onToggleSidebar?: () => void showWindowControls?: boolean + customControls?: React.ReactNode + showLogo?: boolean } function TitleBar({ title, sidebarCollapsed = false, onToggleSidebar, - showWindowControls = true + showWindowControls = true, + customControls, + showLogo = true }: TitleBarProps = {}) { const [isMaximized, setIsMaximized] = useState(false) @@ -32,7 +36,7 @@ function TitleBar({ return (
- WeFlow + {showLogo && WeFlow} {title || 'WeFlow'} {onToggleSidebar ? (
+ {customControls} {showWindowControls ? (
-
- - )} - - {Math.round(displayScale * 100)}% - -
- - -
-
+ + {hasLiveVideo && ( + <> + +
+ + )} + + {Math.round(displayScale * 100)}% + +
+ + + + } + />
syncCurrentKeys({ imageAesKey: value, wxid })) }} /> -
- ⚠️ 快速获取方案基于本地缓存计算,可能因账号信息不匹配而不准确。若图片无法解密,请使用「内存扫描」方案。 -
- -
{isFetchingImageKey ? ( @@ -1399,7 +1396,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { ) : ( imageKeyStatus &&
{imageKeyStatus}
)} - 内存扫描需要微信正在运行,并在微信中打开 2-3 张图片大图后再点击 + 优先推荐缓存计算方案。若图片无法解密,可使用内存扫描(需微信运行并打开 2-3 张图片大图)
diff --git a/src/pages/WelcomePage.tsx b/src/pages/WelcomePage.tsx index 9c1d62c..26311e0 100644 --- a/src/pages/WelcomePage.tsx +++ b/src/pages/WelcomePage.tsx @@ -780,9 +780,6 @@ function WelcomePage({ standalone = false }: WelcomePageProps) { {currentStep.id === 'image' && (
-
- ⚠️ 快速获取方案基于本地缓存计算,可能因账号信息不匹配而不准确。若图片无法解密,请使用下方「内存扫描」方案。 -
@@ -795,11 +792,11 @@ function WelcomePage({ standalone = false }: WelcomePageProps) {
- -
@@ -813,7 +810,7 @@ function WelcomePage({ standalone = false }: WelcomePageProps) { imageKeyStatus &&
{imageKeyStatus}
)} -
内存扫描需要微信正在运行,并在微信中打开 2-3 张图片大图后再点击
+
优先推荐缓存计算方案。若图片无法解密,可使用内存扫描(需微信运行并打开 2-3 张图片大图)
)}