feat: Add emoji and alot of other fixes

This commit is contained in:
2026-06-05 05:40:18 +02:00
parent ca069e2f61
commit 6865147e8f
72 changed files with 3885 additions and 413 deletions

View File

@@ -553,6 +553,29 @@ export function setupSystemHandlers(): void {
return true;
});
ipcMain.handle('copy-file', async (_event, sourceFilePath: string, destinationFilePath: string) => {
if (typeof sourceFilePath !== 'string' || !sourceFilePath.trim()) {
return false;
}
if (typeof destinationFilePath !== 'string' || !destinationFilePath.trim()) {
return false;
}
try {
const stats = await fsp.stat(sourceFilePath);
if (!stats.isFile()) {
return false;
}
await fsp.copyFile(sourceFilePath, destinationFilePath);
return true;
} catch {
return false;
}
});
ipcMain.handle('file-exists', async (_event, filePath: string) => {
try {
await fsp.access(filePath, fs.constants.F_OK);