Skip to content

Commit 17223bb

Browse files
committed
1
1 parent 8d8932c commit 17223bb

66 files changed

Lines changed: 11384 additions & 4174 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pages/chat/index.html

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta name="description" content="" />
7+
<title data-i18n="chat.group.ghpages.title"></title>
8+
<script blocking="render" type="module" src="../preload.mjs"></script>
9+
<link href="https://cdn.jsdelivr.net/npm/daisyui/daisyui.css" rel="stylesheet" crossorigin="anonymous" />
10+
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4" crossorigin="anonymous"></script>
11+
<link rel="stylesheet" href="../base.css" type="text/css" />
12+
</head>
13+
<body class="min-h-screen bg-base-200">
14+
<div class="container mx-auto p-4 max-w-3xl flex flex-col gap-4">
15+
16+
<!-- 头部 -->
17+
<div class="flex items-center justify-between flex-wrap gap-2">
18+
<h1 class="text-xl font-bold" data-i18n="chat.group.ghpages.groupTitle"></h1>
19+
<div class="flex gap-2 items-center text-xs opacity-60">
20+
<span data-i18n="chat.group.ghpages.ghpagesIdentityLabel"></span>
21+
<code id="pubkey-display" class="font-mono truncate max-w-[12rem]"></code>
22+
</div>
23+
</div>
24+
25+
<!-- 连接设置 -->
26+
<div class="card bg-base-100 shadow-sm">
27+
<div class="card-body p-4 flex flex-col gap-2">
28+
<h2 class="card-title text-base" data-i18n="chat.group.ghpages.groupSubtitle"></h2>
29+
<div class="flex gap-2 flex-wrap">
30+
<div class="flex-1 min-w-[12rem]">
31+
<label class="label label-text text-xs" for="origin" data-i18n="chat.group.ghpages.groupOriginLabel"></label>
32+
<input id="origin" type="text" class="input input-bordered input-sm w-full" data-i18n="chat.group.ghpages.groupOriginPlaceholder" />
33+
</div>
34+
<div class="flex-1 min-w-[8rem]">
35+
<label class="label label-text text-xs" for="gid" data-i18n="chat.group.ghpages.groupIdLabel"></label>
36+
<input id="gid" type="text" class="input input-bordered input-sm w-full" />
37+
</div>
38+
<div class="w-28">
39+
<label class="label label-text text-xs" for="cid" data-i18n="chat.group.ghpages.groupChannelLabel"></label>
40+
<input id="cid" type="text" class="input input-bordered input-sm w-full" value="default" />
41+
</div>
42+
</div>
43+
<div class="flex gap-2 flex-wrap items-end">
44+
<div class="flex-1 min-w-[10rem]">
45+
<label class="label label-text text-xs" for="apikey" data-i18n="chat.group.ghpages.groupApiKeyLabel"></label>
46+
<input id="apikey" type="password" class="input input-bordered input-sm w-full" autocomplete="off" />
47+
</div>
48+
<button type="button" id="connect" class="btn btn-sm btn-primary" data-i18n="chat.group.ghpages.groupConnect"></button>
49+
<button type="button" id="disconnect" class="btn btn-sm btn-ghost hidden" data-i18n="chat.group.ghpages.groupDisconnect"></button>
50+
</div>
51+
</div>
52+
</div>
53+
54+
<!-- 状态栏 -->
55+
<div id="status-bar" class="text-xs opacity-70 flex gap-4 flex-wrap">
56+
<span id="conn-status" data-i18n="chat.group.ghpages.groupDisconnected"></span>
57+
<span id="checkpoint-status"></span>
58+
<span id="storage-status"></span>
59+
</div>
60+
61+
<!-- 消息区 -->
62+
<div id="messages" class="card bg-base-100 shadow-sm">
63+
<div id="messages-inner" class="p-4 flex flex-col gap-2 min-h-[12rem] max-h-[50vh] overflow-y-auto text-sm">
64+
<p class="text-xs opacity-40 text-center" data-i18n="chat.group.ghpages.ghpagesNoMessages"></p>
65+
</div>
66+
</div>
67+
68+
<!-- 流式输出占位 -->
69+
<div id="stream-indicator" class="hidden text-xs opacity-60 italic px-2" data-i18n="chat.group.ghpages.ghpagesStreaming"></div>
70+
71+
<!-- 消息输入 -->
72+
<div class="flex gap-2">
73+
<textarea id="msg" class="textarea textarea-bordered flex-1 min-h-16 resize-none text-sm" rows="2" data-i18n="chat.group.ghpages.groupMsgLabel"></textarea>
74+
<button type="button" id="send" class="btn btn-primary self-end" data-i18n="chat.group.ghpages.groupSend"></button>
75+
</div>
76+
77+
<!-- 调试日志(可折叠) -->
78+
<details>
79+
<summary class="text-xs opacity-50 cursor-pointer select-none" data-i18n="chat.group.ghpages.ghpagesDebugLog"></summary>
80+
<pre id="log" class="bg-base-200 p-2 rounded text-xs overflow-auto max-h-40 mt-1"></pre>
81+
</details>
82+
83+
</div>
84+
<script type="module" src="./index.mjs"></script>
85+
</body>
86+
</html>

0 commit comments

Comments
 (0)