login gate: model downloads locked until logged-in (whitelist-only access)
This commit is contained in:
parent
7953a9a2a6
commit
8764cbc07c
@ -323,7 +323,18 @@ body{
|
|||||||
|
|
||||||
<!-- 模型下载 · 一键直达 -->
|
<!-- 模型下载 · 一键直达 -->
|
||||||
<div class="card" style="animation-delay:.5s;border-color:rgba(90,208,224,.2)">
|
<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 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>
|
||||||
|
<!-- 已登录:解锁状态 -->
|
||||||
|
<div id="model-dl-unlocked" style="display:none">
|
||||||
<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px">
|
<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="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="display:flex;align-items:center;gap:12px;margin-bottom:12px">
|
||||||
@ -355,6 +366,7 @@ body{
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!-- 活动流 + Notion -->
|
<!-- 活动流 + Notion -->
|
||||||
<div class="row row-2">
|
<div class="row row-2">
|
||||||
<div class="card bg-green clickable">
|
<div class="card bg-green clickable">
|
||||||
@ -492,6 +504,12 @@ function showLoggedIn(username){
|
|||||||
document.getElementById('user-name').textContent=username;
|
document.getElementById('user-name').textContent=username;
|
||||||
document.getElementById('user-avatar').textContent=username[0].toUpperCase();
|
document.getElementById('user-avatar').textContent=username[0].toUpperCase();
|
||||||
document.getElementById('frost-entry').style.display='block';
|
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 goToRepo(){const u=localStorage.getItem('current_user');window.location.href='/code/'+u;}
|
||||||
function dismissRepo(){}
|
function dismissRepo(){}
|
||||||
@ -503,8 +521,14 @@ function logout(){
|
|||||||
document.getElementById('frost-entry').style.display='none';
|
document.getElementById('frost-entry').style.display='none';
|
||||||
document.getElementById('login-bar').style.display='flex';
|
document.getElementById('login-bar').style.display='flex';
|
||||||
document.getElementById('login-user').value='';
|
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={};
|
let chatHistory={};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user