Move temperature into device panel
This commit is contained in:
1 parent
a4781f8a6f
commit
8a00ddc0de
1 file changed
+17
-10
@@ -646,8 +646,8 @@ page() {
|
||||
$refresh_meta
|
||||
<title>OpenWrt Full Backup</title>
|
||||
<style>
|
||||
:root { color-scheme: light dark; --bg: #f6f7f9; --panel: #fff; --text: #15181c; --muted: #667085; --line: #d9dee7; --accent: #16a34a; --accent-hover: #15803d; --button-text: #fff; --bad: #dc2626; --bad-hover: #b91c1c; --ok: #067647; --hot: #dc2626; }
|
||||
@media (prefers-color-scheme: dark) { :root { --bg: #111418; --panel: #181d23; --text: #eef2f6; --muted: #a6b0bf; --line: #2d3642; --accent: #16a34a; --accent-hover: #15803d; --button-text: #fff; --bad: #dc2626; --bad-hover: #b91c1c; --ok: #7ee0a3; --hot: #dc2626; } }
|
||||
:root { color-scheme: light dark; --bg: #f6f7f9; --panel: #fff; --text: #15181c; --muted: #667085; --line: #d9dee7; --accent: #16a34a; --accent-hover: #15803d; --button-text: #fff; --bad: #dc2626; --bad-hover: #b91c1c; --ok: #067647; --hot: #dc2626; --warn: #eab308; }
|
||||
@media (prefers-color-scheme: dark) { :root { --bg: #111418; --panel: #181d23; --text: #eef2f6; --muted: #a6b0bf; --line: #2d3642; --accent: #16a34a; --accent-hover: #15803d; --button-text: #fff; --bad: #dc2626; --bad-hover: #b91c1c; --ok: #7ee0a3; --hot: #dc2626; --warn: #eab308; } }
|
||||
* { box-sizing: border-box; }
|
||||
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; zoom: .9; }
|
||||
main { max-width: 1280px; margin: 0 auto; padding: 18px; display: grid; gap: 14px; }
|
||||
@@ -661,6 +661,7 @@ p { margin: 6px 0; color: var(--muted); }
|
||||
.title-row .button { min-height: 34px; }
|
||||
.hero .pill { background: rgba(127,127,127,.08); color: var(--text); }
|
||||
.hot-text { color: var(--hot); }
|
||||
.warn-text { color: var(--warn); }
|
||||
.grid { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); }
|
||||
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
|
||||
.span4 { grid-column: span 4; }
|
||||
@@ -684,7 +685,9 @@ button:hover, .button:hover { background: var(--accent-hover); }
|
||||
.result-output, .console { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
|
||||
.console { max-height: 340px; }
|
||||
.console-title { margin: 12px 0 6px; font-weight: 700; }
|
||||
.device-card, .create-card, .temp-card { min-width: 0; }
|
||||
.device-card, .create-card { min-width: 0; }
|
||||
.device-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: 14px; margin-top: 12px; }
|
||||
.device-section h3 { margin: 0 0 10px; font-size: 14px; }
|
||||
.disk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 12px; }
|
||||
.disk-widget { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: rgba(127,127,127,.06); }
|
||||
.disk-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
|
||||
@@ -694,7 +697,7 @@ button:hover, .button:hover { background: var(--accent-hover); }
|
||||
.meter { height: 8px; border-radius: 999px; background: rgba(127,127,127,.18); overflow: hidden; margin: 10px 0; }
|
||||
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--hot)); }
|
||||
.disk-meta { display: grid; gap: 3px; color: var(--muted); font-size: 12px; }
|
||||
.temp-list { display: grid; gap: 10px; margin-top: 12px; }
|
||||
.temp-list { display: grid; gap: 10px; }
|
||||
.temp-widget { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: rgba(127,127,127,.06); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
|
||||
.temp-widget strong, .temp-widget span, .temp-widget b { display: block; }
|
||||
.temp-widget span { margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
|
||||
@@ -711,7 +714,7 @@ td, th { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: lef
|
||||
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
|
||||
.status { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; color: var(--muted); }
|
||||
@media (max-width: 820px) { .span4, .span6, .span8, .span12 { grid-column: 1 / -1; } main { padding: 12px; } .section-head { flex-direction: column; } .settings-tools { grid-template-columns: 1fr; } }
|
||||
@media (max-width: 820px) { .span4, .span6, .span8, .span12 { grid-column: 1 / -1; } main { padding: 12px; } .section-head { flex-direction: column; } .device-body, .settings-tools { grid-template-columns: 1fr; } }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -722,7 +725,7 @@ td, th { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: lef
|
||||
<h1>OpenWrt Full Backup</h1>
|
||||
<a class="button" href="/cgi-bin/luci/admin/status/overview">Вернуться в OpenWrt</a>
|
||||
</div>
|
||||
<p>Веб-панель для полного бэкапа OpenWrt без сборки IPK. Держи эту ссылку в секрете.</p>
|
||||
<p>Веб-панель для полного бэкапа OpenWrt без сборки IPK. <span class="warn-text">Держи эту ссылку в секрете.</span></p>
|
||||
</div>
|
||||
</header>
|
||||
EOF
|
||||
@@ -749,20 +752,24 @@ EOF
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
<div class="panel span6 device-card">
|
||||
<div class="panel span12 device-card">
|
||||
<h2>Устройство</h2>
|
||||
<div class="status">
|
||||
<span class="pill">Имя: $(h "$(system_value host)")</span>
|
||||
<span class="pill">Версия: $(h "$(system_value release)")</span>
|
||||
<span class="pill">Плата: $(h "$(system_value board)")</span>
|
||||
</div>
|
||||
<div class="device-body">
|
||||
<div class="device-section">
|
||||
<h3>Разделы памяти</h3>
|
||||
<div class="disk-grid">$(storage_widgets)</div>
|
||||
</div>
|
||||
|
||||
<div class="panel span6 temp-card">
|
||||
<h2>Температура роутера</h2>
|
||||
<div class="device-section">
|
||||
<h3>Температура роутера</h3>
|
||||
<div class="temp-list">$(temperature_widgets)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="panel span6 create-card" method="post" action="$(self_url)">
|
||||
<h2>Создать бэкап</h2>
|
||||
|
||||
Reference in new issue
Block a user