the change to take a hostname in Post.CanonicalURL broke a few template
using that function. This adds a Hostname string to the Post being
passed to templates and passes it to calls to Post.CanonicalURL
This includes the instance's hostname in calls to export a CSV file and
PublicPost.CanonicalURL().
It also fixes a panic in that method during CSV export caused by draft
posts.
This adds a User.IsSuspended() method and uses it when displaying the
user's status on admin pages, instead of doing a magic number check.
This should also help in the future, in case this logic ever changes.
Ref T661
this changed the CLI flag to use the username instead of the userID
leaving the underlying database function as is.
also now posts are all deleted with no option to skip as this is likely
never needed.
CLI only but backend supports calls from app.db.DeleteAccount already
takes --delete-account user_id_number with optional --posts to also
delete posts. if --posts is omitted all user posts will be updated to
anonymous posts
- update error messages to be correct
- move suspended message into template and include for other pages
- check suspended status on all relevant pages and show message if
logged in user is suspended.
- fix possible nil pointer error
- remove changes to db schema files
- add version comment to migration
- add UserStatus type with UserActive and UserSuspended
- change database table to use status column instead of suspended
- update toggle suspended handler to be toggle status in prep for
possible future inclusion of further user statuses
This just queries the browser whether `prefers-color-scheme` is set
and chooses dark mode if needed, and only if the user hasn't manually
set a scheme by pushing the button.
this adds a helper script to rewrite all time elements with a proper
datetime attribute into the users locale via the browser
navigator.language.
collection, collection-post and chorus-collection-post templates now
include this script
font-size-adjust is still a flag-enabled feature in Chrome 77, and
doesn't have widespread support across browsers. So instead this uses
font-size to make the text large enough.
Ref T690
This uses the Invite fetched from the database to explain a bit more
about how the invite URL expires. It also reduces some space around the
input box.
Ref T690