1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-05 17:14:03 +00:00

Add "reveal" FS job and a wrapper

This commit is contained in:
Даниїл Григор'єв 2022-11-05 20:19:05 +02:00
parent ed6922f912
commit 8750568522
No known key found for this signature in database
GPG Key ID: B890DF16341D8C1D
3 changed files with 17 additions and 0 deletions

View File

@ -336,6 +336,11 @@ ipcMain.handle("fs-job", async (event, job) => {
return;
}
case "reveal": {
shell.showItemInFolder(fname);
return;
}
default:
throw new Error("Unknown fs job: " + job.type);
}

View File

@ -335,6 +335,11 @@ ipcMain.handle("fs-job", async (event, job) => {
return;
}
case "reveal": {
shell.showItemInFolder(fname);
return;
}
default:
throw new Error("Unknown fs job: " + job.type);
}

View File

@ -38,4 +38,11 @@ export class StorageImplElectron extends StorageInterface {
filename,
});
}
revealFileAsync(filename) {
return ipcRenderer.invoke("fs-job", {
type: "reveal",
filename,
});
}
}