Spaces:
Sleeping
Sleeping
Commit ·
95fe952
1
Parent(s): 5891790
move status messages to live feed and clean up UI
Browse files- templates/index.html +12 -16
templates/index.html
CHANGED
|
@@ -702,11 +702,6 @@
|
|
| 702 |
</div>
|
| 703 |
|
| 704 |
<button type="submit" id="submit-button" class="action-button">Initiate Synthesis</button>
|
| 705 |
-
|
| 706 |
-
<div id="loading-indicator"
|
| 707 |
-
style="display: none; text-align: center; font-size: 0.7rem; color: var(--chlorophyll);">
|
| 708 |
-
<i class="fas fa-spinner fa-spin"></i> PREPARING SEQUENCE...
|
| 709 |
-
</div>
|
| 710 |
</div>
|
| 711 |
|
| 712 |
<div class="glass-panel pulse-feed">
|
|
@@ -758,7 +753,6 @@
|
|
| 758 |
<script>
|
| 759 |
const form = document.getElementById('video-form');
|
| 760 |
const submitButton = document.getElementById('submit-button');
|
| 761 |
-
const loadingIndicator = document.getElementById('loading-indicator');
|
| 762 |
const progressArea = document.getElementById('progress-area');
|
| 763 |
const progressMessage = document.getElementById('progress-message');
|
| 764 |
const thinkingHeader = document.getElementById('thinking-header');
|
|
@@ -851,9 +845,11 @@
|
|
| 851 |
return;
|
| 852 |
}
|
| 853 |
|
| 854 |
-
loadingIndicator.style.display = 'block';
|
| 855 |
submitButton.disabled = true;
|
| 856 |
-
submitButton.textContent = 'Synthesis
|
|
|
|
|
|
|
|
|
|
| 857 |
|
| 858 |
const formData = new FormData(form);
|
| 859 |
try {
|
|
@@ -861,7 +857,8 @@
|
|
| 861 |
const result = await res.json();
|
| 862 |
if (result.status === 'processing_started') {
|
| 863 |
currentRequestId = result.request_id;
|
| 864 |
-
thinkingHeader.innerHTML = "> Handshake established.
|
|
|
|
| 865 |
progressArea.style.display = 'block';
|
| 866 |
if (progressInterval) clearInterval(progressInterval);
|
| 867 |
progressInterval = setInterval(pollProgress, POLLING_INTERVAL);
|
|
@@ -869,8 +866,8 @@
|
|
| 869 |
throw new Error(result.message);
|
| 870 |
}
|
| 871 |
} catch (err) {
|
| 872 |
-
|
| 873 |
-
|
| 874 |
submitButton.disabled = false;
|
| 875 |
submitButton.textContent = 'Initiate Synthesis';
|
| 876 |
}
|
|
@@ -914,7 +911,6 @@
|
|
| 914 |
}
|
| 915 |
|
| 916 |
function completeHub(result) {
|
| 917 |
-
loadingIndicator.style.display = 'none';
|
| 918 |
submitButton.disabled = false;
|
| 919 |
submitButton.textContent = 'Initiate Synthesis';
|
| 920 |
|
|
@@ -998,7 +994,7 @@
|
|
| 998 |
instructionOnedrive.style.display = 'none';
|
| 999 |
btnOnedrive.style.display = 'none';
|
| 1000 |
statusOnedrive.style.display = 'block';
|
| 1001 |
-
statusOnedrive.innerHTML = '<i class="fab fa-
|
| 1002 |
statusOnedrive.style.fontSize = '0.9rem';
|
| 1003 |
projectSelectionOnedrive.style.display = 'block';
|
| 1004 |
fetchOneDriveProjects(sData.access_token);
|
|
@@ -1007,7 +1003,7 @@
|
|
| 1007 |
}
|
| 1008 |
} catch (err) {
|
| 1009 |
btnOnedrive.disabled = false;
|
| 1010 |
-
btnOnedrive.innerHTML = '<i class="fab fa-
|
| 1011 |
}
|
| 1012 |
});
|
| 1013 |
|
|
@@ -1035,7 +1031,7 @@
|
|
| 1035 |
function resetOneDriveLogin() {
|
| 1036 |
eraseCookie('velocity_onedrive_token');
|
| 1037 |
btnOnedrive.style.display = 'block';
|
| 1038 |
-
btnOnedrive.innerHTML = '<i class="fab fa-
|
| 1039 |
btnOnedrive.disabled = false;
|
| 1040 |
statusOnedrive.style.display = 'none';
|
| 1041 |
projectSelectionOnedrive.style.display = 'none';
|
|
@@ -1051,7 +1047,7 @@
|
|
| 1051 |
document.getElementById('onedrive_access_token').value = cachedToken;
|
| 1052 |
projectSelectionOnedrive.style.display = 'block';
|
| 1053 |
fetchOneDriveProjects(cachedToken).then(() => {
|
| 1054 |
-
statusOnedrive.innerHTML = '<i class="fab fa-
|
| 1055 |
statusOnedrive.style.fontSize = '0.9rem';
|
| 1056 |
});
|
| 1057 |
}
|
|
|
|
| 702 |
</div>
|
| 703 |
|
| 704 |
<button type="submit" id="submit-button" class="action-button">Initiate Synthesis</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 705 |
</div>
|
| 706 |
|
| 707 |
<div class="glass-panel pulse-feed">
|
|
|
|
| 753 |
<script>
|
| 754 |
const form = document.getElementById('video-form');
|
| 755 |
const submitButton = document.getElementById('submit-button');
|
|
|
|
| 756 |
const progressArea = document.getElementById('progress-area');
|
| 757 |
const progressMessage = document.getElementById('progress-message');
|
| 758 |
const thinkingHeader = document.getElementById('thinking-header');
|
|
|
|
| 845 |
return;
|
| 846 |
}
|
| 847 |
|
|
|
|
| 848 |
submitButton.disabled = true;
|
| 849 |
+
submitButton.textContent = 'Synthesis Active';
|
| 850 |
+
|
| 851 |
+
thinkingHeader.innerHTML = "> PREPARING SEQUENCE...<br>> INITIATING HANDSHAKE...";
|
| 852 |
+
thinkingHeader.scrollTop = thinkingHeader.scrollHeight;
|
| 853 |
|
| 854 |
const formData = new FormData(form);
|
| 855 |
try {
|
|
|
|
| 857 |
const result = await res.json();
|
| 858 |
if (result.status === 'processing_started') {
|
| 859 |
currentRequestId = result.request_id;
|
| 860 |
+
thinkingHeader.innerHTML += "<br>> Handshake established.<br>> Core systems active.";
|
| 861 |
+
thinkingHeader.scrollTop = thinkingHeader.scrollHeight;
|
| 862 |
progressArea.style.display = 'block';
|
| 863 |
if (progressInterval) clearInterval(progressInterval);
|
| 864 |
progressInterval = setInterval(pollProgress, POLLING_INTERVAL);
|
|
|
|
| 866 |
throw new Error(result.message);
|
| 867 |
}
|
| 868 |
} catch (err) {
|
| 869 |
+
thinkingHeader.innerHTML += `<br>><span style="color: var(--error-color);"> SYNTHESIS FAILED: ${err.message}</span>`;
|
| 870 |
+
thinkingHeader.scrollTop = thinkingHeader.scrollHeight;
|
| 871 |
submitButton.disabled = false;
|
| 872 |
submitButton.textContent = 'Initiate Synthesis';
|
| 873 |
}
|
|
|
|
| 911 |
}
|
| 912 |
|
| 913 |
function completeHub(result) {
|
|
|
|
| 914 |
submitButton.disabled = false;
|
| 915 |
submitButton.textContent = 'Initiate Synthesis';
|
| 916 |
|
|
|
|
| 994 |
instructionOnedrive.style.display = 'none';
|
| 995 |
btnOnedrive.style.display = 'none';
|
| 996 |
statusOnedrive.style.display = 'block';
|
| 997 |
+
statusOnedrive.innerHTML = '<i class="fab fa-windows"></i> Linked to OneDrive';
|
| 998 |
statusOnedrive.style.fontSize = '0.9rem';
|
| 999 |
projectSelectionOnedrive.style.display = 'block';
|
| 1000 |
fetchOneDriveProjects(sData.access_token);
|
|
|
|
| 1003 |
}
|
| 1004 |
} catch (err) {
|
| 1005 |
btnOnedrive.disabled = false;
|
| 1006 |
+
btnOnedrive.innerHTML = '<i class="fab fa-windows"></i> Retry Link';
|
| 1007 |
}
|
| 1008 |
});
|
| 1009 |
|
|
|
|
| 1031 |
function resetOneDriveLogin() {
|
| 1032 |
eraseCookie('velocity_onedrive_token');
|
| 1033 |
btnOnedrive.style.display = 'block';
|
| 1034 |
+
btnOnedrive.innerHTML = '<i class="fab fa-windows"></i> Connect OneDrive';
|
| 1035 |
btnOnedrive.disabled = false;
|
| 1036 |
statusOnedrive.style.display = 'none';
|
| 1037 |
projectSelectionOnedrive.style.display = 'none';
|
|
|
|
| 1047 |
document.getElementById('onedrive_access_token').value = cachedToken;
|
| 1048 |
projectSelectionOnedrive.style.display = 'block';
|
| 1049 |
fetchOneDriveProjects(cachedToken).then(() => {
|
| 1050 |
+
statusOnedrive.innerHTML = '<i class="fab fa-windows"></i> Linked to OneDrive';
|
| 1051 |
statusOnedrive.style.fontSize = '0.9rem';
|
| 1052 |
});
|
| 1053 |
}
|