mirror of https://github.com/keeweb/keeweb
fix #1341: auto-lock the app on screen lock on Windows
parent
0a025d807b
commit
cccb9ac681
|
@ -23,7 +23,6 @@ const windowPositionFileName = path.join(userDataDir, 'window-position.json');
|
|||
const appSettingsFileName = path.join(userDataDir, 'app-settings.json');
|
||||
const tempUserDataPath = path.join(userDataDir, 'temp');
|
||||
const tempUserDataPathRand = Date.now().toString() + Math.random().toString();
|
||||
const systemNotificationIds = [];
|
||||
|
||||
let htmlPath = process.argv
|
||||
.filter(arg => arg.startsWith('--htmlpath='))
|
||||
|
@ -440,15 +439,9 @@ function subscribePowerEvents() {
|
|||
electron.powerMonitor.on('resume', () => {
|
||||
emitRemoteEvent('power-monitor-resume');
|
||||
});
|
||||
if (process.platform === 'darwin') {
|
||||
const id = electron.systemPreferences.subscribeNotification(
|
||||
'com.apple.screenIsLocked',
|
||||
() => {
|
||||
emitRemoteEvent('os-lock');
|
||||
}
|
||||
);
|
||||
systemNotificationIds.push(id);
|
||||
}
|
||||
electron.powerMonitor.on('lock-screen', () => {
|
||||
emitRemoteEvent('os-lock');
|
||||
});
|
||||
}
|
||||
|
||||
function setEnv() {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
Release notes
|
||||
-------------
|
||||
##### v1.13.0 (TBD)
|
||||
`+` #1341: auto-lock the app on screen lock on Windows
|
||||
`-` fix #1323: version in the About dialog
|
||||
`-` fix #734: OTP secrets with spaces
|
||||
|
||||
|
|
Loading…
Reference in New Issue