Commit Graph

2304 Commits

Author SHA1 Message Date
Manos Pitsidianakis
e9dd6becc3
.gitea/PULL_REQUEST_TEMPLATE.md: comment out content
I suspect this is annoying to see when opening a PR for everyone and not
just me, so I comment it out by default.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-06-02 15:15:34 +03:00
Manos Pitsidianakis
6be25ac3df
melib/jmap: don't use client field for get/posts
HTTP Requests should go through the get_async()/post_async() methods of
JmapConnection, which traces requests if optional feature `jmap-trace`
is enabled.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-06-02 15:15:34 +03:00
Manos Pitsidianakis
33999fc6ab
melib/jmap: re-add Submission to USING
Submission capability is necessary for Identity retrievals.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-06-02 15:15:34 +03:00
Manos Pitsidianakis
45bfcf8707
melib/email/headers/standards.rs: minor refactors
Refactor the standards! macro to remove unnecessary repetitions, and
also add RFC2183 as source for the Content-Disposition header.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-06-02 12:17:56 +03:00
Manos Pitsidianakis
3bab5324c4
melib/email: Improve Debug impl for ContentType etc
Improve Debug impl for ContentType, Text, ContentTransferEncoding which
all include bytes in some of their variants. The derived Debug
implementation did not show them as readable ascii strings, so a custom
impl was necessary to make it readable.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-06-02 12:15:33 +03:00
Manos Pitsidianakis
2bfe608678
view.rs: hide self from "add contacts" options
Adding ourselves to our contacts doesn't make sense (in the generic
case) so remove them from the list that is shown when the user selects
the add contacts shortcut.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-30 15:44:19 +03:00
Manos Pitsidianakis
e8e7697001
terminal: fix edge case with strings/linebreaking
When printing and line-breaking a string in CellBuffer::write_string(),
the line should continue from the "beginning" of the previous one.
However it might be different than the offset of the first character of
the string, because it may be indented already.

This would result in awkward line breaks like:

            Available actions: [ list- |# end of terminal/border
            post, list-unsubscribe, lis|
            t-archive ]

This commit adds an extra argument to write_string() to specify the x
offset of the string, so that we can apply it while printing characters
but ignore it when the line changes; then the x coordinate will take the
value of the line_break value.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-30 13:58:56 +03:00
Manos Pitsidianakis
74f0d12afb
tools: remove obsolete imapshell.rs and smtp_conn.rs
Previous commits added shells in the main binary.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 22:47:35 +03:00
Manos Pitsidianakis
571bd98497
Add proper imap-shell in tools subcommand for debugging
Add imap-shell to tools subcommand.

To use, run

  $ meli tools imap-shell <account-name>

Where account name is what you have in your config file.

For convenience, typing an invalid name will list all the valid names:

  $ meli tools imap-shell "asdf"
  The configuration file does not contain the account `asdf`. It contains the following:
  user@example.com
  work
  personal account
  Try again with a valid account name.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 22:46:08 +03:00
Manos Pitsidianakis
e187bb3f0d
Add tools subcommand with smtp shell for debugging
Add tools subcommand, with options to launch imap, smtp or jmap shells.
Currently only smtp is implemented, imap is working but with quirks.

To use, run

  $ meli tools smtp-shell <account-name>

Where account name is what you have in your config file.

For convenience, typing an invalid name will list all the valid names:

  $ meli tools smtp-shell "asdf"
  The configuration file does not contain the account `asdf`. It contains the following:
  user@example.com
  work
  personal account
  Try again with a valid account name.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 22:46:08 +03:00
Manos Pitsidianakis
74a3539f88
terminal/cells.rs: fix degenerate OOB cell access
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 21:16:59 +03:00
Manos Pitsidianakis
7eed944abc
melib/jmap: fix screwed up rfc8620 module split
I first split the rfc8620.rs into two files with an octopus merge but
getting fixups autosquashed in rebase was impossible with this approach.
So I made the split manually and botched the state of the two splitted
halves.

This commit removes extraneous code and the unused rfc8620.rs file.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 13:59:03 +03:00
euxane
3de4908d6b man(7): fix typo for toggle_expand_headers
Signed-off-by: euxane <euxane.trangirard@pacien.net>
2024-05-29 12:36:32 +02:00
Manos Pitsidianakis
f2b59a7633
jmap: add RequestUrlTemplate type
Add type that preserves both text (String) and parsed Url value for a
Url template.

Also add a test to catch regressions.

Closes #403 (JMAP: message body fetching broken on v0.8.5)

Fixes: 51e3f163d4 ("melib/jmap: Use Url instead of String in deserializing")
Resolves: https://git.meli-email.org/meli/meli/issues/403
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 00:51:13 +03:00
Manos Pitsidianakis
f7838b1ddf
jmap/rfc8620.rs: split to methods.rs and objects.rs
Split rfc8620 to two separate files.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 00:51:12 +03:00
Manos Pitsidianakis
a78f3f261d
jmap/rfc8620: move submodules to jmap/
Part of simplifying jmap module hierarchy.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 00:51:12 +03:00
Manos Pitsidianakis
50ecade74a
jmap: merge rfc8620/tests.rs to tests.rs
In anticipation of next commit which will flatten the rfc8620 module
(move submodules to root).

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 00:51:12 +03:00
Manos Pitsidianakis
77867aeed4
jmap: unwrap object module
jmap module hierarchy has been historically weird at places, because
some modules had been developed in separate bursts.

