diff --git a/package.json b/package.json
index c7b427d5..ff52b66d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "meshcentral",
- "version": "0.4.6-u",
+ "version": "0.4.6-v",
"keywords": [
"Remote Management",
"Intel AMT",
diff --git a/public/styles/style.css b/public/styles/style.css
index ff6c103f..2b83cce7 100644
--- a/public/styles/style.css
+++ b/public/styles/style.css
@@ -600,19 +600,19 @@ body {
#idx_dlgCancelButton {
float: right;
- width: 80px;
+ min-width: 80px;
margin-left: 5px;
}
#idx_dlgOkButton {
float: right;
- width: 80px;
+ min-width: 80px;
margin-left: 5px;
}
#idx_dlgDeleteButton {
float: left;
- width: 80px;
+ min-width: 80px;
margin-left: 5px;
}
diff --git a/translate/translate.json b/translate/translate.json
index 6da8f81f..faa406c2 100644
--- a/translate/translate.json
+++ b/translate/translate.json
@@ -2693,7 +2693,7 @@
"pt": "Cancelar",
"ja": "キャンセル",
"nl": "Annuleren",
- "de": "Abbr.",
+ "de": "Abbrechen",
"xloc": [
"default.handlebars->container->dialog->idx_dlgButtonBar",
"default.handlebars->23->946",
diff --git a/views/default.handlebars b/views/default.handlebars
index 0c4b76df..9e980009 100644
--- a/views/default.handlebars
+++ b/views/default.handlebars
@@ -1125,7 +1125,7 @@
var meshes = {};
var meshcount = 0;
var nodes = null;
- var usergroups = {};
+ var usergroups = null;
var filetree = {};
var userinfo = null;
var serverinfo = null;
@@ -1722,8 +1722,10 @@
break;
}
case 'usergroups': {
+ var groupCount = 0;
usergroups = {};
- for (var i in message.ugroups) { usergroups[message.ugroups[i]._id] = message.ugroups[i]; }
+ for (var i in message.ugroups) { groupCount++; usergroups[message.ugroups[i]._id] = message.ugroups[i]; }
+ if (groupCount == 0) { usergroups = null; }
masterUpdate(8192);
break;
}
@@ -2218,6 +2220,7 @@
case 'createusergroup':
case 'usergroupchange': {
// User group changed
+ if (usergroups == null) { usergroups = {}; }
var ugroup = usergroups[message.event.ugrpid];
if (ugroup == null) {
// This is a new user group for us
@@ -2233,7 +2236,13 @@
}
case 'deleteusergroup': {
// User group removed
- if (usergroups[message.event.ugrpid] != null) { delete usergroups[message.event.ugrpid]; masterUpdate(8192); }
+ if ((usergroups != null) && (usergroups[message.event.ugrpid] != null)) {
+ delete usergroups[message.event.ugrpid];
+ var c = 0;
+ for (var i in usergroups) { c++; }
+ if (c == 0) { usergroups = null; } // If user groups is empty, set it to null.
+ masterUpdate(8192 + 16384);
+ }
break;
}
case 'createmesh': {
@@ -7651,7 +7660,7 @@
x += '
';
if (meshrights & 2) {
x += ' ' + "Add Users" + '';
- if ((userinfo.siteadmin & 256) != 0) {
+ if ((usergroups != null) && ((userinfo.siteadmin & 256) != 0)) {
var userGroupCount = 0, newUserGroup = false;
for (var i in usergroups) { userGroupCount++; if ((currentMesh.links == null) || (currentMesh.links[i] == null)) { newUserGroup = true; } }
if ((userGroupCount > 0) && (newUserGroup)) { x += ' ' + "Add User Group" + ''; }
@@ -7682,6 +7691,7 @@
var uname = i.split('/')[2];
if (currentMesh.links[i].name) { uname = currentMesh.links[i].name; }
if (i == userinfo._id) { uname = userinfo.name; }
+ if ((usergroups != null) && (usergroups[i] != null)) { uname = usergroups[i].name; }
sortedusers.push({ id: i, name: uname, rights: currentMesh.links[i].rights });
}
sortedusers.sort(function(a, b) { if (a.name > b.name) return 1; if (a.name < b.name) return -1; return 0; });
@@ -7888,7 +7898,7 @@
for (var i in meshes) { if ((currentUser.links == null) || (currentUser.links[i] == null)) { y += ''; } }
x += addHtmlValue("Device Group", '