Commit Graph

2306 Commits

Author SHA1 Message Date
Manos Pitsidianakis
3944e4e60e
meli: update to 2021 edition
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-13 18:51:30 +03:00
Manos Pitsidianakis
fe0a96f085
melib: update to 2021 edition
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-13 18:47:00 +03:00
Manos Pitsidianakis
81974311c2
mail/view: show current number command buffer
The command buffer in the envelope view records numbers the user presses
and then combines them with an action (e.g. type n in decimal; press
open_url action to open nth link, analogously with attachments).

Since a few commits ago, the command buffer number stopped being printed
on the envelope view.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-13 15:29:06 +03:00
Manos Pitsidianakis
64ba0459ee
mail/compose: init cursor at To: header field
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-11 08:52:18 +03:00
Manos Pitsidianakis
39e99770da
Use Context::current_dir() when saving files to relative paths
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-09 19:05:46 +03:00
Manos Pitsidianakis
a4f0dbac26
Add current working directory tracking to Context
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-09 17:15:15 +03:00
Manos Pitsidianakis
7e4ed2fa10
view/envelope: fix some out of bounds drawing.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-09 12:54:59 +03:00
Manos Pitsidianakis
45d4f611b1
Add install-man cli subcommand to install manpages on your system
If meli is installed via cargo or a package without manpages, this
command can be used to install them to the user's system.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-09 12:31:34 +03:00
Manos Pitsidianakis
747e39bf55
meli: add print-used-paths subcommand
Print all paths that meli creates/uses e.g. XDG data path and temp dir
path.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-08 17:39:11 +03:00
Manos Pitsidianakis
9b9c38f769
mellib/imap: don't flood user with sqlite3 errors if db is corrupted
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-08 17:10:07 +03:00
Manos Pitsidianakis
bb4d200036
command/parser: unify toggle_* parsers
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-07 15:47:54 +03:00
Manos Pitsidianakis
63abf1e890
Update README.md
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-07 12:56:45 +03:00
Manos Pitsidianakis
7e3e938631
mail/view: fix out-of-bounds draw when terminal is small
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-07 12:37:24 +03:00
Manos Pitsidianakis
c43aeb0eb1
melib/email/parser: fix invalid address parse on folded values
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-07 12:34:49 +03:00
Manos Pitsidianakis
54862f8651
listing.rs: add hide_sidebar_on_launch option
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-07 12:33:51 +03:00
Manos Pitsidianakis
b673af02ac
accounts.rs: move to crate root
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-05 15:44:43 +03:00
Manos Pitsidianakis
dd4d0b7972
state.rs: fix typo
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-05 15:34:12 +03:00
Manos Pitsidianakis
6476985ce6
Add Cross.toml for aarch64-unknown-linux-gnu builds
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-05 15:33:28 +03:00
Manos Pitsidianakis
6d5ebb5b04
command: split code into submodules, add better error reporting
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-05 15:06:09 +03:00
Manos Pitsidianakis
f0075b86cf
ui: show descriptive tab names for composer and threads
Instead of showing the nondescript tab names in the tab area,
use Subject or To: data from the draft in the composer and a subject
from the thread entries.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-03 10:17:24 +03:00
Manos Pitsidianakis
a615b4701b
dependencies: embed xdg-utils crate
No reason to have it out of the tree.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-03 10:13:25 +03:00
Manos Pitsidianakis
0a9c89b6b3
mail/view/thread: add toggle_layout shortcut
Toggles between horizontal and vertical layout. Previously it was
decided on the terminal width.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-02 21:47:14 +03:00
Manos Pitsidianakis
49c36009ce
mail/view: don't initialize entire thread at once
For large threads, this would result in a lot of futures being created.
The user just wants to read one entry, not all of them. So prioritize
the open entry and some of the latest ones as an optimistic
pre-fetching.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-02 21:29:35 +03:00
Manos Pitsidianakis
c7825c76c3
mail/view: handle dialog Esc in the parent component
Dialogues handled Esc themselves, which meant the event didn't bubble up
to their parent to let them know they should remove the dialogue. This
commit fixes that.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-02 21:29:35 +03:00
Manos Pitsidianakis
3344a8dbf6
mail/view: remove unnecessary Clone derives
There's no need to clone MailViews when opening them in new tabs,
just initialize new ones with the same metadata. That saves us the
trouble of implementing Clone for all related types.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-02 19:36:12 +03:00
Manos Pitsidianakis
1b3bebe304
view/thread: open earliest unread email instead of first in thread
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-02 19:04:35 +03:00
Manos Pitsidianakis
85af524458
email/parser.rs: fix invalid mailto() results when body field exists
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-01 15:57:46 +03:00
Manos Pitsidianakis
0132677ff5
commands.rs: Introduce CommandError with context
There was no way to provide context to the user why their
command failed to be parsed. This commit paves the way of returning for
invalid domain values, invalid types, etc.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-01 15:55:43 +03:00
Manos Pitsidianakis
2dc2940586
melib/build.rs: add feature to use cache instead of downloading unicode data
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-01 15:55:43 +03:00
Manos Pitsidianakis
49a38a23bf
jmap: fix invalid Type link references
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-01 15:55:42 +03:00
Manos Pitsidianakis
b4f2f33576
remove deflate feature; make it a hard dependency
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-09-01 15:55:42 +03:00
Manos Pitsidianakis
a337e2269e
contacts: refactor module structure
To prepare for more functionality, refactor contacts module.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-30 01:12:45 +03:00
Manos Pitsidianakis
46636d8748
Bump version to 0.8.0
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-29 15:04:55 +03:00
Manos Pitsidianakis
65e82d8896
Add meli/README.md symbolic link
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-29 15:01:42 +03:00
Manos Pitsidianakis
1c79786ea2
Add scripts/make_html_manual_page.py
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-29 14:55:16 +03:00
Manos Pitsidianakis
290cfb86c0
themes: add a highlighted_selected theme key
So that if you select a mail/thread entry that is currently under the
cursor (making it `highlighted`) you can also see its `selected` status.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 23:50:17 +03:00
Damian Poddebniak
5459a84f3d chore: Update to imap-codec 1.0.0 (w/o -beta) 2023-08-28 18:16:48 +02:00
Manos Pitsidianakis
31aa9ad29e
listing: autogen mbox filename when exporting mail to directories
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 18:20:38 +03:00
Manos Pitsidianakis
59513b2670
melib/jmap: implement Backend::submit(), server-side submission
Well this was more complex that it should have been. And not very
optimized because we're not using pipelining in the submit() path:

