diff --git a/www/admin/app-admin.less b/www/admin/app-admin.less index 10e178308..e9ba67325 100644 --- a/www/admin/app-admin.less +++ b/www/admin/app-admin.less @@ -23,5 +23,8 @@ display: flex; flex-flow: column; } + .cp-support-fromadmin { + border: 1px solid red !important; // XXX + } } diff --git a/www/support/ui.js b/www/support/ui.js index 42ee89c94..c008e219c 100644 --- a/www/support/ui.js +++ b/www/support/ui.js @@ -170,7 +170,9 @@ define([ var privateData = metadataMgr.getPrivateData(); // Check content.sender to see if it comes from us or from an admin - var fromMe = content.sender && content.sender.edPublic === privateData.edPublic; + var senderKey = content.sender && content.sender.edPublic; + var fromMe = senderKey === privateData.edPublic; + var fromAdmin = ctx.adminKeys.indexOf(senderKey) !== -1; var userData = h('div.cp-support-showdata', [ Messages.support_showData, @@ -183,7 +185,7 @@ define([ }); var name = Util.fixHTML(content.sender.name) || Messages.anonymous; - return h('div.cp-support-list-message', { + return h('div.cp-support-list-message' + (fromAdmin? '.cp-support-fromadmin': ''), { 'data-hash': hash }, [ h('div.cp-support-message-from' + (fromMe ? '.cp-support-fromme' : ''), [ @@ -219,6 +221,7 @@ define([ common: common, isAdmin: isAdmin, pinUsage: pinUsage || false, + adminKeys: Array.isArray(ApiConfig.adminKeys)? ApiConfig.adminKeys.slice(): [], }; ui.sendForm = function (id, form, dest) {