Initial control project import

This commit is contained in:
seo
2026-06-07 00:33:58 +09:00
commit e1ca2fc125
25 changed files with 8231 additions and 0 deletions
+1100
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

+98
View File
@@ -0,0 +1,98 @@
:root {
--bg: #090d12;
--panel: #111821;
--tile: #0c1219;
--line: #263341;
--line2: #3a4a5d;
--text: #eaf1f8;
--muted: #91a0af;
--dim: #6e7c8b;
--blue: #54c7ec;
--green: #69db9a;
--yellow: #f0c860;
--red: #ff7a70;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif; }
button, input, select { font: inherit; }
.login-page { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(420px, calc(100vw - 32px)); border: 1px solid var(--line); background: var(--panel); padding: 28px; }
.login-card span, .brand span, .top-metrics span, .panel-head h2, .kv span, .fan-stats span, .path-box span, .card-list span, .triple h3 { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.login-card h1 { margin: 8px 0 20px; font-size: 24px; }
.login-card input, .login-card button { width: 100%; min-height: 42px; margin-top: 10px; border: 1px solid var(--line2); background: var(--tile); color: var(--text); padding: 9px 11px; }
.login-card button { background: var(--blue); color: #061018; font-weight: 900; }
.login-card p { color: var(--red); margin-bottom: 0; }
.shell { width: 100%; min-width: 1260px; max-width: 1920px; margin: 0 auto; padding: 12px; }
.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 250px minmax(0, 1fr) auto; gap: 10px; align-items: stretch; border: 1px solid var(--line); background: rgba(9, 13, 18, .96); padding: 10px; margin-bottom: 12px; }
.brand { display: grid; align-content: center; min-width: 0; }
.brand h1 { margin: 4px 0 0; font-size: 20px; line-height: 1.1; }
.top-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.top-metrics div, .fan-stats div, .kv div, .path-box div, .card-list article { min-width: 0; border: 1px solid var(--line); background: var(--tile); padding: 9px; }
b, strong, td, th { overflow-wrap: anywhere; }
.top-metrics b, .fan-stats b, .kv b, .path-box b, .card-list b { display: block; margin-top: 4px; font-family: Consolas, Monaco, monospace; font-size: 13px; }
.top-metrics b { font-size: 15px; }
.logout { display: grid; place-items: center; border: 1px solid var(--line2); background: #172130; color: var(--text); padding: 0 12px; text-decoration: none; }
.layout { display: grid; grid-template-columns: 330px minmax(0, 1fr) 410px; gap: 12px; align-items: start; }
.left-col, .center-col, .right-col { display: grid; gap: 12px; min-width: 0; }
.left-col, .right-col { position: sticky; top: 88px; max-height: calc(100vh - 100px); overflow: auto; scrollbar-width: thin; }
.panel { min-width: 0; border: 1px solid var(--line); background: var(--panel); padding: 10px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; margin-bottom: 10px; }
.panel-head h2 { margin: 0; color: var(--text); font-size: 13px; }
.panel-head h2::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: var(--blue); }
.panel-head em { color: var(--green); font-style: normal; font-size: 12px; font-weight: 900; }
.fan-panel { background: #12202a; }
.fan-gauge { display: grid; place-items: center; height: 132px; border: 1px solid var(--line2); background: radial-gradient(circle, #172d39 0%, #0c141c 72%); }
.fan-gauge strong { font-family: Consolas, Monaco, monospace; font-size: 44px; line-height: 1; }
.fan-gauge span { color: var(--muted); font-size: 12px; }
.fan-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.mode-row, .pwm-row { display: flex; gap: 8px; margin-top: 10px; }
.mode-row button, .pwm-row button, .service-cards button, td button { min-height: 28px; border: 1px solid var(--line2); background: #182332; color: var(--text); cursor: pointer; padding: 5px 8px; }
body[data-fan-mode="auto"] #btnFanAuto, body[data-fan-mode="manual"] #btnFanManual, .pwm-row button { background: var(--blue); color: #061018; font-weight: 900; }
.mode-row button { flex: 1 1 0; }
.pwm-row input[type="range"] { flex: 1 1 auto; accent-color: var(--blue); }
.pwm-row input[type="number"], select { width: 82px; border: 1px solid var(--line2); background: var(--tile); color: var(--text); padding: 5px 7px; }
.path-box { display: grid; gap: 6px; margin-top: 10px; max-height: 140px; overflow: auto; }
.kv, .card-list, .service-cards { display: grid; gap: 8px; }
.service-cards { max-height: 430px; overflow: auto; }
.service-cards article { border: 1px solid var(--line); background: var(--tile); padding: 9px; }
.service-cards article.up { border-left: 3px solid var(--green); }
.service-cards article.down { border-left: 3px solid var(--red); }
.service-cards strong, .card-list strong { display: block; font-family: Consolas, Monaco, monospace; }
.service-cards span, .service-cards small { display: block; color: var(--muted); margin-top: 4px; }
.service-cards div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.chart-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.chart-grid div { height: 220px; border: 1px solid var(--line); background: var(--tile); padding: 8px 8px 14px; }
.chart-grid canvas { display: block; max-height: calc(100% - 24px); }
.table-box, .event-box, .triple section { max-width: 100%; overflow: auto; border: 1px solid var(--line); background: var(--tile); }
.table-box.big { height: 360px; }
.table-box.huge { height: 430px; }
.table-box.small { max-height: 220px; }
.triple { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.triple section { height: 170px; padding: 9px; }
.triple h3 { margin: 0 0 8px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; font-size: 12px; }
th { position: sticky; top: 0; z-index: 2; background: #1a2532; color: var(--text); }
tr:nth-child(even) td { background: rgba(255,255,255,.025); }
.mono { font-family: Consolas, Monaco, monospace; }
.card-list article { position: relative; }
.card-list em { position: absolute; right: 9px; top: 9px; font-style: normal; font-size: 11px; font-weight: 900; }
.card-list em.up { color: var(--green); }
.card-list em.down { color: var(--red); }
.card-list div { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 7px; }
.event-box { max-height: 220px; margin-top: 8px; }
.event { padding: 7px 8px; border-bottom: 1px solid var(--line); color: #dbe5ef; font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 1.35; }
.event.bad { color: var(--red); }
.empty { padding: 14px; color: var(--muted); font-size: 13px; }
.bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.bottom .table-box { height: 300px; }
.notice { position: fixed; right: 16px; bottom: 16px; z-index: 80; border: 1px solid var(--line2); background: #142030; color: var(--text); padding: 12px 14px; }
.notice.error { border-color: var(--red); }
.notice.hidden { display: none; }
@media (max-width: 1500px) {
.shell { min-width: 1180px; }
.layout { grid-template-columns: 310px minmax(0, 1fr) 360px; }
.top-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chart-grid { grid-template-columns: 1fr; }
}
+6
View File
@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<rect width="64" height="64" rx="16" fill="#0f1115"/>
<path d="M18 40c4-10 8-20 14-20s10 10 14 20" fill="none" stroke="#3b82f6" stroke-width="5" stroke-linecap="round"/>
<circle cx="32" cy="32" r="6" fill="#35c46b"/>
<path d="M16 47h32" stroke="#edf1f7" stroke-width="4" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

+24
View File
@@ -0,0 +1,24 @@
{
"name": "Seoul Control Center",
"short_name": "Seoul Control",
"description": "Fan and WiFi control panel",
"start_url": "/",
"scope": "/",
"display": "standalone",
"background_color": "#0f1115",
"theme_color": "#0f1115",
"icons": [
{
"src": "/assets/icon-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/assets/icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
}
]
}
+70
View File
@@ -0,0 +1,70 @@
(() => {
'use strict';
const button = document.querySelector('#wakeLockBtn');
if (!button) return;
let wakeLock = null;
let wanted = false;
function supported() {
return 'wakeLock' in navigator;
}
function active() {
return wakeLock !== null && wakeLock.released === false;
}
function render() {
const isActive = active();
button.disabled = !supported();
button.classList.toggle('wake-active', isActive);
button.textContent = 'WakeLock';
button.title = supported() ? '화면 꺼짐 방지' : '현재 브라우저에서 WakeLock을 지원하지 않습니다.';
}
async function requestWakeLock() {
if (!supported()) {
render();
return;
}
wakeLock = await navigator.wakeLock.request('screen');
wakeLock.addEventListener('release', () => {
wakeLock = null;
render();
});
render();
}
async function releaseWakeLock() {
wanted = false;
if (wakeLock) {
await wakeLock.release();
}
wakeLock = null;
render();
}
button.addEventListener('click', () => {
const job = active() ? releaseWakeLock() : (async () => {
wanted = true;
await requestWakeLock();
})();
job.catch(error => {
wanted = false;
wakeLock = null;
alert(error.message || 'WakeLock failed');
render();
});
});
document.addEventListener('visibilitychange', () => {
if (document.visibilityState === 'visible' && wanted && !active()) {
requestWakeLock().catch(() => render());
}
});
render();
})();