* add tests for privacy mode settings
* test privacy mode settings for member role
* test default language settings
* test denied keys interface for each role
* test adding new member interface depending on role
* test member details depending on role
* test invite button is disabled pending on user role
* disable ui if user is unelevated
* disable revoke button if unelevated and not own invite
* improve styling of disabled elements
* remove revoke if alias not made my current user
The landing path (/) can now also be used as a websocket endpoint.
This enables use of the room server with ssb-browser-demo and similar
applications that can't use TCP connections.
also pin WIP muxrpc branch (fix-stupid-timeout)
it could be they error on the call for a valid reason.
TODO:
* we need to make an IsConnectionError(err)
* maybe level up the gossip.ping code for liveliness.
to make sure the list of languages is sorted, we now use a slice of
TagTranslation{Tag: string, Translation: string} structs, sorted
by `TagTranslation.Tag`.
while working on the /set-language route, i noticed that i was getting a
csrf error for all /admin views when setting the language, while it
worked well on non-admin routes.
the issue, it turned out, was that we needed to configure gorilla's csrf
feature to set all cookies on the same route. when unconfigured, the
set cookies will only be set for the path they are being set at.
see more in the gorilla.csrf documentation (in particular the csrf.Path
option): https://pkg.go.dev/github.com/gorilla/csrf?utm_source=godoc#Path
i18n.ListLanguages() returns a map, mapping language tags ('en', 'sv')
to the names of their corresponding languages (as translated by the
language itself).
This functionality will be used in the language picker, to present a
nice list of the translated languages.
I renamed testing.go to conform to go's testing conventions, and
added a test for i18n.ListLanguages().