frontend: FE-027 隐藏式标题栏红绿灯融入顶栏,防启动白闪与顶栏拖拽区
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* 是否运行在 macOS 的 Electron 窗口内。
|
||||
* 用于判断隐藏式标题栏场景:需要为红绿灯预留空间并启用顶栏拖拽。
|
||||
*/
|
||||
export function isMacElectron(): boolean {
|
||||
if (typeof navigator === "undefined") {
|
||||
return false
|
||||
}
|
||||
const ua = navigator.userAgent
|
||||
return ua.includes("Electron") && ua.includes("Macintosh")
|
||||
}
|
||||
Reference in New Issue
Block a user