Icon+Color must be refreshed when tab changes
This commit is contained in:
parent
dd17851120
commit
6ff8841311
1 changed files with 5 additions and 1 deletions
6
index.js
6
index.js
|
@ -956,12 +956,16 @@ const ContainerService = {
|
||||||
|
|
||||||
const userContextId = ContainerService._getUserContextIdFromTab(tab);
|
const userContextId = ContainerService._getUserContextIdFromTab(tab);
|
||||||
return ContainerService.getIdentity({userContextId}).then(identity => {
|
return ContainerService.getIdentity({userContextId}).then(identity => {
|
||||||
|
const hbox = viewFor(tab.window).document.getElementById("userContext-icons");
|
||||||
|
|
||||||
if (!identity) {
|
if (!identity) {
|
||||||
|
hbox.setAttribute("data-identity-color", "");
|
||||||
|
hbox.hidden = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const hbox = viewFor(tab.window).document.getElementById("userContext-icons");
|
|
||||||
hbox.setAttribute("data-identity-color", identity.color);
|
hbox.setAttribute("data-identity-color", identity.color);
|
||||||
|
hbox.hidden = false;
|
||||||
|
|
||||||
const label = viewFor(tab.window).document.getElementById("userContext-label");
|
const label = viewFor(tab.window).document.getElementById("userContext-label");
|
||||||
label.setAttribute("value", identity.name);
|
label.setAttribute("value", identity.name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue