Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💻 Reduce achievements time #5605

Merged
merged 7 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions static/js/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,15 +672,15 @@ export async function showAchievements(achievements: Achievement[] | undefined,
$('#achievement_pop_up').removeAttr('reload');
$('#achievement_pop_up').removeAttr('redirect');
location.reload();
}, achievements.length * 6000);
}, achievements.length * 3000);
}
if (redirect) {
$('#achievement_pop_up').attr('redirect', redirect);
setTimeout(function(){
$('#achievement_pop_up').removeAttr('reload');
$('#achievement_pop_up').removeAttr('redirect');
window.location.pathname = redirect;
}, achievements.length * 6000);
}, achievements.length * 3000);
}
}

Expand All @@ -692,11 +692,11 @@ function showAchievement(achievement: Achievement) {
$('#achievement_pop_up').fadeIn(1000, function () {
setTimeout(function(){
$('#achievement_pop_up').fadeOut(1000);
}, 4000);
}, 1000);
});
setTimeout(()=>{
resolve();
;} , 6000
;} , 1000
);
});
}
Expand Down Expand Up @@ -786,6 +786,7 @@ export async function delete_program(id: string, prompt: string) {
// this function decreases the total programs saved
updateProgramCount();
const response = await postJsonWithAchievements('/programs/delete', { id });
console.log(response)
Annelein marked this conversation as resolved.
Show resolved Hide resolved
showAchievements(response.achievement, true, "");
// issue request on the Bar component.
console.log("resp", response)
Expand Down
9 changes: 5 additions & 4 deletions static/js/appbundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -105440,15 +105440,15 @@ def note_with_error(value, err):
$("#achievement_pop_up").removeAttr("reload");
$("#achievement_pop_up").removeAttr("redirect");
location.reload();
}, achievements.length * 6e3);
}, achievements.length * 3e3);
}
if (redirect2) {
$("#achievement_pop_up").attr("redirect", redirect2);
setTimeout(function() {
$("#achievement_pop_up").removeAttr("reload");
$("#achievement_pop_up").removeAttr("redirect");
window.location.pathname = redirect2;
}, achievements.length * 6e3);
}, achievements.length * 3e3);
}
}
function showAchievement(achievement) {
Expand All @@ -105459,12 +105459,12 @@ def note_with_error(value, err):
$("#achievement_pop_up").fadeIn(1e3, function() {
setTimeout(function() {
$("#achievement_pop_up").fadeOut(1e3);
}, 4e3);
}, 1e3);
});
setTimeout(() => {
resolve2();
;
}, 6e3);
}, 1e3);
});
}
function removeBulb() {
Expand Down Expand Up @@ -105535,6 +105535,7 @@ def note_with_error(value, err):
updateSelectOptions("adventure");
updateProgramCount();
const response = await postJsonWithAchievements("/programs/delete", { id: id2 });
console.log(response);
showAchievements(response.achievement, true, "");
console.log("resp", response);
modal.notifySuccess(response.message);
Expand Down
4 changes: 2 additions & 2 deletions static/js/appbundle.js.map

Large diffs are not rendered by default.

Loading