diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2022-10-19 13:57:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 13:57:02 +0300 |
commit | 00d3ded23db7cb8d4906eda923442c70c62908d3 (patch) | |
tree | 5c1b86229b820d7e7c33a3613529e6901a708b7c | |
parent | 59a7bbb69e5ba7bfe7b11dd35c6aaa03cc70382e (diff) | |
parent | 379567b831c46d2b9fe1c19db3039d60437f4dd8 (diff) |
Merge pull request #7116 from nextcloud/fix/hide-important-when-no-important-msg
Hide important section when no important messages
-rw-r--r-- | src/components/EmptyMailboxSection.vue | 2 | ||||
-rw-r--r-- | src/components/MailboxThread.vue | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/components/EmptyMailboxSection.vue b/src/components/EmptyMailboxSection.vue index de8b6d812..74a2b40c4 100644 --- a/src/components/EmptyMailboxSection.vue +++ b/src/components/EmptyMailboxSection.vue @@ -1,6 +1,6 @@ <template> <div id="emptycontent"> - <slot> {{ t('mail', 'Messages marked as important will show up here') }} </slot> + <slot> {{ t('mail', 'No messages') }} </slot> </div> </template> diff --git a/src/components/MailboxThread.vue b/src/components/MailboxThread.vue index 4c72ca59f..9ba94fcf7 100644 --- a/src/components/MailboxThread.vue +++ b/src/components/MailboxThread.vue @@ -21,7 +21,7 @@ :bus="bus" :open-first="mailbox.specialRole !== 'drafts'" /> <template v-else> - <div class="app-content-list-item"> + <div v-show="hasImportantEnvelopes" class="app-content-list-item"> <SectionTitle class="important" :name="t('mail', 'Important')" /> <Popover trigger="hover focus"> <ButtonVue slot="trigger" @@ -37,7 +37,7 @@ </p> </Popover> </div> - <Mailbox + <Mailbox v-show="hasImportantEnvelopes" class="nameimportant" :account="unifiedAccount" :mailbox="unifiedInbox" @@ -47,7 +47,9 @@ :initial-page-size="8" :collapsible="true" :bus="bus" /> - <SectionTitle class="app-content-list-item other" :name="t('mail', 'Other')" /> + <SectionTitle v-show="hasImportantEnvelopes" + class="app-content-list-item other" + :name="t('mail', 'Other')" /> <Mailbox class="nameother" :account="unifiedAccount" @@ -143,6 +145,9 @@ export default { hasEnvelopes() { return this.$store.getters.getEnvelopes(this.mailbox.databaseId, this.searchQuery).length > 0 }, + hasImportantEnvelopes() { + return this.$store.getters.getEnvelopes(this.unifiedInbox.databaseId, this.appendToSearch(priorityImportantQuery)).length > 0 + }, showThread() { return (this.mailbox.isPriorityInbox === true || this.hasEnvelopes) && this.$route.name === 'message' }, @@ -276,6 +281,9 @@ export default { .app-content-list-item:hover { background: transparent; } +.app-content-list-item { + flex: 0; +} .button { background-color: var(--color-main-background); |