Skip to content
Snippets Groups Projects
Commit 16a3e39f authored by lowercasedonkey's avatar lowercasedonkey
Browse files

Allow "ok" to force endweek.

parent 7561eb57
No related branches found
No related tags found
No related merge requests found
......@@ -305,9 +305,10 @@ globalThis.endWeek = (function() {
function confirmEndWeek() {
const expiredReminders = V.reminders.filter(r => r.week <= V.week);
if (expiredReminders.length > 0) {
confirm(`These reminders are due: ${toSentence(Array.from(expiredReminders, r => r.message))}`);
} else if (!V.sideBarOptions.confirmWeekEnd || confirm("Are you sure you want to end the week?")) {
if (
(!V.sideBarOptions.confirmWeekEnd || confirm("Are you sure you want to end the week?")) &&
(expiredReminders.length === 0 || confirm(`These reminders are due: ${toSentence(Array.from(expiredReminders, r => r.message))}. End the week anyway?`))
) {
App.UI.EndWeekAnim.start();
setTimeout(doEndWeek, 0); // execute immediately, but after the event loop runs, so the loading screen gets shown
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment