Skip to content

Commit e4710a6

Browse files
committed
Folder Button
1 parent b6fc3fa commit e4710a6

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

frontend/app.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ function setup() {
558558

559559
$("#IDEButton").on("click", () => launchInIDE());
560560

561-
$("#FolderButton").on("click", () => launchInIDE());
561+
$("#FolderButton").on("click", () => launchFolder());
562562

563563

564564
$("#verboseOption").checkbox();
@@ -961,6 +961,7 @@ function switchGenerateMode(mode) {
961961
if (mode == 'updateMode') {
962962
$("#generateButton").hide();
963963
$("#updateButton").show();
964+
$("#folderButton").show();
964965
$("#missingAddonMessage").hide();
965966
$("#localAddonMessage").hide();
966967
$("#nameRandomiser").hide();
@@ -982,6 +983,7 @@ function switchGenerateMode(mode) {
982983

983984
$("#generateButton").show();
984985
$("#updateButton").hide();
986+
$("#folderButton").show();
985987
$("#missingAddonMessage").hide();
986988
$("#localAddonMessage").hide();
987989
$("#nameRandomiser").show();
@@ -1050,6 +1052,15 @@ function getPlatformList() {
10501052
return platformValueArray;
10511053
}
10521054

1055+
function openFolder() {
1056+
const platformsPicked = $("#platformsDropdown .active");
1057+
const platformValueArray = [];
1058+
for (let i = 0; i < platformsPicked.length; i++){
1059+
platformValueArray.push($(platformsPicked[i]).attr("data-value"));
1060+
}
1061+
return platformValueArray;
1062+
}
1063+
10531064
//----------------------------------------
10541065
function displayModal(message) {
10551066
$("#uiModal .content")
@@ -1062,8 +1073,10 @@ function displayModal(message) {
10621073

10631074
if (message.indexOf("Success!") > -1){
10641075
$("#IDEButton").show();
1076+
$("#FolderButton").show();
10651077
} else {
10661078
$("#IDEButton").hide();
1079+
$("#FolderButton").show();
10671080
}
10681081

10691082
$("#uiModal").modal('show');
@@ -1187,9 +1200,7 @@ function launchFolder(){
11871200

11881201
const project = {
11891202
'projectName': $("#projectName").val(),
1190-
'projectPath': $("#projectPath").val(),
1191-
'platform': platform,
1192-
'ofPath': $("#ofPath").val()
1203+
'projectPath': $("#projectPath").val()
11931204
};
11941205

11951206
ipcRenderer.send('launchFolder', project );

frontend/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,8 +1150,8 @@ ipcMain.on('launchProjectinIDE', (event, arg) => {
11501150
}
11511151
});
11521152

1153-
ipcMain.on('launchFolder', (event, arg) => {
1154-
const {
1153+
ipcMain.on('launchFolder', async (event, arg) => {
1154+
const {
11551155
projectPath,
11561156
projectName } = arg;
11571157
const fullPath = path.join(projectPath, projectName);

0 commit comments

Comments
 (0)