Commit Graph

364 Commits (f91e751383556c625e581db04272f1ad6c7b4803)

Author SHA1 Message Date
Eugen Rochko d67bd44ca1
Add profile setup to onboarding in web UI ()
Claire 07a4059901
Add support for invite codes in the registration API ()
Claire 23e32a4b30
Fix format-dependent redirects being cached regardless of requested format ()
Matt Jankowski d6f50839e1
Fix `RSpec/SpecFilePathFormat` cops ()
Claire bbf46cc418
Fix error and incorrect URLs in `/api/v1/accounts/:id/featured_tags` for remote accounts ()
Nick Schonning 85db392464
Autofix Rubocop cops for config/ ()
Claire b4e739ff0f
Change interaction modal in web UI ()
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Stanislas Signoud 5fad7bd58a
Change links in multi-column mode so tabs are open in single-column mode ()
Eugen Rochko 54a10523e2
Change labels of live feeds tabs in web UI ()
Matt Jankowski f8bd581126
Remove unused routes ()
Eugen Rochko 6637ef7852
Add unsubscribe link to e-mails ()
Nick Schonning c66250abf1
Autofix Rubocop Regex Style rules ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Claire bec6a1cad4
Add hCaptcha support ()
Matt Jankowski 41eb49b984
Extract large route namespace blocks to separate files ()
Claire 32a030dd74
Rewrite import feature ()
João Pedro Marques 8f6e290c7a
Adds new follower/following routes ()
Robert R George 4db8230194
Add trend management to admin API ()
Matt Jankowski 7bef11630d
Remove references to non-existent actions ()
Eugen Rochko 75e5a6e437
Change user backups to use expiring URLs for download when possible ()
Christian Schmidt bd047acc35
Replace `Status#translatable?` with language matrix in separate endpoint ()
Claire 59b24c3688
Fix `/api/v1/streaming` sub-paths not being redirected ()
Thijs Kinkhorst d15a9df6fe
Fix paths with url-encoded @ to redirect to the correct path ()
Connor Shea 30e895299c
Add listing of followed hashtags ()
* Add followed_tags route.

This at least gets us to the point where the page can actually be
rendered, although it doesn't display any hashtags (yet?).

Attempting to implement .

* Fix minor issues.

* I've got the followed tags data partially working

But the Hashtag component errors for some reason. Something about the
value of the history attribute being invalid.

* Fix a mistake in the code

* Minor change.

* Get the followed hashtags list fully working.

Still need to add the Follow/Unfollow buttons, though.

* Resolve JS linter issues.

* Add pagination logic to followed tags list view.

However, it currently loads further pages immediately on page load, so
that's not ideal. Need to figure that one out.

* Appease the linter.

* Apply suggestions from code review

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Fixes and resolve some other feedback.

* Use set/update instead of setIn/updateIn.

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Claire 343e1fe8e9
Add confirmation screen when handling reports ()
* Add confirmation screen on moderation actions

* Add flash notice when a report has been processed

* Refactor tests

* Add tests
lenore gilbert c373148b3d
Support for import/export of instance-level domain blocks/allows for 4.x w/ additional fixes ()
* Allow import/export of instance-level domain blocks/allows ()

* Allow import/export of instance-level domain blocks/allows.
Fixes 

* Pacify circleci

* Address simple code review feedback

* Add headers to exported CSV

* Extract common import/export functionality to
AdminExportControllerConcern

* Add additional fields to instance-blocked domain export

* Address review feedback

* Split instance domain block/allow import/export into separate pages/controllers

* Address code review feedback

* Pacify DeepSource

* Work around Paperclip::HasAttachmentFile for Rails 6

* Fix deprecated API warning in export tests

* Remove after_commit workaround

(cherry picked from commit 94e98864e3)

* Add confirmation page when importing blocked domains ()

* Move glitch-soc-specific strings to glitch-soc-specific locale files

* Add confirmation page when importing blocked domains

(cherry picked from commit b91196f4b7)

