Commit Graph

94 Commits (5ba7b2cd7bb07abe8faafe5e45db6145b3f90bc9)

Author SHA1 Message Date
Manos Pitsidianakis 53e924eb33
Add edit envelope action back as async 4 years ago
Manos Pitsidianakis 8a6bf3b217
Preserve Account order from configuration file
Use IndexMap to preserve the order of accounts in the UI from the
account definitions.
4 years ago
Manos Pitsidianakis 750e32c8e1
mail/listing: use mailbox count() total instead of loaded total 4 years ago
Manos Pitsidianakis 26b327d86a
mail/listing*: clear selection after perform_action() 4 years ago
Manos Pitsidianakis c2550f60b6
Rename EXECUTE mode to COMMAND
vim uses COMMAND, and we want to be consistent with vim when possible.
4 years ago
Manos Pitsidianakis 989cfcc877
conf/accounts.rs: use mailbox alias if available in MailboxEntry::name() 4 years ago
Manos Pitsidianakis 00acba7717
melib/MailBackend: add copy_messages,set_flags,delete_messages methods 4 years ago
Manos Pitsidianakis 1bd89b3c96
themes: add mail.sidebar_account_name key 4 years ago
Manos Pitsidianakis 0882dbbad0
melib/Collection: put all fields behind a mutex 4 years ago
Manos Pitsidianakis ddafde7b37
jobs: save handle for each Job
If we save the JoinHandle for each task, we can cancel it in future
commits if we have to timeout network requests.
4 years ago
Manos Pitsidianakis bbedeed3e3
More imap async fixes 4 years ago
Manos Pitsidianakis b3876113aa
BackendOp: return future in as_bytes() 4 years ago
Manos Pitsidianakis e06308fed2
MailBackend: change more methods to Futures 4 years ago
Manos Pitsidianakis c82367e00d
BackendOp: Change set_{flag,tag} methods 4 years ago
Manos Pitsidianakis efb06be09b
melib: return Result<_> from operation()
Envelope might have been deleted before main thread requests an
operation, which is a race condition.
4 years ago
Manos Pitsidianakis ca11c8e474
Remove useless debug prints 4 years ago
Manos Pitsidianakis f3d5edfe14
Add copy/move to other account operations 4 years ago
Manos Pitsidianakis a17f0b4fd4
listing: rework MailListingTrait
split redraw_list() to redraw_threads_list() and redraw_envelope_list()
4 years ago
Manos Pitsidianakis a6af7fc0d3
listing.rs: don't create unnecessary operation 4 years ago
Manos Pitsidianakis eb701695f7
Remove fnv crate 4 years ago
Manos Pitsidianakis c8391983ee
Refactor OfflineListing
Move offline status drawing to OfflineListing
4 years ago
Manos Pitsidianakis 18dcf15e1e
Add open_mailbox shortcut for sidebar 4 years ago
Manos Pitsidianakis d8135674df
themes: add {even,odd}_unseen, {even,odd}_selected, {even,odd}_highlighted
Suggested in #21
4 years ago
Manos Pitsidianakis 4930d1b46c
Add Italics, Blink, Dim and Hidden text attributes
Text attributes have been rewritten as bit flags, so for example instead of
"BoldUnderline" you'd have to define "Bold | Underline" in your theme
settings.

Requested in #21
4 years ago
Manos Pitsidianakis fd60be482f
Open sidebar for mailbox navigation with Left/Right arrow keys
Left/Right arrow keys change focus between the sidebar and mailbox
listing. If focused on sidebar, move arrow keys to select mailbox and
open with 'Enter'. Press Right arrow key to return to mailbox listing.

- Mailbox focused:
  +--+-------------+
  |~ |=============|
  |~ |=============|
  |  |=============|
  |~ |=============|
  |~ |=============|
  +--+-------------+
- Press `Left` arrow key
- Menu focused:
  +--------+-------+
  |~~~~    |=======|
  |~~      |=======|
  |        |=======|
  |~~~     |=======|
  |~~~~    |=======|
  +--------+-------+
- Press `Right` arrow key to return
4 years ago
Manos Pitsidianakis 840005022c
themes: add default tag theme attribute
The theme attribute key is "mail.listing.tag_default"
4 years ago
Manos Pitsidianakis 9ff54f236b
Add conf_override! macro
conf_override! wraps struct definitions and defines a secondary Override
struct that wraps each field in an Option. The macro mailbox_settings!
is used to select settings from an account & mailbox index. If a user defines an overriding setting, the macro returns the override instead of the immediately next in the hierarchy setting.

The selection is done for a specific field as follows:

  if per-folder override is defined, return per-folder override
    else if per-account override is defined, return per-account override
      else return global setting field value.
4 years ago
Manos Pitsidianakis 651dda67cf
Respect autoload mailbox setting 4 years ago
Manos Pitsidianakis 106dae3334
Add config overrides to mailbox filter
If per-folder config filter is defined, it overrides the app-wide
filter.
4 years ago
Manos Pitsidianakis 6c76db2063
Add delete, copy actions for envelopes 4 years ago
Manos Pitsidianakis 63467a3c45
Check ComponentId equality on Composer::kill() 4 years ago
Manos Pitsidianakis bae083cc8f
Rename Filter action to search 4 years ago
Manos Pitsidianakis 760c1e859d
Add search shortcut to shortcut map 4 years ago
Manos Pitsidianakis 4ac52d9d5b
Replace every use of Folder with Mailbox
Use Mailbox for consistency.
4 years ago
Manos Pitsidianakis b6efb14824
melib: remove Mailbox
Refactor Collection from melib to hold what folders have what envelopes.

Frontend accounts will now have a FolderEntry for each logical folder
and will unify many Account fields into one and eliminate a lot of
duplicate/dead code.
4 years ago
Manos Pitsidianakis 4090eecd04
ui: Consume Esc input events only when necessary 4 years ago
Manos Pitsidianakis 14b0ef8f37
Respect use_color conf value as well as NO_COLOR 4 years ago
Manos Pitsidianakis 22fb0c0844
ui: handle ViewMailbox in listing.rs
handling viewmailbox inside a listing instead of their parent/manager
component is a leftover from before they even had a parent/manager.
4 years ago
Manos Pitsidianakis 647cb10b33
ui: Use FolderHash instead of usize for folder cursor
Use FolderHash directly as a cursor type for folders within an account
isntead of having a usize (being the order of the folder within the
account) and figuring out the folder_hash everytime it's needed.

Add OfflineListing for offline accounts and AccountStatusChange event.
4 years ago
Manos Pitsidianakis 9b7875c023
ui: change Component::get_status return type
There was no reason to return Option<String>, just return String::new()
instead of Option::None
4 years ago
Manos Pitsidianakis eb501b6d50
ui: add ThemeAttribute argument to clear_area()
clear_area() sets the cleared cell attributes according to the new
argument.
4 years ago
Manos Pitsidianakis 144eb62b76
ui: force refresh_mailbox etc on Mailbox{Delete,Create} 4 years ago
Manos Pitsidianakis f5e694cf5a
Make small cosmetic fixes 4 years ago
Manos Pitsidianakis 8b6ea8de9a
Remove ui crate
Merge ui crate with root crate.

In preparation for uploading `meli` as a separate crate on crates.io.

Workspace crates will need to be published as well and having a separate
`ui` crate and binary perhaps doesn't make sense anymore.
4 years ago