joermd commited on
Commit
c3fef77
ยท
verified ยท
1 Parent(s): 75c469e

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +13 -12
index.html CHANGED
@@ -239,7 +239,7 @@ function createUserMessage(text) {
239
  prefix = 'ุงุนุทู†ูŠ ุฑุฏ ู…ูุตู„ ูˆู…ูˆุณุน: ';
240
  }
241
 
242
- return `
243
  <div class="message flex justify-end mb-4">
244
  <div class="max-w-[80%]">
245
  <div class="bg-indigo-500 text-white rounded-lg p-4 shadow-sm">
@@ -247,11 +247,11 @@ function createUserMessage(text) {
247
  </div>
248
  </div>
249
  </div>
250
- `;
251
  }
252
 
253
  function createBotMessage(text, messageId) {
254
- return `
255
  <div class="message flex justify-start mb-4">
256
  <div class="flex-shrink-0 mt-1">
257
  <img src="https://ufastpro.com/wp-content/uploads/2024/12/3.png" alt="Bot Avatar" class="bot-avatar">
@@ -288,7 +288,7 @@ function createBotMessage(text, messageId) {
288
  </div>
289
  </div>
290
  </div>
291
- `;
292
  }
293
 
294
  async function typeText(elementId, text) {
@@ -309,18 +309,18 @@ function toggleSendButton(isGenerating) {
309
  const sendButton = document.getElementById('sendMessage');
310
  if (isGenerating) {
311
  sendButton.classList.add('stop-generation');
312
- sendButton.innerHTML = `
313
  <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
314
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
315
  </svg>
316
- `;
317
  } else {
318
  sendButton.classList.remove('stop-generation');
319
- sendButton.innerHTML = `
320
  <svg class="w-6 h-6 transform rotate-90" fill="none" stroke="currentColor" viewBox="0 0 24 24">
321
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 10l7-7m0 0l7 7m-7-7v18"></path>
322
  </svg>
323
- `;
324
  }
325
  }
326
 
@@ -376,7 +376,7 @@ async function sendMessage() {
376
  if (error.name === 'AbortError') {
377
  document.getElementById(messageId).textContent = 'ุชู… ุฅูŠู‚ุงู ุงู„ุชูˆู„ูŠุฏ.';
378
  } else {
379
- document.getElementById(messageId).textContent = '''ุณุคุงู„ ุฑุงุฆุน ูˆุนู…ูŠู‚! โค๏ธ ู„ูˆ ูƒู†ุช ุฃู…ู„ูƒ ูุฑุตุฉ ู„ุชุบูŠูŠุฑ ุดูŠุก ูˆุงุญุฏ ููŠ ุงู„ุนุงู„ู…ุŒ ุณุฃุนู…ู„ ุนู„ู‰ ุงู„ู‚ุถุงุก ุนู„ู‰ ุงู„ูู‚ุฑ. ู„ุฃู† ุงู„ูู‚ุฑ ู‡ูˆ ุฃุณุงุณ ุงู„ุนุฏูŠุฏ ู…ู† ุงู„ู…ุดุงูƒู„ ู…ุซู„ ุงู„ุฌูˆุนุŒ ุงู„ุชุนู„ูŠู… ุงู„ุณูŠุฆุŒ ูˆุงู„ู…ุฑุถ. ุชุฎูŠู„ ู„ูˆ ุฃู† ูƒู„ ุฅู†ุณุงู† ูŠู…ู„ูƒ ู…ุง ูŠูƒููŠ ู„ูŠุนูŠุด ุญูŠุงุฉ ูƒุฑูŠู…ุฉุŒ ูƒูŠู ุณุชุตุจุญ ุงู„ุญูŠุงุฉ ู…ู„ูŠุฆุฉ ุจุงู„ุณู„ุงู… ูˆุงู„ูุฑุต ู„ู„ุฌู…ูŠุนุŸ''';
380
  }
381
  } finally {
382
  currentController = null;
@@ -393,12 +393,12 @@ document.addEventListener('click', async (e) => {
393
  await navigator.clipboard.writeText(text);
394
  e.target.closest('.copy-button').textContent = 'ุชู… ุงู„ู†ุณุฎ!';
395
  setTimeout(() => {
396
- e.target.closest('.copy-button').innerHTML = `
397
  <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
398
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"></path>
399
  </svg>
400
  ู†ุณุฎ
401
- `;
402
  }, 2000);
403
  }
404
 
@@ -454,4 +454,5 @@ messagesContainer.insertAdjacentHTML('beforeend', createBotMessage('', initialMe
454
  typeText(initialMessageId, 'ู…ุฑุญุจุงู‹! ูƒูŠู ูŠู…ูƒู†ู†ูŠ ู…ุณุงุนุฏุชูƒ ุงู„ูŠูˆู…ุŸ');
455
  </script>
456
  </body>
457
- </html>
 
 
239
  prefix = 'ุงุนุทู†ูŠ ุฑุฏ ู…ูุตู„ ูˆู…ูˆุณุน: ';
240
  }
241
 
242
+ return
243
  <div class="message flex justify-end mb-4">
244
  <div class="max-w-[80%]">
245
  <div class="bg-indigo-500 text-white rounded-lg p-4 shadow-sm">
 
247
  </div>
248
  </div>
249
  </div>
250
+ ;
251
  }
252
 
253
  function createBotMessage(text, messageId) {
254
+ return
255
  <div class="message flex justify-start mb-4">
256
  <div class="flex-shrink-0 mt-1">
257
  <img src="https://ufastpro.com/wp-content/uploads/2024/12/3.png" alt="Bot Avatar" class="bot-avatar">
 
288
  </div>
289
  </div>
290
  </div>
291
+ ;
292
  }
293
 
294
  async function typeText(elementId, text) {
 
309
  const sendButton = document.getElementById('sendMessage');
310
  if (isGenerating) {
311
  sendButton.classList.add('stop-generation');
312
+ sendButton.innerHTML =
313
  <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
314
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
315
  </svg>
316
+ ;
317
  } else {
318
  sendButton.classList.remove('stop-generation');
319
+ sendButton.innerHTML =
320
  <svg class="w-6 h-6 transform rotate-90" fill="none" stroke="currentColor" viewBox="0 0 24 24">
321
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 10l7-7m0 0l7 7m-7-7v18"></path>
322
  </svg>
323
+ ;
324
  }
325
  }
326
 
 
376
  if (error.name === 'AbortError') {
377
  document.getElementById(messageId).textContent = 'ุชู… ุฅูŠู‚ุงู ุงู„ุชูˆู„ูŠุฏ.';
378
  } else {
379
+ document.getElementById(messageId).textContent = 'ุนุฐุฑุงู‹ุŒ ุญุฏุซ ุฎุทุฃ ููŠ ุงู„ู…ุนุงู„ุฌุฉ.';
380
  }
381
  } finally {
382
  currentController = null;
 
393
  await navigator.clipboard.writeText(text);
394
  e.target.closest('.copy-button').textContent = 'ุชู… ุงู„ู†ุณุฎ!';
395
  setTimeout(() => {
396
+ e.target.closest('.copy-button').innerHTML =
397
  <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
398
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"></path>
399
  </svg>
400
  ู†ุณุฎ
401
+ ;
402
  }, 2000);
403
  }
404
 
 
454
  typeText(initialMessageId, 'ู…ุฑุญุจุงู‹! ูƒูŠู ูŠู…ูƒู†ู†ูŠ ู…ุณุงุนุฏุชูƒ ุงู„ูŠูˆู…ุŸ');
455
  </script>
456
  </body>
457
+ </html>
458
+