Still not working . I click start call and nothing happened I click the settings icon nothing happens. Fix errors and make everything open as it should be. Try each button yourself . Recode if you need to. - Follow Up Deployment
Browse files- index.html +87 -32
- prompts.txt +2 -1
index.html
CHANGED
|
@@ -671,22 +671,15 @@ You: Your order will ship within 24 hours and typically arrives in 2-3 business
|
|
| 671 |
});
|
| 672 |
|
| 673 |
// Training modal
|
| 674 |
-
|
| 675 |
-
|
| 676 |
-
|
| 677 |
-
|
| 678 |
-
|
| 679 |
-
|
| 680 |
-
|
| 681 |
-
|
| 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 => {
|
|
@@ -702,16 +695,12 @@ You: Your order will ship within 24 hours and typically arrives in 2-3 business
|
|
| 702 |
if (settingsModal) {
|
| 703 |
settingsModal.classList.add('hidden');
|
| 704 |
}
|
| 705 |
-
|
| 706 |
-
|
| 707 |
-
const closeSettings = document.getElementById('closeSettings');
|
| 708 |
-
|
| 709 |
-
settingsBtn.addEventListener('click', () => {
|
| 710 |
-
settingsModal.classList.remove('hidden');
|
| 711 |
});
|
| 712 |
-
|
| 713 |
-
closeSettings.addEventListener('click', () => {
|
| 714 |
-
settingsModal.classList.add('hidden');
|
| 715 |
});
|
| 716 |
|
| 717 |
// Close when clicking outside modal
|
|
@@ -750,9 +739,47 @@ You: Your order will ship within 24 hours and typically arrives in 2-3 business
|
|
| 750 |
trainingOptions.style.display = this.value === 'training' ? 'block' : 'none';
|
| 751 |
});
|
| 752 |
|
| 753 |
-
|
| 754 |
-
|
| 755 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 756 |
const loadingIcon = this.querySelector('i');
|
| 757 |
const originalContent = this.innerHTML;
|
| 758 |
|
|
@@ -1041,6 +1068,31 @@ Or contact support at help@trillion.ventures`);
|
|
| 1041 |
|
| 1042 |
// Call interface simulation
|
| 1043 |
function showCallInterface(number, isTraining, trainingMode) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1044 |
const callModal = document.createElement('div');
|
| 1045 |
callModal.className = 'fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50';
|
| 1046 |
callModal.innerHTML = `
|
|
@@ -1136,11 +1188,14 @@ Or contact support at help@trillion.ventures`);
|
|
| 1136 |
|
| 1137 |
// Close modals when clicking outside
|
| 1138 |
window.addEventListener('click', (event) => {
|
| 1139 |
-
if (event.target === trainingModal) {
|
| 1140 |
-
trainingModal.classList.add('hidden');
|
| 1141 |
}
|
| 1142 |
-
if (event.target === settingsModal) {
|
| 1143 |
-
settingsModal.classList.add('hidden');
|
|
|
|
|
|
|
|
|
|
| 1144 |
}
|
| 1145 |
});
|
| 1146 |
});
|
|
|
|
| 671 |
});
|
| 672 |
|
| 673 |
// Training modal
|
| 674 |
+
// Training modal functionality
|
| 675 |
+
document.getElementById('trainAIbtn').addEventListener('click', () => {
|
| 676 |
+
document.getElementById('trainingModal').classList.remove('hidden');
|
| 677 |
+
showTrainingSection('qa'); // Default to Q&A section
|
| 678 |
+
});
|
| 679 |
+
|
| 680 |
+
document.getElementById('closeTraining').addEventListener('click', () => {
|
| 681 |
+
document.getElementById('trainingModal').classList.add('hidden');
|
| 682 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 683 |
|
| 684 |
function showTrainingSection(sectionId) {
|
| 685 |
document.querySelectorAll('.trainingSection').forEach(section => {
|
|
|
|
| 695 |
if (settingsModal) {
|
| 696 |
settingsModal.classList.add('hidden');
|
| 697 |
}
|
| 698 |
+
document.getElementById('settingsBtn').addEventListener('click', () => {
|
| 699 |
+
document.getElementById('settingsModal').classList.remove('hidden');
|
|
|
|
|
|
|
|
|
|
|
|
|
| 700 |
});
|
| 701 |
+
|
| 702 |
+
document.getElementById('closeSettings').addEventListener('click', () => {
|
| 703 |
+
document.getElementById('settingsModal').classList.add('hidden');
|
| 704 |
});
|
| 705 |
|
| 706 |
// Close when clicking outside modal
|
|
|
|
| 739 |
trainingOptions.style.display = this.value === 'training' ? 'block' : 'none';
|
| 740 |
});
|
| 741 |
|
| 742 |
+
document.getElementById('startCallBtn').addEventListener('click', async function() {
|
| 743 |
+
const number = document.getElementById('callNumber').value.trim();
|
| 744 |
+
const isTraining = document.getElementById('callPurpose').value === 'training';
|
| 745 |
+
const trainingMode = isTraining ? document.getElementById('callTrainingMode').value : null;
|
| 746 |
+
|
| 747 |
+
// Show calling interface immediately for user feedback
|
| 748 |
+
showCallInterface(number, isTraining, trainingMode);
|
| 749 |
+
|
| 750 |
+
try {
|
| 751 |
+
// Disable button during call initiation
|
| 752 |
+
this.disabled = true;
|
| 753 |
+
const originalHTML = this.innerHTML;
|
| 754 |
+
this.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Calling...';
|
| 755 |
+
|
| 756 |
+
// Initialize Jitsi if needed
|
| 757 |
+
if (!jitsiApi) {
|
| 758 |
+
await initializeJitsiClient();
|
| 759 |
+
}
|
| 760 |
+
|
| 761 |
+
// Make the call - this is simulated in the demo
|
| 762 |
+
const call = await makeOutgoingCall(number, {
|
| 763 |
+
isTraining,
|
| 764 |
+
trainingMode,
|
| 765 |
+
enableTraining: isTraining ? document.getElementById('enableCallTraining').checked : false
|
| 766 |
+
});
|
| 767 |
+
|
| 768 |
+
// Update UI for active call
|
| 769 |
+
document.getElementById('callStatus').textContent = `Calling ${number}`;
|
| 770 |
+
updateCallStats();
|
| 771 |
+
|
| 772 |
+
} catch (error) {
|
| 773 |
+
console.error('Call error:', error);
|
| 774 |
+
alert(`Call failed: ${error.message}`);
|
| 775 |
+
|
| 776 |
+
// Clean up if call failed
|
| 777 |
+
endCurrentCall();
|
| 778 |
+
} finally {
|
| 779 |
+
// Reset button state
|
| 780 |
+
this.disabled = false;
|
| 781 |
+
this.innerHTML = originalHTML;
|
| 782 |
+
}
|
| 783 |
const loadingIcon = this.querySelector('i');
|
| 784 |
const originalContent = this.innerHTML;
|
| 785 |
|
|
|
|
| 1068 |
|
| 1069 |
// Call interface simulation
|
| 1070 |
function showCallInterface(number, isTraining, trainingMode) {
|
| 1071 |
+
// Create a simple call interface
|
| 1072 |
+
const callContainer = document.createElement('div');
|
| 1073 |
+
callContainer.className = 'fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50';
|
| 1074 |
+
callContainer.innerHTML = `
|
| 1075 |
+
<div class="bg-white rounded-lg p-6 w-80 text-center">
|
| 1076 |
+
<div class="call-animation mx-auto mb-4"></div>
|
| 1077 |
+
<h3 class="text-xl font-bold mb-1">Calling ${number}</h3>
|
| 1078 |
+
<p class="text-gray-500 mb-4">${isTraining ? 'AI Training Call' : 'Outgoing Call'}</p>
|
| 1079 |
+
|
| 1080 |
+
<div class="flex justify-center space-x-4">
|
| 1081 |
+
<button class="end-call-btn bg-red-500 hover:bg-red-600 text-white p-3 rounded-full">
|
| 1082 |
+
<i class="fas fa-phone-slash"></i>
|
| 1083 |
+
</button>
|
| 1084 |
+
</div>
|
| 1085 |
+
</div>
|
| 1086 |
+
`;
|
| 1087 |
+
|
| 1088 |
+
document.body.appendChild(callContainer);
|
| 1089 |
+
|
| 1090 |
+
// End call button functionality
|
| 1091 |
+
callContainer.querySelector('.end-call-btn').addEventListener('click', () => {
|
| 1092 |
+
endCurrentCall();
|
| 1093 |
+
callContainer.remove();
|
| 1094 |
+
alert('Call ended successfully');
|
| 1095 |
+
});
|
| 1096 |
const callModal = document.createElement('div');
|
| 1097 |
callModal.className = 'fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50';
|
| 1098 |
callModal.innerHTML = `
|
|
|
|
| 1188 |
|
| 1189 |
// Close modals when clicking outside
|
| 1190 |
window.addEventListener('click', (event) => {
|
| 1191 |
+
if (event.target === document.getElementById('trainingModal')) {
|
| 1192 |
+
document.getElementById('trainingModal').classList.add('hidden');
|
| 1193 |
}
|
| 1194 |
+
if (event.target === document.getElementById('settingsModal')) {
|
| 1195 |
+
document.getElementById('settingsModal').classList.add('hidden');
|
| 1196 |
+
}
|
| 1197 |
+
if (event.target === document.getElementById('setupHelpModal')) {
|
| 1198 |
+
document.getElementById('setupHelpModal').classList.add('hidden');
|
| 1199 |
}
|
| 1200 |
});
|
| 1201 |
});
|
prompts.txt
CHANGED
|
@@ -2,4 +2,5 @@ When I try to call it gives this error. Call failed: Can't find variable: trilli
|
|
| 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
|
|
|
|
|
|
| 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
|
| 6 |
+
Still not working . I click start call and nothing happened I click the settings icon nothing happens. Fix errors and make everything open as it should be. Try each button yourself . Recode if you need to.
|