Commit Graph

443 Commits

Author SHA1 Message Date
Matthew Wild
fda822e9d9 Initial implementation of /policies page 2022-03-21 15:51:58 +00:00
Matthew Wild
846a5e49fd Merge pull request #122 from snikket-im/feature/autocomplete-hints
Add autocomplete hints to password forms
2022-02-07 11:43:20 +00:00
Matthew Wild
b3ff7f04b5 Merge pull request #127 from snikket-im/fix/unhealthy
Install netcat in final image instead of build image
2022-02-07 11:42:40 +00:00
Jonas Schäfer
0ac4ab8142 Install netcat in final image instead of build image
`nc` (from netcat) is required for the healthcheck. In
c1cf6ab1e5, the installation was
erroneously moved to the builder image, instead of the final image, so
it was missing since then from the actual application image, causing it
to always show as unhealthy.

Fixes #126.
2022-02-05 13:51:30 +01:00
Matthew Wild
d4a38f5049 Merge pull request #125 from snikket-im/fix/support-requirements-compilation
Dockerfile: Add dev headers required for building deps
beta.20220119.2
2022-02-01 09:09:50 +00:00
Matthew Wild
344a4d3e93 Dockerfile: Add dev headers required for building deps 2022-02-01 09:04:25 +00:00
Matthew Wild
57f1047526 Merge pull request #124 from snikket-im/fix/support-requirements-compilation
Dockerfile: Ensure a compiler is available while pip-installing requirements
2022-02-01 08:16:33 +00:00
Matthew Wild
b036caa85e Dockerfile: Ensure a compiler is available while pip-installing requirements
Dependencies are not necessarily packaged for all architectures. In some cases
(such as aiohttp, and others, on ARM) pip will attempt to compile the
dependency from scratch. Since switching to multi-stage builds, we have been
installing these without a compiler present which caused the build to fail on
ARM architectures.

This commit temporarily installs build-essential packages while running pip,
then removes them again afterwards.
2022-01-31 21:45:39 +00:00
Matthew Wild
08845cb9f0 Merge pull request #123 from snikket-im/hotfix/error-handling
Fix error handling when building image
2022-01-31 18:11:58 +00:00
Jonas Schäfer
6aa6e12680 Fix error handling when building image
Apparently, we managed to publish an image without working aiohttp
because of this.

Partially a regression from 5d7183a.
2022-01-31 19:09:03 +01:00
Jonas Schäfer
4bd58c1104 Add autocomplete hints to password forms
This allows user agents to do smart things like filling in the current
password only where it makes sense or integrate nicely with a password
manager.

Fixes #94.
2022-01-22 15:34:27 +01:00
misiek
4f7a4fb5d4 Translated using Weblate (Polish)
Currently translated at 100.0% (321 of 321 strings)

Translation: Snikket/Web Portal
Translate-URL: http://i18n.sotecware.net/projects/snikket/web-portal/pl/
2022-01-21 15:00:36 +00:00
uira
34a23f8505 Translated using Weblate (Indonesian)
Currently translated at 100.0% (321 of 321 strings)

Translation: Snikket/Web Portal
Translate-URL: http://i18n.sotecware.net/projects/snikket/web-portal/id/
beta.20220119.1 beta.20220119
2022-01-18 14:59:01 +00:00
Jonas Schäfer
ebcb083b6a Translated using Weblate (German)
Currently translated at 100.0% (321 of 321 strings)

Translation: Snikket/Web Portal
Translate-URL: http://i18n.sotecware.net/projects/snikket/web-portal/de/
2022-01-18 14:59:01 +00:00
Kim Alvefur
2f0b38b149 Translated using Weblate (Swedish)
Currently translated at 100.0% (321 of 321 strings)

Translation: Snikket/Web Portal
Translate-URL: http://i18n.sotecware.net/projects/snikket/web-portal/sv/
2022-01-18 09:21:29 +00:00
Weblate
6244ad5c8a Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: Snikket/Web Portal
Translate-URL: http://i18n.sotecware.net/projects/snikket/web-portal/
2022-01-17 16:27:36 +00:00
Jonas Schäfer
07fa1f0abd Fix missing space in string 2022-01-17 17:27:26 +01:00
Weblate
3d22458f9b Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: Snikket/Web Portal
Translate-URL: http://i18n.sotecware.net/projects/snikket/web-portal/
2022-01-17 16:26:16 +00:00
Jonas Schäfer
3b768fe220 Extract translations 2022-01-17 17:26:02 +01:00
Matthew Wild
19cf82e894 Merge pull request #111 from snikket-im/fix/byte-scaling
Fix corner cases of byte number formatting
2022-01-17 15:47:57 +00:00
Matthew Wild
fe0316708b Merge pull request #113 from snikket-im/feature/flake8-print
Include flake8-print plugin
2022-01-17 15:47:21 +00:00
Jonas Schäfer
81b0a58dc9 Merge pull request #107 from Zash/storagestats
Show how much storage space is used by shared files
2022-01-17 16:40:16 +01:00
Jonas Schäfer
08aea153f9 Merge pull request #110 from snikket-im/feature/account-export
Feature: account import/export
2022-01-17 16:38:04 +01:00
Jonas Schäfer
958b3365f7 Remove strange greeting copied over from user_home 2022-01-17 16:34:30 +01:00
Matthew Wild
05caf38d37 Use PUT method instead of POST, as expected by API 2022-01-17 16:33:46 +01:00
Matthew Wild
390ecded42 Include PEP data in export/import 2022-01-17 16:33:29 +01:00
Matthew Wild
f6395d4d9c Complete the implementation of data import 2022-01-17 16:33:00 +01:00
Matthew Wild
32179c72cd Add account data import UI on registration success page 2022-01-17 16:24:00 +01:00
Matthew Wild
3cb8185b1a prosodyclient: Add API to import XEP-0227 account data 2022-01-17 16:23:58 +01:00
Matthew Wild
481379d03f Switch to HTTP 204 to indicate no data to export
This is more robust, as it indicates the request was successfully
authenticated and processed, but that there is no data to export. This is
different from the URL not existing (which would also happen if the module was
unavailable, which should be a notable error instead).
2022-01-17 16:23:57 +01:00
Matthew Wild
275b302531 Add UI for exporting user account data 2022-01-17 16:23:56 +01:00
Matthew Wild
e18f727db0 prosodyclient: Add support for exporting a user's account data 2022-01-17 16:23:55 +01:00
Matthew Wild
f7429413cd Add more icons to the repertoire 2022-01-17 16:23:35 +01:00
Jonas Schäfer
d5a46b69a6 Include flake8-print plugin
This alerts us of stray print statements, which should never occur
because this is a non-TUI application.
2022-01-15 17:07:16 +01:00
Jonas Schäfer
51f2ebbd13 Handle the correct exception when formatting extremely high amounts of bytes
Found in production. Yes really. Due to some borked LXC integration, my
snikket host reports

