v1.3.18 CPU四块并列一行
This commit is contained in:
1 parent
cdb53ee53a
commit
7fe99f6903
3 files changed
+13
-6
No files matched your search
@@ -16,7 +16,7 @@ PORT = int(os.environ.get("PORT", "7031"))
|
||||
# ---------- CardAuth hub (免费形态: 安装统计/在线/公告/版本推送,失败开放) ----------
|
||||
HUB_URL = os.environ.get("HUB_URL", "https://auth.88531.cn/api").rstrip("/")
|
||||
HUB_PROJECT_ID = os.environ.get("HUB_PROJECT_ID", "12")
|
||||
HUB_VERSION = os.environ.get("SITE_VERSION", "1.3.17")
|
||||
HUB_VERSION = os.environ.get("SITE_VERSION", "1.3.18")
|
||||
HUB = {"ok": False, "install_id": None, "latest": "", "update_available": False,
|
||||
"update_required": False, "download_url": "", "changelog": "",
|
||||
"announcements": [], "popup": [], "ts": 0}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ services:
|
||||
environment:
|
||||
- PORT=7031
|
||||
- PROCFS_PATH=/host/proc
|
||||
- SITE_VERSION=1.3.17
|
||||
- SITE_VERSION=1.3.18
|
||||
- HUB_URL=https://auth.88531.cn/api
|
||||
- HUB_PROJECT_ID=12
|
||||
- HUB_KEY_FILE=/run/secrets/hub_key
|
||||
|
||||
+11
-4
@@ -52,6 +52,13 @@ button.refresh{background:#20a53a;color:#fff;border:none;border-radius:3px;paddi
|
||||
.benchbtn{border:1px solid #20a53a;background:#20a53a;color:#fff;border-radius:6px;padding:8px 18px;font-size:14px;cursor:pointer}
|
||||
.benchbtn:disabled{background:#ccc;border-color:#ccc;cursor:wait}
|
||||
.benchhist{font-size:12px;color:#666;line-height:1.8;margin-top:4px}
|
||||
#cpu4row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 16px 12px}
|
||||
#cpu4row .cpuinfo{margin:0;min-width:0;overflow:hidden}
|
||||
#cpu4row .bigbtn{font-size:15px;padding:10px 18px}
|
||||
#cpu4row .perfbtn{padding:6px 12px;font-size:13px;margin:0 6px 6px 0}
|
||||
#cpu4row .benchbtn{padding:6px 12px;font-size:13px}
|
||||
@media(max-width:1400px){#cpu4row{grid-template-columns:repeat(2,minmax(0,1fr))}}
|
||||
@media(max-width:800px){#cpu4row{grid-template-columns:minmax(0,1fr)}}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -62,7 +69,7 @@ button.refresh{background:#20a53a;color:#fff;border:none;border-radius:3px;paddi
|
||||
<div class="tab" data-t="net">网络</div>
|
||||
<div style="margin-left:auto;display:flex;align-items:center;gap:12px;padding-right:16px;font-size:12px">
|
||||
<span id="licBell" onclick="toggleAnn()" title="公告" style="cursor:pointer;position:relative;font-size:15px">🔔<i id="licDot" style="display:none;position:absolute;top:-2px;right:-4px;width:8px;height:8px;border-radius:50%;background:#f00"></i></span>
|
||||
<span id="licVer" onclick="checkVer(true)" title="点击检查新版本" style="color:#999;cursor:pointer">v1.3.17</span>
|
||||
<span id="licVer" onclick="checkVer(true)" title="点击检查新版本" style="color:#999;cursor:pointer">v1.3.18</span>
|
||||
<label style="color:#999">刷新 <select id="ival" onchange="setIval(this.value)" style="border:1px solid #ddd;border-radius:3px;padding:2px 4px;color:#333"><option value="3">3s</option><option value="5">5s</option><option value="10">10s</option><option value="30">30s</option><option value="60">60s</option></select></label>
|
||||
<button id="pauseBtn" onclick="togglePause()" style="background:#ff9900;color:#fff;border:none;border-radius:3px;padding:3px 10px;cursor:pointer">⏸ 停止刷新</button>
|
||||
<a href="https://nav.88531.cn" target="_blank" style="color:#20a53a;text-decoration:none">资享导航站</a>
|
||||
@@ -71,10 +78,10 @@ button.refresh{background:#20a53a;color:#fff;border:none;border-radius:3px;paddi
|
||||
</div>
|
||||
<div class="card" id="summary"></div>
|
||||
<div class="cpuinfo" id="cpuinfo" style="display:none"></div>
|
||||
<div class="cpuinfo" id="cpuperf" style="display:none"></div>
|
||||
<div id="cpu4row"><div class="cpuinfo" id="cpuperf" style="display:none"></div>
|
||||
<div class="cpuinfo" id="cpubench" style="display:none"></div>
|
||||
<div class="cpuinfo" id="cpusensor" style="display:none"></div>
|
||||
<div class="cpuinfo" id="cpuadvise" style="display:none"></div>
|
||||
<div class="cpuinfo" id="cpuadvise" style="display:none"></div></div>
|
||||
<div class="cpuinfo" id="meminfo" style="display:none"></div>
|
||||
<div class="cpuinfo" id="membench" style="display:none"></div>
|
||||
<div class="cpuinfo" id="diskinfo" style="display:none"></div>
|
||||
@@ -241,7 +248,7 @@ function togglePause(){paused=!paused;document.getElementById('pauseBtn').textCo
|
||||
startTimer();
|
||||
async function licPoll(){try{const r=await fetch('/api/license-config',{cache:'no-store'});const j=await r.json();LIC=j;
|
||||
const dot=document.getElementById('licDot');if(dot)dot.style.display=(j.announcements&&j.announcements.length)?'':'none';
|
||||
const v=document.getElementById('licVer');if(v)v.textContent='v'+(j.version||'1.3.17')+(j.update_available?' ●':'');
|
||||
const v=document.getElementById('licVer');if(v)v.textContent='v'+(j.version||'1.3.18')+(j.update_available?' ●':'');
|
||||
if(j.popup&&j.popup.length){try{const seen=JSON.parse(localStorage.getItem('fnos_ann_seen')||'[]');const fresh=j.popup.filter(a=>seen.indexOf(a.id)<0);if(fresh.length){const a=fresh[0];const el=document.getElementById('annPop');el.innerHTML=`<div style="display:flex;justify-content:space-between;align-items:center"><b>📢 ${esc(a.title||'公告')}</b><span onclick="dismissPop(${a.id})" style="cursor:pointer;color:#999">✕</span></div><div style="margin-top:6px">${a.content||''}</div>`;el.style.display='';}}catch(e){}}
|
||||
if(document.getElementById('annPanel').style.display!=='none')renderAnn();}catch(e){}}
|
||||
function renderAnn(){const el=document.getElementById('annPanel');const list=LIC.announcements||[];el.innerHTML=list.length?(`<b>📢 公告(${list.length})</b>`+list.map(a=>`<div style="margin-top:8px;padding-top:8px;border-top:1px dashed #eee"><div><b>${esc(a.title||'')}</b></div><div style="color:#666">${a.content||''}</div></div>`).join('')):'<span style="color:#999">暂无公告</span>';}
|
||||
|
||||
Reference in new issue
Block a user