Commit graph

89 commits

Author SHA1 Message Date
Drew DeVault
a393429f01 Implement JavaScript UI for attachments
This one is a bit of a doozy. A summary of the changes:

- Session has grown storage for attachments which have been uploaded but
  not yet sent.
- The list of attachments on a message is refcounted so that we can
  clean up the temporary files only after it's done with - i.e. after
  copying to Sent and after all of the SMTP attempts are done.
- Abandoned attachments are cleared out on process shutdown.

Future work:
- Add a limit to the maximum number of pending attachments the user can
  have in the session.
- Periodically clean out abandoned attachments?
2020-10-29 15:18:36 -04:00
Drew DeVault
4904207269 Replace parts tree with attachment list 2020-10-23 16:08:40 -04:00
Drew DeVault
3db443c1df message.html: add tab to view raw email 2020-10-23 15:32:59 -04:00
Drew DeVault
64b16f4a50 message.html: add tabs to select html/plaintext 2020-10-23 15:15:46 -04:00
Drew DeVault
f97f38d4a9 Send outgoing emails asyncronously 2020-10-23 14:15:07 -04:00
Drew DeVault
b437cef2ab Implement broader search functionality 2020-10-23 11:45:00 -04:00
Drew DeVault
0191aa4698 plugins/base/imap: fetch flags on search 2020-10-22 13:07:51 -04:00
Drew DeVault
6ba418c9b2 Generalize sidebar categorization logic 2020-10-22 13:03:50 -04:00
Drew DeVault
9e2c420461 Categorize and normalize folder listing 2020-10-22 12:29:55 -04:00
Drew DeVault
793f261b62 Handle case where server does not return body
This was causing a nil pointer dereference before.

Fixes ~migadu/alps#121.
2020-10-22 11:05:35 -04:00
Reto Brunner
f3931fd510
remove exec bit from plugins/base/imap.go 2020-08-11 10:07:34 +02:00
Jesse Olson
456d183ebc
Set Message-Id header 2020-08-05 14:56:19 +02:00
наб
d60aca0e5c
base HTML: fix nil on emails without a text part
P.a. to 50e131244a which solved
https://todo.sr.ht/~emersion/alps/100

Closes: https://todo.sr.ht/~emersion/alps/102
2020-07-13 17:07:18 +02:00
Simon Ser
92b3016196
Fix nil render data on invalid password
This would cause this error:

    template: head.html:7:15: executing "head.html" at <index .Global.Path 0>: error calling index: index of untyped nil
2020-07-07 12:47:18 +02:00
Zach DeCook
0aff774c5d
Stay on the same page after moving a message 2020-06-29 16:31:48 +02:00
Simon Ser
1f9fe0b169
Workaround template functions not loaded
This is a hacky workaround to make things work until we find a better
solution.

Closes: https://todo.sr.ht/~emersion/alps/96
2020-06-10 22:46:42 +02:00
Simon Ser
522454e009
base: don't use Client.Mailbox
The information returned by Client.Mailbox may be out-of-date. Instead,
retrieve the mailbox status from the server each time.

Closes: https://todo.sr.ht/~emersion/alps/80
2020-05-28 12:09:44 +02:00
Simon Ser
9a7acd2791
Add INBOX unread count on mailbox/message pages 2020-05-21 19:19:17 +02:00
Drew DeVault
9465f8db6d
login: set encrypted "remember me" token 2020-05-20 19:07:47 +02:00
Simon Ser
8589228c73
Replace IMAPMessage.TextPartName with TextPart 2020-05-20 16:25:25 +02:00
Drew DeVault
2d86413876
mailbox: show unseen message count in page title 2020-05-20 15:28:36 +02:00
fox.cpp
62910a94fb
plugins/base: Add missing nil check for getMailboxByType
Fixes panic if there is no usable Sent folder.
2020-05-18 18:35:05 +02:00
Drew DeVault
aab1f866f6
mailbox: set title to "Inbox" rather than "INBOX" 2020-05-13 19:49:20 +02:00
Simon Ser
3036cc4436
plugins/base: fix mailbox unread count 2020-05-13 18:18:13 +02:00
Drew DeVault
3d1f278fae
Use context-appropriate title for mbox/msg view 2020-05-13 17:00:47 +02:00
Drew DeVault
1cf95af41e
Add <meta refresh> to mailbox view
This causes the mailbox to automatically reload the page every 60
seconds, without JavaScript.