```
MemTotal:       9007199254740991 kB
MemFree:        9007199254690591 kB
MemAvailable:   9007199254690591 kB
```

That is more than 1024 TiB, so it tries to go further up in the scale,
which then causes a Guru Meditation because of the uncaught IndexError.
2022-01-10 17:32:11 +01:00
Jonas Schäfer
b4e6ee8943 Fix formatting of zero bytes
Previously, that would raise a ValueError (math domain error), because
log(0) is undefined.
2022-01-10 17:31:50 +01:00
Jonas Schäfer
52d8047546 Correctly detect presence of storage metric
If there have been no uploads yet, the metric will be zero, so the if
condition would fail the test, so it would render as "unknown".
2022-01-10 16:56:31 +01:00
Jonas Schäfer
aed9ad1cde Merge pull request #93 from Zash/debianbullseye
Dockerfile: Switch base image to Debian 11
2022-01-10 16:40:28 +01:00
Kim Alvefur
b545c137b1 Dockerfile: Switch base image to Debian 11 2022-01-10 16:27:38 +01:00
Matthew Wild
47642dc384 Merge pull request #108 from snikket-im/feature/multi-stage-dockerfile
Dockerfile: Split build into multiple stages
2022-01-10 14:21:57 +00:00
Jonas Schäfer
5d7183a0b8 Reinstate cache deletion in multi-stage build
Previously, the multi-stage build increased the image size by about 30
MiB (163MiB -> 191MiB). Dropping the caches reduces the image size down
to 159MiB, leading to a net improvement of 4 MiB.
2022-01-08 13:29:28 +01:00
Matthew Wild
c1cf6ab1e5 Dockerfile: Split build into multiple stages
Currently the Dockerfile has a single RUN directive with all the needed
commands in it. This optimizes for image size by not creating too many
"layers" (which are only additive). However it means the result that gets
cached can basically never be reused, because any change to the source code
will need to execute the whole RUN block again.

This commit switches to a docker "multi-stage" build, where we have a build
image that is separate from the final one that gets published. The build
image can be cached locally, and size is no longer a significant concern.

This approach allows the single RUN command to be split up into multiple RUN
commands that only execute when strictly needed (i.e. when their result
is not cached locally).

This drastically improves the build time when rebuilding the image after
a simple code change, because the build image doesn't have to install all
the apt packages, for example. This leads to a nicer developer experience
when using docker locally for development and testing.
2022-01-08 13:17:52 +01:00
Jonas Schäfer
aee53a2e1a Merge pull request #109 from snikket-im/feature/fix-mypy
Fix mypy false positives
2022-01-08 13:14:28 +01:00
Jonas Schäfer
3a81a0140b Revert "Fix spurious mypy error"
This reverts commit 28ff19c19c.
2022-01-08 13:12:30 +01:00
Jonas Schäfer
5b4d4ddd36 Fix some mypy regression 2022-01-08 13:12:30 +01:00
Jonas Schäfer
28ff19c19c Fix spurious mypy error
For whatever reason, it thinks that babel has no __version__ field, but
it in fact does.
2022-01-08 12:52:31 +01:00
uira
8e3837f704 Translated using Weblate (Indonesian)
Currently translated at 100.0% (303 of 303 strings)

Translation: Snikket/Web Portal
Translate-URL: http://i18n.sotecware.net/projects/snikket/web-portal/id/
beta.20220113
2021-12-12 07:00:42 +00:00
Kim Alvefur
4af78f635e Show how much storage space is used by shared files
Requires at least https://hg.prosody.im/prosody-modules/rev/883ad8b0a7c0
2021-11-18 19:50:47 +01:00
Matthew Wild
98e7de3166 Merge pull request #104 from snikket-im/feature/enable-restricted-users
admin: Show restricted user role in the UI
beta.20211118 beta.20211119
2021-11-09 17:03:08 +00:00
Matthew Wild
61c71b2145 admin: Inline restricted user role name
It was a variable only for the benefit of translators while disabled.
2021-11-09 17:00:59 +00:00