From 36e790dee6501b2e49097874eb7134cdb5eb85eb Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 29 Apr 2020 14:40:42 -0400 Subject: [PATCH] style support tickets from premium users via a class --- www/admin/app-admin.less | 3 +++ www/support/ui.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/www/admin/app-admin.less b/www/admin/app-admin.less index 84532c6c5..787c31219 100644 --- a/www/admin/app-admin.less +++ b/www/admin/app-admin.less @@ -47,5 +47,8 @@ color: @colortheme_logo-2; } } + .cp-support-frompremium { + border: 2px solid red; + } } diff --git a/www/support/ui.js b/www/support/ui.js index 2038d8ddd..234953cb6 100644 --- a/www/support/ui.js +++ b/www/support/ui.js @@ -188,6 +188,7 @@ define([ var senderKey = content.sender && content.sender.edPublic; var fromMe = senderKey === privateData.edPublic; var fromAdmin = ctx.adminKeys.indexOf(senderKey) !== -1; + var fromPremium = Boolean(privateData.plan); var userData = h('div.cp-support-showdata', [ Messages.support_showData, @@ -199,8 +200,10 @@ define([ ev.stopPropagation(); }); + var adminClass = (fromAdmin? '.cp-support-fromadmin': ''); + var premiumClass = (fromPremium? '.cp-support-frompremium': ''); var name = Util.fixHTML(content.sender.name) || Messages.anonymous; - return h('div.cp-support-list-message' + (fromAdmin? '.cp-support-fromadmin': ''), { + return h('div.cp-support-list-message' + adminClass + premiumClass, { 'data-hash': hash }, [ h('div.cp-support-message-from' + (fromMe ? '.cp-support-fromme' : ''), [