Skip to content
Draft
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions src/components/Composer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1539,11 +1539,16 @@
},

async onSend() {

if (this.selectTo.length === 0) {
showWarning(t('mail', 'The email has no visible ‘To’ recipients. Some mail providers may reject this message.'))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type of warning discussed in #13094 is a conditionally rendered text underneath the recipient input.

It would be something like the helper text of NcTextField https://nextcloud-vue-components.netlify.app/#/Components/NcFields?id=nctextfield but for the NcSelect component. NcSelect might not have this feature at the moment.

@steven-mpawulo steven-mpawulo Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. I initially thought you meant displaying an actual warning toast.
For this case, would it be okay to use a simple <p> element below the NcSelect as helper text and style it accordingly, since NcSelect doesn't seem to support helper text like NcTextField does at the moment.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sounds good as workaround.

I've created nextcloud-libraries/nextcloud-vue#8669 to track the missing feature. If we add this later we can switch.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome.
Let me update

}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happens too late. The warning text should be shown every time there are no direct recipients.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also considered this but initially ignored it. I’ll update it now.


if (this.encrypt) {
logger.debug('get encrypted message from mailvelope')
await this.$refs.mailvelopeEditor.pull()
}

Check failure on line 1551 in src/components/Composer.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Block must not be padded by blank lines
this.$emit('send', {
...this.getMessageData(),
force: false,
Expand Down
Loading