Drew DeVault
cb37df882e
Add notices on action completion
3 lat temu
Drew DeVault
1992880454
Add theme-specific error page
3 lat temu
Drew DeVault
8de661b3bb
Hide caldav/carrdav in nav unless present
3 lat temu
Drew DeVault
3d1f278fae
Use context-appropriate title for mbox/msg view
4 lat temu
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.
4 lat temu
Simon Ser
b891a95fcf
Rename project to alps
4 lat temu
Simon Ser
892f1fa581
Remove outdated TODO
4 lat temu
Simon Ser
3347e69480
Use %q to quote values in format strings
4 lat temu
Simon Ser
9fdccc3a4b
Rename template.go to renderer.go
4 lat temu
Simon Ser
8b10324ab6
go fmt
4 lat temu
Dejan Strbac
83a5132d15
Add current path to the global context
4 lat temu
Simon Ser
c38b1d47f9
Fix panic when injecting a template with nil data
4 lat temu
Simon Ser
ad1d2ee7f4
Implement plugin/template reload on SIGUSR1
There's no way around having a global mutex, because we need to update
the HTTP routes when reloading plugins. During reload we need to lock
the whole server.
Closes: https://todo.sr.ht/~sircmpwn/koushin/43
4 lat temu
Simon Ser
97b314b6e7
Add Server.Reload
This only reloads templates for now. In the future it'll also reload
Lua plugins.
4 lat temu
Simon Ser
020e27fe45
Add Context to Plugin.Inject
This allows to access the request metadata and the session from injectors.
4 lat temu
Simon Ser
ca3672df2a
Add RenderData interface
This allows Go plugins to easily inject global data.
4 lat temu
Simon Ser
d8a875a5f7
Rename RenderData to BaseRenderData
RenderData will be used for an interface.
4 lat temu
Simon Ser
e93346ffa9
Remove the public/ directory
Now that all templates are provided by plugins, there's no need to have
a public/ directory. Themes can be in /themes instead of /public/themes.
4 lat temu
Simon Ser
d897eeee5c
Introduce base plugin
This plugin offers base IMAP/SMTP functionality.
References: https://todo.sr.ht/~sircmpwn/koushin/39
4 lat temu
Simon Ser
f07ab52632
Add docs
4 lat temu
Simon Ser
1b5bc568fb
Allow plugins to provide their own templates
4 lat temu
Simon Ser
e54a359acb
Export Server.{Sessions,Plugins}
And unexport a few internal functions.
4 lat temu
Simon Ser
d8f411176f
Export Context
This allows plugins to access it.
4 lat temu
Simon Ser
835e9e5033
go fmt
4 lat temu
Simon Ser
3748b4413e
Introduce GlobalRenderData and RenderData
GlobalRenderData contains some global metadata that can be obtained from
any template.
RenderData is a base type for template data. It contains a Global field
with global metadata and an Extra field for plugins.
4 lat temu
Simon Ser
edf738f23d
Load all themes on startup
This is the first step to allow each user to have a different theme.
4 lat temu
Simon Ser
4a504b0fc6
Rename Plugin.Render to Plugin.Inject
This function doesn't render anything, it just adds extra data to the
template data.
4 lat temu
Simon Ser
76599232dc
Add a Lua API to set template filters
4 lat temu
Simon Ser
4f74722c14
Add basic support for plugins
4 lat temu
Simon Ser
e94b1311de
Add basic theme support
References: https://todo.sr.ht/~sircmpwn/koushin/1
4 lat temu
Simon Ser
a4729060be
Escape mailbox names in URLs
Closes: https://todo.sr.ht/~sircmpwn/koushin/14
4 lat temu
Simon Ser
be14524c33
Display & download any message part
4 lat temu
Simon Ser
fce17c9733
Linkify mailbox list
4 lat temu
Simon Ser
a1a067e6de
Add HTTP server boilerplate
4 lat temu