Reload all tabs when the user logs in or out

This commit is contained in:
yflory
2017-01-16 14:08:44 +01:00
parent efed1f5efe
commit a9063e0459
9 changed files with 69 additions and 21 deletions

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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 {