From d57d5962f4707189758a3b17ed47c77e019fc77c Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 28 Jun 2019 17:08:11 +0200 Subject: [PATCH] Add support link to the user menu --- www/common/common-ui-elements.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index c6668e41f..e98b6d89b 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1861,6 +1861,13 @@ define([ content: h('span', Messages.adminPage || 'Admin') }); } + if (padType !== 'support' && accountName) { + options.push({ + tag: 'a', + attributes: {'class': 'cp-toolbar-menu-support fa fa-life-ring'}, + content: h('span', Messages.supportPage || 'Support') + }); + } // Add login or logout button depending on the current status if (accountName) { options.push({ @@ -1956,6 +1963,13 @@ define([ window.parent.location = origin+'/settings/'; } }); + $userAdmin.find('a.cp-toolbar-menu-support').click(function () { + if (padType) { + window.open(origin+'/support/'); + } else { + window.parent.location = origin+'/support/'; + } + }); $userAdmin.find('a.cp-toolbar-menu-admin').click(function () { if (padType) { window.open(origin+'/admin/');