Move dashboard defaults settings to theme (#6973)

This commit is contained in:
Alex
2024-05-08 12:41:21 -07:00
committed by GitHub
parent 66b57a7784
commit 301a1f69a0
20 changed files with 183 additions and 342 deletions

View File

@@ -143,19 +143,19 @@
echo " ],\n";
echo " backgroundColor: [\n";
if (permission_exists('do_not_disturb')) {
echo " '".$_SESSION['dashboard']['call_forward_chart_color_do_not_disturb']['text']."',\n";
echo " '".($settings->get('theme', 'dashboard_call_forward_chart_color_do_not_disturb') ?? '#ea4c46')."',\n";
}
if (permission_exists('follow_me')) {
echo " '".$_SESSION['dashboard']['call_forward_chart_color_follow_me']['text']."',\n";
echo " '".($settings->get('theme', 'dashboard_call_forward_chart_color_follow_me') ?? '#03c04a')."',\n";
}
if (permission_exists('call_forward')) {
echo " '".$_SESSION['dashboard']['call_forward_chart_color_call_forward']['text']."',\n";
echo " '".($settings->get('theme', 'dashboard_call_forward_chart_color_call_forward') ?? '#2a9df4')."',\n";
}
echo " '".$_SESSION['dashboard']['call_forward_chart_color_active']['text']."',\n";
echo " '".$_SESSION['dashboard']['call_forward_chart_color_active']['text']."',\n";
echo " '".($settings->get('theme', 'dashboard_call_forward_chart_color_active') ?? '#d4d4d4')."',\n";
echo " '".($settings->get('theme', 'dashboard_call_forward_chart_color_active') ?? '#d4d4d4')."'\n";
echo " ],\n";
echo " borderColor: '".$_SESSION['dashboard']['call_forward_chart_border_color']['text']."',\n";
echo " borderWidth: '".$_SESSION['dashboard']['call_forward_chart_border_width']['text']."',\n";
echo " borderColor: '".$settings->get('theme', 'dashboard_chart_border_color')."',\n";
echo " borderWidth: '".$settings->get('theme', 'dashboard_chart_border_width')."'\n";
echo " }]\n";
echo " },\n";
echo " options: {\n";