Allow empty local part for alias definition

This commit is contained in:
Antoine Nguyen
2025-07-02 13:58:18 +02:00
parent a8e73c366f
commit 195a8473a2
2 changed files with 11 additions and 15 deletions
+10 -14
View File
@@ -14,27 +14,23 @@
@mouseleave="setHover(mailbox, false)"
>
<v-icon :icon="iconByMailboxType[mailbox.type]" class="mr-4" />
<template
v-if="
props.unseenCounters &&
mailbox.unseen > 0 &&
currentMailboxUnseen > 0
"
>
<span
v-if="mailbox.name === route.query.mailbox"
class="font-weight-bold"
>
<template v-if="mailbox.name === route.query.mailbox">
<span v-if="currentMailboxUnseen > 0" class="font-weight-bold">
{{ getMailboxLabel(mailbox) }} ({{
getCurrentMailboxUnseen(mailbox)
}})
</span>
<span v-else class="font-weight-bold">
{{ getMailboxLabel(mailbox) }} ({{ mailbox.unseen }})
<span v-else>
{{ getMailboxLabel(mailbox) }}
</span>
</template>
<template v-else>
{{ getMailboxLabel(mailbox) }}
<span v-if="mailbox.unseen > 0" class="font-weight-bold">
{{ getMailboxLabel(mailbox) }} ({{ mailbox.unseen }})
</span>
<span v-else>
{{ getMailboxLabel(mailbox) }}
</span>
</template>
<v-spacer />
<v-btn
+1 -1
View File
@@ -467,7 +467,7 @@ class WritableAccountSerializer(v1_serializers.WritableAccountSerializer):
"""Add support for aliases and sender addresses."""
aliases = serializers.ListField(
child=lib_fields.DRFEmailFieldUTF8(), required=False
child=lib_fields.DRFEmailFieldUTF8AndEmptyUser(), required=False
)
mailbox = MailboxSerializer(required=False)