This commit is contained in:
Suvodip
2024-10-02 21:19:54 +05:30
parent b8994802cb
commit 2e342cd642
19 changed files with 1061 additions and 78 deletions

View File

@@ -96,8 +96,8 @@ function submitUserData(drawingZone) {
starValue = 3;
}
let maxStarValue = 5;
let progress = 0;
let feedbackMessage; starValue === 5 ? feedbackMessage = `Fantastic! You earned ${starValue} stars! <br> Keep up the amazing work you're a superstar!` : starValue === 4 ? feedbackMessage = `Great job! ${starValue} stars you're so close to <br> perfection! ` : starValue === 3 ? feedbackMessage = `Well done! ${starValue} stars for your effort! <br> Keep pushing, youve got this!` : '';
function progressIncrement() {
const interval = setInterval(() => {
@@ -201,14 +201,14 @@ function submitUserData(drawingZone) {
body: JSON.stringify(userData)
})
.then(response => {
setTimeout(() => {
setTimeout(() => {
if (response.ok) {
if (response.status == 200) {
loadingMainContainer.style.display = 'none';
loadingDiv.style.display = 'none';
starContainer.style.display = 'flex';
starContainer.style.flexDirection = 'row';
document.getElementById('countStar').innerHTML = starValue;
document.getElementById('starFeedbackMessage').innerHTML = feedbackMessage;
for (let i = 0; i < starValue; i++) {
const starDiv = document.createElement('div');
starDiv.innerHTML = starSVG;