init: AI-webUI-V1 first backup

This commit is contained in:
2026-02-15 23:08:47 +08:00
commit f372004545
9 changed files with 1882 additions and 0 deletions

152
public/index.html Normal file
View File

@@ -0,0 +1,152 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>My DeepSeek WebUI</title>
<!-- Local vendor (CSP-friendly) -->
<link rel="stylesheet" href="/vendor/github.min.css">
<link rel="stylesheet" href="/style.css">
<!-- ✅ 新增:只在这里补一点点样式(避免你还要改第三个文件) -->
<style>
/* 顶部栏的图标按钮 */
.icon-btn{
border: none;
background: transparent;
cursor: pointer;
font-size: 18px;
padding: 6px 10px;
border-radius: 8px;
line-height: 1;
}
.icon-btn:hover{
background: rgba(0,0,0,0.06);
}
/* 隐藏侧栏:通过 .app.sidebar-hidden 控制 */
.app.sidebar-hidden .sidebar{
width: 0;
min-width: 0;
overflow: hidden;
border-right: none;
}
/* 左侧 chat item标题+日期+删除按钮 */
#chatList li.chat-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.chat-item-left {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
.chat-title {
font-size: 14px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-date {
font-size: 12px;
color: rgba(255, 255, 255, 0.65);
}
.chat-del {
background: transparent;
border: none;
color: rgba(255, 255, 255, 0.75);
cursor: pointer;
padding: 4px 6px;
border-radius: 6px;
}
.chat-del:hover {
background: rgba(255, 255, 255, 0.12);
color: #fff;
}
/* 消息时间戳 */
.message .msg-meta {
margin-top: 6px;
font-size: 12px;
opacity: 0.65;
}
.message.user .msg-meta {
text-align: right;
}
/* 空状态提示 */
.empty-state{
margin: 24px auto;
max-width: 720px;
padding: 18px 16px;
border-radius: 12px;
background: rgba(0,0,0,0.04);
color: rgba(0,0,0,0.72);
font-size: 14px;
line-height: 1.6;
}
.empty-state h3{
margin: 0 0 8px 0;
font-size: 16px;
color: rgba(0,0,0,0.85);
}
.empty-state code{
background: rgba(0,0,0,0.06);
padding: 2px 6px;
border-radius: 6px;
}
</style>
</head>
<body>
<div class="app">
<aside class="sidebar">
<div class="sidebar-header">
<h2>Chats</h2>
<button id="newChatBtn" type="button"></button>
</div>
<ul id="chatList"></ul>
</aside>
<main class="main">
<header class="topbar">
<div class="topbar-left">
<!-- ✅ 新增:隐藏/展开侧栏按钮 -->
<button id="sidebarToggle" type="button" class="icon-btn" title="Toggle sidebar"></button>
<label>Model:</label>
<select id="modelSelect">
<option value="deepseek-chat">deepseek-chat</option>
<option value="deepseek-reasoner">deepseek-reasoner</option>
</select>
<label>Temp:</label>
<input id="tempInput" type="number" step="0.1" value="0.7" />
</div>
<button id="clearBtn" type="button">Clear</button>
</header>
<section id="messages" class="messages"></section>
<footer class="inputbar">
<textarea id="input" placeholder="Type your message... (Enter=send, Shift+Enter=newline)"></textarea>
<button id="sendBtn" type="button">Send</button>
</footer>
</main>
</div>
<!-- Local vendor (CSP-friendly) -->
<script src="/vendor/marked.min.js"></script>
<script src="/vendor/highlight.js"></script>
<script src="/app.js"></script>
</body>
</html>