Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjulia.kirschenheuter <julia.kirschenheuter@nextcloud.com>2022-05-05 11:05:32 +0300
committerjulia.kirschenheuter <julia.kirschenheuter@nextcloud.com>2022-05-05 11:05:32 +0300
commit6d655a0d905bbd71fbabae0d7f665d591ea300fe (patch)
treea23457c0a48c1b99a3aec763151ec8061d23554c /src
parent01e352e851dc4aebc04c170a88ebcb61fe8ccce2 (diff)
Show account color indicator only if several accounts are present
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Diffstat (limited to 'src')
-rw-r--r--src/components/Envelope.vue8
-rw-r--r--src/components/EnvelopeList.vue5
2 files changed, 11 insertions, 2 deletions
diff --git a/src/components/Envelope.vue b/src/components/Envelope.vue
index bd661da57..8604c73fc 100644
--- a/src/components/Envelope.vue
+++ b/src/components/Envelope.vue
@@ -16,7 +16,7 @@
@click="onClick">
<template #icon>
<div
- v-if="mailbox.isUnified"
+ v-if="mailbox.isUnified && hasMultipleAccounts"
class="mail-message-account-color"
:style="{'background-color': accountColor}" />
<div
@@ -145,7 +145,7 @@
</template>
<template #extra>
<div
- v-if="mailbox.isUnified"
+ v-if="mailbox.isUnified && hasMultipleAccounts"
class="mail-message-account-color"
:style="{'background-color': accountColor}" />
<div v-for="tag in tags"
@@ -236,6 +236,10 @@ export default {
required: false,
default: () => [],
},
+ hasMultipleAccounts: {
+ type: Boolean,
+ default: false,
+ },
},
data() {
return {
diff --git a/src/components/EnvelopeList.vue b/src/components/EnvelopeList.vue
index 1c021506e..0faf40455 100644
--- a/src/components/EnvelopeList.vue
+++ b/src/components/EnvelopeList.vue
@@ -161,6 +161,7 @@
:mailbox="mailbox"
:selected="selection.includes(env.databaseId)"
:select-mode="selectMode"
+ :has-multiple-accounts="hasMultipleAccounts"
:selected-envelopes="selectedEnvelopes"
@delete="$emit('delete', env.databaseId)"
@update:selected="onEnvelopeSelectToggle(env, index, ...$event)"
@@ -272,6 +273,10 @@ export default {
selectedEnvelopes() {
return this.envelopes.filter((env) => this.selection.includes(env.databaseId))
},
+ hasMultipleAccounts() {
+ const mailboxIds = this.envelopes.map(envelope => envelope.mailboxId)
+ return Array.from(new Set(mailboxIds)).length > 1
+ },
},
watch: {
envelopes(newVal, oldVal) {