Keldos commited on
Commit
3290e22
1 Parent(s): 18ed09e

WIP: 微调,加上新对话按钮

Browse files
web_assets/html/chatbot_header_btn.html CHANGED
@@ -14,6 +14,17 @@
14
  </div>
15
 
16
  <div class="btn-bar-group">
 
 
 
 
 
 
 
 
 
 
 
17
  <button id="open-toolbox-btn" onclick="toolboxClick()" class="chuanhu-ui-btn">
18
  <!-- <svg width="24px" height="24px" viewBox="0 0 43.4767 34.1953" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
19
  <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 
14
  </div>
15
 
16
  <div class="btn-bar-group">
17
+ <button id="new-chat-btn" onclick="newChatClick()" class="chuanhu-ui-btn">
18
+ <svg width="24px" height="24px" viewBox="0 0 41.3058 37.9805" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
19
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
20
+ <g fill-rule="nonzero">
21
+ <path d="M7.85906,37.9732 C10.2516,37.9732 15.1013,35.6613 18.7802,33.1193 C31.3151,33.6708 41.3058,26.4138 41.3058,16.6013 C41.3058,7.42008 32.1359,0 20.6529,0 C9.17883,0 0,7.42008 0,16.6013 C0,22.5973 3.85266,27.9152 9.65789,30.6202 C8.82141,32.2172 7.33664,34.2469 6.52195,35.292 C5.57226,36.5116 6.08883,37.9732 7.85906,37.9732 Z M9.48751,35.2875 C9.34688,35.336 9.30727,35.2334 9.40829,35.1089 C10.392,33.8965 11.858,32.0149 12.5182,30.7552 C12.9734,29.9184 12.8473,29.1593 11.8221,28.6863 C6.06376,26.0217 2.68407,21.6335 2.68407,16.6013 C2.68407,8.91657 10.6542,2.66954 20.6529,2.66954 C30.6677,2.66954 38.6217,8.91657 38.6217,16.6013 C38.6217,24.2698 30.6677,30.5241 20.6529,30.5241 C20.1642,30.5241 19.5356,30.495 18.747,30.4659 C18.0687,30.4587 17.5069,30.66 16.9006,31.1402 C14.4764,32.7921 11.1403,34.7288 9.48751,35.2875 Z" fill-opacity="0.85" fill="currentColor"></path>
22
+ <path d="M12.233,16.7468 C12.233,17.5238 12.7908,18.0816 13.6235,18.0816 L19.2947,18.0816 L19.2947,23.7778 C19.2947,24.5855 19.8525,25.1522 20.6295,25.1522 C21.4371,25.1522 22.0111,24.5927 22.0111,23.7778 L22.0111,18.0816 L27.7146,18.0816 C28.515,18.0816 29.0817,17.5238 29.0817,16.7468 C29.0817,15.9391 28.5223,15.3652 27.7146,15.3652 L22.0111,15.3652 L22.0111,9.67782 C22.0111,8.85399 21.4371,8.28727 20.6295,8.28727 C19.8525,8.28727 19.2947,8.86125 19.2947,9.67782 L19.2947,15.3652 L13.6235,15.3652 C12.7835,15.3652 12.233,15.9391 12.233,16.7468 Z" fill-opacity="0.85" fill="currentColor"></path>
23
+ </g>
24
+ </g>
25
+ </svg>
26
+ </button>
27
+
28
  <button id="open-toolbox-btn" onclick="toolboxClick()" class="chuanhu-ui-btn">
29
  <!-- <svg width="24px" height="24px" viewBox="0 0 43.4767 34.1953" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
30
  <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
web_assets/javascript/ChuanhuChat.js CHANGED
@@ -350,7 +350,7 @@ window.addEventListener("DOMContentLoaded", function () {
350
  historyLoaded = false;
351
  });
352
  window.addEventListener('resize', ()=>{
353
- setChatbotHeight();
354
  setPopupBoxPosition();
355
  adjustSide();
356
  windowWidth = window.innerWidth;
 
350
  historyLoaded = false;
351
  });
352
  window.addEventListener('resize', ()=>{
353
+ // setChatbotHeight();
354
  setPopupBoxPosition();
355
  adjustSide();
356
  windowWidth = window.innerWidth;
web_assets/javascript/webui.js CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  function openSettingBox() {
2
  chuanhuPopup.classList.add('showBox');
3
  popupWrapper.classList.add('showBox');
 
1
+
2
+ function newChatClick() {
3
+ gradioApp().querySelector('#empty-btn').click();
4
+ }
5
+
6
  function openSettingBox() {
7
  chuanhuPopup.classList.add('showBox');
8
  popupWrapper.classList.add('showBox');
web_assets/stylesheet/ChuanhuChat.css CHANGED
@@ -10,10 +10,7 @@
10
  --switch-checkbox-color-light: #e5e7eb;
11
  --switch-checkbox-color-dark: #515151;
12
 
13
- --chatbot-blur-background-color: #F3F3F388;
14
- /* --chatbot-blur-background-color-dark: #121111bb; */
15
- /* --menu-background-color-light: #F0F0F0;
16
- --menu-background-color-dark: #282828; */
17
 
18
  --menu-width: 320px;
19
  --menu-background-fill: var(--background-fill-primary);
@@ -21,7 +18,7 @@
21
  --toolbox-width: 280px;
22
  --toolbox-background-fill: var(--background-fill-secondary);
23
  .dark {
24
- --chatbot-blur-background-color: #12111188;
25
  }
26
  }
27
 
 
10
  --switch-checkbox-color-light: #e5e7eb;
11
  --switch-checkbox-color-dark: #515151;
12
 
13
+ --chatbot-blur-background-color: #F3F3F366;
 
 
 
14
 
15
  --menu-width: 320px;
16
  --menu-background-fill: var(--background-fill-primary);
 
18
  --toolbox-width: 280px;
19
  --toolbox-background-fill: var(--background-fill-secondary);
20
  .dark {
21
+ --chatbot-blur-background-color: #12111166;
22
  }
23
  }
24
 
web_assets/stylesheet/override-gradio.css CHANGED
@@ -14,7 +14,7 @@ div.no-container {
14
 
15
  /* gradio的页脚信息 */
16
  footer {
17
- /* display: none !important; */
18
  margin-top: .2em !important;
19
  font-size: 85%;
20
  }
 
14
 
15
  /* gradio的页脚信息 */
16
  footer {
17
+ display: none !important;
18
  margin-top: .2em !important;
19
  font-size: 85%;
20
  }