diff --git a/www/support/app-support.less b/www/support/app-support.less index c364d84e7..67c76aa8d 100644 --- a/www/support/app-support.less +++ b/www/support/app-support.less @@ -47,5 +47,10 @@ br { margin: 5px; } + pre.debug-data { + background-color: @cp_markdown-block-bg; + color: @cp_markdown-block-fg; + padding: 5px; + } } diff --git a/www/support/inner.js b/www/support/inner.js index fd6a25662..2b6f761d5 100644 --- a/www/support/inner.js +++ b/www/support/inner.js @@ -49,6 +49,9 @@ define([ 'cp-support-language', 'cp-support-form', ], + 'debugging': [ + 'cp-support-debugging-data', + ], }; var supportKey = ApiConfig.supportMailbox; @@ -225,6 +228,16 @@ define([ return $div; }; + create['debugging-data'] = function () { + var key = 'debugging-data'; + var $div = makeBlock(key); // Msg.support_debuggingDataTitle.support_debuggingDataHint; + var data = APP.support.getDebuggingData().sender; + + var content = h('pre.debug-data', JSON.stringify(data, null, 2)); + $div.append(content); + + return $div; + }; var hideCategories = function () { APP.$rightside.find('> div').hide(); @@ -237,6 +250,12 @@ define([ }); }; + var icons = { + tickets: 'fa-envelope-o', + new: 'fa-life-ring', + debugging: 'fa-wrench', + }; + var createLeftside = function () { var $categories = $('
', {'class': 'cp-sidebarlayout-categories'}) .appendTo(APP.$leftside); @@ -250,8 +269,12 @@ define([ 'class': 'cp-sidebarlayout-category', 'data-category': key }).appendTo($categories); - if (key === 'tickets') { $category.append($('', {'class': 'fa fa-envelope-o'})); } - if (key === 'new') { $category.append($('', {'class': 'fa fa-life-ring'})); } + var iconClass = icons[key]; + if (iconClass) { + $category.append(h('span', { + class: 'fa ' + iconClass, + })); + } if (key === active) { $category.addClass('cp-leftside-active');