[Fix] Fixed webapps for missing userConfig

This commit is contained in:
Robert von Burg 2020-05-12 11:50:18 +02:00
parent 2e2a897e63
commit 3a60e720d8
1 changed files with 14 additions and 5 deletions

View File

@ -271,13 +271,11 @@
},
authTokenValid: {
type: Boolean,
value: false
value: false,
observer: "authTokenValidObserver"
},
userConfig: {
type: Object,
value: function () {
return Strolch.getUserConfig();
}
type: Object
},
userLocale: {
type: String,
@ -317,6 +315,7 @@
observers: [],
listeners: {
"cx-reload": "reload",
"cx-show-toast": "onShowToast",
"cx-server-not-available": "onServerNotAvailable",
"cx-session-invalid": "onSessionInvalid",
@ -331,6 +330,10 @@
"cx-log-out": "onLogOut",
},
reload: function () {
this.reloadPage(this.selectedPage);
},
observePage: function (newValue, oldValue) {
if (newValue) {
this.reloadPage(newValue);
@ -360,6 +363,12 @@
}
},
authTokenValidObserver: function (newValue, oldValue) {
if (newValue && !oldValue) {
this.userConfig = Strolch.getUserConfig();
}
},
refreshBrowser: function () {
localStorage['appScmRevision'] = this.scmRevision;
document.location.reload();