Commit Graph

1185 Commits (2635c8dc5c19ea976b9fc787169244d7e8cec90a)

Author SHA1 Message Date
Eugen Rochko 5c9abdeff1
Add retention policy for cached content and media ()
Eugen Rochko 546672e292
Change "Allow trends without prior review" setting to include statuses ()
* Change "Allow trends without prior review" setting to include posts

* Fix i18n-tasks
Eugen Rochko 1d84cbeaab
Fix "select all matching items" being offered when all items are on the page ()
Eugen Rochko af396fa35f
Remove preference to aggregate reblogs in home/list feeds ()
Eugen Rochko 0b3e4fd5de
Remove digest e-mails ()
* Remove digest e-mails

* Remove digest-related code
Eugen Rochko 5b0e8cc92b
Add ability to select all accounts matching search for batch actions ()
Eugen Rochko d696f729f1
Add meta tag for official iOS app ()
Jeong Arm 42ff4dce41
Use type="color" on badge color input field ()
This informs browser to use interactive color picker
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
Jeong Arm d415f1116b
Fix /admin/accounts/ order parameter ()
Jeong Arm f248d95be2
Fix badge color not affected ()
* Fix badge color not affected

* Generate user role css
Jeremy Kescher ec83e2a35e
Fix missing scope for current_user in _sidebar.html.haml ()
Fixes https://github.com/mastodon/mastodon/issues/18821

Fix suggested by https://miaow.gay/@meganeko/108665430982072358
Jeong Arm ad489f865a
Fix custom.css html escaped ()
Claire ecb3bb3256
Add support for editing labelling of one's own role ()
Still disallow edition of rank or permissions
Eugen Rochko e7aa2be828
Change how hashtags are normalized ()
* Change how hashtags are normalized

* Fix tests
Claire befbac3f1c
Fix various in the user role management UI ()
* Reword priority description

* Disable checkboxes for permissions you can't enable in role edition interface

* Set max priority in HTML attribute

* Explicitly link to role edition, do not link when you can't edit

* Reword priority description based on review
Claire 0665ba8a23
Fix incorrect param in role card link ()
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.
Eugen Rochko 620b70c41e
Remove item titles from RSS feeds ()
Claire 37cd984acf
Fix logo gradient not working on some Safari and Blink-based browsers ()
Works around https://bugs.chromium.org/p/chromium/issues/detail?id=258029
Eugen Rochko 45aa5781ce
Change brand color and logotypes ()
- Add rake task for generating Apple/Android icons and favicons from SVG
- Add rake task for generating PNG icons and logos for e-mails from SVG
- Remove obsolete Microsoft icons and configuration
- Remove PWA shortcut icons
Eugen Rochko a2871cd747
Add administrative webhooks ()
* Add administrative webhooks

* Fix error when webhook is deleted before delivery worker runs
Jeong Arm dc7e2985e6
Add lang html attr to each posts ()
Jeong Arm 12535568f7
Fix rss view on hashtag ()
Eugen Rochko 2b8dc58b7f
Change RSS feeds ()
* Change RSS feeds

- Use date and time for titles instead of ellipsized text
- Use full content in body, even when there is a content warning
- Use media extensions

* Change feed icons and add width and height attributes to custom emojis

* Fix custom emoji animate on hover breaking

* Fix tests
Claire 991353682d
Fix ambiguous wording on appeal actions ()
Fixes 
Stefano Pigozzi 99d7684dfd
Replace leftover `envelope` icons with `at` icons ()
Claire 5c691430e5
Fix error on attempting to delete an account moderation note ()
Fixes 
Claire e7f0c9f7da
Pre-fill domain block/allow domain from search filter ()
Chris Dzombak 9bf04db23a
Fix incorrect link in "new trending tags" email ()
Closes 
Eugen Rochko 8e20e16cf0
Change e-mail notifications to only be sent when recipient is offline ()
* Change e-mail notifications to only be sent when recipient is offline

Change the default for follow and mention notifications back on

* Add preference to always send e-mail notifications

* Change wording
Eugen Rochko fd9a9b07c2
Fix trends returning less results per page when filtered in REST API ()
- Change filtering and pagination to occur in SQL instead of Redis
- Change rank/score displayed on trends in admin UI to be locale-specific
Eugen Rochko 6221b36b27
Remove sign-in token authentication, instead send e-mail about new sign-in ()
Claire 2c45859ca9
Refactor account and status formatting ()
* Refactor status formatting

* Add account formatting helpers

* Remove StatusFormatter

* Fixup

* Fix copied typo
Eugen Rochko cefa526c6d
Refactor formatter ()
* Refactor formatter

* Move custom emoji pre-rendering logic to view helpers

* Move more methods out of Formatter

* Fix code style issues

* Remove Formatter

* Add inline poll options to RSS feeds

* Remove unused helper method

* Fix code style issues

* Various fixes and improvements

* Fix test
Eugen Rochko 2dd30804b6
Change how unconfirmed accounts are displayed in admin UI ()
Fix 
mayaeh 52813830be
Add a hashtag public link to the trending hashtag page ()
* Add a hashtag public link to the hashtag management page

* Add support for element 'target' to Counter.js.
Remove 'rel' element.

* Update app/javascript/mastodon/components/admin/Counter.js

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

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Jeong Arm 6907605026
Add stop delivery link also for failing instance ()
Claire 749fe73ec4
Add tooltip for instance delivery warnings ()
Eugen Rochko 392b367835
Fix IDN domains not being rendered correctly in a few left-over places ()
Gomasy cf5435bb27
Fix being unable to search by domain ()
Claire 9b139d4ef9
Fix “edited at” in public pages not being properly localized ()
Fixes 
Eugen Rochko a794117679
Fix individually approved/rejected statuses/links showing as pending review ()
Eugen Rochko 91616004fe
Fix not being able to upload GIF emojis in admin UI ()
Eugen Rochko 5db1f377ea
Fix nil error when viewing suspended domain in admin UI ()
Claire 3bc0aeed50
Change text version of warning mail to mention appeals instead of mails ()
Also, the instruction to reply to e-mail would probably not work in many cases
where the notifications e-mail address is not able to receive incoming emails
or the mailbox is not actively monitored.
Eugen Rochko d17fb70131
Change how changes to media attachments are stored for edits ()
* Change how changes to media attachments are stored for edits

Fix not being able to re-order media attachments

* Fix not broadcasting updates when polls/media is changed through ActivityPub

* Various fixes and improvements

* Update app/models/report.rb

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

* Add tracking of media attachment description changes

* Change poll in status edit to have a structure closer to the real one

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Eugen Rochko bd53dd5210
Change design of federation pages in admin UI ()
* Change design of federation pages in admin UI

* Fix query performance in instance media attachments measure

* Fix reblogs being included in instance languages dimension
Eugen Rochko dba4be1038
Change appearance of account cards in web UI ()
* Change appearance of account cards in web UI

* Various fixes and improvements

* Various fixes and improvements