|
@@ -661,6 +661,10 @@
|
|
|
pointer-events: auto;
|
|
|
}
|
|
|
|
|
|
+ body.whiteTheme .item:hover{
|
|
|
+ background-color: #ececec !important;
|
|
|
+ }
|
|
|
+
|
|
|
@supports not (backdrop-filter: blur(2px)) {
|
|
|
.notificationbar .cover{
|
|
|
/*
|
|
@@ -866,6 +870,12 @@
|
|
|
border: 0px;
|
|
|
}
|
|
|
|
|
|
+ .alternativeAccount.item{
|
|
|
+ padding-top: 0.6em !important;
|
|
|
+ padding-bottom: 0.6em !important;
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+
|
|
|
/* File operation progress tracker */
|
|
|
#backgroundTaskPanel{
|
|
|
background-color: var(--body_background) !important;
|
|
@@ -1198,7 +1208,7 @@
|
|
|
<img class="usericon" src="img/desktop/system_icon/user.svg">
|
|
|
</div>
|
|
|
<div class="content" style="padding-left: 1em;">
|
|
|
- <div id="username" class="header" style="font-weight: 500; font-size: 1.22em;">User</div>
|
|
|
+ <div id="username" class="header" style="font-weight: 600; font-size: 1.22em;">User</div>
|
|
|
<div class="meta" style="margin-top: 0.15em;">
|
|
|
<div id="usergroups">@Users</div>
|
|
|
</div>
|
|
@@ -1210,22 +1220,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="ui divider"></div>
|
|
|
- <div class="item" style="padding-left: 8px;">
|
|
|
- <div id="alternativeAccountList" class="ui small items" style="margin-bottom: 0; padding-bottom: 8px; width: 100%;">
|
|
|
- <div class="alternativeUsableAccount item" style="padding-left: 0px;">
|
|
|
- <div class="ui mini image">
|
|
|
- <img class="accountIcon" src="img/desktop/system_icon/user.svg">
|
|
|
- </div>
|
|
|
- <div class="content" style="padding-left: 1em;">
|
|
|
- <div class="header accountName" style="font-weight: 500; font-size: 1em;">User</div>
|
|
|
- <div class="meta" style="margin-top: 0.15em;">
|
|
|
- <div class="accountGroups">@Users</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div id="alternativeAccountList">
|
|
|
+
|
|
|
</div>
|
|
|
- <div class="ui divider" style="margin-left: 2em; margin-right: 2em;"></div>
|
|
|
+ <div class="ui divider" style="margin-left: 3em; margin-right: 3em;"></div>
|
|
|
<div class="item" style="padding-top: 6px; padding-bottom:6px; margin: 0px !important;" onclick="openSwitchAccountPanel(); hideToolPanel();">
|
|
|
<i class="ui user plus icon" style="margin-right: 0.6em;"></i> <span locale="account/switch/addAccount">Add another account</span>
|
|
|
</div>
|
|
@@ -1855,10 +1853,10 @@
|
|
|
}
|
|
|
|
|
|
function hookLaunchMenuEvents(){
|
|
|
- $(".groupType").on("click touchstart",function(){
|
|
|
+ $(".groupType").off("click touchstart").on("click touchstart",function(){
|
|
|
moduleTypeButtonClicked(this);
|
|
|
});
|
|
|
- $(".poweroption").on("click touchstart",function(){
|
|
|
+ $(".poweroption").off("click touchstart").on("click touchstart",function(){
|
|
|
logout();
|
|
|
});
|
|
|
}
|
|
@@ -7261,61 +7259,50 @@
|
|
|
/*
|
|
|
Alternative account manager
|
|
|
*/
|
|
|
- function getBrowserAccountPoolUUID(){
|
|
|
- return localStorage.getItem("ao_acc");
|
|
|
- }
|
|
|
function listAllStoredAccounts(){
|
|
|
$("#alternativeAccountList").empty();
|
|
|
- if (getBrowserAccountPoolUUID() == undefined){
|
|
|
- //Empty or no stored accounts
|
|
|
- $("#alternativeAccountList").append(`<i class="ui green check circle icon"></i> ${applocale.getString("account/switch/noAlternative", "No other account stored on this browser")}`);
|
|
|
- $("#alternativeAccountList").css("padding-top", "8px");
|
|
|
- $("#signoutAllButton").addClass('disabled');
|
|
|
- return;
|
|
|
- }else{
|
|
|
- //Request server side for the account pool
|
|
|
- $.get("system/auth/u/list?pid=" + getBrowserAccountPoolUUID(), function(data){
|
|
|
- if (data.error != undefined){
|
|
|
- $("#alternativeAccountList").append(`<i class="ui green check circle icon"></i> ${applocale.getString("account/switch/noAlternative", "No other account stored on this browser")}`);
|
|
|
- $("#alternativeAccountList").css("padding-top", "8px");
|
|
|
- //This uuid no longer exists or it has been expired and removed by backend server/
|
|
|
- localStorage.removeItem("ao_acc");
|
|
|
- }else{
|
|
|
- if (data.length > 0){
|
|
|
- data.forEach(function(account){
|
|
|
- if (account.Username == userInfo.Username){
|
|
|
- //Skip
|
|
|
- return;
|
|
|
+ //Request server side for the account pool
|
|
|
+ $.get("system/auth/u/list", function(data){
|
|
|
+ if (data.error != undefined){
|
|
|
+ $("#alternativeAccountList").append(`<div style="padding: 0.4em; padding-left: 1em; padding-right: 1em;">
|
|
|
+ <i class="ui green check circle icon"></i> ${applocale.getString("account/switch/noAlternative", "No other account stored on this browser")}
|
|
|
+ </div>`);
|
|
|
+ $("#signoutAllButton").addClass('disabled');
|
|
|
+ }else{
|
|
|
+ if (data.length > 1){
|
|
|
+ data.forEach(function(account){
|
|
|
+ if (account.Username == userInfo.Username){
|
|
|
+ //Skip
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $.get("system/desktop/user?target=" + account.Username, function(data){
|
|
|
+ let userIcon = data.UserIcon;
|
|
|
+ if (userIcon == ""){
|
|
|
+ userIcon = "img/desktop/system_icon/user.svg"
|
|
|
}
|
|
|
- $("#alternativeAccountList").css("padding-top", "0px");
|
|
|
- $.get("system/desktop/user?target=" + account.Username, function(data){
|
|
|
- let userIcon = data.UserIcon;
|
|
|
- if (userIcon == ""){
|
|
|
- userIcon = "img/desktop/system_icon/user.svg"
|
|
|
- }
|
|
|
- $("#alternativeAccountList").append(`
|
|
|
- <div class="alternativeAccount ${account.IsExpired?"expired":""}" acname="${account.Username}" onclick="switchAccount(this);" style="margin-top: 0.6em;">
|
|
|
- <div class="ui header">
|
|
|
- <img class="usericon ui circular image" src="${userIcon}">
|
|
|
- <div class="content" style="font-size: 95% !important;">
|
|
|
- <span class="username">${account.Username}</span> ${(data.IsAdmin)?'<i style="margin-left: 0.4em; color: rgb(38, 50, 56);" title="Admin" class="small shield alternate icon themed text"></i>':""}
|
|
|
- <div class="sub header usergroup">${!account.IsExpired?"<i class='ui green check circle icon' style='margin-right: 0px;'></i> " + applocale.getString("account/switch/sessionValid", "Session Valid"):"<i class='ui red times circle icon' style='margin-right: 0px;'></i> " + applocale.getString("account/switch/sessionExpired", "Session Expired")}</div>
|
|
|
- </div>
|
|
|
+ $("#alternativeAccountList").append(`
|
|
|
+ <div class="alternativeAccount item ${account.IsExpired?"expired":""}" acname="${account.Username}" onclick="switchAccount(this);">
|
|
|
+ <div class="ui header">
|
|
|
+ <img class="usericon ui circular image" src="${userIcon}">
|
|
|
+ <div class="content" style="font-size: 95% !important;">
|
|
|
+ <span class="username">${account.Username}</span> ${(data.IsAdmin)?'<i style="margin-left: 0.4em; color: rgb(38, 50, 56);" title="Admin" class="small shield alternate icon themed text"></i>':""}
|
|
|
+ <div class="sub header usergroup">${!account.IsExpired?"<i class='ui green check circle icon' style='margin-right: 0px;'></i> " + applocale.getString("account/switch/sessionValid", "Session Valid"):"<i class='ui red times circle icon' style='margin-right: 0px;'></i> " + applocale.getString("account/switch/sessionExpired", "Session Expired")}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- `);
|
|
|
- });
|
|
|
+ </div>
|
|
|
+ `);
|
|
|
});
|
|
|
- $("#signoutAllButton").removeClass('disabled');
|
|
|
- }else{
|
|
|
- $("#signoutAllButton").addClass('disabled');
|
|
|
- $("#alternativeAccountList").css("padding-top", "8px");
|
|
|
- $("#alternativeAccountList").append(`<i class="ui green check circle icon"></i> ${applocale.getString("account/switch/noAlternative", "No other account stored on this browser")}`);
|
|
|
- return;
|
|
|
- }
|
|
|
+ });
|
|
|
+ $("#signoutAllButton").removeClass('disabled');
|
|
|
+ }else{
|
|
|
+ $("#signoutAllButton").addClass('disabled');
|
|
|
+ $("#alternativeAccountList").append(`<div style="padding: 0.4em; padding-left: 1em; padding-right: 1em;">
|
|
|
+ <i class="ui green check circle icon"></i> ${applocale.getString("account/switch/noAlternative", "No other account stored on this browser")}
|
|
|
+ </div>`);
|
|
|
+ return;
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
function switchAccount(object){
|
|
@@ -7335,7 +7322,6 @@
|
|
|
url: "system/auth/u/switch",
|
|
|
data: {
|
|
|
"username": targetUsername,
|
|
|
- "pid": getBrowserAccountPoolUUID(),
|
|
|
},
|
|
|
success: function(data){
|
|
|
if (data.error != undefined){
|
|
@@ -7351,7 +7337,6 @@
|
|
|
if (confirm(applocale.getString("account/switch/logout/confirm", "This will logout all other accounts from this browser. Confirm?"))){
|
|
|
$.ajax({
|
|
|
url: "system/auth/u/logoutAll",
|
|
|
- data: {pid: getBrowserAccountPoolUUID()},
|
|
|
success: function(data){
|
|
|
if (data.error != undefined){
|
|
|
alert(data.error);
|