Add some docs
This commit is contained in:
parent
c76c2eaf5c
commit
7ec5c510a3
4 changed files with 41 additions and 4 deletions
17
README.md
17
README.md
|
@ -13,11 +13,22 @@ Join chat on Matrix at [#panorama:mozilla.org][3]
|
||||||
|
|
||||||
Goals:
|
Goals:
|
||||||
|
|
||||||
- Never have to actually close the application.
|
- **Never have to actually close the application.** All errors should be
|
||||||
- Handles email, calendar, and address books using open standards.
|
handled gracefully in a way that can be recovered or restarted without
|
||||||
- Hot-reload on-disk config.
|
needing to close the entire application.
|
||||||
|
- **Handles email, calendar, and address books using open standards.** IMAP for
|
||||||
|
email retrieval, SMTP for email sending, CalDAV for calendars, and CardDAV
|
||||||
|
for address books. Work should be saved locally prior to uploading to make
|
||||||
|
sure nothing is ever lost as a result of network failure.
|
||||||
|
- **Hot-reload on-disk config.** Configuration should be able to be reloaded so
|
||||||
|
that the user can keep the application open. Errors in config should be
|
||||||
|
reported to the user while the application is still running off the old
|
||||||
|
version.
|
||||||
|
- **Scriptable.** Built-in scripting language should allow for customization of
|
||||||
|
common functionality, including keybinds and colors.
|
||||||
|
|
||||||
Stretch goals:
|
Stretch goals:
|
||||||
|
- Full-text email/message search
|
||||||
- Unified "feed" that any app can submit to.
|
- Unified "feed" that any app can submit to.
|
||||||
- Submit notifications to gotify-shaped notification servers.
|
- Submit notifications to gotify-shaped notification servers.
|
||||||
- JMAP implementation.
|
- JMAP implementation.
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
|
|
||||||
- [Intro](./intro.md)
|
- [Intro](./intro.md)
|
||||||
- [Config](./config.md)
|
- [Config](./config.md)
|
||||||
|
- [Code Structure](./code.md)
|
||||||
|
|
26
docs/src/code.md
Normal file
26
docs/src/code.md
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# Code Structure
|
||||||
|
|
||||||
|
The entire application is running on several async threads in a tokio runtime:
|
||||||
|
|
||||||
|
- [Mail](#mail)
|
||||||
|
- [UI](#ui)
|
||||||
|
- [VM](#vm)
|
||||||
|
|
||||||
|
Each of these communicates with the others via pairs of unbounded async
|
||||||
|
channels.
|
||||||
|
|
||||||
|
## Mail
|
||||||
|
|
||||||
|
The mail thread is in charge of communicating with mail servers. It keeps a
|
||||||
|
single connection alive to each server even if the UI thread has multiple mail
|
||||||
|
views open.
|
||||||
|
|
||||||
|
## UI
|
||||||
|
|
||||||
|
The UI thread manages everything user-facing. It runs a terminal UI using the
|
||||||
|
tui crate. There's a tiny windowing system built in that allows for tiling
|
||||||
|
windows, split horizontally or vertically.
|
||||||
|
|
||||||
|
## VM
|
||||||
|
|
||||||
|
The VM runs the scripting language that can be used inside the application.
|
|
@ -151,7 +151,6 @@ impl UI {
|
||||||
let visible = self.window_layout.visible_windows(chunks[0]);
|
let visible = self.window_layout.visible_windows(chunks[0]);
|
||||||
for (layout_id, area) in visible.into_iter() {
|
for (layout_id, area) in visible.into_iter() {
|
||||||
if let Some(window) = self.windows.get(&layout_id) {
|
if let Some(window) = self.windows.get(&layout_id) {
|
||||||
debug!("drawing window {:?}", window.name());
|
|
||||||
window.draw(f, area, self);
|
window.draw(f, area, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue