diff --git a/apps/state.js b/apps/state.js index 5e5505b..795bd61 100644 --- a/apps/state.js +++ b/apps/state.js @@ -1,6 +1,7 @@ import plugin from "../../../lib/plugins/plugin.js" import { Config } from "../components/index.js" import Monitor from "../model/State/Monitor.js" +import { getBackground } from "../model/State/style.js" import { getData } from "../model/State/index.js" import { si } from "../model/State/utils.js" import { puppeteer } from "../model/index.js" @@ -27,7 +28,8 @@ export class NewState extends plugin { async monitor(e) { await puppeteer.render("state/monitor", { - chartData: JSON.stringify(Monitor.chartData) + chartData: JSON.stringify(Monitor.chartData), + backdrop: await getBackground() }, { e, scale: 1.4 diff --git a/model/State/CPU.js b/model/State/CPU.js index 0543409..080b191 100644 --- a/model/State/CPU.js +++ b/model/State/CPU.js @@ -4,19 +4,19 @@ import { si, Circle } from "./utils.js" export default async function getCpuInfo() { let { currentLoad: { currentLoad }, cpu, fullLoad } = await si.get({ currentLoad: "currentLoad", - cpu: "vendor,speed,cores", + cpu: "manufacturer,speed,cores", fullLoad: "*" }) - let { vendor, speed, cores } = cpu + let { manufacturer, speed, cores } = cpu if (currentLoad == null || currentLoad == undefined) return false fullLoad = Math.round(fullLoad) - vendor = vendor?.split(" ")?.[0] ?? "unknown" + manufacturer = manufacturer?.split(" ")?.[0] ?? "unknown" return { ...Circle(currentLoad / 100), inner: Math.round(currentLoad) + "%", title: "CPU", info: [ - `${vendor} ${cores}核 ${speed}GHz`, + `${manufacturer} ${cores}核 ${speed}GHz`, `CPU满载率 ${fullLoad}%` ] diff --git a/resources/admin/index.css b/resources/admin/index.css index 491b462..b5686c2 100644 --- a/resources/admin/index.css +++ b/resources/admin/index.css @@ -44,7 +44,7 @@ body { } .cfg-line { - color: #000000; + color: #303030; line-height: 36px; padding-left: 20px; font-weight: bold; @@ -69,7 +69,7 @@ body { text-align: center; line-height: 36px; font-size: 20px; - color: #486081; + color: #4578c0; font-weight: bold; border-radius: 0 16px 16px 0; } @@ -79,7 +79,7 @@ body { .cfg-desc { font-size: 16px; - color: rgb(73, 71, 71); + color: #454444; margin: 5px 0 5px 20px; } diff --git a/resources/admin/index.scss b/resources/admin/index.scss index 545f6ee..a319698 100644 --- a/resources/admin/index.scss +++ b/resources/admin/index.scss @@ -43,7 +43,7 @@ body { } .cfg-line { - color: #000000; + color: #303030; line-height: 36px; padding-left: 20px; font-weight: bold; @@ -68,7 +68,7 @@ body { text-align: center; line-height: 36px; font-size: 20px; - color: #486081; + color: #4578c0; font-weight: bold; border-radius: 0 16px 16px 0; @@ -79,7 +79,7 @@ body { .cfg-desc { font-size: 16px; - color: rgb(73, 71, 71); + color: #454444; margin: 5px 0 5px 20px; } diff --git a/resources/help/imgs/default.png b/resources/help/imgs/default.png index 1334c02..39e7814 100644 Binary files a/resources/help/imgs/default.png and b/resources/help/imgs/default.png differ diff --git a/resources/help/index.css b/resources/help/index.css index 8a9ab73..dfdae1a 100644 --- a/resources/help/index.css +++ b/resources/help/index.css @@ -1,10 +1,14 @@ .help-title, .help-group { - background-image: linear-gradient(180deg, #d51a2f, #0cacaa); + background-image: linear-gradient(180deg, #7a7a9f, #403544); -webkit-background-clip: text; background-clip: text; color: transparent; } +:root { + --table-color: #865E58; +} + body { width: 1100px; } @@ -40,7 +44,7 @@ body { } .help-group { - font-size: 20px; + font-size: 25px; font-weight: bold; padding: 15px 15px 10px 20px; display: inline-block; @@ -54,7 +58,7 @@ body { display: table; overflow: hidden; width: 100%; - color: #d63d2f; + color: var(--table-color); } .help-table .tr { display: table-row; diff --git a/resources/help/index.scss b/resources/help/index.scss index 3c8d155..4f32bfc 100644 --- a/resources/help/index.scss +++ b/resources/help/index.scss @@ -1,9 +1,13 @@ %text-gradient { - background-image: linear-gradient(180deg, #d51a2f, #0cacaa); + background-image: linear-gradient(180deg, #7a7a9f, #403544); background-clip: text; color: transparent; } +:root { + --table-color: #865E58; +} + body { width: 1100px; } @@ -44,7 +48,7 @@ body { .help-group { @extend %text-gradient; - font-size: 20px; + font-size: 25px; font-weight: bold; padding: 15px 15px 10px 20px; display: inline-block; @@ -58,7 +62,7 @@ body { display: table; overflow: hidden; width: 100%; - color: #d63d2f; + color: var(--table-color); .tr { display: table-row; diff --git a/resources/state/monitor.html b/resources/state/monitor.html index 54495e3..6d4dd93 100644 --- a/resources/state/monitor.html +++ b/resources/state/monitor.html @@ -3,20 +3,24 @@ {{block 'css'}} + {{/block}} {{block 'main'}} +
+
+
椰奶监控
+
CPU & RAM & Network & FsStats
+
+