mirror of https://github.com/xwiki-labs/cryptpad
Merge branch 'support-data' into 4.14
This commit is contained in:
commit
6061e8869c
|
@ -47,5 +47,10 @@
|
|||
br {
|
||||
margin: 5px;
|
||||
}
|
||||
pre.debug-data {
|
||||
background-color: @cp_markdown-block-bg;
|
||||
color: @cp_markdown-block-fg;
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 = $('<div>', {'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($('<span>', {'class': 'fa fa-envelope-o'})); }
|
||||
if (key === 'new') { $category.append($('<span>', {'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');
|
||||
|
|
Loading…
Reference in New Issue