Flatten object module since it was not necessary.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 00:51:12 +03:00
Manos Pitsidianakis
fc1122a2aa
jmap/mailbox.rs: rename to backend_mailbox.rs
To differentiate with the `Mailbox` object module.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 00:51:12 +03:00
Manos Pitsidianakis
7ba7dc70c5
jmap: imports cleanup in all modules
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 00:51:12 +03:00
Manos Pitsidianakis
dce3852fe5
jmap: add capabilities module
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-29 00:51:12 +03:00
euxane
4722d7ccb8 docs/meli.conf: also mention server_password_command for jmap
This was already supported but not mentioned on the manual page.

Signed-off-by: euxane <euxane.trangirard@pacien.net>
2024-05-27 19:59:40 +02:00
Manos Pitsidianakis
f0d1b9cfd1
README.md: add ayllu mirror link
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-23 14:12:01 +03:00
Manos Pitsidianakis
ed5a6b04f4
terminal.rs: add a symbols range to is_emoji check
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-23 09:30:18 +03:00
Manos Pitsidianakis
58d7327130
notifications: change new mail text content
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-23 09:29:50 +03:00
Manos Pitsidianakis
0e1e5b9ea7
terminal: add support for Alternate Scroll Mode (xterm)
If mouse mode is on, using the mouse scroll wheel will scroll inside
meli.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-23 09:28:41 +03:00
Manos Pitsidianakis
06ec2790d0
view/envelope.rs: fix str slice index panic
Replace direct slice indexing with get(<range>)

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-22 15:13:18 +03:00
Manos Pitsidianakis
fe08d52a7f
terminal.rs: add force_text_emoji_presentation option
If true, text presentations of color symbols and emoji will be enforced
as much as possible.

Might not work on all non-text symbols and is experimental.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-20 16:21:11 +03:00
Manos Pitsidianakis
39fbb164ed
Change info_message_{next,prev} shortcuts to <, >
Alt-< and Alt-> might not work on all keyboards/terminals.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-20 10:35:38 +03:00
Manos Pitsidianakis
c65635ef60
melib/connections.rs: Fix compilation for macos
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-20 10:17:04 +03:00
Manos Pitsidianakis
4148aee59b
melib: refactor smtp,draft errors and email tests
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-20 10:17:04 +03:00
Manos Pitsidianakis
4bdfb3a31b
melib/connections.rs: disable Nagle's algorithm by default
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-18 12:16:47 +03:00
Manos Pitsidianakis
671d35e21e
melib: update mailin-embedded dependency to 0.8.2
Closes: #391

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-16 08:49:00 +02:00
Manos Pitsidianakis
a4ebe3b7d4
conf.rs: Add ErrorKind::Platform
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-14 12:01:32 +02:00
Manos Pitsidianakis
57e3e643a1
conversations.rs: remove excessive right padding in flags
Flags had too many spaces on its right side padding. This commit removes
it.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-14 12:01:32 +02:00
Manos Pitsidianakis
a8c7582fa3
melib/imap: fix ENVELOPE parsing in untagged responses
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-14 12:01:31 +02:00
Manos Pitsidianakis
a9c3b151f1
listing.rs: impl highlight_self in all index styles
Add highlight_self to all listing styles (compact, conversations, plain,
thread).

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-14 12:01:31 +02:00
Manos Pitsidianakis
1abce964c7
melib: add Envelope::recipient_any method
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-14 12:01:30 +02:00
Manos Pitsidianakis
735b44f286
Add 'highlight_self' theme attribute
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-14 11:59:31 +02:00
Manos Pitsidianakis
50ff16c44f
themes: add LIGHT, DARK constant theme keys
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-14 11:59:31 +02:00
Manos Pitsidianakis
9ca34a6864
Update MSRV to 1.70.0
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-07 11:49:19 +03:00
Manos Pitsidianakis
8fff740176
Update yanked zerocopy dependency
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-06 19:15:58 +03:00
Manos Pitsidianakis
8eaf03554f
Bump version to 0.8.5
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-06 18:37:30 +03:00
Manos Pitsidianakis
8ec6f22090
Use ShellExpandTrait::expand in more user-provided paths
ShellExpandTrait::expand was not used consistently, leading to only some
functionalities supporting things like tilde expansion.

Fixes #387

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-06 18:33:43 +03:00
Manos Pitsidianakis
b5ddc397df
terminal: remove unwrap() from get_events() loop
When exiting the app, the received value might be None.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-06 10:49:41 +03:00
Manos Pitsidianakis
46e40856ba
dialogs: fix UIConfirmationDialog highlight printing
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-05 16:56:33 +03:00
Manos Pitsidianakis
35408b1689
pager.rs: run pager filter asynchronously
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-04 20:26:32 +03:00
Manos Pitsidianakis
5d915baa81
terminal/embedded: use Screen::resize instead of CellBuffer::resize
CellBuffer::resize does not update generation info and should only be
used from within Screen::resize

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-04 20:26:32 +03:00
Manos Pitsidianakis
684fae3ed8
terminal: copy old content to new buf when resizing
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-04 20:26:32 +03:00
Manos Pitsidianakis
ab04189887
clippy: fix new warnings for 1.78.0
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-04 20:26:32 +03:00