feat: 霜砚Agent入口卡片 — 登录后显示醒目跳转

This commit is contained in:
bingshuo 2026-05-19 22:49:46 +08:00
parent aa0066d36e
commit d985002d49

View File

@ -293,6 +293,20 @@ body{
</div>
</div>
<!-- 霜砚Agent入口 -->
<div class="card bg-amber clickable" id="frost-entry" style="display:none;border-color:rgba(42,157,191,0.3);padding:20px 28px;cursor:pointer;" onclick="goToShuangyan()">
<div style="display:flex;align-items:center;gap:20px;">
<div style="width:52px;height:52px;border-radius:16px;background:linear-gradient(135deg,rgba(42,157,191,0.3),rgba(123,93,191,0.2));display:flex;align-items:center;justify-content:center;font-size:24px;box-shadow:0 0 24px rgba(90,208,224,0.15);"></div>
<div style="flex:1;">
<div style="font-size:18px;font-weight:600;color:#d4eaf0;">霜砚Agent · 百炼开发人格体</div>
<div style="font-size:14px;color:#8aa0b8;margin-top:2px;">基于 Qwen3-8B 光湖微调模型 · Notion 数据库 · 守渊工单同步</div>
</div>
<div style="display:flex;align-items:center;gap:10px;padding:10px 24px;background:linear-gradient(135deg,rgba(42,157,191,0.3),rgba(123,93,191,0.2));border:1px solid rgba(90,208,224,0.2);border-radius:14px;color:#5ad0e0;font-size:16px;font-weight:500;transition:all .3s;">
进入 →
</div>
</div>
</div>
<!-- 人格体 + 系统信息:呼吸边框 -->
<div class="row row-2">
<div class="card bg-cyan clickable">
@ -446,17 +460,20 @@ function showLoggedIn(username){
document.getElementById('logged-in-bar').style.display='flex';
document.getElementById('user-name').textContent=username;
document.getElementById('user-avatar').textContent=username[0].toUpperCase();
document.getElementById('frost-entry').style.display='block';
}
function goToRepo(){const u=localStorage.getItem('current_user');window.location.href='/code/'+u;}
function dismissRepo(){}
function goToShuangyan(){window.location.href='https://guanghubingshuo.com/agent-api/';}
function logout(){
localStorage.removeItem('current_user');localStorage.removeItem('is_admin');
localStorage.removeItem('logged_in');localStorage.removeItem('login_time');
document.getElementById('logged-in-bar').style.display='none';
document.getElementById('frost-entry').style.display='none';
document.getElementById('login-bar').style.display='flex';
document.getElementById('login-user').value='';
}
(function(){const u=localStorage.getItem('current_user');if(u&&localStorage.getItem('logged_in')==='true')showLoggedIn(u)})();
(function(){const u=localStorage.getItem('current_user');if(u&&localStorage.getItem('logged_in')==='true'){showLoggedIn(u);document.getElementById('frost-entry').style.display='block'}})();
/* ── 对话记忆 ── */
let chatHistory={};