Skip to content

Commit 7a5280c

Browse files
committed
onload, if unable to connect to wamp router & there's not saved configuration, open settings modal
1 parent b6ea248 commit 7a5280c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/js/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ var config = (function($, module) {
6363
};
6464
var config = getLocalStorageItem('debugConsoleConfig');
6565

66+
module.haveSavedConfig = config !== null;
67+
6668
config = $.extend(configDefault, config);
6769

6870
module.get = function (key) {
@@ -75,6 +77,7 @@ var config = (function($, module) {
7577
module.set = function(key, val) {
7678
config[key] = val;
7779
setLocalStorageItem("debugConsoleConfig", config);
80+
module.haveSavedConfig = true;
7881
// events.publish('config.set', config);
7982
};
8083

@@ -196,6 +199,9 @@ $(function() {
196199
'Not connected to debug server' +
197200
'</div>'
198201
);
202+
if (!config.haveSavedConfig) {
203+
$('#modal-settings').modal("show");
204+
}
199205
} else if (cmd == "connectionOpened") {
200206
$("#alert").remove();
201207
}

0 commit comments

Comments
 (0)