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",
"savedSuccess": "The settings were successfully updated.",
"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",
"discoverableByEmail": "Let other users find me when they search for my full email",
"playSoundWhenDone": "Play a sound when marking tasks as done",
@ -86,7 +86,8 @@
"weekStartMonday": "Monday",
"language": "Language",
"defaultList": "Default List",
"timezone": "Time Zone"
"timezone": "Time Zone",
"overdueTasksRemindersTime": "Overdue tasks reminder email time"
},
"totp": {
"title": "Two Factor Authentication",

View file

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