feat: add option to configure overdue reminders email time

This commit is contained in:
kolaente 2022-06-16 16:52:25 +02:00
parent 1ebd21ccb0
commit 31c49aed4b
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 20 additions and 8 deletions

View file

@ -77,7 +77,7 @@
"newName": "The new Name", "newName": "The new Name",
"savedSuccess": "The settings were successfully updated.", "savedSuccess": "The settings were successfully updated.",
"emailReminders": "Send me reminders for tasks via Email", "emailReminders": "Send me reminders for tasks via Email",
"overdueReminders": "Send me reminders for overdue undone tasks via email each morning", "overdueReminders": "Send me reminders for overdue undone tasks via email",
"discoverableByName": "Let other users find me when they search for my name", "discoverableByName": "Let other users find me when they search for my name",
"discoverableByEmail": "Let other users find me when they search for my full email", "discoverableByEmail": "Let other users find me when they search for my full email",
"playSoundWhenDone": "Play a sound when marking tasks as done", "playSoundWhenDone": "Play a sound when marking tasks as done",
@ -86,7 +86,8 @@
"weekStartMonday": "Monday", "weekStartMonday": "Monday",
"language": "Language", "language": "Language",
"defaultList": "Default List", "defaultList": "Default List",
"timezone": "Time Zone" "timezone": "Time Zone",
"overdueTasksRemindersTime": "Overdue tasks reminder email time"
}, },
"totp": { "totp": {
"title": "Two Factor Authentication", "title": "Two Factor Authentication",

View file

@ -20,14 +20,27 @@
</div> </div>
<div class="field"> <div class="field">
<label class="checkbox"> <label class="checkbox">
<input type="checkbox" v-model="settings.emailRemindersEnabled"/> <input type="checkbox" v-model="settings.overdueTasksRemindersEnabled"/>
{{ $t('user.settings.general.emailReminders') }} {{ $t('user.settings.general.overdueReminders') }}
</label> </label>
</div> </div>
<div class="field" v-if="settings.overdueTasksRemindersEnabled">
<label class="label" for="overdueTasksReminderTime">
{{ $t('user.settings.general.overdueTasksRemindersTime') }}
</label>
<div class="control">
<input
@keyup.enter="updateSettings"
class="input"
id="overdueTasksReminderTime"
type="time"
v-model="settings.overdueTasksRemindersTime"/>
</div>
</div>
<div class="field"> <div class="field">
<label class="checkbox"> <label class="checkbox">
<input type="checkbox" v-model="settings.overdueTasksRemindersEnabled"/> <input type="checkbox" v-model="settings.emailRemindersEnabled"/>
{{ $t('user.settings.general.overdueReminders') }} {{ $t('user.settings.general.emailReminders') }}
</label> </label>
</div> </div>
<div class="field"> <div class="field">
@ -206,7 +219,6 @@ function getPlaySoundWhenDoneSetting() {
return localStorage.getItem(playSoundWhenDoneKey) === 'true' || localStorage.getItem(playSoundWhenDoneKey) === null return localStorage.getItem(playSoundWhenDoneKey) === 'true' || localStorage.getItem(playSoundWhenDoneKey) === null
} }
const playSoundWhenDone = ref(getPlaySoundWhenDoneSetting()) const playSoundWhenDone = ref(getPlaySoundWhenDoneSetting())
const quickAddMagicMode = ref(getQuickAddMagicMode()) const quickAddMagicMode = ref(getQuickAddMagicMode())
@ -219,7 +231,6 @@ const availableLanguageOptions = ref(
.sort((a, b) => a.title.localeCompare(b.title)), .sort((a, b) => a.title.localeCompare(b.title)),
) )
const defaultList = computed({ const defaultList = computed({
get: () => store.getters['lists/getListById'](settings.defaultListId), get: () => store.getters['lists/getListById'](settings.defaultListId),
set(l) { set(l) {