Commit Graph
100 Commits
Author SHA1 Message Date
ThibGandEugen Rochko c05ed8a625 Fix poll options not being selectable via keyboard (#12538)
* Fix poll options not being selectable via keyboard

Fixes #12384

* Improve styling of poll option checkboxes/radio buttons

* Use more appropriate ARIA roles for poll options

* Allow switching between single and multiple choice from keyboard

* Coding style

* Avoid using .bind()
2019-12-03 19:53:16 +01:00
ThibGandEugen Rochko 27d5d02925 Fix blocking/unblocking users from status dropdown menu (#12535)
Fixes #12511
2019-12-02 18:25:24 +01:00
ThibGandEugen Rochko 4195039420 Link to reports targetting instance in admin view (#12513) 2019-12-01 19:03:43 +01:00
ThibGandEugen Rochko 911cc14481 Add follow_request notification type (#12198)
* Add follow_request notification type

The notification type already existed in the backend but was never pushed
to the front-end. This also means translation strings were also available
for the backend, from the notification mailer.

Unlike other notification types, these are off by default, to match what
I remember of Gargron's view on the topic: that follow requests should not
clutter notifications and should instead be reviewed at the user's own
leisure in the dedicated column.

Since follow requests have their own column, I've deemed it unnecessary to
add a specific tab for them in the notification quick filter.

* Show follow request link in single-column if there are pending requests, even if account isn't locked

* Push follow requests from notifications to the follow_requests list

* Offer to accept or reject follow request from the notification

* Redesign follow request notification
2019-12-01 17:25:29 +01:00
ThibGandEugen Rochko f60cd97638 Only normalize local polls (#12515)
Before this patch, if remote poll options have leading or trailing spaces,
the information stored locally won't match them, causing federated voting to
fail.
2019-12-01 17:24:33 +01:00
ThibGandEugen Rochko f05b0463db Fallback to Create audience when object has no defined audience (#12249)
Fixes #11137
2019-11-30 19:58:00 +01:00
ThibGandEugen Rochko d8f96028c5 Add ability to filter reports by target account domain (#12154)
* Add ability to filter reports by target account domain

* Reword by_target_domain label
2019-11-30 19:53:58 +01:00
ThibGandEugen Rochko 35b142a7ad Fix lost focus when modals open/close (#12437)
* Fix lost focus after modal closes

Regression caused by the use of the wicg-inert polyfill

* Fix regression introduced by wicg-inert

* Catch errors to please CodeClimate
2019-11-30 18:19:47 +01:00
ThibGandEugen Rochko a690b3e470 Add hotkey for opening media files (#12498)
* [WiP] Add hotkey to open media

* Give focus to play/pause button when opening video modal
2019-11-29 17:02:35 +01:00
ThibGandEugen Rochko 667708f5b0 Fix pending upload count not being decremented on error (#12499)
The arguments were passed to the wrong function… also, there is no
need to have a conditional decrementation: failure to upload means
we marked an upload as pending, in all cases.
2019-11-29 17:02:18 +01:00
ThibGandEugen Rochko 00c219aa45 Fix empty poll options not being filtered on remote poll update (#12484)
If a poll contains empty options (which is apparently possible on Pleroma),
it is created without them. However, the poll update code doesn't filter
empty options, and thus:
1. Clear known votes, as it assumes the set of options has changed
2. Errors out because it tries adding empty options, which fails validation

This commit fixes that by filtering them out the same way they are filtered
out at poll creation time.
2019-11-26 22:46:31 +01:00
ThibGandEugen Rochko e7a7f88df7 Fix OCR with delete & redraft (#12465) 2019-11-25 01:42:51 +01:00
ThibGandYamagishi Kazutoshi 00b8704a32 Revert "Bump tesseract.js from 2.0.0-alpha.16 to 2.0.0-beta.2 (#12311)" (#12454)
This reverts commit 0c20442605.
2019-11-24 12:16:41 +09:00
ThibGandEugen Rochko 42b3b019e0 Fix blur behind closed registration message (#12442)
* Fix closed registration message blur

* Adjust overlay margins to account for blur

Fixes #12425
2019-11-22 15:56:59 +01:00
ThibGandEugen Rochko 2edf6d81cb Simplify SQL query when performing account search amongst followings (#12302) 2019-11-21 17:35:04 +01:00
ThibGandEugen Rochko c656cc2191 Fix FetchLinkCardServices crashing on a tags without a target (#12159)
* Add test for links without targets

* Fix FetchLinkCardServices crashing on a tags without a target
2019-11-21 16:04:52 +01:00
ThibGandEugen Rochko e86234b1e9 Change media description label to be context-sensitive (#12270)
“Describe for the visually impaired” makes no sense when the uploaded media
is an audio file.
2019-11-21 11:39:07 +01:00
ThibGandEugen Rochko c4d45765e3 Change domain block behavior to update user records before deleting data (#12247)
When suspending or silencing a domain, one probably wants the silence or
suspend parts to take effect as soon as possible. Deleting media files can
take a while (possibly days), so perform silencing as soon as possible, and
clean up media afterwards.
2019-11-21 11:36:15 +01:00
ThibGandEugen Rochko dfea7368c9 Add bookmarks (#7107)
* Add backend support for bookmarks

Bookmarks behave like favourites, except they aren't shared with other
users and do not have an associated counter.

* Add spec for bookmark endpoints

* Add front-end support for bookmarks

* Introduce OAuth scopes for bookmarks

* Add bookmarks to archive takeout

* Fix migration

* Coding style fixes

* Fix rebase issue

* Update bookmarked_statuses to latest UI changes

* Update bookmark actions to properly reflect status changes in state

* Add bookmarks item to single-column layout

* Make active bookmarks red
2019-11-13 23:02:10 +01:00
ThibGandEugen Rochko a2014830c2 Fix broken admin audit log in whitelist mode (#12303) 2019-11-11 00:05:15 +02:00
ThibGandEugen Rochko 0d6da8892a Fix unread toot indicator not honoring onlyMedia in public and community timelines (#12330)
* Fix unread toot indicator not honoring onlyMedia in public and community timelines

* Fixup: `unread` already accounts for new content in pending items
2019-11-11 00:05:02 +02:00
ThibGandEugen Rochko 0d5f3ae331 Fix already-known remote private toots not being searchable by URL (#12336)
* Fix already-known remote private toots not being searchable by URL

Whenever an URL search fails, and an account is provided, try getting a
private status matching that URL from database.

* Fix searching by `id` field instead of `uri`
2019-11-11 00:04:48 +02:00
ThibGandEugen Rochko 514e427bd2 Fix relationship caches being broken as result of a follow request (#12299) 2019-11-07 09:08:00 +02:00
ThibGandEugen Rochko 66684c489c Fix WebUI allowing to upload more items than the limit (#12300)
Until this patch, drag'n'drop and copy-paste allowed to start uploading as
long as the number of *finished* uploads was below the limit.
2019-11-07 09:07:03 +02:00
ThibGandEugen Rochko 7cdb8c10e9 Minor improvements to poll composing UI (#12319)
- Disable the “add option” button instead of hiding it
- Allow poll option inputs to scale to full width
2019-11-07 09:06:06 +02:00
ThibGandEugen Rochko 66c1fe0495 Fix various issues with account migration (#12301)
* Fix being able to follow oneself by moving to an account that was following the old one

* Add specs

* Add spec to catch MoveWorker issue with local followers following both accounts

* Fix move worker breaking when a local account follows both source and target accounts

* Fix migration from remote to local account not sending Undo Follow

* Fix show_reblogs not being preserved for moved account's followers
2019-11-07 09:05:07 +02:00
ThibGandEugen Rochko e37358b3bc Fix code referencing wrong class (#12263)
For some reason, I have seen this only triggered here:
https://circleci.com/gh/tootsuite/mastodon/98324?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-checks-link

But Follow.find_by referenced the ActivityPub::Activity::Follow class
instead of the model class.
2019-11-04 13:02:27 +01:00
ThibGandEugen Rochko 3db3c10762 Fix filtered out items being counted as pending items (#12266) 2019-11-04 13:02:16 +01:00
ThibGandEugen Rochko 65e13cfacf Add abilityto add oneself to lists (#12271)
* Add ability to add oneself to lists

* Change search results to include oneself when searching through followers

* Mark follow relation as optional in ListAccount
2019-11-04 13:02:01 +01:00
ThibGandEugen Rochko 1a12943924 Fix notification filters not applying to poll options (#12269) 2019-11-04 13:01:50 +01:00
ThibGandEugen Rochko 650820d62d Fix remote media descriptions being cut off at 420 chars (#12262)
* Fix remote media descriptions being cut off at 420 chars

Fixes #12258

* Fix tests
2019-11-04 13:00:16 +01:00
ThibGandEugen Rochko 7488a9e154 Add support for submitting media description with ctrl+enter (#12272) 2019-11-04 12:59:17 +01:00
ThibGandEugen Rochko 15c192ce40 Add link to search for users connected from the same IP address (#12157)
* Add link to search for users connected from the same IP address

Fixes #11949

* Fix missing cell in admin account view table
2019-10-24 22:49:26 +02:00
ThibGandEugen Rochko bcf694dce7 Fix volume slider in chromium 🤷 (#12158)
Fixes #12156
2019-10-24 22:49:12 +02:00
ThibGandEugen Rochko 3a929dbedd Replace fav icon animation with CSS (#12175)
Fixes #12151
2019-10-24 22:47:48 +02:00
ThibGandEugen Rochko aa884e0484 Fix batch actions being hidden from mobile view (#12183)
On mobile, batch actions are hidden from the settings/admin interface,
but there are several places those actions can only be performed through
batch actions.

This may not look great, but at least it makes the actions available again.
2019-10-24 22:46:59 +02:00
ThibGandEugen Rochko bd684e25d9 Fix incoming federation in whitelist mode (#12185)
… posting to the AP inbox required a logged-in local user…
2019-10-24 22:45:35 +02:00
ThibGandEugen Rochko 699f53c464 Fix RSS caching (but disable localization) (#12054) 2019-10-02 18:30:33 +02:00
ThibGandEugen Rochko 559da46fd4 Fix typo in mute confirmation dialog (#12044) 2019-10-01 23:55:11 +02:00
ThibGandEugen Rochko 26a8c6fd2d Fix custom emoji animation on hover in conversations view (#12040) 2019-10-01 17:11:14 +02:00
ThibGandEugen Rochko 3a4d994c40 Fix BootstrapTimelineService crashing when bootstrapped accounts are invalid (#12037)
* Add test to handle suspended and missing users in BootstrapTimelineService

* Fix BootstrapTimelineService crashing when bootstrapped accounts are invalid
2019-10-01 15:10:00 +02:00
ThibGandEugen Rochko 541269f8bc Fix missing propType for conversation delete (#12035) 2019-10-01 15:07:58 +02:00
ThibGandEugen Rochko 3babf8464b Add voters count support (#11917)
* Add voters count to polls

* Add ActivityPub serialization and parsing of voters count

* Add support for voters count in WebUI

* Move incrementation of voters count out of redis lock

* Reword “voters” to “people”
2019-09-29 22:58:01 +02:00
ThibGandEugen Rochko 9027bfff0c Add explanation to mute dialog, refactor and clean up mute/block UI (#11992)
* Add some explanation to the mute modal dialog

* Remove `isSubmitting` from mute modal code, this wasn't used

* Refactor block modal

Signed-off-by: Thibaut Girka <thib@sitedethib.com>

* Refactor SCSS a bit

* Put mute modal toggle to the same side as in the report dialog for consistency

* Reword mute explanation

* Fix mute explanation styling

* Left-align all text in mute confirmation modal
2019-09-29 21:46:05 +02:00
ThibGandEugen Rochko 15b3eeb326 Change vote results to display ex-aequo leading options as leading (#12001) 2019-09-29 21:23:40 +02:00
ThibGandEugen Rochko b0cda7a504 Fix vote checkmark in poll results (#11990) 2019-09-28 19:41:36 +02:00
ThibGandEugen Rochko 18b451c0e6 Change silences to always require approval on follow (#11975)
* Change silenced accounts to require approval on follow

* Also require approval for follows by people explicitly muted by target accounts

* Do not auto-accept silenced or muted accounts when switching from locked to unlocked

* Add `follow_requests_count` to verify_credentials

* Show “Follow requests” menu item if needed even if account is locked

* Add tests

* Correctly reflect that follow requests weren't auto-accepted when local account is silenced

* Accept follow requests from user-muted accounts to avoid leaking mutes
2019-09-27 21:13:51 +02:00
ThibGandEugen Rochko 860a77d45e Avoid storing audio and video file data in memory (#11974) 2019-09-27 15:22:11 +02:00
ThibGandEugen Rochko 7baedcb61e Use blob URL for Tesseract to avoid CORS issues (#11964) 2019-09-27 02:16:11 +02:00
ThibGandEugen Rochko b359974d9b Show user what options they have voted (#11195)
* Add own_votes field to poll results in REST API

Fixes #10679

* Display user votes in WebUI

* Update styling

* Add vote checkmark to public pages
2019-09-22 14:15:18 +02:00
ThibGandEugen Rochko 577706987d Fix “load more” adding older toots/notifications to pending items (#11883) 2019-09-18 11:27:10 +02:00
ThibGandEugen Rochko d256901f60 Change timelines to add new items to pending items when scrolled down (#11867) 2019-09-16 19:39:44 +02:00
ThibGandEugen Rochko d41494226d Fix poll options checkboxes/radio buttons not being vertically centered (#11833) 2019-09-16 16:12:18 +02:00
ThibGandEugen Rochko f109867578 Fix “slow mode” issues (#11859)
* Fix weird scroll-jumping behavior with pending items

* Treat pending items as unread items

* Fix scroll position being altered because of the “X new items” button
2019-09-16 15:45:06 +02:00
ThibGandEugen Rochko 524187b653 Fix expiring polls not being displayed as such in the WebUI (#11835)
* Fix expiring polls not being displayed as such in the WebUI

* Reset expiration state and timer when a poll changes

* Refactor timer logic in `_setupTimer`, only set expiration if props have changed

* Refactor and do not use deprecated React lifecycles
2019-09-16 14:32:26 +02:00
ThibGandEugen Rochko c00ab575b7 Fix media description button being disabled at 420 characters instead of 1500 (#11836) 2019-09-14 00:52:56 +02:00
ThibGandEugen Rochko cf2b708e6b Fix display of long poll options (#11717) 2019-09-13 16:04:09 +02:00
ThibGandEugen Rochko 225edac118 Change /api/v1/timelines/public to require auth when public preview is off (#11802)
Fixes #11289
2019-09-13 16:03:46 +02:00
ThibGandEugen Rochko 4faaa5b25e Add updated relationship to follow request API responses (#11800)
Fixes #11747
2019-09-10 20:56:42 +02:00
ThibGandEugen Rochko 17389c63c8 Change /admin/custom_emoji to honor the auto_play_gif setting (#11801)
Fixes #9535
2019-09-10 20:56:07 +02:00
ThibGandEugen Rochko 2b2b03a7da Fix duplicate HTML ids in /about (#11803)
Fixes #11329
2019-09-10 20:55:23 +02:00
ThibGandEugen Rochko ec2a439a22 Add account bio to account admin view (#11473)
* Add account bio to account admin view

* Change styling to make bio fields / content more readable
2019-09-09 14:15:52 +02:00
ThibGandEugen Rochko 1653b58777 Attempt to concurrently connect to remote IP addresses (#11757)
* Attempt to concurrently connect to remote IP addresses

* Reduce code length to please CodeClimate 🤷
2019-09-05 05:32:53 +02:00
ThibGandEugen Rochko c1e238a77b Fix admin interface showing superfluous reject media/reports on suspended blocks (#11749)
* Fix admin interface showing superfluous reject media/reports on suspended domains

* Fix reject media/reports checkboxes being visible when editing domain block of suspend severity
2019-09-03 22:53:27 +02:00
ThibGandEugen Rochko 692c5b439a Fix ActivityPub context not being dynamically computed (#11746)
* Fix contexts not being dynamically included

Fixes #11649

* Refactor Note context in serializer

* Refactor Actor serializer
2019-09-03 22:52:32 +02:00
ThibGandEugen Rochko 0ea53122f2 Fix Mastodon logo style on hover on public pages' footer (#11735)
Fixes #11690
2019-09-02 18:12:12 +02:00
ThibGandEugen Rochko 6493f4ffae Fix height of dashboard counters (#11736) 2019-09-02 18:11:34 +02:00
ThibGandEugen Rochko 34eac5a1ec Fix custom emoji animation on hover in WebUI directory bios (#11716) 2019-09-01 20:04:35 +02:00
ThibGandEugen Rochko 6914482d0a Change detailed status child ordering to sort self-replies on top (#11686)
Fixes #11679
2019-08-30 01:57:38 +02:00
ThibGandEugen Rochko 7802ebd5f3 Revert bcrypt to 3.1.12, again (#11693)
Same reasons as in #11555
2019-08-29 20:51:30 +02:00
ThibGandEugen Rochko 81f864d4da Add special alert for throttled requests (#11677)
* Add special alert for throttled requests

* Use an extra attribute instead of an array
2019-08-27 16:50:39 +02:00
ThibGandEugen Rochko fd3d45d38f Add confirmation modal when logging out from the web app (#11671)
* [WiP] Add a confirmation modal before logging out from the web interface

* Add confirmation to logout link in getting started footer

* Please CodeClimate
2019-08-26 18:24:10 +02:00
ThibGandEugen Rochko 91582937f3 Fix crash when switching back/from mobile layout (#11655)
Fixes #11630
2019-08-25 15:49:02 +02:00
ThibGandEugen Rochko bd4099d976 Change window resize handler to switch to/from mobile layout as soon as needed (#11656) 2019-08-25 15:48:50 +02:00
ThibGandEugen Rochko 37f612074e Fix items in StatusContent render list not all having a key (#11645) 2019-08-23 21:02:59 +02:00
ThibGandEugen Rochko 5ab1e0e738 Restore hashtag suggestions from local tag history (#11632)
* Restore hashtag suggestions from local tag history

* Append local hashtag suggestions instead of prepending them

* Do not display inaccurate usage statistics for hashtags not retrieved from API

* Fixup
2019-08-22 04:37:18 +02:00
ThibGandEugen Rochko d857d0d14d Fix trending hashtags being fetched every 36 seconds instead of every hour (#11631) 2019-08-21 00:18:07 +02:00
ThibGandEugen Rochko b48c7ee059 Fix handling of audio files in account media gallery (#11629)
Fixes #11627
2019-08-20 19:46:41 +02:00
ThibGandEugen Rochko 97af209c31 Revert "Bump react-redux-loading-bar from 4.0.8 to 4.4.0 (#11609)" (#11625)
This reverts commit 2e44b81166.
2019-08-20 02:19:01 +02:00
ThibGandEugen Rochko 8203e24cf4 Fix CSP needlessly allowing blob URLs in script-src (#11620) 2019-08-19 20:36:58 +02:00
ThibGandEugen Rochko 0d13a9cd13 Fix hidden statuses losing focus (#11208)
Fixes #10991
2019-08-19 19:00:33 +02:00
ThibGandEugen Rochko cb62a83a71 Add invite comments (#10465) 2019-08-19 11:40:42 +02:00
ThibGandEugen Rochko 9b6a5ed109 Add public blocks to /about/blocks (#11298)
* Add automatic blocklist display in /about/blocks

Inspired by https://github.com/Gargron/mastodon.social-misc

* Add admin option to set who can see instance blocks

* Normalize locales files

* Rename “Sandbox” to “Silence” for consistency

* Disable /about/blocks when in whitelist mode

* Optionally display rationale for domain blocks

* Only display domain blocks that have user-facing limitations, and order them

* Redesign table of blocked domains to better handle long domain names and rationales

* Change domain blocks ordering now that rationales aren't displayed right away

* Only show explanation for block severities actually in use

* Reword instance block explanations and add disclaimer for public fetch mode
2019-08-19 11:35:48 +02:00
ThibGandEugen Rochko 53071389ee Fix multiple issues with replies collection for pages further than self-replies (#11582)
* Fix the replies collection returning snowflakes ids rather than URIs

Fixes #11568

* Fix min_id in replies queries once self-replies are exhausted

* Fix `next` attribute of replies collection being nil when there are no self-replies

* Rename other_accounts param to only_other_accounts
2019-08-16 22:58:51 +02:00
ThibGandEugen Rochko 2ca6b2bb6c Improve focal point modal on mobile (#11575)
* Reduce padding around report modal and focal point modal title

* Increase max allowed height for focal point modal content
2019-08-15 22:49:00 +02:00
ThibGandEugen Rochko d37126fd03 Allow clicking behind preview (#11576) 2019-08-15 22:47:51 +02:00
ThibGandEugen Rochko f178a01c11 Fix client-side resizing of image uploads (#11570)
Fixes #11567
2019-08-15 11:52:26 +02:00
ThibGandEugen Rochko 7ffec882ae Fix reverse-proxy caching of instance actor object (#11561) 2019-08-13 15:30:37 +02:00
ThibGandEugen Rochko 5f63339744 Fix more ActivityPub queries setting cookies and preventing caching (#11557) 2019-08-12 22:26:07 +02:00
ThibGandEugen Rochko 789cb3c028 Revert bcrypt to 3.1.12 (#11555) 2019-08-12 17:52:12 +02:00
ThibGandEugen Rochko 646f96d448 Fix ActivityPub and REST API queries setting cookies and preventing caching (#11539)
Regression from #8657
2019-08-11 22:59:40 +02:00
ThibGandEugen Rochko fd01043691 Fix “read more” button behing hidden (regression from #11404) (#11522)
* Fix “read more” button behing hidden (regression from #11404)

This has the side-effect of putting the “Read more” button below possibly
trunctated polls instead of putting the poll below the “Read more”

* Remove dead code
2019-08-08 17:05:50 +02:00
ThibGandEugen Rochko bced70469a Add domain block notes (#11515)
* Add database columns for adding notes to domain blocks/restrctions

* Add admin UI to set private and public comments when blocking a domain

* Add text for private and public comments on domain blocks

* Show domain block comments in admin UI

* Add comments to the domain block undo page

* Make UnblockDomainService more robust regarding upgraded domain blocks

* Allow editing domain blocks

* Rename button from “undo domain block” to “view domain block” in account admin UI

* Change test to unsilence silenced users from upgraded blocks
2019-08-07 20:20:23 +02:00
ThibGandEugen Rochko 396b8cdd0f Improve focus handling with dropdown menus (#11511)
- Focus first item when activated via keyboard
- When the dropdown menu closes, give back the focus to
  the actual element which was focused prior to opening the menu
2019-08-07 13:58:53 +02:00
ThibGandEugen Rochko 111a0628fc Fix image uploads being perfectly white when canvas read access is blocked (#11499)
Fixes #11496
2019-08-06 12:08:19 +02:00
ThibGandEugen Rochko 27a0d02d0d Improve keyboard navigation in privacy dropdown (#11492)
* Trap tab in privacy dropdown

* Give focus back to last focused element when privacy dropdown menu closes

* Actually give back focus to the element that had it before clicking the dropdown
2019-08-06 11:59:58 +02:00
ThibGandEugen Rochko a12f1a0baf Improve dropdown menu keyboard navigation (#11491)
* Allow selecting menu items with the space bar in status dropdown menus

* Fix modals opened by keyboard navigation being immediately closed

* Fix menu items triggering modal actions

* Add Tab trapping inside dropdown menu

* Give focus back to last focused element when status dropdown menu closes
2019-08-06 11:59:46 +02:00
ThibGandEugen Rochko 5c73746b69 Trap tab in modals (#11493) 2019-08-06 11:59:28 +02:00
ThibGandEugen Rochko 792d0dd470 Fix privacy dropdown active state when dropdown is placed on top of it (#11495) 2019-08-06 11:59:14 +02:00
ThibGandEugen Rochko c8fd823327 Change icon button styles to make hover/focus states more obvious (#11474)
* Change icon buttons styles to make hover/focused states more obvious

* Fix CW button size inconsistency

* Fix icon button background color consistency
2019-08-03 19:10:50 +02:00