Commit Graph

17 Commits

Author SHA1 Message Date
Jonas Schäfer
fa700bba07 Massive code cleanup
- Avoid fighting import cycles using a factory function
- Collapse useless subpackages into simple modules
- Move flask plugins / infrastructure in own module
- Refactor how blueprints are used to localize information about
  URL routing to app factory
2021-01-17 20:11:25 +01:00
Jonas Schäfer
e476d9b7c2 Implement admin dashboard
Fixes #23.
2021-01-17 20:10:04 +01:00
Jonas Schäfer
9e3fcbaf67 Prepare for fully typechecked codebase 2021-01-16 16:05:54 +01:00
Jonas Schäfer
d3777d3b07 Make flake8 happy 2021-01-16 15:22:46 +01:00
Jonas Schäfer
d6b1ce8773 Make logging configurable 2020-04-30 16:14:14 +02:00
Jonas Schäfer
095970adb4 Convert login page to proper form
- free CSRF protection
- free "empty field" early out
- easier passing on of errors to the view
2020-04-30 16:14:14 +02:00
Jonas Schäfer
af08f31cf3 Include language tag in html/@lang 2020-03-07 16:56:15 +01:00
Jonas Schäfer
e07fbb0c97 Start translating the web portal 2020-03-07 16:55:12 +01:00
Jonas Schäfer
6819a4eec6 Clean up about page 2020-03-07 13:31:40 +01:00
Jonas Schäfer
18279e3478 Add version info to package 2020-03-07 13:31:30 +01:00
Jonas Schäfer
76c38030a8 Improve avatar route handler
- Fix etag attaching (add_etag is actually a coroutine which hashes
  the data payload)
- Add expires header (with now + 1800s default) so that we don’t
  get hit with an avatar request on each load -- also helps with
  page responsiveness.
- Proper handling for HEAD requests.
- CSP to prevent funny SVG attacks.
2020-03-07 13:12:30 +01:00
Jonas Schäfer
71733adc90 Fix various edge cases around stale sessions
If a session cookie is set, but prosody doesn’t know about the
session anymore, we could get into fun states. This patch fixes
them by requiring the session to be tested with a ping request
on each HTTP request.
2020-03-07 13:11:45 +01:00
Jonas Schäfer
5ee2d97eb6 Implement support for shim avatar display 2020-03-07 13:11:43 +01:00
Jonas Schäfer
c902c59f8b Implement support for avatars 2020-03-07 12:38:17 +01:00
Jonas Schäfer
e985fe9c61 Design foundations
- Create a colour palette
- Create a sizing schema for paddings and fonts
- Implement basic form controls
- Create a theme demo page
- Apply the theme to the existing pages.

Still TODO is the final font selection.
2020-03-05 18:43:52 +01:00
Jonas Schäfer
9318b0d152 Implement support for password change and logout
Note the hack.
2020-02-29 13:43:10 +01:00
Jonas Schäfer
aade4c67fd Bootstrap initial thing which can login 2020-02-29 12:37:56 +01:00