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 张图片大图)
)}