Move the 'logged out' screen inside the sframe

This commit is contained in:
yflory
2017-11-13 17:28:09 +01:00
parent 5a2afb5c95
commit 1514ad5df3
9 changed files with 49 additions and 29 deletions

View File

@@ -1215,6 +1215,21 @@ define([
}
if (parsedNew) { oldHref = newHref; }
};
// Listen for login/logout in other tabs
window.addEventListener('storage', function (e) {
if (e.key !== common.userHashKey) { return; }
var o = e.oldValue;
var n = e.newValue;
if (!o && n) {
document.location.reload();
} else if (o && !n) {
common.logout();
if (getNetwork()) {
getNetwork().disconnect();
}
}
});
if (PINNING_ENABLED && isLoggedIn()) {
console.log("logged in. pads will be pinned");