Fix colour system
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
|
||||
{% block extra_css %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/dashboard.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('main.dynamic_colors') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -70,17 +69,11 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// Get all chart colors
|
||||
const chartColors = {
|
||||
primary: getCssVar('--chart-primary'),
|
||||
secondary: getCssVar('--chart-secondary'),
|
||||
warning: getCssVar('--chart-warning'),
|
||||
primaryLight: getCssVar('--chart-primary-light'),
|
||||
primaryLighter: getCssVar('--chart-primary-lighter'),
|
||||
primaryLightest: getCssVar('--chart-primary-lightest'),
|
||||
primaryPale: getCssVar('--chart-primary-pale'),
|
||||
secondaryLight: getCssVar('--chart-secondary-light'),
|
||||
secondaryLighter: getCssVar('--chart-secondary-lighter'),
|
||||
secondaryLightest: getCssVar('--chart-secondary-lightest'),
|
||||
secondaryPale: getCssVar('--chart-secondary-pale')
|
||||
color1: getCssVar('--chart-color-1'),
|
||||
color2: getCssVar('--chart-color-2'),
|
||||
color3: getCssVar('--chart-color-3'),
|
||||
color4: getCssVar('--chart-color-4'),
|
||||
warning: getCssVar('--warning-color')
|
||||
};
|
||||
|
||||
// Contact Status Chart
|
||||
@@ -92,7 +85,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
labels: ['Active', 'Inactive'],
|
||||
datasets: [{
|
||||
data: [{{ active_count }}, {{ inactive_count }}],
|
||||
backgroundColor: [chartColors.primary, chartColors.secondary],
|
||||
backgroundColor: [chartColors.color1, chartColors.color2],
|
||||
borderWidth: 0,
|
||||
hoverOffset: 4
|
||||
}]
|
||||
@@ -119,7 +112,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
labels: ['Starred', 'Unstarred'],
|
||||
datasets: [{
|
||||
data: [{{ starred_count }}, {{ file_count - starred_count }}],
|
||||
backgroundColor: [chartColors.warning, chartColors.primary],
|
||||
backgroundColor: [chartColors.warning, chartColors.color1],
|
||||
borderWidth: 0,
|
||||
hoverOffset: 4
|
||||
}]
|
||||
@@ -145,16 +138,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
datasets: [{
|
||||
data: [{% for type in storage_by_type %}{{ type.total_size }}{% if not loop.last %}, {% endif %}{% endfor %}],
|
||||
backgroundColor: [
|
||||
chartColors.primary,
|
||||
chartColors.primaryLight,
|
||||
chartColors.primaryLighter,
|
||||
chartColors.primaryLightest,
|
||||
chartColors.primaryPale,
|
||||
chartColors.secondary,
|
||||
chartColors.secondaryLight,
|
||||
chartColors.secondaryLighter,
|
||||
chartColors.secondaryLightest,
|
||||
chartColors.secondaryPale
|
||||
chartColors.color1,
|
||||
chartColors.color2,
|
||||
chartColors.color3,
|
||||
chartColors.color4
|
||||
],
|
||||
borderWidth: 0,
|
||||
hoverOffset: 4
|
||||
@@ -185,16 +172,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
datasets: [{
|
||||
data: [{% for type in trash_by_type %}{{ type.count }}{% if not loop.last %}, {% endif %}{% endfor %}],
|
||||
backgroundColor: [
|
||||
chartColors.primary,
|
||||
chartColors.primaryLight,
|
||||
chartColors.primaryLighter,
|
||||
chartColors.primaryLightest,
|
||||
chartColors.primaryPale,
|
||||
chartColors.secondary,
|
||||
chartColors.secondaryLight,
|
||||
chartColors.secondaryLighter,
|
||||
chartColors.secondaryLightest,
|
||||
chartColors.secondaryPale
|
||||
chartColors.color1,
|
||||
chartColors.color2,
|
||||
chartColors.color3,
|
||||
chartColors.color4
|
||||
],
|
||||
borderWidth: 0,
|
||||
hoverOffset: 4
|
||||
|
||||
Reference in New Issue
Block a user