login gate: model downloads locked until logged-in (whitelist-only access)

This commit is contained in:
root 2026-05-20 21:12:58 +08:00
parent 7953a9a2a6
commit 8764cbc07c

View File

@ -323,35 +323,47 @@ body{
<!-- 模型下载 · 一键直达 -->
<div class="card" style="animation-delay:.5s;border-color:rgba(90,208,224,.2)">
<div class="card-header"><span class="hd" style="background:#5ad0e0;box-shadow:0 0 12px rgba(90,208,224,.3)"></span>模型下载 · 基础基座 — 点击链接直下到本地<span class="r">D107 · 公开</span></div>
<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px">
<div style="padding:18px 20px;background:rgba(255,255,255,.02);border:1px solid var(--glass-edge);border-radius:16px">
<div style="display:flex;align-items:center;gap:12px;margin-bottom:12px">
<div style="width:18px;height:18px;border-radius:50%;background:#5ad0e0;box-shadow:0 0 12px rgba(90,208,224,.3)"></div>
<div><div style="font-size:16px;font-weight:600;color:var(--light)">母模型 7B SFT</div><div style="font-size:13px;color:var(--text-soft)">Qwen2.5-7B · 通用对话微调 · 14.2GB</div></div>
</div>
<a href="https://bingshuo-1317346199.cos.ap-guangzhou.myqcloud.com/models/qwen25-7b-sft/final/model.safetensors" style="display:inline-block;padding:8px 18px;background:rgba(90,208,224,.1);border:1px solid rgba(90,208,224,.2);border-radius:10px;color:#5ad0e0;font-size:14px;text-decoration:none;font-weight:500">⬇ 下载 model.safetensors</a>
<div class="card-header"><span class="hd" style="background:#5ad0e0;box-shadow:0 0 12px rgba(90,208,224,.3)"></span>模型下载 · 基础基座<span class="r" id="model-dl-tag">登录后可下载</span></div>
<!-- 未登录:锁定状态 -->
<div id="model-dl-locked">
<div style="padding:28px 20px;text-align:center;border:1px dashed rgba(255,255,255,.08);border-radius:16px">
<div style="font-size:36px;margin-bottom:8px">🔒</div>
<div style="font-size:16px;color:var(--text-soft);margin-bottom:6px">模型下载仅对<strong style="color:var(--light)">内测成员</strong>开放</div>
<div style="font-size:14px;color:var(--text-faint);margin-bottom:16px">请先登录代码仓库账号 · 账号需经主权者白名单审批</div>
<button onclick="document.getElementById('login-bar').scrollIntoView({behavior:'smooth',block:'center'})" style="padding:10px 24px;background:rgba(90,208,224,.1);border:1px solid rgba(90,208,224,.2);border-radius:12px;color:#5ad0e0;font-size:14px;cursor:pointer;font-family:inherit">登录 · 解锁下载</button>
</div>
<div style="padding:18px 20px;background:rgba(255,255,255,.02);border:1px solid var(--glass-edge);border-radius:16px">
<div style="display:flex;align-items:center;gap:12px;margin-bottom:12px">
<div style="width:18px;height:18px;border-radius:50%;background:#a080e8;box-shadow:0 0 12px rgba(160,128,232,.3)"></div>
<div><div style="font-size:16px;font-weight:600;color:var(--light)">代码模型 7B SFT</div><div style="font-size:13px;color:var(--text-soft)">Qwen2.5-Coder-7B · 代码开发微调 · 14.2GB</div></div>
</div>
<!-- 已登录:解锁状态 -->
<div id="model-dl-unlocked" style="display:none">
<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px">
<div style="padding:18px 20px;background:rgba(255,255,255,.02);border:1px solid var(--glass-edge);border-radius:16px">
<div style="display:flex;align-items:center;gap:12px;margin-bottom:12px">
<div style="width:18px;height:18px;border-radius:50%;background:#5ad0e0;box-shadow:0 0 12px rgba(90,208,224,.3)"></div>
<div><div style="font-size:16px;font-weight:600;color:var(--light)">母模型 7B SFT</div><div style="font-size:13px;color:var(--text-soft)">Qwen2.5-7B · 通用对话微调 · 14.2GB</div></div>
</div>
<a href="https://bingshuo-1317346199.cos.ap-guangzhou.myqcloud.com/models/qwen25-7b-sft/final/model.safetensors" style="display:inline-block;padding:8px 18px;background:rgba(90,208,224,.1);border:1px solid rgba(90,208,224,.2);border-radius:10px;color:#5ad0e0;font-size:14px;text-decoration:none;font-weight:500">⬇ 下载 model.safetensors</a>
</div>
<a href="https://bingshuo-1317346199.cos.ap-guangzhou.myqcloud.com/models/qwen25-coder-7b-sft/final/model.safetensors" style="display:inline-block;padding:8px 18px;background:rgba(160,128,232,.1);border:1px solid rgba(160,128,232,.2);border-radius:10px;color:#a080e8;font-size:14px;text-decoration:none;font-weight:500">⬇ 下载 model.safetensors</a>
</div>
<div style="padding:18px 20px;background:rgba(255,255,255,.02);border:1px solid var(--glass-edge);border-radius:16px">
<div style="display:flex;align-items:center;gap:12px;margin-bottom:12px">
<div style="width:18px;height:18px;border-radius:50%;background:#40b87a;box-shadow:0 0 12px rgba(64,184,122,.3)"></div>
<div><div style="font-size:16px;font-weight:600;color:var(--light)">蒸馏 1.5B · 铸渊基座</div><div style="font-size:13px;color:var(--text-soft)">代码蒸馏 · 适合开发型人格体微调 · 2.9GB</div></div>
<div style="padding:18px 20px;background:rgba(255,255,255,.02);border:1px solid var(--glass-edge);border-radius:16px">
<div style="display:flex;align-items:center;gap:12px;margin-bottom:12px">
<div style="width:18px;height:18px;border-radius:50%;background:#a080e8;box-shadow:0 0 12px rgba(160,128,232,.3)"></div>
<div><div style="font-size:16px;font-weight:600;color:var(--light)">代码模型 7B SFT</div><div style="font-size:13px;color:var(--text-soft)">Qwen2.5-Coder-7B · 代码开发微调 · 14.2GB</div></div>
</div>
<a href="https://bingshuo-1317346199.cos.ap-guangzhou.myqcloud.com/models/qwen25-coder-7b-sft/final/model.safetensors" style="display:inline-block;padding:8px 18px;background:rgba(160,128,232,.1);border:1px solid rgba(160,128,232,.2);border-radius:10px;color:#a080e8;font-size:14px;text-decoration:none;font-weight:500">⬇ 下载 model.safetensors</a>
</div>
<a href="https://bingshuo-1317346199.cos.ap-guangzhou.myqcloud.com/models/qwen25-15b-coder-distill/model.safetensors" style="display:inline-block;padding:8px 18px;background:rgba(64,184,122,.1);border:1px solid rgba(64,184,122,.2);border-radius:10px;color:#40b87a;font-size:14px;text-decoration:none;font-weight:500">⬇ 下载 model.safetensors</a>
</div>
<div style="padding:18px 20px;background:rgba(255,255,255,.02);border:1px solid var(--glass-edge);border-radius:16px">
<div style="display:flex;align-items:center;gap:12px;margin-bottom:12px">
<div style="width:18px;height:18px;border-radius:50%;background:#d4a030;box-shadow:0 0 12px rgba(212,160,48,.3)"></div>
<div><div style="font-size:16px;font-weight:600;color:var(--light)">蒸馏 1.5B · 霜砚基座</div><div style="font-size:13px;color:var(--text-soft)">通用蒸馏 · 适合对话型人格体微调 · 2.9GB</div></div>
<div style="padding:18px 20px;background:rgba(255,255,255,.02);border:1px solid var(--glass-edge);border-radius:16px">
<div style="display:flex;align-items:center;gap:12px;margin-bottom:12px">
<div style="width:18px;height:18px;border-radius:50%;background:#40b87a;box-shadow:0 0 12px rgba(64,184,122,.3)"></div>
<div><div style="font-size:16px;font-weight:600;color:var(--light)">蒸馏 1.5B · 铸渊基座</div><div style="font-size:13px;color:var(--text-soft)">代码蒸馏 · 适合开发型人格体微调 · 2.9GB</div></div>
</div>
<a href="https://bingshuo-1317346199.cos.ap-guangzhou.myqcloud.com/models/qwen25-15b-coder-distill/model.safetensors" style="display:inline-block;padding:8px 18px;background:rgba(64,184,122,.1);border:1px solid rgba(64,184,122,.2);border-radius:10px;color:#40b87a;font-size:14px;text-decoration:none;font-weight:500">⬇ 下载 model.safetensors</a>
</div>
<div style="padding:18px 20px;background:rgba(255,255,255,.02);border:1px solid var(--glass-edge);border-radius:16px">
<div style="display:flex;align-items:center;gap:12px;margin-bottom:12px">
<div style="width:18px;height:18px;border-radius:50%;background:#d4a030;box-shadow:0 0 12px rgba(212,160,48,.3)"></div>
<div><div style="font-size:16px;font-weight:600;color:var(--light)">蒸馏 1.5B · 霜砚基座</div><div style="font-size:13px;color:var(--text-soft)">通用蒸馏 · 适合对话型人格体微调 · 2.9GB</div></div>
</div>
<a href="https://bingshuo-1317346199.cos.ap-guangzhou.myqcloud.com/models/shuangyan-15b-distill/model.safetensors" style="display:inline-block;padding:8px 18px;background:rgba(212,160,48,.1);border:1px solid rgba(212,160,48,.2);border-radius:10px;color:#d4a030;font-size:14px;text-decoration:none;font-weight:500">⬇ 下载 model.safetensors</a>
</div>
<a href="https://bingshuo-1317346199.cos.ap-guangzhou.myqcloud.com/models/shuangyan-15b-distill/model.safetensors" style="display:inline-block;padding:8px 18px;background:rgba(212,160,48,.1);border:1px solid rgba(212,160,48,.2);border-radius:10px;color:#d4a030;font-size:14px;text-decoration:none;font-weight:500">⬇ 下载 model.safetensors</a>
</div>
</div>
</div>
@ -492,6 +504,12 @@ function showLoggedIn(username){
document.getElementById('user-name').textContent=username;
document.getElementById('user-avatar').textContent=username[0].toUpperCase();
document.getElementById('frost-entry').style.display='block';
// 解锁模型下载
const dl=document.getElementById('model-dl-locked');
const du=document.getElementById('model-dl-unlocked');
if(dl&&du){dl.style.display='none';du.style.display='block'}
const tg=document.getElementById('model-dl-tag');
if(tg)tg.textContent='内测·已登录';
}
function goToRepo(){const u=localStorage.getItem('current_user');window.location.href='/code/'+u;}
function dismissRepo(){}
@ -503,8 +521,14 @@ function logout(){
document.getElementById('frost-entry').style.display='none';
document.getElementById('login-bar').style.display='flex';
document.getElementById('login-user').value='';
// 锁定模型下载
const dl=document.getElementById('model-dl-locked');
const du=document.getElementById('model-dl-unlocked');
if(dl&&du){dl.style.display='block';du.style.display='none'}
const tg=document.getElementById('model-dl-tag');
if(tg)tg.textContent='登录后可下载';
}
(function(){const u=localStorage.getItem('current_user');if(u&&localStorage.getItem('logged_in')==='true'){showLoggedIn(u);document.getElementById('frost-entry').style.display='block'}})();
(function(){const u=localStorage.getItem('current_user');if(u&&localStorage.getItem('logged_in')==='true'){showLoggedIn(u)}})();
/* ── 对话记忆 ── */
let chatHistory={};