Dashboard - Add text color settings (#6950)

* Dashboard - Add text color setting
This commit is contained in:
Alex
2024-04-17 16:01:54 -06:00
committed by GitHub
parent 37fd4692c1
commit 1412ed7f68
16 changed files with 398 additions and 209 deletions
@@ -18,7 +18,7 @@
$text = $language->get($_SESSION['domain']['language']['code'], 'core/user_settings');
//used for missed and recent calls
$theme_image_path = $_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/";
$theme_image_path = $_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/";
//voicemail
echo "<div class='hud_box'>\n";
@@ -52,6 +52,7 @@
}
}
//add doughnut chart
?>
<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick="$('#hud_voicemail_details').slideToggle('fast');">
@@ -67,32 +68,36 @@
datasets: [{
data: ['<?php echo $messages['new']; ?>', 0.00001],
backgroundColor: [
'<?php echo $_SESSION['dashboard']['new_messages_chart_main_background_color']['text']; ?>',
'<?php echo $_SESSION['dashboard']['new_messages_chart_main_background_color']['text']; ?>',
'<?php echo $_SESSION['dashboard']['new_messages_chart_sub_background_color']['text']; ?>'
],
borderColor: '<?php echo $_SESSION['dashboard']['new_messages_chart_border_color']['text']; ?>',
borderWidth: '<?php echo $_SESSION['dashboard']['new_messages_chart_border_width']['text']; ?>',
cutout: chart_cutout
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
chart_counter: {
chart_text: '<?php echo $messages['new']; ?>',
},
legend: {
display: false
chart_number: {
text: '<?php echo $messages['new']; ?>'
},
title: {
display: true,
text: '<?php echo $text['label-new_messages']; ?>',
fontFamily: chart_text_font
color: '<?php echo $dashboard_heading_text_color; ?>'
}
}
},
plugins: [chart_counter],
plugins: [{
id: 'chart_number',
beforeDraw(chart, args, options){
const {ctx, chartArea: {top, right, bottom, left, width, height} } = chart;
ctx.font = chart_text_size + 'px ' + chart_text_font;
ctx.textBaseline = 'middle';
ctx.textAlign = 'center';
ctx.fillStyle = '<?php echo $dashboard_number_text_color; ?>';
ctx.fillText(options.text, width / 2, top + (height / 2));
ctx.save();
}
}]
}
);
</script>
@@ -130,8 +135,8 @@
}
echo "</div>";
//$n++;
echo "<span class='hud_expander' onclick=\"$('#hud_voicemail_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
echo "</div>\n";
?>
?>