1. first upload email bytes as a Blob object. This requires a standalone
   API post call at a specific url so it cannot be changed with followup
   calls to reference the blob's id.
2. Create an EmailObject in the drafts folder.
3. Create an EmailSubmission object referencing the email id of prevous
   call. Unfortunately I cannot get the Result Reference to work in
   stalwart jmap, so for now this is too a separate transaction.

Caveat emptor: Errors might not be returned to the user.

Closes #277.

https://git.meli.delivery/meli/meli/issues/277

https://git.meli.delivery/meli/meli/pulls/279

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 17:16:38 +03:00
Manos Pitsidianakis
38bc1369cc
melib/jmap: add an Identity type.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 14:54:34 +03:00
Manos Pitsidianakis
5d8f07c805
melib/jmap: rename some objects better
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 14:39:20 +03:00
Manos Pitsidianakis
b95f778335
melib/jmap: move JmapSession to its own module
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 14:39:17 +03:00
Manos Pitsidianakis
29fd8522e6
melib/jmap: implement Backend::create_mailbox()
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 14:35:13 +03:00
Manos Pitsidianakis
31982931f5
melib/jmap: use Argument<OBJ> (value or resultreference) where appropriate
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 14:31:05 +03:00
Manos Pitsidianakis
d9467d5fcd
melib/jmap: save all core capabilities to session store
We will need this in the future when we're going to support extra
extensions like Blob and also now to support server submission.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 14:27:34 +03:00
Manos Pitsidianakis
11432ba2c3
melib/jmap: make null fields into Option<_>s
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 14:21:47 +03:00
Manos Pitsidianakis
4f9b97736a
melib/jmap: Rename EmailImport to EmailImportObject
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 14:19:18 +03:00
Manos Pitsidianakis
6ebdc7f9ae
melib/jmap: add Id<_>::empty() contructor
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 14:16:11 +03:00
Manos Pitsidianakis
37a787e6bb
melib/jmap: use IndexMap instead of HashMap
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 14:12:05 +03:00
Manos Pitsidianakis
c875dda496
melib/jmap: add last_method_response field to Connection
For book keeping.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-08-28 13:58:20 +03:00