mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-24 23:06:51 +00:00
修复朋友圈封面信息被错误解析的问题;解决了一些安全问题
This commit is contained in:
@@ -279,7 +279,7 @@ function SettingsPage() {
|
||||
const savedNotificationFilterMode = await configService.getNotificationFilterMode()
|
||||
const savedNotificationFilterList = await configService.getNotificationFilterList()
|
||||
|
||||
const savedAuthEnabled = await configService.getAuthEnabled()
|
||||
const savedAuthEnabled = await window.electronAPI.auth.verifyEnabled()
|
||||
const savedAuthUseHello = await configService.getAuthUseHello()
|
||||
setAuthEnabled(savedAuthEnabled)
|
||||
setAuthUseHello(savedAuthUseHello)
|
||||
@@ -2046,6 +2046,14 @@ function SettingsPage() {
|
||||
checked={authEnabled}
|
||||
onChange={async (e) => {
|
||||
const enabled = e.target.checked
|
||||
if (enabled) {
|
||||
// 检查是否已设置密码,未设置则阻止开启
|
||||
const storedHash = await configService.getAuthPassword()
|
||||
if (!storedHash) {
|
||||
showMessage('请先设置密码再启用应用锁', false)
|
||||
return
|
||||
}
|
||||
}
|
||||
setAuthEnabled(enabled)
|
||||
await configService.setAuthEnabled(enabled)
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user