Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/components/Thread.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
ref="envelopeRefs"
:key="env.databaseId"
:envelope="env"
:mailbox-id="$route.params.mailboxId"
:thread-subject="threadSubject"
:expanded="expandedThreads.includes(env.databaseId)"
:full-height="thread.length === 1"
Expand Down
34 changes: 22 additions & 12 deletions src/components/ThreadEnvelope.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@
@keydown.space.prevent="$emit('toggle-expand', $event)">
<div class="envelope__header__left__sender-subject-tags">
<div class="sender" :class="{ 'sender--expanded': expanded }">
<NcChip
:title="mailboxName(mailbox)"
variant="tertiary"
no-close="true">
<MailboxIcon
:account="account"
:mailbox="mailbox" />
</NcChip>

{{ envelope.from && envelope.from[0] ? envelope.from[0].label : '' }}
</div>
<NcButton
Expand Down Expand Up @@ -393,6 +402,7 @@ import { NcActionButton, NcButton } from '@nextcloud/vue'
import { mapStores } from 'pinia'
import NcActions from '@nextcloud/vue/components/NcActions'
import NcActionText from '@nextcloud/vue/components/NcActionText'
import NcChip from '@nextcloud/vue/components/NcChip'
import ArchiveIcon from 'vue-material-design-icons/ArchiveArrowDownOutline.vue'
import ChevronDownIcon from 'vue-material-design-icons/ChevronDown.vue'
import ChevronUpIcon from 'vue-material-design-icons/ChevronUp.vue'
Expand All @@ -411,6 +421,7 @@ import ConfirmModal from './ConfirmationModal.vue'
import Error from './Error.vue'
import EventModal from './EventModal.vue'
import JunkIcon from './icons/JunkIcon.vue'
import MailboxIcon from './icons/MailboxIcon.vue'
import MailFilterFromEnvelope from './mailFilter/MailFilterFromEnvelope.vue'
import MenuEnvelope from './MenuEnvelope.vue'
import Message from './Message.vue'
Expand All @@ -426,6 +437,7 @@ import importantSvg from '../../img/important.svg'
import { isPgpText } from '../crypto/pgp.js'
import { matchError } from '../errors/match.js'
import NoTrashMailboxConfiguredError from '../errors/NoTrashMailboxConfiguredError.js'
import { translate as translateMailboxName } from '../i18n/MailboxTranslator.js'
import logger from '../logger.js'
import { buildRecipients as buildReplyRecipients } from '../ReplyBuilder.js'
import { smartReply } from '../service/AiIntergrationsService.js'
Expand Down Expand Up @@ -459,8 +471,10 @@ export default {
RecipientBubble,
NcActionButton,
NcButton,
NcChip,
Error,
IconFavorite,
MailboxIcon,
JunkIcon,
MessageLoadingSkeleton,
MenuEnvelope,
Expand Down Expand Up @@ -489,16 +503,6 @@ export default {
type: Object,
},

mailboxId: {
required: false,
type: [
String,
Number,
],

default: undefined,
},

expanded: {
required: false,
type: Boolean,
Expand Down Expand Up @@ -702,7 +706,7 @@ export default {
},

mailbox() {
return this.mainStore.getMailbox(this.mailboxId)
return this.mainStore.getMailbox(this.envelope.mailboxId)
},

archiveMailbox() {
Expand Down Expand Up @@ -1071,6 +1075,10 @@ export default {
})
},

mailboxName() {
return translateMailboxName(this.mailbox)
},

async unsubscribeViaOneClick() {
try {
this.unsubscribing = true
Expand Down Expand Up @@ -1213,7 +1221,9 @@ export default {

<style lang="scss" scoped>
.sender {
display: flex;
margin-inline-start: calc(var(--default-grid-baseline) * 3);
gap: var(--default-grid-baseline);

&--expanded {
color: var(--color-text-maxcontrast);
Expand Down Expand Up @@ -1410,7 +1420,7 @@ export default {
}

.subline {
margin-inline-start: 8px;
margin-inline-start: calc(var(--default-grid-baseline) * 3);
color: var(--color-text-maxcontrast);
cursor: default;
overflow: hidden;
Expand Down
Loading