Port front-end part of 9660aa4543 to glitch-soc
[API] This makes use of a new media posting API (/api/v2/media), supporting
background processing of uploaded files. For Pleroma's purposes, this could
be handled the same as /api/v1/media since afaik Pleroma doesn't do any
transcoding.
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Conflicts:
- `README.md`:
Our README.md files are completely different. Discarded upstream changes.
- `app/javascript/core/admin.js`:
Updating rails-ujs, no real conflict, but a comment to close to changed
code. Various glitch-soc-only files have been updated to match those changes,
though.
- `package.json`:
No real conflict, just an additional dependency in glitch-soc that was too
close to something updated upstream. Took upstream's changes.
This two-line change fixes a crash in the front end that occurred
under the following circumstances:
* A server had more than one announcement,
* A user was displaying the announcements, and
* An announcement was deleted (or unpublished, which amounts to
the same thing.)
As might be expected, the bug was caused by attempting to access a
notification using an index value outside the bounds of the existing
announcements. Specifically, in two places. First,
`_markAnnouncementAsRead` attempts to modify announcements based on
the current index. This is what caused the front end crash. Second,
when rendering the `Announcements` component, the code paginates the
announcements and displays the current one. This did not cause a
crash, but caused the front end to confusingly display a blank
announcement (in situations that would have caused a crash) with no
way for the user to navigate back to previous announcements.
This commit fixes both issues by adding a check to ensure that the
code never attempts to access an announcement with an index greater
than or equal to the number of announcements present.
Only look up private toots from database if the request failed because of 401,
403 or 404 errors, as those may indicate a private toot, rather than something
that isn't a toot or cannot be processed.
* Change ActivityPub follower/following collections to not link first page
* Add support for hiding followers and following of remote users
* Switch to using a single `hide_collections` column
* Address code style remarks
Conflicts:
- `app/controllers/api/v1/statuses_controller.rb`:
Conflict due to upstream adding a new parameter (with_rate_limit),
too close to glitch-soc's own additional parameter (content_type).
Added upstream's parameter.
- `app/services/post_status_service.rb`:
Conflict due to upstream adding a new parameter (rate_limit),
too close to glitch-soc's own additional parameter (content_type).
Added upstream's parameter.
- `app/views/settings/preferences/appearance/show.html.haml`:
Conflict due to us not exposing theme settings here (as we have
a different flavour/skin menu).
Took upstream change, while still not exposing theme settings.
- `config/webpack/shared.js`:
Coding style fixes for a part we have rewritten.
Discarded upstream changes.
* Improve description of privacy levels in compose interface
* Change strings in defaultMessage and source as well as english
Co-authored-by: Thibaut Girka <thib@sitedethib.com>