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 (
-

+ {showLogo &&

}
{title || 'WeFlow'}
{onToggleSidebar ? (
+ {customControls}
{showWindowControls ? (