Skip to content

Commit b09616f

Browse files
Merge pull request #13281 from nextcloud/backport/13214/stable5.10
[stable5.10] fix: hide "create task" option when no task calendar is available
2 parents 298fca1 + 67e21a1 commit b09616f

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/components/Envelope.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@
408408
{{ t('mail', 'Reply with meeting') }}
409409
</ActionButton>
410410
<ActionButton
411+
v-if="tasksEnabled"
411412
:close-after-click="true"
412413
@click.prevent="showTaskModal = true">
413414
<template #icon>
@@ -901,6 +902,10 @@ export default {
901902
return this.mainStore.getMailbox(this.account.archiveMailboxId)
902903
},
903904
905+
tasksEnabled() {
906+
return this.mainStore.getTaskCalendarsForCurrentUser.length > 0
907+
},
908+
904909
isSnoozedMailbox() {
905910
return this.mailbox.databaseId === this.account.snoozeMailboxId
906911
},

src/components/MenuEnvelope.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
{{ t('mail', 'Reply with meeting') }}
151151
</ActionButton>
152152
<ActionButton
153+
v-if="tasksEnabled"
153154
:close-after-click="true"
154155
@click.prevent="$emit('open-task-modal')">
155156
<template #icon>
@@ -442,6 +443,10 @@ export default {
442443
return mailboxHasRights(this.mailbox, 'te')
443444
},
444445
446+
tasksEnabled() {
447+
return this.mainStore.getTaskCalendarsForCurrentUser.length > 0
448+
},
449+
445450
isSnoozedMailbox() {
446451
return this.mailbox.databaseId === this.account.snoozeMailboxId
447452
},

0 commit comments

Comments
 (0)