jjmandog commited on
Commit
98ef78a
·
verified ·
1 Parent(s): 18d5708

Now buttons aren’t functional. Check code and fix errors . Make everything work properly again - Follow Up Deployment

Browse files
Files changed (2) hide show
  1. index.html +30 -9
  2. prompts.txt +2 -1
index.html CHANGED
@@ -675,17 +675,33 @@ You: Your order will ship within 24 hours and typically arrives in 2-3 business
675
  const trainBtn = document.getElementById('trainAIbtn');
676
  const closeTraining = document.getElementById('closeTraining');
677
 
678
- trainBtn.addEventListener('click', () => {
679
- trainingModal.classList.remove('hidden');
680
- showTrainingSection('qa'); // Default to Q&A section
681
- });
 
 
682
 
683
- closeTraining.addEventListener('click', () => {
684
- trainingModal.classList.add('hidden');
685
- });
 
 
 
 
 
 
 
 
 
686
 
687
  // Settings modal functionality
688
  document.addEventListener('DOMContentLoaded', function() {
 
 
 
 
 
689
  const settingsModal = document.getElementById('settingsModal');
690
  const settingsBtn = document.getElementById('settingsBtn');
691
  const closeSettings = document.getElementById('closeSettings');
@@ -734,7 +750,9 @@ You: Your order will ship within 24 hours and typically arrives in 2-3 business
734
  trainingOptions.style.display = this.value === 'training' ? 'block' : 'none';
735
  });
736
 
737
- document.getElementById('startCallBtn').addEventListener('click', async function() {
 
 
738
  const loadingIcon = this.querySelector('i');
739
  const originalContent = this.innerHTML;
740
 
@@ -855,6 +873,7 @@ You: Your order will ship within 24 hours and typically arrives in 2-3 business
855
 
856
  // Improved System Test Modal with actual testing
857
  const testBtn = document.getElementById('systemTestBtn');
 
858
 
859
  testBtn.addEventListener('click', async function() {
860
  try {
@@ -1464,7 +1483,9 @@ Or contact support at help@trillion.ventures`);
1464
 
1465
  <!-- System Status Check -->
1466
  <script>
1467
- document.getElementById('checkSystemBtn').addEventListener('click', async function() {
 
 
1468
  try {
1469
  this.classList.add('bg-yellow-100');
1470
  this.querySelector('i').className = 'fas fa-spinner fa-spin text-yellow-600';
 
675
  const trainBtn = document.getElementById('trainAIbtn');
676
  const closeTraining = document.getElementById('closeTraining');
677
 
678
+ if (trainBtn) {
679
+ trainBtn.addEventListener('click', () => {
680
+ trainingModal.classList.remove('hidden');
681
+ showTrainingSection('qa'); // Default to Q&A section
682
+ });
683
+ }
684
 
685
+ if (closeTraining) {
686
+ closeTraining.addEventListener('click', () => {
687
+ trainingModal.classList.add('hidden');
688
+ });
689
+ }
690
+
691
+ function showTrainingSection(sectionId) {
692
+ document.querySelectorAll('.trainingSection').forEach(section => {
693
+ section.classList.add('hidden');
694
+ });
695
+ document.getElementById(sectionId + 'Training')?.classList.remove('hidden');
696
+ }
697
 
698
  // Settings modal functionality
699
  document.addEventListener('DOMContentLoaded', function() {
700
+ // Initialize modals
701
+ const settingsModal = document.getElementById('settingsModal');
702
+ if (settingsModal) {
703
+ settingsModal.classList.add('hidden');
704
+ }
705
  const settingsModal = document.getElementById('settingsModal');
706
  const settingsBtn = document.getElementById('settingsBtn');
707
  const closeSettings = document.getElementById('closeSettings');
 
750
  trainingOptions.style.display = this.value === 'training' ? 'block' : 'none';
751
  });
752
 
753
+ const startCallBtn = document.getElementById('startCallBtn');
754
+ if (startCallBtn) {
755
+ startCallBtn.addEventListener('click', async function() {
756
  const loadingIcon = this.querySelector('i');
757
  const originalContent = this.innerHTML;
758
 
 
873
 
874
  // Improved System Test Modal with actual testing
875
  const testBtn = document.getElementById('systemTestBtn');
876
+ if (!testBtn) return;
877
 
878
  testBtn.addEventListener('click', async function() {
879
  try {
 
1483
 
1484
  <!-- System Status Check -->
1485
  <script>
1486
+ const checkSystemBtn = document.getElementById('checkSystemBtn');
1487
+ if (checkSystemBtn) {
1488
+ checkSystemBtn.addEventListener('click', async function() {
1489
  try {
1490
  this.classList.add('bg-yellow-100');
1491
  this.querySelector('i').className = 'fas fa-spinner fa-spin text-yellow-600';
prompts.txt CHANGED
@@ -1,4 +1,5 @@
1
  When I try to call it gives this error. Call failed: Can't find variable: trillionClient
2
  I can’t
3
  I can’t make outgoing calls please fix this and test. Also the orange icon next to settings doesn’t work . Fix that as well. Improve the coding if you need to. Before finishing please test to make sure it all works
4
- Now the settings button won’t work. Can you fix it
 
 
1
  When I try to call it gives this error. Call failed: Can't find variable: trillionClient
2
  I can’t
3
  I can’t make outgoing calls please fix this and test. Also the orange icon next to settings doesn’t work . Fix that as well. Improve the coding if you need to. Before finishing please test to make sure it all works
4
+ Now the settings button won’t work. Can you fix it
5
+ Now buttons aren’t functional. Check code and fix errors . Make everything work properly again