Update transformed files

This commit is contained in:
Florian Rappl
2026-02-04 11:26:06 +01:00
parent b3b124bde1
commit 8009348941
38 changed files with 577 additions and 454 deletions

View File

@@ -3,18 +3,18 @@ const electron_1 = require("electron");
let electronSocket;
module.exports = (socket) => {
electronSocket = socket;
socket.on('shell-showItemInFolder', (fullPath) => {
socket.on("shell-showItemInFolder", (fullPath) => {
electron_1.shell.showItemInFolder(fullPath);
electronSocket.emit('shell-showItemInFolderCompleted');
electronSocket.emit("shell-showItemInFolderCompleted");
});
socket.on('shell-openPath', async (path) => {
socket.on("shell-openPath", async (path) => {
const errorMessage = await electron_1.shell.openPath(path);
electronSocket.emit('shell-openPathCompleted', errorMessage);
electronSocket.emit("shell-openPathCompleted", errorMessage);
});
socket.on('shell-openExternal', async (url, options) => {
let result = '';
socket.on("shell-openExternal", async (url, options) => {
let result = "";
if (options) {
await electron_1.shell.openExternal(url, options).catch(e => {
await electron_1.shell.openExternal(url, options).catch((e) => {
result = e.message;
});
}
@@ -23,9 +23,9 @@ module.exports = (socket) => {
result = e.message;
});
}
electronSocket.emit('shell-openExternalCompleted', result);
electronSocket.emit("shell-openExternalCompleted", result);
});
socket.on('shell-trashItem', async (fullPath, deleteOnFail) => {
socket.on("shell-trashItem", async (fullPath, deleteOnFail) => {
let success = false;
try {
await electron_1.shell.trashItem(fullPath);
@@ -34,18 +34,18 @@ module.exports = (socket) => {
catch (error) {
success = false;
}
electronSocket.emit('shell-trashItem-completed', success);
electronSocket.emit("shell-trashItem-completed", success);
});
socket.on('shell-beep', () => {
socket.on("shell-beep", () => {
electron_1.shell.beep();
});
socket.on('shell-writeShortcutLink', (shortcutPath, operation, options) => {
socket.on("shell-writeShortcutLink", (shortcutPath, operation, options) => {
const success = electron_1.shell.writeShortcutLink(shortcutPath, operation, options);
electronSocket.emit('shell-writeShortcutLinkCompleted', success);
electronSocket.emit("shell-writeShortcutLinkCompleted", success);
});
socket.on('shell-readShortcutLink', (shortcutPath) => {
socket.on("shell-readShortcutLink", (shortcutPath) => {
const shortcutDetails = electron_1.shell.readShortcutLink(shortcutPath);
electronSocket.emit('shell-readShortcutLinkCompleted', shortcutDetails);
electronSocket.emit("shell-readShortcutLinkCompleted", shortcutDetails);
});
};
//# sourceMappingURL=shell.js.map