* Fix authorization check in domain blocks controller

(cherry picked from commit 7527937758)

* Fix error strings for domain blocks and email-domain blocks

Corrected issue with non-error message used for Mastodon:NotPermittedError in Domain Blocks
Corrected issue Domain Blocks using the Email Domain Blocks message on ActionContoller::ParameterMissing
Corrected issue with Email Domain Blocks using the not_permitted string from "custom emojii's"

* Ran i18n-tasks normalize to address test failure

* Removed unused admin.export_domain_blocks.not_permitted string

Removing unused string as indicated by Check i18n

* Fix tests

(cherry picked from commit 9094c2f52c)

* Fix domain block export not exporting blocks with only media rejection

(cherry picked from commit 26ff48ee48)

* Fix various issues with domain block import

- stop using Paperclip for processing domain allow/block imports
- stop leaving temporary files
- better error handling
- assume CSV files are UTF-8-encoded

(cherry picked from commit cad824d8f501b95377e4f0a957e5a00d517a1902)

Co-authored-by: Levi Bard <taktaktaktaktaktaktaktaktaktak@gmail.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Eugen Rochko 21fd25a269
Fix rate limiting for paths with formats ()
trwnh b59ce0a60f
Move V2 Filter methods under /api/v2 prefix ()
* Move V2 Filter methods under /api/v2 prefix

* move over the tests too
Claire dd7176a4b5
Fix redirects from /web/ discarding everything after a dot ()
Fixes 
Claire d70303bba6
Add server-side route so that legacy /web/statuses/:id URLs keep being supported ()
Claire b8f6f03956
Fix /users/:username/statuses/:id leading to a soft 404 in web app ()
Yamagishi Kazutoshi 31e23269f9
Fix `/web` prefix ()
Eugen Rochko ca6e92fdb8
Fix warning about constants in routes ()
Eugen Rochko f8ca3bb2a1
Add ability to view previous edits of a status in admin UI ()
* Add ability to view previous edits of a status in admin UI

* Change moderator access to posts to be controlled by a separate policy
Eugen Rochko 7c152acb2c
Change settings area to be separated into categories in admin UI ()
And update all descriptions
Eugen Rochko 839f893168
Change public accounts pages to mount the web UI ()
* Change public accounts pages to mount the web UI

* Fix handling of remote usernames in routes

- When logged in, serve web app
- When logged out, redirect to permalink
- Fix `app-body` class not being set sometimes due to name conflict

* Fix missing `multiColumn` prop

* Fix failing test

* Use `discoverable` attribute to control indexing directives

* Fix `<ColumnLoading />` not using `multiColumn`

* Add `noindex` to accounts in REST API

* Change noindex directive to not be rendered by default before a route is mounted

* Add loading indicator for detailed status in web UI

* Fix missing indicator appearing while account is loading in web UI
Eugen Rochko 1bd00036c2
Change about page to be mounted in the web UI ()
Eugen Rochko a2ba011326
Change privacy policy to be rendered in web UI, add REST API ()
Source string no longer localized, Markdown instead of raw HTML
Eugen Rochko 58d5b28cb0
Remove previous landing page ()
Eugen Rochko d2528b26b6
Add server banner to web app, add `GET /api/v2/instance` to REST API ()
Eugen Rochko 02ba9cfa35
Remove code for rendering public and hashtag timelines outside the web UI ()
Eugen Rochko 36f4c32a38
Change path of privacy policy page ()
Eugen Rochko 0d6b878808
Add user content translations with configurable backends ()
Eugen Rochko 2a7766dcc9
Add admin API for managing e-mail domain blocks ()
Eugen Rochko c556c3a0d1
Add admin API for managing canonical e-mail blocks ()
Eugen Rochko b399d79545
Add admin API for managing IP blocks ()
Claire 50487db122
Add ability to filter individual posts ()
* Add database table for status-specific filters

* Add REST endpoints, entities and attributes

* Show status filters in /filters interface

* Perform server-side filtering for individual posts filters

