|
@@ -740,6 +740,9 @@
|
|
right:4px;
|
|
right:4px;
|
|
z-index:114;
|
|
z-index:114;
|
|
width:300px;
|
|
width:300px;
|
|
|
|
+ max-height: calc(100% - 100px);
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ scrollbar-width: thin;
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
border-top-right-radius: 0px;
|
|
border-top-right-radius: 0px;
|
|
border-top-left-radius: 0px;
|
|
border-top-left-radius: 0px;
|
|
@@ -1661,7 +1664,7 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
- function initDesktopUserInfo(){
|
|
|
|
|
|
+ function initDesktopUserInfo(callback=undefined){
|
|
$.get("system/desktop/user", function(data){
|
|
$.get("system/desktop/user", function(data){
|
|
if (data.error !== undefined){
|
|
if (data.error !== undefined){
|
|
alert(data.error);
|
|
alert(data.error);
|
|
@@ -1684,6 +1687,10 @@
|
|
//User is admin. Add admin icon
|
|
//User is admin. Add admin icon
|
|
$("#username").append(`<i style="margin-left: 0.4em; color: #${desktopThemeColor}" class="small shield alternate icon themed text"></i>`);
|
|
$("#username").append(`<i style="margin-left: 0.4em; color: #${desktopThemeColor}" class="small shield alternate icon themed text"></i>`);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (callback != undefined){
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -7305,8 +7312,6 @@
|
|
}
|
|
}
|
|
|
|
|
|
function switchAccount(object){
|
|
function switchAccount(object){
|
|
- alert("WIP")
|
|
|
|
- return;
|
|
|
|
let targetUsername = $(object).attr("acname");
|
|
let targetUsername = $(object).attr("acname");
|
|
if (targetUsername == undefined || targetUsername == ""){
|
|
if (targetUsername == undefined || targetUsername == ""){
|
|
console.log("Unable to load username from element")
|
|
console.log("Unable to load username from element")
|
|
@@ -7324,19 +7329,13 @@
|
|
url: "system/auth/u/switch",
|
|
url: "system/auth/u/switch",
|
|
data: {
|
|
data: {
|
|
"username": targetUsername,
|
|
"username": targetUsername,
|
|
- "pid": browserAccountPoolUUID,
|
|
|
|
|
|
+ "pid": getBrowserAccountPoolUUID(),
|
|
},
|
|
},
|
|
success: function(data){
|
|
success: function(data){
|
|
if (data.error != undefined){
|
|
if (data.error != undefined){
|
|
- showError(data.error);
|
|
|
|
|
|
+ alert(data.error);
|
|
}else{
|
|
}else{
|
|
- hideError();
|
|
|
|
- initCurrentAccountInfo(function(){
|
|
|
|
- listAllStoredAccounts();
|
|
|
|
- if(ao_module_virtualDesktop){
|
|
|
|
- parent.initDesktop();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ initDesktop();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|