@@ -31,6 +31,7 @@ addonToCreateData = {
31
31
"tags" : [ ] ,
32
32
"ignore" : [ ]
33
33
}
34
+ currentAppVersion = "v1.1" ;
34
35
35
36
36
37
@@ -46,6 +47,20 @@ $(document).ready(() => {
46
47
ipcRenderer . on ( "addonInfo" , ( event , message ) => {
47
48
getAddonInfoFromSteam ( message )
48
49
} ) ;
50
+
51
+ // Check current version, let user know if it differs
52
+ $ . ajax ( {
53
+ type : "GET" ,
54
+ url : "https://api.github.com/repos/Leeous/gmod-addon-tool/releases/latest" ,
55
+ dataType : "json"
56
+ } ) . done ( ( data ) => {
57
+ if ( data . tag_name != currentAppVersion ) {
58
+ var open = confirm ( "Update " + data . tag_name + " available." ) ;
59
+ if ( open ) {
60
+ shell . openExternal ( "https://github.com/Leeous/gmod-addon-tool/releases" ) ;
61
+ }
62
+ }
63
+ } )
49
64
50
65
function getAddonInfoFromSteam ( message ) {
51
66
arrayOfAddonIds = message ;
@@ -173,6 +188,10 @@ $(document).ready(() => {
173
188
$ ( '#dir_prompt_next button' ) . click ( ( ) => {
174
189
$ ( '#directory_selection' ) . fadeOut ( ( ) => {
175
190
$ ( '#addon_management' ) . fadeIn ( ) ;
191
+ $ ( '#addon_management_prompt' ) . fadeIn ( ) ;
192
+ win . setBounds ( {
193
+ height : 175 ,
194
+ } )
176
195
} ) ;
177
196
} )
178
197
@@ -189,7 +208,6 @@ $(document).ready(() => {
189
208
$ ( '#create_new_addon_button' ) . click ( ( ) => {
190
209
$ ( '#addon_management_prompt' ) . fadeOut ( ( ) => {
191
210
win . setBounds ( { height : 250 } )
192
-
193
211
$ ( '#create_new_addon, #addonDirPrompt' ) . fadeIn ( )
194
212
} )
195
213
} )
0 commit comments