修复系统信息页面的夜间模式显示问题
This commit is contained in:
parent
9d890f6b02
commit
4811b708b0
@ -259,9 +259,20 @@ $this->title = '系统信息';
|
||||
$dataTime = substr($systemInfo->serverTime, 11, 8);
|
||||
$mp_free = round(100 - $systemInfo->mp_usage, 2);
|
||||
$script = <<< JS
|
||||
var myChart = echarts.init(document.getElementById('cpu-graph'));
|
||||
var myChart2 = echarts.init(document.getElementById('memory-graph'));
|
||||
var myChart3 = echarts.init(document.getElementById('disk-chart'));
|
||||
var myChart;
|
||||
var myChart2;
|
||||
var myChart3;
|
||||
// detect dark mode
|
||||
if ((window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches)|| document.documentElement.getAttribute('data-bs-theme')==='dark') {
|
||||
myChart = echarts.init(document.getElementById('cpu-graph'),'dark');
|
||||
myChart2 = echarts.init(document.getElementById('memory-graph'),'dark');
|
||||
myChart3 = echarts.init(document.getElementById('disk-chart'),'dark');
|
||||
}else {
|
||||
myChart = echarts.init(document.getElementById('cpu-graph'));
|
||||
myChart2 = echarts.init(document.getElementById('memory-graph'));
|
||||
myChart3 = echarts.init(document.getElementById('disk-chart'));
|
||||
}
|
||||
|
||||
// check load-graph is exist
|
||||
var needLoadGraph = document.getElementById('load-graph');
|
||||
// var
|
||||
|
@ -10,9 +10,6 @@
|
||||
border-radius:10px;
|
||||
padding: 16px;
|
||||
}
|
||||
.system-info .group-content span{
|
||||
color: #6b6b6b;
|
||||
}
|
||||
|
||||
#load-graph,#cpu-graph,#memory-graph{
|
||||
padding-top: 35px;
|
||||
|
Loading…
Reference in New Issue
Block a user