This also updates the base template data to include the full URL, and
replaces the earlier "Path" field with a pre-split array of path
components, which is more immediately useful to most templates given the
limitations of string munging with text/template primitives.
2020-05-13 16:58:48 +02:00
Simon Ser
b891a95fcf
Rename project to alps 2020-05-13 14:07:44 +02:00
Simon Ser
4cf5ad68af
plugins/base: always show INBOX first 2020-03-27 13:19:26 +01:00
Simon Ser
5af6c6adc1
plugins/base: wrap MailboxInfo and MailboxStatus
This allows us to extend these and expose helpers for templates and
plugins.
2020-03-27 10:45:43 +01:00
Simon Ser
f6959346ee
plugins/base: allow redirect param to be a form param 2020-03-27 10:27:37 +01:00
Simon Ser
9b804005b4
plugins/base: add redirect param to move/delete/flag endpoints 2020-03-27 10:24:19 +01:00
Simon Ser
9eac0b453a
plugins/base: allow to specify move/flag params via query 2020-03-19 17:25:52 +01:00
Simon Ser
b61e40f363
plugins/base: allow move/delete/flag operations to take multiple UIDs 2020-03-19 16:43:27 +01:00
Simon Ser
fe73f2022c
plugins/base: add action param to handleSetFlags
This alows to add/remove flags instead of setting them.
2020-03-18 21:10:40 +01:00
Simon Ser
a455fc8ddd
plugins/base: fix IMAMessage.PartByPath with nil path 2020-03-18 19:44:18 +01:00
Simon Ser
be3ab9bdd5
plugins/base: disallow replying to text/html parts 2020-03-18 15:08:36 +01:00
Simon Ser
ae8658f468
plugins/base: add route to forward messages
Only inline forwarding is supported for now.

References: https://todo.sr.ht/~sircmpwn/koushin/37
2020-03-18 15:01:15 +01:00
Simon Ser
c96903f3f1
plugins/base: replace MessageRenderData.PartPath with Part 2020-02-25 16:38:29 +01:00
Simon Ser
8c4fd20e27
Revert "plugins/viewhtml: convert mailto links"
This reverts commit 02faf6174b.

This commit doesn't work, because it's applied to <img> tags. Making it
handle <a> tags doesn't work either because bluemonday will strip any
target="_blank" attributes, making the compose form open in the
<iframe>. Let's just revert this whole commit for now.
2020-02-25 15:37:47 +01:00
Simon Ser
02faf6174b
plugins/viewhtml: convert mailto links 2020-02-25 14:06:10 +01:00
Simon Ser
7af7d73700
plugins/base: add message URL and Content-Id helpers 2020-02-25 10:46:55 +01:00
Simon Ser
8299617ebc
Turn message part viewers into plugins 2020-02-12 15:41:00 +01:00
Simon Ser
1bd930f043
plugins/carddav: add basic contacts view 2020-02-05 14:58:56 +01:00
Simon Ser
6ea7cd9134
plugins/base: add icons for attachments/re/fwd/starred 2020-02-05 11:58:53 +01:00
Simon Ser
651872ef7d
plugins/base/imap: disable full-text search for now
It's too slow on servers where indexes aren't enabled.

References: https://todo.sr.ht/~sircmpwn/koushin/23
2020-02-05 11:37:01 +01:00
Simon Ser
4d68400036
plugins/base: add settings page
Add a settings page where the user can change the number of messages
displayed per page.
2020-01-28 20:04:33 +01:00
Simon Ser
85c01b87a9
plugins/base: support attachments in drafts
References: https://todo.sr.ht/~sircmpwn/koushin/16
2020-01-28 12:30:07 +01:00
Simon Ser
50046b62ac
plugins/base: use BodyStructure.Walk instead of custom logic 2020-01-28 11:15:10 +01:00
Simon Ser
b325933a8b
Add .editorconfig 2020-01-24 20:59:35 +01:00
Simon Ser
3384c39a17
plugins/base: delete previous draft 2020-01-24 20:27:05 +01:00