实现图片解密设置页

This commit is contained in:
电摇小子
2026-07-14 11:07:35 +08:00
parent f1ceef0e5e
commit 7b54b611d3
24 changed files with 1541 additions and 42 deletions
@@ -21,3 +21,21 @@ export async function isWindowsWechatRunning(): Promise<boolean> {
}
return false
}
export async function isWechatRunning(): Promise<boolean> {
if (process.platform === 'win32') return isWindowsWechatRunning()
if (process.platform !== 'darwin') return false
for (const args of [
['-x', 'WeChat'],
['-f', 'WeChat.app/Contents/MacOS/WeChat']
]) {
try {
const { stdout } = await execFileAsync('/usr/bin/pgrep', args)
if (stdout.trim()) return true
} catch {
// Try the next macOS process lookup strategy.
}
}
return false
}