* Fix filtering on context mismatch

* Refactor `toServerSideType` by moving it to its own module

* Move loupe and delete icons to their own module

* Add ability to filter individual posts from WebUI

* Replace keyword list by warnings (expired, context mismatch)

* Refactor server-side filtering code

* Add tests
Claire 726931fe4a
Fix /api/v1/tags/:id route constraints ()
The constraint was applied prior to decoding, and rejected anything containing
the '%' character, which would be used for anything with non-ASCII unicode
characters.
Eugen Rochko c3f0621a59
Add ability to follow hashtags ()
Eugen Rochko 44b2ee3485
Add customizable user roles ()
* Add customizable user roles

* Various fixes and improvements

* Add migration for old settings and fix tootctl role management
Claire 02851848e9
Revamp post filtering system ()
* Add model for custom filter keywords

* Use CustomFilterKeyword internally

Does not change the API

* Fix /filters/edit and /filters/new

* Add migration tests

* Remove whole_word column from custom_filters (covered by custom_filter_keywords)

* Redesign /filters

Instead of a list, present a card that displays more information and handles
multiple keywords per filter.

* Redesign /filters/new and /filters/edit to add and remove keywords

This adds a new gem dependency: cocoon, as well as a npm dependency:
cocoon-js-vanilla. Those are used to easily populate and remove form fields
from the user interface when manipulating multiple keyword filters at once.

* Add /api/v2/filters to edit filter with multiple keywords

Entities:
- `Filter`: `id`, `title`, `filter_action` (either `hide` or `warn`), `context`
  `keywords`
- `FilterKeyword`: `id`, `keyword`, `whole_word`

API endpoits:
- `GET /api/v2/filters` to list filters (including keywords)
- `POST /api/v2/filters` to create a new filter
  `keywords_attributes` can also be passed to create keywords in one request
- `GET /api/v2/filters/:id` to read a particular filter
- `PUT /api/v2/filters/:id` to update a new filter
  `keywords_attributes` can also be passed to edit, delete or add keywords in
   one request
- `DELETE /api/v2/filters/:id` to delete a particular filter
- `GET /api/v2/filters/:id/keywords` to list keywords for a filter
- `POST /api/v2/filters/:filter_id/keywords/:id` to add a new keyword to a
   filter
- `GET /api/v2/filter_keywords/:id` to read a particular keyword
- `PUT /api/v2/filter_keywords/:id` to edit a particular keyword
- `DELETE /api/v2/filter_keywords/:id` to delete a particular keyword

* Change from `irreversible` boolean to `action` enum

* Remove irrelevent `irreversible_must_be_within_context` check

* Fix /filters/new and /filters/edit with update for filter_action

* Fix Rubocop/Codeclimate complaining about task names

* Refactor FeedManager#phrase_filtered?

This moves regexp building and filter caching to the `CustomFilter` class.

This does not change the functional behavior yet, but this changes how the
cache is built, doing per-custom_filter regexps so that filters can be matched
independently, while still offering caching.

* Perform server-side filtering and output result in REST API

* Fix numerous filters_changed events being sent when editing multiple keywords at once

* Add some tests

* Use the new API in the WebUI

- use client-side logic for filters we have fetched rules for.
  This is so that filter changes can be retroactively applied without
  reloading the UI.
- use server-side logic for filters we haven't fetched rules for yet
  (e.g. network error, or initial timeline loading)

* Minor optimizations and refactoring

* Perform server-side filtering on the streaming server

* Change the wording of filter action labels

* Fix issues pointed out by linter

* Change design of “Show anyway” link in accordence to review comments

* Drop “irreversible” filtering behavior

* Move /api/v2/filter_keywords to /api/v1/filters/keywords

* Rename `filter_results` attribute to `filtered`

* Rename REST::LegacyFilterSerializer to REST::V1::FilterSerializer

* Fix systemChannelId value in streaming server

* Simplify code by removing client-side filtering code

The simplifcation comes at a cost though: filters aren't retroactively
applied anymore.