-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
256 lines (255 loc) · 15 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://ajax.googleapis.com/; style-src 'unsafe-inline' 'self' https://fonts.googleapis.com; font-src https://fonts.googleapis.com https://fonts.gstatic.com; script-src 'unsafe-inline' 'self' https://ajax.googleapis.com; connect-src https://api.github.com https://api.steampowered.com; img-src *"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="src/js/script.js"></script>
<title>Garry's Mod Addon Tool</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<link rel="stylesheet" href="src/css/style.css">
</head>
<body>
<div id="errorNote">
<p class="errorText">Placeholder</p>
<div>
<h6>More info in logs - open settings</h6>
<h6 id="fatalError">Fatal - GMAT will exit in <span>15</span> seconds.</h6>
</div>
</div>
<div id="main_titlebar">
<div class="main_title">
<p>Garry's Mod Addon Tool <span style='font-size: 0.7em; font-weight: 300; -webkit-app-region: no-drag;'>by <a href='https://leeous.github.io' target='_blank' style='text-decoration: underline; color: inherit;'>Leeous</a></span></p>
</div>
<div class="main_buttons">
<p id="coffeeApp" title="Buy me a coffee? :)">☕</p>
<p id="settingsModal" title="Settings" >⚙</p>
<p id="minApp" title="Minimize">—</p>
<p id="closeApp" title="Exit">X</p>
</div>
</div>
<div id="directory_selection">
<div id="gmodDirSelect">
<h3 id="dir_select_prompt">Please select your Garry's Mod directory</h3>
<button id="gmod_dir_folder" class="button_normal">Choose Directory</button>
<h4 style="font-weight: 300; margin: 10px">Steam <b>must</b> be open!</h4>
</div>
<p id="status_of_dir"></p>
<div id="dir_prompt_next">
<button class="transition_button" data-divtoshow="#addon_management, #addon_management_prompt" data-divtohide="#directory_selection" data-resize="500, 200" disabled>Next</button>
</div>
</div>
<div id="addon_management">
<div id="addon_management_prompt">
<h3>What would you like to do?</h3>
<div id="addon_mgt_btn_grid">
<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, 260" style="margin: 10px;">Create a new addon</button>
<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="450, 500" style="margin: 10px;" disabled>Loading... </button>
<button class="button_normal medium-text transition_button rowtwo" data-divtoshow="#extract_addon, #addon_extraction, #extract_addon_select" data-divtohide="#addon_management_prompt" data-resize="500, 250" style="margin: 10px;">Extract Addon</button>
</div>
</div>
<div id="update_existing_addon" class="path_div">
<div class="top">
<div>
<button class="transition_button back_button" data-divtoshow="#addon_management_prompt" data-divtohide="#update_existing_addon" data-resize="500, 200">◀ Back</button>
</div>
<div>
<h3>Your addons</h3>
</div>
<div></div>
</div>
<div id="yourAddons"></div>
</div>
<div id="create_new_addon" class="path_div">
<div class="top">
<div>
<button class="transition_button back_button resetAddonCreation" data-divtoshow="#addon_management_prompt" data-divtohide="#create_new_addon, #addonDirPrompt" data-resize="500, 200">◀ Back</button>
</div>
<div>
<h3>Addon creation</h3>
</div>
<div>
</div>
</div>
<div id="addon_creation">
<div id="addonDirPrompt">
<p>Please select your addon's folder</p>
<button id="addon_dir_folder" class="button_normal">Choose Directory</button>
<p id="addonDir"><b></b></p>
<div class="next_prompt">
<button id="addonDirCheck" class="transition_button" data-divtoshow="#addonIconPrompt" data-divtohide="#addonDirPrompt" data-resize="500, 250" disabled>Next</button>
</div>
</div>
<div id="addonIconPrompt">
<p>Please select an icon for your addon</p>
<p style="font-size: 0.8em">Must be a JPEG/JPG</p>
<button id="addon_icon" class="button_normal">Choose Directory</button>
<div class="next_prompt">
<button id="addonIconCheck" class="transition_button" data-divtoshow="#jsonCreator" data-divtohide="#addonIconPrompt" data-resize="500, 360" disabled>Next</button>
</div>
</div>
<div id="jsonCreator">
<div id="jsonInfo">
<div id="jsonTitle">
<p class="jsonSectionHeader">Title</p>
<input name="addonTitle" type="text" placeholder="Crazy cool addon" maxlength="128">
<p><span style="font-size: .7em; color: white;">(required)</span></p>
</div>
<div id="jsonType">
<p class="jsonSectionHeader">Type</p>
<select name="addonType" id="">
<option value="null">-- Select one --</option>
<option value="serverContent">Server Content</option>
<option value="gamemode">Gamemode</option>
<option value="map">Map</option>
<option value="weapon">Weapon</option>
<option value="vehicle">Vehicle</option>
<option value="npc">NPC</option>
<option value="tool">Tool</option>
<option value="effects">Effects</option>
<option value="model">Model</option>
</select>
<p><span style="font-size: .7em; color: white;">(required)</span></p>
</div>
<div id="jsonTags">
<div class="col">
<p class="jsonSectionHeader">Tag</p>
</div>
<div class="col">
<div class="jsonGrid">
<div class="type">
<input type="checkbox" name="roleplay" class="typeCheckbox">
<p>Roleplay</p>
</div>
<div class="type">
<input type="checkbox" name="scenic" class="typeCheckbox">
<p>Scenic</p>
</div>
<div class="type">
<input type="checkbox" name="movie" class="typeCheckbox">
<p>Movie</p>
</div>
<div class="type">
<input type="checkbox" name="realism" class="typeCheckbox">
<p>Realism</p>
</div>
<div class="type">
<input type="checkbox" name="fun" class="typeCheckbox">
<p>Fun</p>
</div>
<div class="type">
<input type="checkbox" name="water" class="typeCheckbox">
<p>Water</p>
</div>
<div class="type">
<input type="checkbox" name="comic" class="typeCheckbox">
<p>Comic</p>
</div>
<div class="type">
<input type="checkbox" name="build" class="typeCheckbox">
<p>Build</p>
</div>
<div class="type">
<input type="checkbox" name="cartoon" class="typeCheckbox">
<p>Cartoon</p>
</div>
<div class="type">
<p><span style="font-size: .7em; color: white;">(max 2)</span></p>
</div>
</div>
</div>
</div>
<div id="jsonIgnore">
<p class="jsonSectionHeader">Ignore</p>
<input name="addonIgnore" type="text" placeholder="*.html, README.md, etc">
<p><span style="font-size: .7em; color: white; font-weight:500;">(file names seprated by a comma)</span></p>
</div>
<div class="next_prompt">
<button id="jsonAddonValidate" class="transition_button" data-divtoshow="#gmaPrep" data-divtohide="#jsonCreator" data-resize="500, 510" disabled>Next</button>
</div>
</div>
</div>
<div id="gmaPrep">
<!-- <p>Created <span style="font-weight: 700">addon.json</span>!</p> -->
<h4>What would you like to do?</h4>
<!-- This section is filled out by ipcRenderer.on("addonJSONCheck") in script.js:592 -->
<div id="gmaPreview">
<img id="addonIconPreview" src="" alt="Addon Icon">
<table id="addonPreviewDetails">
<tr>
<th>Title</th>
<td class="addonTitle"></td>
</tr>
<tr>
<th>Type</th>
<td class="addonType"></td>
</tr>
<tr>
<th>Tags</th>
<td class="addonTags"></td>
</tr>
</table>
</div>
<div class="buttonListTemplate">
<button id="createOnly" class="button_normal">Create GMA only</button>
<button id="createAndUpload" class="button_normal">Create GMA <b>and</b> upload</button>
<button id="editAddonJSON" class="button_normal transition_button" data-divtohide="#gmaPrep" data-divtoshow="#jsonCreator" data-resize="500,355">Edit addon.json</button>
</div>
</div>
<div id="createGMA">
<h4>Creating GMA...</h4>
<img src="src/img/loading.gif" style="width: 64px; display: block; margin-left: auto; margin-right: auto; margin-top: 35px;" alt="">
</div>
<div id="uploading">
<h4>Uploading to the workshop...</h4>
<img src="src/img/loading.gif" style="width: 64px; display: block; margin-left: auto; margin-right: auto; margin-top: 35px;" alt="">
</div>
<div id="newAddonLocation">
<h3>Finished!</h3>
<p><a id="gmaLocation" style="color: white;" href="#">View</a></p>
<button class="button_normal transition_button resetAddonCreation" data-divtohide="#create_new_addon" data-divtoshow="#addon_management_prompt" data-resize="500, 200" style="width: 100px;">Done</button>
</div>
<div id="new_addon">
<h3>Uploaded!</h3>
<p><a id="new_addon_link" style="color: white;" href="#">View on Steam</a></p>
<button class="button_normal transition_button resetAddonCreation" data-divtohide="#create_new_addon" data-divtoshow="#addon_management_prompt" data-resize="500, 200" style="width: 100px;">Done</button>
</div>
</div>
</div>
<div id="extract_addon" class="path_div">
<div class="top">
<div>
<button id="extraction_back" class="back_button transition_button resetAddonExtraction" data-divtoshow="#addon_management_prompt" data-divtohide="#extract_addon" data-resize="500, 200">◀ Back</button>
</div>
<div>
<h3>Addon Extraction</h3>
</div>
<div></div>
</div>
<div id="addon_extraction">
<div id="extract_addon_select">
<p>Select the GMA file you'd like to extract</p>
<button id="gmaFileSelection" class="button_normal">Choose GMA file</button>
<p id="currentGMAFile" style="font-weight: bold;"></p>
<div id="addon_extract_next" class="bottom_btn">
<button disabled class="button_normal" data-divtohide="#extract_addon_select" data-divtoshow="#extracting_addon">Extract</button>
</div>
</div>
<div id="extracting_addon">
<p>Extracting addon...</p>
<img src="src/img/loading.gif" style="width: 64px; display: block; margin-left: auto; margin-right: auto; margin-top: 35px;" alt="">
</div>
<div id="extraction_done">
<h3>Extracted!</h3>
<p><a id="extractedGMALocation" style="color: white;" href="#">View</a></p>
<button class="button_normal transition_button resetAddonExtraction" data-divtohide="#extract_addon" data-divtoshow="#addon_management_prompt" data-resize="500, 200" style="width: 100px;">Done</button>
</div>
</div>
</div>
</div>
<div id="checkmarkNote">
<img src="src/img/checkmark.png" alt="">
<p>Saved!</p>
</div>
</body>
</html>