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