feat: Add user statuses and cards
This commit is contained in:
@@ -528,6 +528,7 @@ export function setupSystemHandlers(): void {
|
||||
resolve(false);
|
||||
}
|
||||
});
|
||||
|
||||
response.on('error', () => resolve(false));
|
||||
});
|
||||
|
||||
@@ -537,7 +538,12 @@ export function setupSystemHandlers(): void {
|
||||
});
|
||||
|
||||
ipcMain.handle('context-menu-command', (_event, command: string) => {
|
||||
const allowedCommands = ['cut', 'copy', 'paste', 'selectAll'] as const;
|
||||
const allowedCommands = [
|
||||
'cut',
|
||||
'copy',
|
||||
'paste',
|
||||
'selectAll'
|
||||
] as const;
|
||||
|
||||
if (!allowedCommands.includes(command as typeof allowedCommands[number])) {
|
||||
return;
|
||||
@@ -557,4 +563,10 @@ export function setupSystemHandlers(): void {
|
||||
case 'selectAll': webContents.selectAll(); break;
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.handle('get-idle-state', () => {
|
||||
const { getIdleState } = require('../idle/idle-monitor') as typeof import('../idle/idle-monitor');
|
||||
|
||||
return getIdleState();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user