mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-22 00:07:21 -06:00
Tweak the previous use of graphPalette to be the right way around
This commit is contained in:
parent
35b54dd121
commit
052b8cbde8
@ -6,7 +6,6 @@ export class DashboardGraph {
|
|||||||
this.dom = document.getElementById(id);
|
this.dom = document.getElementById(id);
|
||||||
this.dom.classList.add("muted");
|
this.dom.classList.add("muted");
|
||||||
if (isDarkMode()) {
|
if (isDarkMode()) {
|
||||||
this.chart = echarts.init(this.dom, 'dark');
|
|
||||||
window.graphPalette = [
|
window.graphPalette = [
|
||||||
'#4992ff',
|
'#4992ff',
|
||||||
'#7cffb2',
|
'#7cffb2',
|
||||||
@ -18,8 +17,8 @@ export class DashboardGraph {
|
|||||||
'#8d48e3',
|
'#8d48e3',
|
||||||
'#dd79ff'
|
'#dd79ff'
|
||||||
];
|
];
|
||||||
|
this.chart = echarts.init(this.dom, 'dark');
|
||||||
} else {
|
} else {
|
||||||
this.chart = echarts.init(this.dom, 'vintage');
|
|
||||||
window.graphPalette = [
|
window.graphPalette = [
|
||||||
'#d87c7c',
|
'#d87c7c',
|
||||||
'#919e8b',
|
'#919e8b',
|
||||||
@ -32,6 +31,7 @@ export class DashboardGraph {
|
|||||||
'#724e58',
|
'#724e58',
|
||||||
'#4b565b'
|
'#4b565b'
|
||||||
];
|
];
|
||||||
|
this.chart = echarts.init(this.dom, 'vintage');
|
||||||
}
|
}
|
||||||
this.chart.showLoading();
|
this.chart.showLoading();
|
||||||
this.option = {};
|
this.option = {};
|
||||||
|
@ -23,21 +23,6 @@ export function initDayNightMode() {
|
|||||||
document.body.classList.add('dark-mode');
|
document.body.classList.add('dark-mode');
|
||||||
document.documentElement.setAttribute('data-bs-theme', "dark");
|
document.documentElement.setAttribute('data-bs-theme', "dark");
|
||||||
localStorage.setItem('theme', 'dark');
|
localStorage.setItem('theme', 'dark');
|
||||||
window.graphPalette = [
|
|
||||||
'#4992ff',
|
|
||||||
'#7cffb2',
|
|
||||||
'#fddd60',
|
|
||||||
'#ff6e76',
|
|
||||||
'#58d9f9',
|
|
||||||
'#05c091',
|
|
||||||
'#ff8a45',
|
|
||||||
'#8d48e3',
|
|
||||||
'#dd79ff'
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
document.body.classList.remove('dark-mode');
|
|
||||||
document.documentElement.setAttribute('data-bs-theme', "light");
|
|
||||||
localStorage.setItem('theme', 'light');
|
|
||||||
window.graphPalette = [
|
window.graphPalette = [
|
||||||
'#d87c7c',
|
'#d87c7c',
|
||||||
'#919e8b',
|
'#919e8b',
|
||||||
@ -50,6 +35,21 @@ export function initDayNightMode() {
|
|||||||
'#724e58',
|
'#724e58',
|
||||||
'#4b565b'
|
'#4b565b'
|
||||||
];
|
];
|
||||||
|
} else {
|
||||||
|
document.body.classList.remove('dark-mode');
|
||||||
|
document.documentElement.setAttribute('data-bs-theme', "light");
|
||||||
|
localStorage.setItem('theme', 'light');
|
||||||
|
window.graphPalette = [
|
||||||
|
'#4992ff',
|
||||||
|
'#7cffb2',
|
||||||
|
'#fddd60',
|
||||||
|
'#ff6e76',
|
||||||
|
'#58d9f9',
|
||||||
|
'#05c091',
|
||||||
|
'#ff8a45',
|
||||||
|
'#8d48e3',
|
||||||
|
'#dd79ff'
|
||||||
|
];
|
||||||
}
|
}
|
||||||
if (window.graphList !== undefined) {
|
if (window.graphList !== undefined) {
|
||||||
window.graphList.forEach((graph) => {
|
window.graphList.forEach((graph) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user