opencode-statboard 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/index.html +2 -1
- package/server.js +3 -1
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -66,13 +66,14 @@
|
|
|
66
66
|
.skeleton-card { height: 60px; }
|
|
67
67
|
.trend-bar { position: absolute; bottom: 0; border-radius: 2px 2px 0 0; transition: height .4s ease; }
|
|
68
68
|
.trend-bar-cache { left: 0; right: 0; opacity: .2; }
|
|
69
|
+
.version { font-size: 11px; color: var(--muted); background: var(--panel); border: 1px solid var(--border); padding: 2px 8px; border-radius: 4px; }
|
|
69
70
|
.trend-bar-input { left: 25%; width: 22%; z-index: 1; }
|
|
70
71
|
.trend-bar-output { left: 53%; width: 22%; z-index: 1; }
|
|
71
72
|
</style>
|
|
72
73
|
</head>
|
|
73
74
|
<body>
|
|
74
75
|
<header>
|
|
75
|
-
<h1><span class="dot">●</span> <span data-i18n="title">opencode Dashboard</span></h1>
|
|
76
|
+
<h1><span class="dot">●</span> <span data-i18n="title">opencode Dashboard</span> <span class="version">v__VERSION__</span></h1>
|
|
76
77
|
<div class="status">
|
|
77
78
|
<span id="updated">Loading…</span>
|
|
78
79
|
<span class="pill ok" id="pill" data-i18n="live">Live</span>
|
package/server.js
CHANGED
|
@@ -9,6 +9,8 @@ const REFRESH_MS = 15000;
|
|
|
9
9
|
const TREND_MS = 10 * 60 * 1000;
|
|
10
10
|
const REPORT_TTL = 10 * 60 * 1000;
|
|
11
11
|
const CACHE_CLEANUP_MS = 5 * 60 * 1000;
|
|
12
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'));
|
|
13
|
+
const VERSION = pkg.version;
|
|
12
14
|
|
|
13
15
|
const EXE = (() => {
|
|
14
16
|
const candidates = [
|
|
@@ -357,7 +359,7 @@ const server = http.createServer(async (req, res) => {
|
|
|
357
359
|
return;
|
|
358
360
|
}
|
|
359
361
|
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
360
|
-
res.end(data);
|
|
362
|
+
res.end(data.replace('__VERSION__', VERSION));
|
|
361
363
|
});
|
|
362
364
|
} else {
|
|
363
365
|
res.statusCode = 404;
|