Browse Source

translate

Mistivia 1 month ago
parent
commit
62cff84296
2 changed files with 6 additions and 6 deletions
  1. 3 3
      index.html
  2. 3 3
      src/main.js

+ 3 - 3
index.html

@@ -21,9 +21,9 @@
     </div>
 
     <div class="input-container">
-        <textarea class="input-box" placeholder="输入你的消息..." rows="3" id="input-box"></textarea>
-        <button class="button send" id="send-button">发送</button>
-        <button class="button stop" id="stop-button">停止</button>
+        <textarea class="input-box" placeholder="Input Message..." rows="3" id="input-box"></textarea>
+        <button class="button send" id="send-button">Send</button>
+        <button class="button stop" id="stop-button">Stop</button>
     </div>
     <script type="module" src="/src/main.js"></script>
 </body>

+ 3 - 3
src/main.js

@@ -7,7 +7,7 @@ let isGenerating = false;
 function fetchJSONSync(url) {
     try {
         const xhr = new XMLHttpRequest();
-        xhr.open('GET', url, false); // 第三个参数设为false,表示同步请求
+        xhr.open('GET', url, false);  // sync request
         xhr.send();
 
         if (xhr.status !== 200) {
@@ -26,12 +26,12 @@ globalConfig = fetchJSONSync('./config.json');
 
 function setGenerating() {
     isGenerating = true;
-    document.getElementById('send-button').innerHTML = '生成中...';
+    document.getElementById('send-button').innerHTML = 'Generating...';
 }
 
 function unsetGenerating() {
     isGenerating = false;
-    document.getElementById('send-button').innerHTML = '发送';
+    document.getElementById('send-button').innerHTML = 'Send';
 }
 
 let stopGenerating = false;