Reload all tabs when the user logs in or out
This commit is contained in:
@@ -158,6 +158,18 @@ define([
|
||||
logLevel: 1,
|
||||
};
|
||||
|
||||
window.addEventListener('storage', function (e) {
|
||||
var key = e.key;
|
||||
if (e.key !== Cryptpad.userHashKey) { return; }
|
||||
var o = e.oldValue;
|
||||
var n = e.newValue;
|
||||
if (!o && n) {
|
||||
window.location.reload();
|
||||
} else if (o && !n) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
var rt = window.rt = Listmap.create(listmapConfig);
|
||||
exp.proxy = rt.proxy;
|
||||
rt.proxy.on('create', function (info) {
|
||||
|
||||
@@ -289,19 +289,33 @@
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.fa-user {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.cryptpad-user {
|
||||
p.accountData {
|
||||
background: #f0f0f0;
|
||||
&> span {
|
||||
font-weight: bold;
|
||||
span {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
.buttonTitle {
|
||||
.fa-user {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.cryptpad-toolbar-username {
|
||||
.account-name {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cryptpad-dropdown-share {
|
||||
a {
|
||||
.fa {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.lag {
|
||||
height: 15px !important;
|
||||
width: 15px !important;
|
||||
|
||||
@@ -361,13 +361,22 @@
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.fa-user {
|
||||
margin-right: 5px;
|
||||
.cryptpad-user p.accountData {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
.cryptpad-user p.accountData > span {
|
||||
font-weight: bold;
|
||||
}
|
||||
.cryptpad-user p.accountData > span span {
|
||||
font-weight: normal;
|
||||
}
|
||||
.cryptpad-user .buttonTitle .fa-user {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.cryptpad-user .buttonTitle .cryptpad-toolbar-username {
|
||||
.cryptpad-user .buttonTitle .account-name {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.cryptpad-dropdown-share a .fa {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.lag {
|
||||
|
||||
Reference in New Issue
Block a user