File size: 5,083 Bytes
ddebc3e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title data-i18n="webui.chat.pageTitle">Grok2API - WebChat</title>
  <link rel="icon" href="/favicon.ico?v={{APP_VERSION}}">
  <link href="https://cdn.jsdelivr.net/npm/geist@1.0.0/dist/fonts/geist-sans/style.css" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/geist@1.0.0/dist/fonts/geist-mono/style.css" rel="stylesheet">
  <link href="/static/css/app.css?v={{APP_VERSION}}" rel="stylesheet">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css">
</head>
<body class="webui-page">
  <div id="webui-header" data-active="/webui/chat"></div>
  <main id="chatLayout" class="webui-main webui-chat-layout">
    <aside class="webui-sidebar">
      <div class="webui-sidebar-header">
        <div class="webui-sidebar-headcopy">
          <div class="webui-sidebar-headtitle" data-i18n="webui.chat.sidebarTitle">Chats</div>
        </div>
        <div class="webui-sidebar-actions">
          <button id="newChatBtn" class="webui-sidebar-toggle webui-sidebar-new-btn" type="button" data-i18n-aria-label="webui.chat.newChat" data-i18n-title="webui.chat.newChat">
            <svg viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M12 5v14M5 12h14" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>
          </button>
          <button id="sidebarToggleBtn" class="webui-sidebar-toggle" type="button" data-i18n-aria-label="webui.chat.toggleSidebar" data-i18n-title="webui.chat.toggleSidebar" aria-expanded="true">
            <svg viewBox="0 0 24 24" fill="none"><rect x="3.5" y="4.5" width="17" height="15" rx="3.5" stroke="currentColor" stroke-width="1.6"/><path d="M10 5v14" stroke="currentColor" stroke-width="1.6"/></svg>
          </button>
        </div>
      </div>

      <section class="webui-sidebar-sessions">
        <div id="sessionList" class="webui-session-list"></div>
      </section>
    </aside>

    <section class="webui-workspace">
      <section class="webui-chat-pane">
        <section class="webui-thread-shell">
          <main id="thread" class="webui-thread">
            <div id="emptyState" class="webui-empty">
              <div class="webui-empty-card">
                <div class="webui-empty-title" data-i18n="webui.chat.emptyTitle">Web Chat</div>
                <div class="webui-empty-text" data-i18n="webui.chat.empty">输入一条消息开始新的会话。</div>
              </div>
            </div>
          </main>
        </section>

        <section class="webui-composer">
          <div id="uploadMeta" class="webui-upload-meta" hidden></div>
          <div class="webui-input-shell">
            <button id="uploadBtn" class="webui-upload-btn" type="button" data-i18n-aria-label="webui.chat.upload" data-i18n-title="webui.chat.upload">
              <svg viewBox="0 0 24 24" fill="none"><path d="M12 16V5M8 9l4-4 4 4M5 19h14" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>
            </button>
            <input id="fileInput" type="file" hidden multiple>
            <textarea id="promptInput" class="input webui-textarea" placeholder="输入你的问题,Enter 发送,Shift+Enter 换行" data-i18n-placeholder="webui.chat.promptPlaceholder"></textarea>
            <div class="webui-sendbar">
              <label class="webui-sendbar-model">
                <select id="modelSelect" class="input" data-i18n-aria-label="webui.chat.modelLabel"></select>
              </label>
              <button id="sendBtn" class="webui-primary-btn" type="button" data-i18n="webui.chat.send">发送</button>
            </div>
          </div>
        </section>
      </section>
    </section>
  </main>

  <div id="sessionModal" class="modal-overlay" aria-hidden="true">
    <div class="modal">
      <div id="sessionModalTitle" class="modal-title">会话操作</div>
      <div id="sessionModalDesc" class="text-xs text-muted"></div>
      <div id="sessionModalInputWrap" class="mt-2" hidden>
        <input id="sessionModalInput" class="input" type="text">
      </div>
      <div class="modal-footer">
        <button id="sessionModalCancel" type="button" class="btn btn-ghost" data-i18n="webui.chat.cancel">取消</button>
        <button id="sessionModalConfirm" type="button" class="btn btn-primary" data-i18n="webui.chat.confirm">确认</button>
      </div>
    </div>
  </div>

  <script src="/static/js/i18n.js?v={{APP_VERSION}}"></script>
  <script src="/static/js/auth.js?v={{APP_VERSION}}"></script>
  <script src="/static/js/toast.js?v={{APP_VERSION}}"></script>
  <script src="/static/js/webui-header.js?v={{APP_VERSION}}"></script>
  <script src="/static/js/footer.js?v={{APP_VERSION}}"></script>
  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js"></script>
  <script src="/static/js/webui/chat.js?v={{APP_VERSION}}"></script>
</body>
</html>