Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.

Commit d81bb3a

Browse files
committed
reorganize script.js, various changes
1 parent 83458fe commit d81bb3a

File tree

6 files changed

+2768
-333
lines changed

6 files changed

+2768
-333
lines changed

app.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,14 @@ function sendClientAddonInfo() {
9090
console.log(fixedArray)
9191
for (var i = 0; i < fixedArray.length; i++) {
9292
fixedArray[i] = fixedArray[i].replace('/r', '');
93+
console.log(fixedArray)
9394
ADDON_IDS.push([fixedArray[i].substr(0, 11).replace(/\s/g, '').toString()])
9495
}
9596

9697
if (fixedArray == "Couldn't initialize Steam!\r") {
9798
mainWindow.webContents.send('errorAlert', ADDON_IDS);
9899
}
100+
console.log(ADDON_IDS);
99101
mainWindow.webContents.send('addonInfo', ADDON_IDS);
100102
});
101103
}
@@ -129,7 +131,8 @@ ipcMain.on('uploadToWorkshop', (event, gmaDir, iconDir, addonId) => {
129131
const gmpublish = spawn(settings.get('gmodDirectory') + '\\bin\\gmpublish.exe', ['update', '-id', addonId, '-icon', iconDir, '-addon', gmaDir]);
130132
gmpublish.stdout.on('data', (data) => {
131133
var arrayOfOutput = data.toString().split('\n');
132-
var fixedArray = arrayOfOutput.slice(arrayOfOutput.length - 8, arrayOfOutput.length - 7);
134+
console.log(arrayOfOutput)
135+
var fixedArray = arrayOfOutput.slice(arrayOfOutput.length - 2, arrayOfOutput.length - 1);
133136
fixedArray = fixedArray[0].replace(/\D/, '');
134137
fixedArray = fixedArray.substr(5, fixedArray.length);
135138
mainWindow.webContents.send('currentAddonID', fixedArray);

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ <h4 style="font-weight: 300; margin: 10px">Steam <b>must</b> be open!</h4>
3535
<div id="addon_management_prompt">
3636
<h3>What would you like to do?</h3>
3737
<div id="addon_mgt_btn_grid">
38-
<button id="create_addon_button" class="button_normal medium-text transition_button" data-divtoshow="#create_new_addon" data-divtohide="#addon_management_prompt" data-resize="500, 250" style="margin: 10px;">Create a new addon</button>
38+
<button id="create_addon_button" class="button_normal medium-text transition_button" data-divtoshow="#create_new_addon, #addonDirPrompt" data-divtohide="#addon_management_prompt" data-resize="500, 250" style="margin: 10px;">Create a new addon</button>
3939
<button id="update_existing_addon_button" class="button_normal medium-text transition_button rowtwo" data-divtoshow="#update_existing_addon" data-divtohide="#addon_management_prompt" data-resize="500, 250" style="margin: 10px;">Loading... </button>
4040
<button class="button_normal medium-text transition_button rowtwo" data-divtoshow="#extract_addon" data-divtohide="#addon_management_prompt" data-resize="500, 250" style="margin: 10px;">Extract Addon</button>
4141
</div>
@@ -204,7 +204,7 @@ <h3>Addon Extraction</h3>
204204
</div>
205205
<div id="extraction_done">
206206
<h3>Extracted!</h3>
207-
<a id="extractedGMALocation" style="color: white;" href="#">View</a>
207+
<p><a id="extractedGMALocation" style="color: white;" href="#">View</a></p>
208208
<button class="button_normal transition_button" data-divtohide="#extract_addon" data-divtoshow="#addon_management_prompt" data-resize="500, 200" style="width: 100px;">Done</button>
209209
</div>
210210
</div>

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gmod-addon-tool",
3-
"version": "1.0.0",
3+
"version": "1.3",
44
"description": "A simple tool to update workshop addons.",
55
"main": "app.js",
66
"dependencies": {
@@ -11,6 +11,7 @@
1111
},
1212
"devDependencies": {
1313
"electron": "^5.0.0",
14+
"electron-builder": "^22.3.2",
1415
"electron-connect": "^0.6.3",
1516
"electron-packager": "^13.1.1"
1617
},
@@ -19,5 +20,6 @@
1920
"start": "electron ."
2021
},
2122
"author": "Leeous <contact@leeous.com>",
22-
"license": "ISC"
23+
"license": "ISC",
24+
"repository": "git@github.com:Leeous/gmod-addon-tool.git"
2325
}

src/css/style.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@ header {
245245
font-weight: 300;
246246
}
247247

248-
249-
250248
#refresh_addons {
251249
margin-left: auto;
252250
padding-right: 15px;

0 commit comments

Comments
 (0)