Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep open attachments section #1489

Closed

Conversation

theronakpatel
Copy link

No description provided.

@the-djmaze
Copy link
Owner

the-djmaze commented Mar 12, 2024

Why?
If i closed it, maybe i want to keep it closed until i open it again?

Note: this PR keeps the checkboxes and "Download as zip" open. It does not control the triangle.
afbeelding

@the-djmaze
Copy link
Owner

the-djmaze commented Mar 12, 2024

You could write a plugin for what you want.
Some JavaScript to modify MailMessageView will be sufficient.

const dom = document.getElementById('MailMessageView').content;
const ds = dom.querySelector('.attachmentsPlace').dataset;
ds.bind = ds.bind.replace('showAttachmentControls', 'true');
dom.querySelector('.attachmentsControls').dataset.bind = '';

For more info investigate https://github.com/the-djmaze/snappymail/tree/master/plugins

@the-djmaze the-djmaze closed this Mar 12, 2024
@akhil1508
Copy link

@the-djmaze

For me, it makes sense to allow admins to set sensible defaults for this option. I would like to have them always open (like in Gmail or Outlook) for my users.

Could it be a config option instead? Something like always_expand_attachments with options on and off where off will follow the user preference.

@the-djmaze
Copy link
Owner

the-djmaze commented Mar 14, 2024

What about "allow users to show/hide attachment controls"?

A plugin will do that 😉

the-djmaze pushed a commit that referenced this pull request Mar 15, 2024
@the-djmaze the-djmaze added documentation Improvements or additions to documentation extensions (plugin) labels Mar 15, 2024
@akhil1508
Copy link

What about "allow users to show/hide attachment controls"?

@the-djmaze Thanks a lot for the plugin code. Will try to modify it as a setting soon.

the-djmaze pushed a commit that referenced this pull request Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation extensions (plugin)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants