Skip to content

Commit 2aceea9

Browse files
[ENGG-4591]: Onboarding revamp changes (#270)
1 parent 6cb1158 commit 2aceea9

5 files changed

Lines changed: 342 additions & 20 deletions

File tree

src/main/events.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from "path";
22
import { unescape } from "querystring";
33
import fs from "fs";
44
import os from "os";
5-
import { app, dialog, ipcMain } from "electron";
5+
import { app, dialog, ipcMain, shell } from "electron";
66
/** ACTIONS */
77
import startBackgroundProcess from "./actions/startBackgroundProcess";
88
import { getState, setState } from "./actions/stateManagement";
@@ -300,6 +300,11 @@ export const registerMainProcessCommonEvents = () => {
300300
return folderDialogPromise;
301301
});
302302

303+
ipcMain.handle("open-path-in-file-explorer", async (event, payload = {}) => {
304+
const { resourcePath } = payload;
305+
shell.openPath(resourcePath);
306+
});
307+
303308
ipcMain.handle(
304309
"get-workspace-folder-preview",
305310
async (event, payload = {}) => {

src/renderer/actions/local-sync/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ export const GIT_IGNORE_FILE = ".gitignore";
1515

1616
export const GLOBAL_CONFIG_FOLDER_PATH = `${homedir()}/.config/requestly`;
1717
export const GLOBAL_CONFIG_FILE_NAME = "config.json";
18+
export const DEFAULT_WORKSPACE_NAME = "Default workspace";
19+
export const LOCAL_WORKSPACES_DIRECTORY_NAME = "Requestly";

src/renderer/actions/local-sync/fs-manager-builder.rpc-service.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import {
33
createWorkspaceFolder,
44
getAllWorkspaces,
55
removeWorkspace,
6+
createDefaultWorkspace,
7+
openExistingLocalWorkspace,
8+
checkIsWorkspacePathAvailable,
69
} from "./fs-utils";
710
import { FsManagerRPCService } from "./fs-manager.rpc-service";
811

@@ -18,6 +21,12 @@ export class FsManagerBuilderRPCService extends RPCServiceOverIPC {
1821

1922
init() {
2023
this.exposeMethodOverIPC("createWorkspaceFolder", createWorkspaceFolder);
24+
this.exposeMethodOverIPC("createDefaultWorkspace", createDefaultWorkspace);
25+
this.exposeMethodOverIPC(
26+
"openExistingLocalWorkspace",
27+
openExistingLocalWorkspace
28+
);
29+
this.exposeMethodOverIPC("checkIsWorkspacePathAvailable", checkIsWorkspacePathAvailable);
2130
this.exposeMethodOverIPC("getAllWorkspaces", getAllWorkspaces);
2231
this.exposeMethodOverIPC("removeWorkspace", removeWorkspace);
2332
this.exposeMethodOverIPC("build", this.build.bind(this));
@@ -29,7 +38,10 @@ export class FsManagerBuilderRPCService extends RPCServiceOverIPC {
2938
console.log("not building again");
3039
return;
3140
}
32-
const manager = new FsManagerRPCService(rootPath, this.exposedWorkspacePaths);
41+
const manager = new FsManagerRPCService(
42+
rootPath,
43+
this.exposedWorkspacePaths
44+
);
3345
await manager.init();
3446
this.exposedWorkspacePaths.set(rootPath, manager);
3547
}

0 commit comments

Comments
 (0)