Skip to content

Commit caffcfd

Browse files
authored
Merge pull request #245 from andig/bugfix/configured-detection
Fixed configured detection
2 parents d58eb15 + 408fa61 commit caffcfd

File tree

3 files changed

+54
-49
lines changed

3 files changed

+54
-49
lines changed

assets/js/app.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,13 @@ const main = Vue.component('main', {
332332
}
333333
},
334334
methods: {
335-
configured: function(val) {
336-
if (val == '<<.Configured>>' && val != '0') {
337-
return 0+val;
335+
configured: function (val) {
336+
// for development purposes
337+
if (val == '<<.Configured>>') {
338+
return true;
339+
}
340+
if (!isNaN(parseInt(val)) && parseInt(val) > 0) {
341+
return true;
338342
}
339343
return false;
340344
}

server/assets.go

Lines changed: 46 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func indexHandler(links []MenuConfig, site site, liveAssets bool) http.HandlerFu
9595
"Commit": Commit,
9696
"Debug": debug,
9797
"Links": links,
98-
"Configured": len(site.LoadPoints()) > 0,
98+
"Configured": len(site.LoadPoints()),
9999
}); err != nil {
100100
log.ERROR.Println("httpd: failed to render main page: ", err.Error())
101101
}

0 commit comments

Comments
 (0)