backend-plus 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/for-client/my-menu.js +21 -6
- package/package.json +1 -1
package/for-client/my-menu.js
CHANGED
|
@@ -531,14 +531,29 @@ myOwn.informDetectedStatus = function informDetectedStatus(statusCode, logged) {
|
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
|
|
534
|
+
var lastUrl = window.location.href;
|
|
535
|
+
//TODO: desacoplar de BP
|
|
534
536
|
window.addEventListener('popstate', function(){
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
})
|
|
539
|
-
}else{
|
|
540
|
-
my.showPage();
|
|
537
|
+
function checkReactUrl(url){
|
|
538
|
+
const regex = /\/react(\/.*)?$/;
|
|
539
|
+
return regex.test(url);
|
|
541
540
|
}
|
|
541
|
+
const currentUrl = window.location.href;
|
|
542
|
+
if(checkReactUrl(currentUrl)){
|
|
543
|
+
if(!checkReactUrl(lastUrl))
|
|
544
|
+
location.reload();
|
|
545
|
+
}else{
|
|
546
|
+
setTimeout(function(){
|
|
547
|
+
if(!my.config){
|
|
548
|
+
my.autoSetup().then(function(){
|
|
549
|
+
my.showPage();
|
|
550
|
+
})
|
|
551
|
+
}else{
|
|
552
|
+
my.showPage();
|
|
553
|
+
}
|
|
554
|
+
},10)
|
|
555
|
+
}
|
|
556
|
+
lastUrl = currentUrl;
|
|
542
557
|
});
|
|
543
558
|
|
|
544
559
|
window.addEventListener('load', function(){
|
package/package.json
CHANGED