mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 01:18:08 +01:00
Merge branch 'glitch' into develop
This commit is contained in:
commit
7df41062ba
334 changed files with 4386 additions and 3754 deletions
4
.github/workflows/build-nightly.yml
vendored
4
.github/workflows/build-nightly.yml
vendored
|
@ -35,7 +35,7 @@ jobs:
|
|||
labels: |
|
||||
org.opencontainers.image.description=Nightly build image used for testing purposes
|
||||
flavor: |
|
||||
latest=true
|
||||
latest=auto
|
||||
tags: |
|
||||
type=raw,value=edge
|
||||
type=raw,value=nightly
|
||||
|
@ -56,7 +56,7 @@ jobs:
|
|||
labels: |
|
||||
org.opencontainers.image.description=Nightly build image used for testing purposes
|
||||
flavor: |
|
||||
latest=true
|
||||
latest=auto
|
||||
tags: |
|
||||
type=raw,value=edge
|
||||
type=raw,value=nightly
|
||||
|
|
2
.github/workflows/rebase-needed.yml
vendored
2
.github/workflows/rebase-needed.yml
vendored
|
@ -10,7 +10,7 @@ permissions:
|
|||
jobs:
|
||||
label-rebase-needed:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'mastodon/mastodon'
|
||||
if: github.repository == 'glitch-soc/mastodon'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
|
2
.nvmrc
2
.nvmrc
|
@ -1 +1 @@
|
|||
20.16
|
||||
20.17
|
||||
|
|
|
@ -2,6 +2,301 @@
|
|||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [4.3.0] - UNRELEASED
|
||||
|
||||
The following changelog entries focus on changes visible to users, administrators, client developers or federated software developers, but there has also been a lot of code modernization, refactoring, and tooling work, in particular by @mjankowski.
|
||||
|
||||
### Security
|
||||
|
||||
- **Add confirmation interstitial instead of silently redirecting logged-out visitors to remote resources** (#27792, #28902, and #30651 by @ClearlyClaire and @Gargron)\
|
||||
This fixes a longstanding open redirect in Mastodon, at the cost of added friction when local links to remote resources are shared.
|
||||
|
||||
### Added
|
||||
|
||||
- **Add experimental server-side notification grouping** (#29889, #30576, #30685, #30688, #30707, #30776, #30779, #30781, #30440, #31062, #31098, #31076, #31111, #31123, #31223, #31214, #31224, #31299, #31325, #31347, #31304, #31326, #31384, #31403, #31433, #31509, #31486, and #31513 by @ClearlyClaire, @mgmn, and @renchap)\
|
||||
Group notifications of the same type for the same target, so that your notifications no longer get cluttered by boost and favorite notifications as soon as a couple of your posts get traction.\
|
||||
This is done server-side so that clients can efficiently get relevant groups without having to go through numerous pages of individual notifications.\
|
||||
As part of this, the visual design of the entire notifications feature has been revamped.\
|
||||
This feature is intended to eventually replace the existing notifications column, but for this first beta, users will have to enable it in the “Experimental features” section of the notifications column settings.\
|
||||
The API is not final yet, but it consists of:
|
||||
- a new `group_key` attribute to `Notification` entities
|
||||
- `GET /api/v2_alpha/notifications`: https://docs.joinmastodon.org/methods/notifications_alpha/#get-grouped
|
||||
- `GET /api/v2_alpha/notifications/:group_key`: https://docs.joinmastodon.org/methods/notifications_alpha/#get-notification-group
|
||||
- `POST /api/v2_alpha/notifications/:group_key/dimsiss`: https://docs.joinmastodon.org/methods/notifications_alpha/#dismiss-group
|
||||
- `GET /api/v2_alpha/notifications/:unread_count`: https://docs.joinmastodon.org/methods/notifications_alpha/#unread-group-count
|
||||
- **Add notification policies, filtered notifications and notification requests** (#29366, #29529, #29433, #29565, #29567, #29572, #29575, #29588, #29646, #29652, #29658, #29666, #29693, #29699, #29737, #29706, #29570, #29752, #29810, #29826, #30114, #30251, #30559, #29868, #31008, #31011, #30996, #31149, #31220, #31222, #31225, #31242, #31262, #31250, #31273, #31310, #31316, #31322, #31329, #31324, #31331, #31343, #31342, #31309, #31358, #31378, #31406, #31256, #31456, #31419, #31457, #31508, #31540, and #31541 by @ClearlyClaire, @Gargron, @TheEssem, @mgmn, @oneiros, and @renchap)\
|
||||
The old “Block notifications from non-followers”, “Block notifications from people you don't follow” and “Block direct messages from people you don't follow” notification settings have been replaced by a new set of settings found directly in the notification column.\
|
||||
You can now separately filter or drop notifications from people you don't follow, people who don't follow you, accounts created within the past 30 days, as well as unsolicited private mentions, and accounts limited by the moderation.\
|
||||
Instead of being outright dropped, notifications that you chose to filter are put in a separate “Filtered notifications” box that you can review separately without it clogging your main notifications.\
|
||||
This adds the following REST API endpoints:
|
||||
|
||||
- `GET /api/v2/notifications/policy`: https://docs.joinmastodon.org/methods/notifications/#get-policy
|
||||
- `PATCH /api/v2/notifications/policy`: https://docs.joinmastodon.org/methods/notifications/#update-the-filtering-policy-for-notifications
|
||||
- `GET /api/v1/notifications/requests`: https://docs.joinmastodon.org/methods/notifications/#get-requests
|
||||
- `GET /api/v1/notifications/requests/:id`: https://docs.joinmastodon.org/methods/notifications/#get-one-request
|
||||
- `POST /api/v1/notifications/requests/:id/accept`: https://docs.joinmastodon.org/methods/notifications/#accept-request
|
||||
- `POST /api/v1/notifications/requests/:id/dismiss`: https://docs.joinmastodon.org/methods/notifications/#dismiss-request
|
||||
- `POST /api/v1/notifications/requests/accept`: https://docs.joinmastodon.org/methods/notifications/#accept-multiple-requests
|
||||
- `POST /api/v1/notifications/requests/dismiss`: https://docs.joinmastodon.org/methods/notifications/#dismiss-multiple-requests
|
||||
- `GET /api/v1/notifications/requests/merged`: https://docs.joinmastodon.org/methods/notifications/#requests-merged
|
||||
|
||||
In addition, accepting one or more notification requests generates a new streaming event:
|
||||
|
||||
- `notifications_merged`: an event of this type indicates accepted notification requests have finished merging, and the notifications list should be refreshed
|
||||
|
||||
- **Add notifications of severed relationships** (#27511, #29665, #29668, #29670, #29700, #29714, #29712, and #29731 by @ClearlyClaire and @Gargron)\
|
||||
Notify local users when they lose relationships as a result of a local moderator blocking a remote account or server, allowing the affected user to retrieve the list of broken relationships.\
|
||||
Note that this does not notify remote users.\
|
||||
This adds the `severed_relationships` notification type to the REST API and streaming, with a new [`relationship_severance_event` attribute](https://docs.joinmastodon.org/entities/Notification/#relationship_severance_event).
|
||||
- **Add hover cards in web UI** (#30754, #30864, #30850, #30879, #30928, #30949, #30948, #30931, and #31300 by @ClearlyClaire, @Gargron, and @renchap)\
|
||||
Hovering over an avatar or username will now display a hover card with the first two lines of the user's description and their first two profile fields.\
|
||||
This can be disabled in the “Animations and accessibility” section of the preferences.
|
||||
- **Add "system" theme setting (light/dark theme depending on user system preference)** (#29748, #29553, #29795, #29918, #30839, and #30861 by @nshki, @ErikUden, @mjankowski, @renchap, and @vmstan)\
|
||||
Add a “system” theme that automatically switch between default dark and light themes depending on the user's system preferences.\
|
||||
Also changes the default server theme to this new “system” theme so that automatic theme selection happens even when logged out.
|
||||
- **Add timeline of public posts about a trending link** (#30381 and #30840 by @Gargron)\
|
||||
You can now see public posts mentioning currently-trending articles from people who have opted into discovery features.\
|
||||
This adds a new REST API endpoint: https://docs.joinmastodon.org/methods/timelines/#link
|
||||
- **Add author highlight for news articles whose authors are on the fediverse** (#30398, #30670, #30521, and #30846 by @Gargron)\
|
||||
This adds a mechanism to [highlight the author of news articles](https://blog.joinmastodon.org/2024/07/highlighting-journalism-on-mastodon/) shared on Mastodon.\
|
||||
Articles hosted outside the fediverse can indicate a fediverse author with a meta tag:
|
||||
```html
|
||||
<meta name="fediverse:creator" content="username@domain" />
|
||||
```
|
||||
On the API side, this is represented by a new `authors` attribute to the `PreviewCard` entity: https://docs.joinmastodon.org/entities/PreviewCard/#authors\
|
||||
Note that this feature is still work in progress and the tagging format and verification mechanisms may change in future releases.
|
||||
- **Add in-app notifications for moderation actions and warnings** (#30065, #30082, and #30081 by @ClearlyClaire)\
|
||||
In addition to email notifications, also notify users of moderation actions or warnings against them directly within the app, so they are less likely to miss important communication from their moderators.\
|
||||
This adds the `moderation_warning` notification type to the REST API and streaming, with a new [`moderation_warning` attribute](https://docs.joinmastodon.org/entities/Notification/#moderation_warning).
|
||||
- **Add domain information to profiles in web UI** (#29602 by @Gargron)\
|
||||
Clicking the domain of a user in their profile will now open a tooltip with a short explanation about servers and federation.
|
||||
- Add ability to reorder uploaded media before posting in web UI (#28456 by @Gargron)
|
||||
- Add moderation interface for searching hashtags (#30880 by @ThisIsMissEm)
|
||||
- Add ability for admins to configure instance favicon and logo (#30040, #30208, #30259, #30375, #30734, #31016, and #30205 by @ClearlyClaire, @FawazFarid, @JasonPunyon, @mgmn, and @renchap)\
|
||||
This is also exposed through the REST API: https://docs.joinmastodon.org/entities/Instance/#icon
|
||||
- Add `api_versions` to `/api/v2/instance` (#31354 by @ClearlyClaire)\
|
||||
Add API version number to make it easier for clients to detect compatible features going forward.\
|
||||
See API documentation at https://docs.joinmastodon.org/entities/Instance/#api-versions
|
||||
- Add recent audit log entries in federation moderation interface (#27386 by @ThisIsMissEm)
|
||||
- Add profile setup to onboarding in web UI (#27829, #27876, and #28453 by @Gargron)
|
||||
- Add prominent share/copy button on profiles in web UI (#27865 and #27889 by @ClearlyClaire and @Gargron)
|
||||
- Add optional hints for server rules (#29539 and #29758 by @ClearlyClaire and @Gargron)\
|
||||
Server rules can now be broken into a short rule name and a longer explanation of the rule.\
|
||||
This adds a new [`hint` attribute](https://docs.joinmastodon.org/entities/Rule/#hint) to `Rule` entities in the REST API.
|
||||
- Add support for PKCE in OAuth flow (#31129 by @ThisIsMissEm)
|
||||
- Add CDN cache busting on media deletion (#31353 and #31414 by @ClearlyClaire and @tribela)
|
||||
- Add the OAuth application used in local reports (#30539 by @ThisIsMissEm)
|
||||
- Add hint to user that other remote statuses may be missing (#26910, #31387, and #31516 by @Gargron, @audiodude, and @renchap)
|
||||
- Add lang attribute on preview card title (#31303 by @c960657)
|
||||
- Add check for `Content-Length` in `ResponseWithLimitAdapter` (#31285 by @c960657)
|
||||
- Add `Accept-Language` header to fetch preview cards in the server's default language (#31232 by @c960657)
|
||||
- Add support for PKCE Extension in OmniAuth OIDC through the `OIDC_USE_PKCE` environment variable (#31131 by @ThisIsMissEm)
|
||||
- Add API endpoints for unread notifications count (#31191 by @ClearlyClaire)\
|
||||
This adds the following REST API endpoints:
|
||||
- `GET /api/v1/notifications/unread_count`: https://docs.joinmastodon.org/methods/notifications/#unread-count
|
||||
- Add `/` keyboard shortcut to focus the search field (#29921 by @ClearlyClaire)
|
||||
- Add button to view the Hashtag on the instance from Hashtags in Moderation UI (#31533 by @ThisIsMissEm)
|
||||
- Add list of pending releases directly in mail notifications for version updates (#29436 and #30035 by @ClearlyClaire)
|
||||
- Add “Appeals” link under “Moderation” navigation category in moderation interface (#31071 by @ThisIsMissEm)
|
||||
- Add badge on account card in report moderation interface when account is already suspended (#29592 by @ClearlyClaire)
|
||||
- Add admin comments directly to the `admin/instances` page (#29240 by @tribela)
|
||||
- Add ability to require approval when users sign up using specific email domains (#28468, #28732, #28607, and #28608 by @ClearlyClaire)
|
||||
- Add banner for forwarded reports made by remote users about remote content (#27549 by @ClearlyClaire)
|
||||
- Add support HTML ruby tags in remote posts for east-asian languages (#30897 by @ThisIsMissEm)
|
||||
- Add link to manage warning presets in admin navigation (#26199 by @vmstan)
|
||||
- Add volume saving/reuse to video player (#27488 by @thehydrogen)
|
||||
- Add Elasticsearch index size, ffmpeg and ImageMagick versions to the admin dashboard (#27301, #30710, #31130, and #30845 by @vmstan)
|
||||
- Add `MASTODON_SIDEKIQ_READY_FILENAME` environment variable to use a file for Sidekiq to signal it is ready to process jobs (#30971 and #30988 by @renchap)\
|
||||
In the official Docker image, this is set to `sidekiq_process_has_started_and_will_begin_processing_jobs` so that Sidekiq will touch `tmp/sidekiq_process_has_started_and_will_begin_processing_jobs` to signal readiness.
|
||||
- Add `S3_RETRY_LIMIT` environment variable to make S3 retries configurable (#23215 by @smiba)
|
||||
- Add `S3_KEY_PREFIX` environment variable (#30181 by @S0yKaf)
|
||||
- Add support for multiple `redirect_uris` when creating OAuth 2.0 Applications (#29192 by @ThisIsMissEm)
|
||||
- Add Interlingue and Interlingua to interface languages (#28630 and #30828 by @Dhghomon and @renchap)
|
||||
- Add Kashubian, Pennsylvania Dutch, Vai, Jawi Malay, Mohawk and Low German to posting languages (#26024, #26634, #27136, #29098, #27115, and #27434 by @EngineerDali, @HelgeKrueger, and @gunchleoc)
|
||||
- Add validations to `Web::PushSubscription` (#30540 and #30542 by @ThisIsMissEm)
|
||||
- Add option to use native Ruby driver for Redis through `REDIS_DRIVER=ruby` (#30717 by @vmstan)
|
||||
- Add support for libvips in addition to ImageMagick (#30090, #30590, #30597, #30632, #30857, #30869, and #30858 by @ClearlyClaire, @Gargron, and @mjankowski)\
|
||||
Server admins can now use libvips as a faster and lighter alternative to ImageMagick for processing user-uploaded images.\
|
||||
This requires libvips 8.13 or newer, and needs to be enabled with `MASTODON_USE_LIBVIPS=true`.\
|
||||
This is enabled by default in the official Docker images, and is intended to completely replace ImageMagick in the future.
|
||||
- Add active animation to header settings button (#30221, #30307, and #30388 by @daudix)
|
||||
- Add OpenTelemetry instrumentation (#30130, #30322, #30353, and #30350 by @julianocosta89, @renchap, and @robbkidd)\
|
||||
See https://docs.joinmastodon.org/admin/config/#otel for documentation
|
||||
- Add API to get multiple accounts and statuses (#27871 and #30465 by @ClearlyClaire)\
|
||||
This adds `GET /api/v1/accounts` and `GET /api/v1/statuses` to the REST API, see https://docs.joinmastodon.org/methods/accounts/#index and https://docs.joinmastodon.org/methods/statuses/#index
|
||||
- Add redirection back to previous page after site upload deletion (#30141 by @FawazFarid)
|
||||
- Add RFC8414 OAuth 2.0 server metadata (#29191 by @ThisIsMissEm)
|
||||
- Add loading indicator and empty result message to advanced interface search (#30085 by @ClearlyClaire)
|
||||
- Add `profile` OAuth 2.0 scope, allowing more limited access to user data (#29087 and #30357 by @ThisIsMissEm)
|
||||
- Add the role ID to the badge component (#29707 by @renchap)
|
||||
- Add diagnostic message for failure during CLI search deploy (#29462 by @mjankowski)
|
||||
- Add pagination `Link` headers on API accounts/statuses when pinned true (#29442 by @mjankowski)
|
||||
- Add support for specifying custom CA cert for Elasticsearch through `ES_CA_FILE` (#29122 and #29147 by @ClearlyClaire)
|
||||
- Add groundwork for annual reports for accounts (#28693 by @Gargron)\
|
||||
This lays the groundwork for a “year-in-review”/“wrapped” style report for local users, but is currently not in use.
|
||||
- Add notification email on invalid second authenticator (#28822 by @ClearlyClaire)
|
||||
- Add new emojis from `jdecked/twemoji` 15.0 (#28404 by @TheEssem)
|
||||
- Add configurable error handling in attachment batch deletion (#28184 by @vmstan)\
|
||||
This makes the S3 batch size configurable through the `S3_BATCH_DELETE_LIMIT` environment variable (defaults to 1000), and adds some retry logic, configurable through the `S3_BATCH_DELETE_RETRY` environment variable (defaults to 3).
|
||||
- Add VAPID public key to instance serializer (#28006 by @ThisIsMissEm)
|
||||
- Add `nodeName` and `nodeDescription` to nodeinfo `metadata` (#28079 by @6543)
|
||||
- Add Thai diacritics and tone marks in `HASHTAG_INVALID_CHARS_RE` (#26576 by @ppnplus)
|
||||
- Add variable delay before link verification of remote account links (#27774 by @ClearlyClaire)
|
||||
- Add support for invite codes in the registration API (#27805 by @ClearlyClaire)
|
||||
- Add HTML lang attribute to preview card descriptions (#27503 by @srapilly)
|
||||
- Add display of relevant account warnings to report action logs (#27425 by @ClearlyClaire)
|
||||
- Add validation of allowed schemes on preview card URLs (#27485 by @mjankowski)
|
||||
- Add token introspection without read scope to `/api/v1/apps/verify_credentials` (#27142 by @ThisIsMissEm)
|
||||
- Add support for cross-origin request to `/nodeinfo/2.0` (#27413 by @palant)
|
||||
- Add variable delay before link verification of remote account links (#27351 by @ClearlyClaire)
|
||||
- Add PWA shortcut to `/explore` page (#27235 by @jake-anto)
|
||||
|
||||
### Changed
|
||||
|
||||
- **Change icons throughout the web interface** (#27385, #27539, #27555, #27579, #27700, #27817, #28519, #28709, #28064, #28775, #28780, #27924, #29294, #29395, #29537, #29569, #29610, #29612, #29649, #29844, #27780, #30974, #30963, #30962, #30961, #31362, #31363, #31359, #31371, #31360, #31512, #31511, and #31525 by @ClearlyClaire, @Gargron, @arbolitoloco1, @mjankowski, @nclm, @renchap, @ronilaukkarinen, and @zunda)\
|
||||
This changes all the interface icons from FontAwesome to Material Symbols for a more modern look, consistent with the official Mastodon Android app.\
|
||||
In addition, better care is given to pixel alignment, and icon variants are used to better highlight active/inactive state.
|
||||
- **Change design of compose form in web UI** (#28119, #29059, #29248, #29372, #29384, #29417, #29456, #29406, #29651, and #29659 by @ClearlyClaire, @Gargron, @eai04191, @hinaloe, and @ronilaukkarinen)\
|
||||
The compose form has been completely redesigned for a more modern and consistent look, as well as spelling out the chosen privacy setting and language name at all times.\
|
||||
As part of this, the “Unlisted” privacy setting has been renamed to “Quiet public”.
|
||||
- **Change design of confirmation modals in the web UI** (#29576, #29614, #29640, #29644, #30131, #30884, and #31399 by @ClearlyClaire, @Gargron, and @tribela)\
|
||||
The mute, block, and domain block confirmation modals have been completely redesigned to be clearer and include more detailed information on the action to be performed.\
|
||||
They also have a more modern and consistent design, along with other confirmation modals in the application.
|
||||
- **Change colors throughout the web UI** (#29522, #29584, #29653, #29779, #29803, #29809, #29808, #29828, #31034, #31168, #31266, #31348, #31349, #31361, and #31510 by @ClearlyClaire, @Gargron, @renchap, and @vmstan)
|
||||
- **Change onboarding prompt to follow suggestions carousel in web UI** (#28878 and #29272 by @Gargron)
|
||||
- **Change email templates** (#28416, #28755, #28814, #29064, #28883, #29470, #29607, #29761, #29760, and #29879 by @ClearlyClaire, @Gargron, @hteumeuleu, and @mjankowski)\
|
||||
All emails to end-users have been completely redesigned with a fresh new look, providing more information while making them easier to reand and keeping maximum compatibility across mail clients.
|
||||
- **Change follow recommendations algorithm** (#28314, #28433, #29017, #29108, #29306, #29550, #29619, and #31474 by @ClearlyClaire, @Gargron, @kernal053, @mjankowski, and @wheatear-dev)\
|
||||
This replaces the “past interactions” recommendation algorithm with a “friends of friends” algorithm that suggests accounts followed by people you follow, and a “similar profiles” algorithm that suggests accounts with a profile similar to your most recent follows.\
|
||||
In addition, the implementation has been significantly reworked, and all follow recommendations are now dismissable.\
|
||||
This change deprecates the `source` attribute in `Suggestion` entities in the REST API, and replaces it with the new [`sources` attribute](https://docs.joinmastodon.org/entities/Suggestion/#sources).
|
||||
- Change account search algorithm (#30803 by @Gargron)
|
||||
- **Change streaming server to use its own dependencies and its own docker image** (#24702, #27967, #26850, #28112, #28115, #28137, #28138, #28497, #28548, and #30795 by @TheEssem, @ThisIsMissEm, @jippi, @timetinytim, and @vmstan)\
|
||||
In order to reduce the amount of runtime dependencies, the streaming server has been moved into a separate package and Docker image.\
|
||||
The `mastodon` image does not contain the streaming server anymore, as it has been moved to its own `mastodon-streaming` image.\
|
||||
Administrators may need to update their setup accordingly.
|
||||
- Change how content warnings and filters are displayed in web UI (#31365 by @Gargron)
|
||||
- Change Web UI to allow viewing and severing relationships with suspended accounts (#27667 by @ClearlyClaire)\
|
||||
This also adds a `with_suspended` parameter to `GET /api/v1/accounts/relationships` in the REST API.
|
||||
- Change avatars border radius (#31390 by @renchap)
|
||||
- Change counters to be displayed on profile timelines in web UI (#30525 by @Gargron)
|
||||
- Change disabled buttons color in light mode to make the difference more visible (#30998 by @renchap)
|
||||
- Change design of people tab on explore in web UI (#30059 by @Gargron)
|
||||
- Change sidebar text in web UI (#30696 by @Gargron)
|
||||
- Change "Follow" to "Follow back" and "Mutual" when appropriate in web UI (#28452 and #28465 by @Gargron and @renchap)
|
||||
- Change media to be hidden/blurred by default in report modal (#28522 by @ClearlyClaire)
|
||||
- Change order of the "muting" and "blocking" list options in “Data Exports” (#26088 by @fixermark)
|
||||
- Change admin and moderation notes character limit from 500 to 2000 characters (#30288 by @ThisIsMissEm)
|
||||
- Change mute options to be in dropdown on muted users list in web UI (#30049 and #31315 by @ClearlyClaire and @Gargron)
|
||||
- Change out-of-band hashtags design in web UI (#29732 by @Gargron)
|
||||
- Change design of metadata underneath detailed posts in web UI (#29585, #29605, and #29648 by @ClearlyClaire and @Gargron)
|
||||
- Change action button to be last on profiles in web UI (#29533 and #29923 by @ClearlyClaire and @Gargron)
|
||||
- Change confirmation prompts in trending moderation interface to be more specific (#19626 by @tribela)
|
||||
- Change “Trends” moderation menu to “Recommendations & Trends” and move follow recommendations there (#31292 by @ThisIsMissEm)
|
||||
- Change irrelevant fields in account cleanup settings to be disabled unless automatic cleanup is enabled (#26562 by @c960657)
|
||||
- Change dropdown menu icon to not be replaced by close icon when open in web UI (#29532 by @Gargron)
|
||||
- Change back button to always appear in advanced web UI (#29551 and #29669 by @Gargron)
|
||||
- Change border of active compose field search inputs (#29832 and #29839 by @vmstan)
|
||||
- Change link detection to allow `@` at the end of an URL (#31124 by @adamniedzielski)
|
||||
- Change User-Agent to use Mastodon as the product, and http.rb as platform details (#31192 by @ClearlyClaire)
|
||||
- Change layout and wording of the Content Retention server settings page (#27733 by @vmstan)
|
||||
- Change unconfirmed users to be kept for one week instead of two days (#30285 by @renchap)
|
||||
- Change maximum page size for Admin Domain Management APIs from 200 to 500 (#31253 by @ThisIsMissEm)
|
||||
- Change database pool size to default to Sidekiq concurrency settings in Sidekiq processes (#26488 by @sinoru)
|
||||
- Change alt text to empty string for avatars (#21875 by @jasminjohal)
|
||||
- Change Docker images to use custom-built libvips and ffmpeg (#30571, #30569, and #31498 by @vmstan)
|
||||
- Change external links in the admin audit log to plain text or local administration pages (#27139 and #27150 by @ClearlyClaire and @ThisIsMissEm)
|
||||
- Change YJIT to be enabled when available (#30310 and #27283 by @ClearlyClaire and @mjankowski)\
|
||||
Enable Ruby's built-in just-in-time compiler. This improves performances substantially, at the cost of a slightly increased memory usage.
|
||||
- Change `.env` file loading from deprecated `dotenv-rails` gem to `dotenv` gem (#29173 and #30121 by @mjankowski)\
|
||||
This should have no effect except in the unlikely case an environment variable included a newline.
|
||||
- Change “Panjabi” language name to the more common spelling “Punjabi” (#27117 by @gunchleoc)
|
||||
- Change encryption of OTP secrets to use ActiveRecord Encryption (#29831, #28325, #30151, #30202, #30340, and #30344 by @ClearlyClaire and @mjankowski)\
|
||||
This requires a manual step from administrators of existing servers. Indeed, they need to generate new secrets, which can be done using `bundle exec rails db:encryption:init`.\
|
||||
Furthermore, there is a risk that the introduced migration fails if the server was misconfigured in the past. If that happens, the migration error will include the relevant information.
|
||||
- Change `/api/v1/announcements` to return regular `Status` entities (#26736 by @ClearlyClaire)
|
||||
- Change imports to convert case-insensitive fields to lowercase (#29739 and #29740 by @ThisIsMissEm)
|
||||
- Change stats in the admin interface to be inclusive of the full selected range, from beginning of day to end of day (#29416 and #29841 by @mjankowski)
|
||||
- Change materialized views to be refreshed concurrently to avoid locks (#29015 by @Gargron)
|
||||
- Change compose form to use server-provided post character and poll options limits (#28928 and #29490 by @ClearlyClaire and @renchap)
|
||||
- Change streaming server logging from `npmlog` to `pino` and `pino-http` (#27828 by @ThisIsMissEm)\
|
||||
This changes the Mastodon streaming server log format, so this might be considered a breaking change if you were parsing the logs.
|
||||
- Change media “ALT” label to use a specific CSS class (#28777 by @ClearlyClaire)
|
||||
- Change streaming API host to not be overridden to localhost in development mode (#28557 by @ClearlyClaire)
|
||||
- Change cookie rotator to use SHA1 digest for new cookies (#27392 by @ClearlyClaire)\
|
||||
Note that this requires that no pre-4.2.0 Mastodon web server is running when this code is deployed, as those would not understand the new cookies.\
|
||||
Therefore, zero-downtime updates are only supported if you're coming from 4.2.0 or newer. If you want to skip Mastodon 4.2, you will need to completely stop Mastodon services before updating.
|
||||
- Change preview card deletes to be done using batch method (#28183 by @vmstan)
|
||||
- Change `img-src` and `media-src` CSP directives to not include `https:` (#28025 and #28561 by @ClearlyClaire)
|
||||
- Change self-destruct procedure (#26439, #29049, and #29420 by @ClearlyClaire and @zunda)\
|
||||
Instead of enqueuing deletion jobs immediately, `tootctl self-destruct` now outputs a value for the `SELF_DESTRUCT` environment variable, which puts a server in self-destruct mode, processing deletions in the background, while giving users access to their export archives.
|
||||
|
||||
### Removed
|
||||
|
||||
- Remove StatsD integration (replaced by OpenTelemetry) (#30240 by @mjankowski)
|
||||
- Remove `CacheBuster` default options (#30718 by @mjankowski)
|
||||
- Remove home marker updates from the Web UI (#22721 by @davbeck)\
|
||||
The web interface was unconditionally updating the home marker to the most recent received post, discarding any value set by other clients, thus making the feature unreliable.
|
||||
- Remove support for Ruby 3.0 (reaching EOL) (#29702 by @mjankowski)
|
||||
- Remove setting for unfollow confirmation modal (#29373 by @ClearlyClaire)\
|
||||
Instead, the unfollow confirmation modal will always be displayed.
|
||||
- Remove support for Capistrano (#27295 and #30009 by @mjankowski and @renchap)
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Fix link preview cards not always preserving the original URL from the status** (#27312 by @Gargron)
|
||||
- Fix log out from user menu not working on Safari (#31402 by @renchap)
|
||||
- Fix various issues when in link preview card generation (#28748, #30017, #30362, #30173, #30853, #30929, #30933, #30957, #30987, and #31144 by @adamniedzielski, @oneiros, @phocks, @timothyjrogers, and @tribela)
|
||||
- Fix handling of missing links in Webfinger responses (#31030 by @adamniedzielski)
|
||||
- Fix HTTP 500 error in `/api/v1/polls/:id/votes` when required `choices` parameter is missing (#25598 by @danielmbrasil)
|
||||
- Fix cross-origin loading of `inert.css` polyfill (#30687 by @louis77)
|
||||
- Fix cutoff of instance name in sign-up form (#30598 by @oneiros)
|
||||
- Fix empty `aria-hidden` attribute value in logo resources area (#30570 by @mjankowski)
|
||||
- Fix “Redirect URI” field not being marked as required in “New application” form (#30311 by @ThisIsMissEm)
|
||||
- Fix right-to-left text in preview cards (#30930 by @ClearlyClaire)
|
||||
- Fix rack attack `match_type` value typo in logging config (#30514 by @mjankowski)
|
||||
- Fix various cases of duplicate, missing, or inconsistent borders or scrollbar styles (#31068, #31286, #31268, #31275, #31284, #31305, #31346, #31372, #31373, #31389, #31432, #31391, and #31445 by @valtlai and @vmstan)
|
||||
- Fix race condition in `POST /api/v1/push/subscription` (#30166 by @ClearlyClaire)
|
||||
- Fix post deletion not being delayed when those are part of an account warning (#30163 by @ClearlyClaire)
|
||||
- Fix rendering error on `/start` when not logged in (#30023 by @timothyjrogers)
|
||||
- Fix logo pushing header buttons out of view on certain conditions in mobile layout (#29787 by @ClearlyClaire)
|
||||
- Fix notification-related records not being reattributed when merging accounts (#29694 by @ClearlyClaire)
|
||||
- Fix results/query in `api/v1/featured_tags/suggestions` (#29597 by @mjankowski)
|
||||
- Fix distracting and confusing always-showing scrollbar track in boost confirmation modal (#31524 by @ClearlyClaire)
|
||||
- Fix being able to upload more than 4 media attachments in some cases (#29183 by @mashirozx)
|
||||
- Fix preview card player getting embedded when clicking on the external link button (#29457 by @ClearlyClaire)
|
||||
- Fix full date display not respecting the locale 12/24h format (#29448 by @renchap)
|
||||
- Fix filters title and keywords overflow (#29396 by @GeopJr)
|
||||
- Fix incorrect date format in “Follows and followers” (#29390 by @JasonPunyon)
|
||||
- Fix “Edit media” modal sizing and layout when space-constrained (#27095 by @ronilaukkarinen)
|
||||
- Fix modal container bounds (#29185 by @nico3333fr)
|
||||
- Fix inefficient HTTP signature parsing using regexps and `StringScanner` (#29133 by @ClearlyClaire)
|
||||
- Fix moderation report updates through `PUT /api/v1/admin/reports/:id` not being logged in the audit log (#29044, #30342, and #31033 by @mjankowski, @tribela, and @vmstan)
|
||||
- Fix moderation interface allowing to select rule violation when there are no server rules (#31458 by @ThisIsMissEm)
|
||||
- Fix redirection from paths with url-encoded `@` to their decoded form (#31184 by @timothyjrogers)
|
||||
- Fix Trending Tags pending review having an unstable sort order (#31473 by @ThisIsMissEm)
|
||||
- Fix the emoji dropdown button always opening the dropdown instead of behaving like a toggle (#29012 by @jh97uk)
|
||||
- Fix processing of incoming posts with bearcaps (#26527 by @kmycode)
|
||||
- Fix support for IPv6 redis connections in streaming (#31229 by @ThisIsMissEm)
|
||||
- Fix search form re-rendering spuriously in web UI (#28876 by @Gargron)
|
||||
- Fix `RedownloadMediaWorker` not being called on transient S3 failure (#28714 by @ClearlyClaire)
|
||||
- Fix ISO code for Canadian French from incorrect `fr-QC` to `fr-CA` (#26015 by @gunchleoc)
|
||||
- Fix `.opus` file uploads being misidentified by Paperclip (#28580 by @vmstan)
|
||||
- Fix loading local accounts with extraneous domain part in WebUI (#28559 by @ClearlyClaire)
|
||||
- Fix destructive actions in dropdowns not using error color in light theme (#28484 by @logicalmoody)
|
||||
- Fix call to inefficient `delete_matched` cache method in domain blocks (#28374 by @ClearlyClaire)
|
||||
- Fix status edits not always being streamed to mentioned users (#28324 by @ClearlyClaire)
|
||||
- Fix onboarding step descriptions being truncated on narrow screens (#28021 by @ClearlyClaire)
|
||||
- Fix duplicate IDs in relationships and familiar_followers APIs (#27982 by @KevinBongart)
|
||||
- Fix modal content not being selectable (#27813 by @pajowu)
|
||||
- Fix Web UI not displaying appropriate explanation when a user hides their follows/followers (#27791 by @ClearlyClaire)
|
||||
- Fix format-dependent redirects being cached regardless of requested format (#27632 by @ClearlyClaire)
|
||||
- Fix confusing screen when visiting a confirmation link for an already-confirmed email (#27368 by @ClearlyClaire)
|
||||
- Fix explore page reloading when you navigate back to it in web UI (#27489 by @Gargron)
|
||||
- Fix missing redirection from `/home` to `/deck/home` in the advanced interface (#27378 by @Signez)
|
||||
- Fix empty environment variables not using default nil value (#27400 by @renchap)
|
||||
- Fix language sorting in settings (#27158 by @gunchleoc)
|
||||
|
||||
## |4.2.11] - 2024-08-16
|
||||
|
||||
### Added
|
||||
|
|
18
Dockerfile
18
Dockerfile
|
@ -196,11 +196,14 @@ ARG VIPS_VERSION=8.15.3
|
|||
ARG VIPS_URL=https://github.com/libvips/libvips/releases/download
|
||||
|
||||
WORKDIR /usr/local/libvips/src
|
||||
# Download and extract libvips source code
|
||||
ADD ${VIPS_URL}/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.xz /usr/local/libvips/src/
|
||||
RUN tar xf vips-${VIPS_VERSION}.tar.xz;
|
||||
|
||||
WORKDIR /usr/local/libvips/src/vips-${VIPS_VERSION}
|
||||
|
||||
# Configure and compile libvips
|
||||
RUN \
|
||||
curl -sSL -o vips-${VIPS_VERSION}.tar.xz ${VIPS_URL}/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.xz; \
|
||||
tar xf vips-${VIPS_VERSION}.tar.xz; \
|
||||
cd vips-${VIPS_VERSION}; \
|
||||
meson setup build --prefix /usr/local/libvips --libdir=lib -Ddeprecated=false -Dintrospection=disabled -Dmodules=disabled -Dexamples=false; \
|
||||
cd build; \
|
||||
ninja; \
|
||||
|
@ -216,11 +219,14 @@ ARG FFMPEG_VERSION=7.0.2
|
|||
ARG FFMPEG_URL=https://ffmpeg.org/releases
|
||||
|
||||
WORKDIR /usr/local/ffmpeg/src
|
||||
# Download and extract ffmpeg source code
|
||||
ADD ${FFMPEG_URL}/ffmpeg-${FFMPEG_VERSION}.tar.xz /usr/local/ffmpeg/src/
|
||||
RUN tar xf ffmpeg-${FFMPEG_VERSION}.tar.xz;
|
||||
|
||||
WORKDIR /usr/local/ffmpeg/src/ffmpeg-${FFMPEG_VERSION}
|
||||
|
||||
# Configure and compile ffmpeg
|
||||
RUN \
|
||||
curl -sSL -o ffmpeg-${FFMPEG_VERSION}.tar.xz ${FFMPEG_URL}/ffmpeg-${FFMPEG_VERSION}.tar.xz; \
|
||||
tar xf ffmpeg-${FFMPEG_VERSION}.tar.xz; \
|
||||
cd ffmpeg-${FFMPEG_VERSION}; \
|
||||
./configure \
|
||||
--prefix=/usr/local/ffmpeg \
|
||||
--toolchain=hardened \
|
||||
|
|
1
Gemfile
1
Gemfile
|
@ -64,7 +64,6 @@ gem 'link_header', '~> 0.0'
|
|||
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
|
||||
gem 'mime-types', '~> 3.5.0', require: 'mime/types/columnar'
|
||||
gem 'nokogiri', '~> 1.15'
|
||||
gem 'nsa'
|
||||
gem 'oj', '~> 3.14'
|
||||
gem 'ox', '~> 2.14'
|
||||
gem 'parslet'
|
||||
|
|
23
Gemfile.lock
23
Gemfile.lock
|
@ -100,7 +100,7 @@ GEM
|
|||
attr_required (1.0.2)
|
||||
awrence (1.2.1)
|
||||
aws-eventstream (1.3.0)
|
||||
aws-partitions (1.964.0)
|
||||
aws-partitions (1.966.0)
|
||||
aws-sdk-core (3.201.5)
|
||||
aws-eventstream (~> 1, >= 1.3.0)
|
||||
aws-partitions (~> 1, >= 1.651.0)
|
||||
|
@ -109,7 +109,7 @@ GEM
|
|||
aws-sdk-kms (1.88.0)
|
||||
aws-sdk-core (~> 3, >= 3.201.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
aws-sdk-s3 (1.158.0)
|
||||
aws-sdk-s3 (1.159.0)
|
||||
aws-sdk-core (~> 3, >= 3.201.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.5)
|
||||
|
@ -281,8 +281,8 @@ GEM
|
|||
fog-core (~> 2.1)
|
||||
fog-json (>= 1.0)
|
||||
formatador (1.1.0)
|
||||
fugit (1.10.1)
|
||||
et-orbi (~> 1, >= 1.2.7)
|
||||
fugit (1.11.1)
|
||||
et-orbi (~> 1, >= 1.2.11)
|
||||
raabro (~> 1.4)
|
||||
fuubar (2.5.1)
|
||||
rspec-core (~> 3.0)
|
||||
|
@ -455,11 +455,6 @@ GEM
|
|||
nokogiri (1.16.7)
|
||||
mini_portile2 (~> 2.8.2)
|
||||
racc (~> 1.4)
|
||||
nsa (0.3.0)
|
||||
activesupport (>= 4.2, < 7.2)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
sidekiq (>= 3.5)
|
||||
statsd-ruby (~> 1.4, >= 1.4.0)
|
||||
oj (3.16.5)
|
||||
bigdecimal (>= 3.0)
|
||||
ostruct (>= 0.2)
|
||||
|
@ -514,17 +509,17 @@ GEM
|
|||
opentelemetry-api (~> 1.0)
|
||||
opentelemetry-instrumentation-base (~> 0.22.1)
|
||||
opentelemetry-instrumentation-rack (~> 0.21)
|
||||
opentelemetry-instrumentation-action_view (0.7.1)
|
||||
opentelemetry-instrumentation-action_view (0.7.2)
|
||||
opentelemetry-api (~> 1.0)
|
||||
opentelemetry-instrumentation-active_support (~> 0.1)
|
||||
opentelemetry-instrumentation-base (~> 0.22.1)
|
||||
opentelemetry-instrumentation-active_job (0.7.4)
|
||||
opentelemetry-instrumentation-active_job (0.7.7)
|
||||
opentelemetry-api (~> 1.0)
|
||||
opentelemetry-instrumentation-base (~> 0.22.1)
|
||||
opentelemetry-instrumentation-active_model_serializers (0.20.2)
|
||||
opentelemetry-api (~> 1.0)
|
||||
opentelemetry-instrumentation-base (~> 0.22.1)
|
||||
opentelemetry-instrumentation-active_record (0.7.2)
|
||||
opentelemetry-instrumentation-active_record (0.7.3)
|
||||
opentelemetry-api (~> 1.0)
|
||||
opentelemetry-instrumentation-base (~> 0.22.1)
|
||||
opentelemetry-instrumentation-active_support (0.6.0)
|
||||
|
@ -558,7 +553,7 @@ GEM
|
|||
opentelemetry-instrumentation-rack (0.24.6)
|
||||
opentelemetry-api (~> 1.0)
|
||||
opentelemetry-instrumentation-base (~> 0.22.1)
|
||||
opentelemetry-instrumentation-rails (0.31.1)
|
||||
opentelemetry-instrumentation-rails (0.31.2)
|
||||
opentelemetry-api (~> 1.0)
|
||||
opentelemetry-instrumentation-action_mailer (~> 0.1.0)
|
||||
opentelemetry-instrumentation-action_pack (~> 0.9.0)
|
||||
|
@ -821,7 +816,6 @@ GEM
|
|||
simplecov-lcov (0.8.0)
|
||||
simplecov_json_formatter (0.1.4)
|
||||
stackprof (0.2.26)
|
||||
statsd-ruby (1.5.0)
|
||||
stoplight (4.1.0)
|
||||
redlock (~> 1.0)
|
||||
stringio (3.1.1)
|
||||
|
@ -980,7 +974,6 @@ DEPENDENCIES
|
|||
net-http (~> 0.4.0)
|
||||
net-ldap (~> 0.18)
|
||||
nokogiri (~> 1.15)
|
||||
nsa
|
||||
oj (~> 3.14)
|
||||
omniauth (~> 2.0)
|
||||
omniauth-cas (~> 3.0.0.beta.1)
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Notifications::RequestsController < Api::BaseController
|
||||
before_action -> { doorkeeper_authorize! :read, :'read:notifications' }, only: :index
|
||||
before_action -> { doorkeeper_authorize! :write, :'write:notifications' }, except: :index
|
||||
include Redisable
|
||||
|
||||
before_action -> { doorkeeper_authorize! :read, :'read:notifications' }, only: [:index, :show, :merged?]
|
||||
before_action -> { doorkeeper_authorize! :write, :'write:notifications' }, except: [:index, :show, :merged?]
|
||||
|
||||
before_action :require_user!
|
||||
before_action :set_request, only: [:show, :accept, :dismiss]
|
||||
|
@ -19,6 +21,10 @@ class Api::V1::Notifications::RequestsController < Api::BaseController
|
|||
render json: @requests, each_serializer: REST::NotificationRequestSerializer, relationships: @relationships
|
||||
end
|
||||
|
||||
def merged?
|
||||
render json: { merged: redis.get("notification_unfilter_jobs:#{current_account.id}").to_i <= 0 }
|
||||
end
|
||||
|
||||
def show
|
||||
render json: @request, serializer: REST::NotificationRequestSerializer
|
||||
end
|
||||
|
@ -69,13 +75,17 @@ class Api::V1::Notifications::RequestsController < Api::BaseController
|
|||
end
|
||||
|
||||
def next_path
|
||||
api_v1_notifications_requests_url pagination_params(max_id: pagination_max_id) unless @requests.empty?
|
||||
api_v1_notifications_requests_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||
end
|
||||
|
||||
def prev_path
|
||||
api_v1_notifications_requests_url pagination_params(min_id: pagination_since_id) unless @requests.empty?
|
||||
end
|
||||
|
||||
def records_continue?
|
||||
@requests.size == limit_param(DEFAULT_ACCOUNTS_LIMIT)
|
||||
end
|
||||
|
||||
def pagination_max_id
|
||||
@requests.last.id
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ module Admin::FilterHelper
|
|||
end
|
||||
|
||||
def table_link_to(icon, text, path, **options)
|
||||
link_to safe_join([fa_icon(icon), text]), path, options.merge(class: 'table-action-link')
|
||||
link_to safe_join([material_symbol(icon), text]), path, options.merge(class: 'table-action-link')
|
||||
end
|
||||
|
||||
def selected?(more_params)
|
||||
|
|
|
@ -105,19 +105,12 @@ module ApplicationHelper
|
|||
policy(record).public_send(:"#{action}?")
|
||||
end
|
||||
|
||||
def fa_icon(icon, attributes = {})
|
||||
class_names = attributes[:class]&.split || []
|
||||
class_names << 'fa'
|
||||
class_names += icon.split.map { |cl| "fa-#{cl}" }
|
||||
|
||||
content_tag(:i, nil, attributes.merge(class: class_names.join(' ')))
|
||||
end
|
||||
|
||||
def material_symbol(icon, attributes = {})
|
||||
inline_svg_tag(
|
||||
"400-24px/#{icon}.svg",
|
||||
class: ['icon', "material-#{icon}"].concat(attributes[:class].to_s.split),
|
||||
role: :img
|
||||
role: :img,
|
||||
data: attributes[:data]
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -245,22 +238,6 @@ module ApplicationHelper
|
|||
full_asset_url(instance_presenter.mascot&.file&.url || frontend_asset_path('images/elephant_ui_plane.svg'))
|
||||
end
|
||||
|
||||
def instance_presenter
|
||||
@instance_presenter ||= InstancePresenter.new
|
||||
end
|
||||
|
||||
def favicon_path(size = '48')
|
||||
instance_presenter.favicon&.file&.url(size)
|
||||
end
|
||||
|
||||
def app_icon_path(size = '48')
|
||||
instance_presenter.app_icon&.file&.url(size)
|
||||
end
|
||||
|
||||
def use_mask_icon?
|
||||
instance_presenter.app_icon.blank?
|
||||
end
|
||||
|
||||
# glitch-soc addition to handle the multiple flavors
|
||||
def preload_locale_pack
|
||||
supported_locales = Themes.instance.flavour(current_flavour)['locales']
|
||||
|
|
|
@ -13,6 +13,22 @@ module InstanceHelper
|
|||
safe_join([description_prefix(invite), I18n.t('auth.description.suffix')], ' ')
|
||||
end
|
||||
|
||||
def instance_presenter
|
||||
@instance_presenter ||= InstancePresenter.new
|
||||
end
|
||||
|
||||
def favicon_path(size = '48')
|
||||
instance_presenter.favicon&.file&.url(size)
|
||||
end
|
||||
|
||||
def app_icon_path(size = '48')
|
||||
instance_presenter.app_icon&.file&.url(size)
|
||||
end
|
||||
|
||||
def use_mask_icon?
|
||||
instance_presenter.app_icon.blank?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def description_prefix(invite)
|
||||
|
|
|
@ -26,11 +26,11 @@ module SettingsHelper
|
|||
device = session.detection.device
|
||||
|
||||
if device.mobile?
|
||||
'mobile'
|
||||
'smartphone'
|
||||
elsif device.tablet?
|
||||
'tablet'
|
||||
else
|
||||
'desktop'
|
||||
'desktop_mac'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
that is implicitly generated as the common chunk through webpack's `splitChunks` config */
|
||||
|
||||
import './public-path';
|
||||
import 'font-awesome/css/font-awesome.css';
|
||||
|
|
|
@ -447,12 +447,12 @@ export function unpinFail(status, error) {
|
|||
};
|
||||
}
|
||||
|
||||
function toggleReblogWithoutConfirmation(status, privacy) {
|
||||
function toggleReblogWithoutConfirmation(status, visibility) {
|
||||
return (dispatch) => {
|
||||
if (status.get('reblogged')) {
|
||||
dispatch(unreblog({ statusId: status.get('id') }));
|
||||
} else {
|
||||
dispatch(reblog({ statusId: status.get('id'), privacy }));
|
||||
dispatch(reblog({ statusId: status.get('id'), visibility }));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import type {
|
|||
} from 'flavours/glitch/api_types/notifications';
|
||||
import { allNotificationTypes } from 'flavours/glitch/api_types/notifications';
|
||||
import type { ApiStatusJSON } from 'flavours/glitch/api_types/statuses';
|
||||
import { usePendingItems } from 'flavours/glitch/initial_state';
|
||||
import type { NotificationGap } from 'flavours/glitch/reducers/notification_groups';
|
||||
import {
|
||||
selectSettingsNotificationsExcludedTypes,
|
||||
|
@ -103,6 +104,28 @@ export const fetchNotificationsGap = createDataLoadingThunk(
|
|||
},
|
||||
);
|
||||
|
||||
export const pollRecentNotifications = createDataLoadingThunk(
|
||||
'notificationGroups/pollRecentNotifications',
|
||||
async (_params, { getState }) => {
|
||||
return apiFetchNotifications({
|
||||
max_id: undefined,
|
||||
// In slow mode, we don't want to include notifications that duplicate the already-displayed ones
|
||||
since_id: usePendingItems
|
||||
? getState().notificationGroups.groups.find(
|
||||
(group) => group.type !== 'gap',
|
||||
)?.page_max_id
|
||||
: undefined,
|
||||
});
|
||||
},
|
||||
({ notifications, accounts, statuses }, { dispatch }) => {
|
||||
dispatch(importFetchedAccounts(accounts));
|
||||
dispatch(importFetchedStatuses(statuses));
|
||||
dispatchAssociatedRecords(dispatch, notifications);
|
||||
|
||||
return { notifications };
|
||||
},
|
||||
);
|
||||
|
||||
export const processNewNotificationForGroups = createAppAsyncThunk(
|
||||
'notificationGroups/processNew',
|
||||
(notification: ApiNotificationJSON, { dispatch, getState }) => {
|
||||
|
@ -138,8 +161,18 @@ export const processNewNotificationForGroups = createAppAsyncThunk(
|
|||
|
||||
export const loadPending = createAction('notificationGroups/loadPending');
|
||||
|
||||
export const updateScrollPosition = createAction<{ top: boolean }>(
|
||||
export const updateScrollPosition = createAppAsyncThunk(
|
||||
'notificationGroups/updateScrollPosition',
|
||||
({ top }: { top: boolean }, { dispatch, getState }) => {
|
||||
if (
|
||||
top &&
|
||||
getState().notificationGroups.mergedNotifications === 'needs-reload'
|
||||
) {
|
||||
void dispatch(fetchNotifications());
|
||||
}
|
||||
|
||||
return { top };
|
||||
},
|
||||
);
|
||||
|
||||
export const setNotificationsFilter = createAppAsyncThunk(
|
||||
|
@ -165,5 +198,34 @@ export const markNotificationsAsRead = createAction(
|
|||
'notificationGroups/markAsRead',
|
||||
);
|
||||
|
||||
export const mountNotifications = createAction('notificationGroups/mount');
|
||||
export const mountNotifications = createAppAsyncThunk(
|
||||
'notificationGroups/mount',
|
||||
(_, { dispatch, getState }) => {
|
||||
const state = getState();
|
||||
|
||||
if (
|
||||
state.notificationGroups.mounted === 0 &&
|
||||
state.notificationGroups.mergedNotifications === 'needs-reload'
|
||||
) {
|
||||
void dispatch(fetchNotifications());
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
export const unmountNotifications = createAction('notificationGroups/unmount');
|
||||
|
||||
export const refreshStaleNotificationGroups = createAppAsyncThunk<{
|
||||
deferredRefresh: boolean;
|
||||
}>('notificationGroups/refreshStale', (_, { dispatch, getState }) => {
|
||||
const state = getState();
|
||||
|
||||
if (
|
||||
state.notificationGroups.scrolledToTop ||
|
||||
!state.notificationGroups.mounted
|
||||
) {
|
||||
void dispatch(fetchNotifications());
|
||||
return { deferredRefresh: false };
|
||||
}
|
||||
|
||||
return { deferredRefresh: true };
|
||||
});
|
||||
|
|
|
@ -201,8 +201,8 @@ const noOp = () => {};
|
|||
|
||||
let expandNotificationsController = new AbortController();
|
||||
|
||||
export function expandNotifications({ maxId, forceLoad = false } = {}, done = noOp) {
|
||||
return (dispatch, getState) => {
|
||||
export function expandNotifications({ maxId = undefined, forceLoad = false }) {
|
||||
return async (dispatch, getState) => {
|
||||
const activeFilter = getState().getIn(['settings', 'notifications', 'quickFilter', 'active']);
|
||||
const notifications = getState().get('notifications');
|
||||
const isLoadingMore = !!maxId;
|
||||
|
@ -212,7 +212,6 @@ export function expandNotifications({ maxId, forceLoad = false } = {}, done = no
|
|||
expandNotificationsController.abort();
|
||||
expandNotificationsController = new AbortController();
|
||||
} else {
|
||||
done();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -239,7 +238,8 @@ export function expandNotifications({ maxId, forceLoad = false } = {}, done = no
|
|||
|
||||
dispatch(expandNotificationsRequest(isLoadingMore));
|
||||
|
||||
api().get('/api/v1/notifications', { params, signal: expandNotificationsController.signal }).then(response => {
|
||||
try {
|
||||
const response = await api().get('/api/v1/notifications', { params, signal: expandNotificationsController.signal });
|
||||
const next = getLinks(response).refs.find(link => link.rel === 'next');
|
||||
|
||||
dispatch(importFetchedAccounts(response.data.map(item => item.account)));
|
||||
|
@ -249,11 +249,9 @@ export function expandNotifications({ maxId, forceLoad = false } = {}, done = no
|
|||
dispatch(expandNotificationsSuccess(response.data, next ? next.uri : null, isLoadingMore, isLoadingRecent, isLoadingRecent && preferPendingItems));
|
||||
fetchRelatedRelationships(dispatch, response.data);
|
||||
dispatch(submitMarkers());
|
||||
}).catch(error => {
|
||||
} catch(error) {
|
||||
dispatch(expandNotificationsFail(error, isLoadingMore));
|
||||
}).finally(() => {
|
||||
done();
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,6 @@ export const initializeNotifications = createAppAsyncThunk(
|
|||
) as boolean;
|
||||
|
||||
if (enableBeta) void dispatch(fetchNotifications());
|
||||
else dispatch(expandNotifications());
|
||||
else void dispatch(expandNotifications({}));
|
||||
},
|
||||
);
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
deleteAnnouncement,
|
||||
} from './announcements';
|
||||
import { updateConversations } from './conversations';
|
||||
import { processNewNotificationForGroups } from './notification_groups';
|
||||
import { processNewNotificationForGroups, refreshStaleNotificationGroups, pollRecentNotifications as pollRecentGroupNotifications } from './notification_groups';
|
||||
import { updateNotifications, expandNotifications } from './notifications';
|
||||
import { updateStatus } from './statuses';
|
||||
import {
|
||||
|
@ -37,7 +37,7 @@ const randomUpTo = max =>
|
|||
* @param {string} channelName
|
||||
* @param {Object.<string, string>} params
|
||||
* @param {Object} options
|
||||
* @param {function(Function, Function): void} [options.fallback]
|
||||
* @param {function(Function, Function): Promise<void>} [options.fallback]
|
||||
* @param {function(): void} [options.fillGaps]
|
||||
* @param {function(object): boolean} [options.accept]
|
||||
* @returns {function(): void}
|
||||
|
@ -52,14 +52,13 @@ export const connectTimelineStream = (timelineId, channelName, params = {}, opti
|
|||
let pollingId;
|
||||
|
||||
/**
|
||||
* @param {function(Function, Function): void} fallback
|
||||
* @param {function(Function, Function): Promise<void>} fallback
|
||||
*/
|
||||
|
||||
const useFallback = fallback => {
|
||||
fallback(dispatch, () => {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks -- this is not a react hook
|
||||
pollingId = setTimeout(() => useFallback(fallback), 20000 + randomUpTo(20000));
|
||||
});
|
||||
const useFallback = async fallback => {
|
||||
await fallback(dispatch, getState);
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks -- this is not a react hook
|
||||
pollingId = setTimeout(() => useFallback(fallback), 20000 + randomUpTo(20000));
|
||||
};
|
||||
|
||||
return {
|
||||
|
@ -109,6 +108,14 @@ export const connectTimelineStream = (timelineId, channelName, params = {}, opti
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 'notifications_merged':
|
||||
const state = getState();
|
||||
if (state.notifications.top || !state.notifications.mounted)
|
||||
dispatch(expandNotifications({ forceLoad: true, maxId: undefined }));
|
||||
if(state.settings.getIn(['notifications', 'groupingBeta'], false)) {
|
||||
dispatch(refreshStaleNotificationGroups());
|
||||
}
|
||||
break;
|
||||
case 'conversation':
|
||||
// @ts-expect-error
|
||||
dispatch(updateConversations(JSON.parse(data.payload)));
|
||||
|
@ -132,21 +139,30 @@ export const connectTimelineStream = (timelineId, channelName, params = {}, opti
|
|||
|
||||
/**
|
||||
* @param {Function} dispatch
|
||||
* @param {function(): void} done
|
||||
* @param {Function} getState
|
||||
*/
|
||||
const refreshHomeTimelineAndNotification = (dispatch, done) => {
|
||||
// @ts-expect-error
|
||||
dispatch(expandHomeTimeline({}, () =>
|
||||
// @ts-expect-error
|
||||
dispatch(expandNotifications({}, () =>
|
||||
dispatch(fetchAnnouncements(done))))));
|
||||
};
|
||||
async function refreshHomeTimelineAndNotification(dispatch, getState) {
|
||||
await dispatch(expandHomeTimeline({ maxId: undefined }));
|
||||
|
||||
// TODO: remove this once the groups feature replaces the previous one
|
||||
if(getState().settings.getIn(['notifications', 'groupingBeta'], false)) {
|
||||
// TODO: polling for merged notifications
|
||||
try {
|
||||
await dispatch(pollRecentGroupNotifications());
|
||||
} catch (error) {
|
||||
// TODO
|
||||
}
|
||||
} else {
|
||||
await dispatch(expandNotifications({}));
|
||||
}
|
||||
|
||||
await dispatch(fetchAnnouncements());
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {function(): void}
|
||||
*/
|
||||
export const connectUserStream = () =>
|
||||
// @ts-expect-error
|
||||
connectTimelineStream('home', 'user', {}, { fallback: refreshHomeTimelineAndNotification, fillGaps: fillHomeTimelineGaps });
|
||||
|
||||
/**
|
||||
|
|
|
@ -87,21 +87,18 @@ export function clearTimeline(timeline) {
|
|||
};
|
||||
}
|
||||
|
||||
const noOp = () => {};
|
||||
|
||||
const parseTags = (tags = {}, mode) => {
|
||||
return (tags[mode] || []).map((tag) => {
|
||||
return tag.value;
|
||||
});
|
||||
};
|
||||
|
||||
export function expandTimeline(timelineId, path, params = {}, done = noOp) {
|
||||
return (dispatch, getState) => {
|
||||
export function expandTimeline(timelineId, path, params = {}) {
|
||||
return async (dispatch, getState) => {
|
||||
const timeline = getState().getIn(['timelines', timelineId], ImmutableMap());
|
||||
const isLoadingMore = !!params.max_id;
|
||||
|
||||
if (timeline.get('isLoading')) {
|
||||
done();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -120,7 +117,8 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) {
|
|||
|
||||
dispatch(expandTimelineRequest(timelineId, isLoadingMore));
|
||||
|
||||
api().get(path, { params }).then(response => {
|
||||
try {
|
||||
const response = await api().get(path, { params });
|
||||
const next = getLinks(response).refs.find(link => link.rel === 'next');
|
||||
|
||||
dispatch(importFetchedStatuses(response.data));
|
||||
|
@ -138,53 +136,49 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) {
|
|||
if (timelineId === 'home') {
|
||||
dispatch(submitMarkers());
|
||||
}
|
||||
}).catch(error => {
|
||||
} catch(error) {
|
||||
dispatch(expandTimelineFail(timelineId, error, isLoadingMore));
|
||||
}).finally(() => {
|
||||
done();
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function fillTimelineGaps(timelineId, path, params = {}, done = noOp) {
|
||||
return (dispatch, getState) => {
|
||||
export function fillTimelineGaps(timelineId, path, params = {}) {
|
||||
return async (dispatch, getState) => {
|
||||
const timeline = getState().getIn(['timelines', timelineId], ImmutableMap());
|
||||
const items = timeline.get('items');
|
||||
const nullIndexes = items.map((statusId, index) => statusId === null ? index : null);
|
||||
const gaps = nullIndexes.map(index => index > 0 ? items.get(index - 1) : null);
|
||||
|
||||
// Only expand at most two gaps to avoid doing too many requests
|
||||
done = gaps.take(2).reduce((done, maxId) => {
|
||||
return (() => dispatch(expandTimeline(timelineId, path, { ...params, maxId }, done)));
|
||||
}, done);
|
||||
|
||||
done();
|
||||
for (const maxId of gaps.take(2)) {
|
||||
await dispatch(expandTimeline(timelineId, path, { ...params, maxId }));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export const expandHomeTimeline = ({ maxId } = {}, done = noOp) => expandTimeline('home', '/api/v1/timelines/home', { max_id: maxId }, done);
|
||||
export const expandPublicTimeline = ({ maxId, onlyMedia, onlyRemote, allowLocalOnly } = {}, done = noOp) => expandTimeline(`public${onlyRemote ? ':remote' : (allowLocalOnly ? ':allow_local_only' : '')}${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { remote: !!onlyRemote, allow_local_only: !!allowLocalOnly, max_id: maxId, only_media: !!onlyMedia }, done);
|
||||
export const expandCommunityTimeline = ({ maxId, onlyMedia } = {}, done = noOp) => expandTimeline(`community${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { local: true, max_id: maxId, only_media: !!onlyMedia }, done);
|
||||
export const expandDirectTimeline = ({ maxId } = {}, done = noOp) => expandTimeline('direct', '/api/v1/timelines/direct', { max_id: maxId }, done);
|
||||
export const expandHomeTimeline = ({ maxId } = {}) => expandTimeline('home', '/api/v1/timelines/home', { max_id: maxId });
|
||||
export const expandPublicTimeline = ({ maxId, onlyMedia, onlyRemote, allowLocalOnly } = {}) => expandTimeline(`public${onlyRemote ? ':remote' : (allowLocalOnly ? ':allow_local_only' : '')}${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { remote: !!onlyRemote, allow_local_only: !!allowLocalOnly, max_id: maxId, only_media: !!onlyMedia });
|
||||
export const expandCommunityTimeline = ({ maxId, onlyMedia } = {}) => expandTimeline(`community${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { local: true, max_id: maxId, only_media: !!onlyMedia });
|
||||
export const expandDirectTimeline = ({ maxId } = {}) => expandTimeline('direct', '/api/v1/timelines/direct', { max_id: maxId });
|
||||
export const expandAccountTimeline = (accountId, { maxId, withReplies, tagged } = {}) => expandTimeline(`account:${accountId}${withReplies ? ':with_replies' : ''}${tagged ? `:${tagged}` : ''}`, `/api/v1/accounts/${accountId}/statuses`, { exclude_replies: !withReplies, exclude_reblogs: withReplies, tagged, max_id: maxId });
|
||||
export const expandAccountFeaturedTimeline = (accountId, { tagged } = {}) => expandTimeline(`account:${accountId}:pinned`, `/api/v1/accounts/${accountId}/statuses`, { pinned: true, tagged });
|
||||
export const expandAccountMediaTimeline = (accountId, { maxId } = {}) => expandTimeline(`account:${accountId}:media`, `/api/v1/accounts/${accountId}/statuses`, { max_id: maxId, only_media: true, limit: 40 });
|
||||
export const expandListTimeline = (id, { maxId } = {}, done = noOp) => expandTimeline(`list:${id}`, `/api/v1/timelines/list/${id}`, { max_id: maxId }, done);
|
||||
export const expandLinkTimeline = (url, { maxId } = {}, done = noOp) => expandTimeline(`link:${url}`, `/api/v1/timelines/link`, { url, max_id: maxId }, done);
|
||||
export const expandHashtagTimeline = (hashtag, { maxId, tags, local } = {}, done = noOp) => {
|
||||
export const expandListTimeline = (id, { maxId } = {}) => expandTimeline(`list:${id}`, `/api/v1/timelines/list/${id}`, { max_id: maxId });
|
||||
export const expandLinkTimeline = (url, { maxId } = {}) => expandTimeline(`link:${url}`, `/api/v1/timelines/link`, { url, max_id: maxId });
|
||||
export const expandHashtagTimeline = (hashtag, { maxId, tags, local } = {}) => {
|
||||
return expandTimeline(`hashtag:${hashtag}${local ? ':local' : ''}`, `/api/v1/timelines/tag/${hashtag}`, {
|
||||
max_id: maxId,
|
||||
any: parseTags(tags, 'any'),
|
||||
all: parseTags(tags, 'all'),
|
||||
none: parseTags(tags, 'none'),
|
||||
local: local,
|
||||
}, done);
|
||||
});
|
||||
};
|
||||
|
||||
export const fillHomeTimelineGaps = (done = noOp) => fillTimelineGaps('home', '/api/v1/timelines/home', {}, done);
|
||||
export const fillPublicTimelineGaps = ({ onlyMedia, onlyRemote, allowLocalOnly } = {}, done = noOp) => fillTimelineGaps(`public${onlyRemote ? ':remote' : (allowLocalOnly ? ':allow_local_only' : '')}${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { remote: !!onlyRemote, only_media: !!onlyMedia, allow_local_only: !!allowLocalOnly }, done);
|
||||
export const fillCommunityTimelineGaps = ({ onlyMedia } = {}, done = noOp) => fillTimelineGaps(`community${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { local: true, only_media: !!onlyMedia }, done);
|
||||
export const fillListTimelineGaps = (id, done = noOp) => fillTimelineGaps(`list:${id}`, `/api/v1/timelines/list/${id}`, {}, done);
|
||||
export const fillHomeTimelineGaps = () => fillTimelineGaps('home', '/api/v1/timelines/home', {});
|
||||
export const fillPublicTimelineGaps = ({ onlyMedia, onlyRemote, allowLocalOnly } = {}) => fillTimelineGaps(`public${onlyRemote ? ':remote' : (allowLocalOnly ? ':allow_local_only' : '')}${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { remote: !!onlyRemote, only_media: !!onlyMedia, allow_local_only: !!allowLocalOnly });
|
||||
export const fillCommunityTimelineGaps = ({ onlyMedia } = {}) => fillTimelineGaps(`community${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { local: true, only_media: !!onlyMedia });
|
||||
export const fillListTimelineGaps = (id) => fillTimelineGaps(`list:${id}`, `/api/v1/timelines/list/${id}`, {});
|
||||
|
||||
export function expandTimelineRequest(timeline, isLoadingMore) {
|
||||
return {
|
||||
|
|
|
@ -4,6 +4,7 @@ import type { ApiNotificationGroupsResultJSON } from 'flavours/glitch/api_types/
|
|||
export const apiFetchNotifications = async (params?: {
|
||||
exclude_types?: string[];
|
||||
max_id?: string;
|
||||
since_id?: string;
|
||||
}) => {
|
||||
const response = await api().request<ApiNotificationGroupsResultJSON>({
|
||||
method: 'GET',
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import Rails from '@rails/ujs';
|
||||
import 'font-awesome/css/font-awesome.css';
|
||||
|
||||
export function start() {
|
||||
require.context('@/images/', true, /\.(jpg|png|svg)$/);
|
||||
|
|
|
@ -153,7 +153,7 @@ class ReportReasonSelector extends PureComponent {
|
|||
<Category id='other' text={intl.formatMessage(messages.other)} selected={category === 'other'} onSelect={this.handleSelect} disabled={disabled} />
|
||||
<Category id='legal' text={intl.formatMessage(messages.legal)} selected={category === 'legal'} onSelect={this.handleSelect} disabled={disabled} />
|
||||
<Category id='spam' text={intl.formatMessage(messages.spam)} selected={category === 'spam'} onSelect={this.handleSelect} disabled={disabled} />
|
||||
<Category id='violation' text={intl.formatMessage(messages.violation)} selected={category === 'violation'} onSelect={this.handleSelect} disabled={disabled}>
|
||||
<Category id='violation' text={intl.formatMessage(messages.violation)} selected={category === 'violation'} onSelect={this.handleSelect} disabled={disabled || rules.length === 0}>
|
||||
{rules.map(rule => <Rule key={rule.id} id={rule.id} text={rule.text} selected={rule_ids.includes(rule.id)} onToggle={this.handleToggle} disabled={disabled} />)}
|
||||
</Category>
|
||||
</div>
|
||||
|
|
|
@ -1,28 +1,23 @@
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
interface Props {
|
||||
resource: JSX.Element;
|
||||
message: React.ReactNode;
|
||||
label: React.ReactNode;
|
||||
url: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export const TimelineHint: React.FC<Props> = ({ className, resource, url }) => (
|
||||
export const TimelineHint: React.FC<Props> = ({
|
||||
className,
|
||||
message,
|
||||
label,
|
||||
url,
|
||||
}) => (
|
||||
<div className={classNames('timeline-hint', className)}>
|
||||
<strong>
|
||||
<FormattedMessage
|
||||
id='timeline_hint.remote_resource_not_displayed'
|
||||
defaultMessage='{resource} from other servers are not displayed.'
|
||||
values={{ resource }}
|
||||
/>
|
||||
</strong>
|
||||
<br />
|
||||
<p>{message}</p>
|
||||
|
||||
<a href={url} target='_blank' rel='noopener noreferrer'>
|
||||
<FormattedMessage
|
||||
id='account.browse_more_on_origin_server'
|
||||
defaultMessage='Browse more on the original profile'
|
||||
/>
|
||||
{label}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
that is implicitly generated as the common chunk through webpack's `splitChunks` config */
|
||||
|
||||
import '@/entrypoints/public-path';
|
||||
import 'font-awesome/css/font-awesome.css';
|
||||
|
||||
// This is a hack to ensures that webpack compiles our images.
|
||||
require.context('../images', true);
|
||||
|
|
|
@ -12,6 +12,7 @@ import ProfileColumnHeader from 'flavours/glitch/features/account/components/pro
|
|||
import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error';
|
||||
import { normalizeForLookup } from 'flavours/glitch/reducers/accounts_map';
|
||||
import { getAccountHidden } from 'flavours/glitch/selectors';
|
||||
import { useAppSelector } from 'flavours/glitch/store';
|
||||
|
||||
import { lookupAccount, fetchAccount } from '../../actions/accounts';
|
||||
import { fetchFeaturedTags } from '../../actions/featured_tags';
|
||||
|
@ -57,12 +58,22 @@ const mapStateToProps = (state, { params: { acct, id, tagged }, withReplies = fa
|
|||
};
|
||||
};
|
||||
|
||||
const RemoteHint = ({ url }) => (
|
||||
<TimelineHint url={url} resource={<FormattedMessage id='timeline_hint.resources.statuses' defaultMessage='Older posts' />} />
|
||||
);
|
||||
const RemoteHint = ({ accountId, url }) => {
|
||||
const acct = useAppSelector(state => state.accounts.get(accountId)?.acct);
|
||||
const domain = acct ? acct.split('@')[1] : undefined;
|
||||
|
||||
return (
|
||||
<TimelineHint
|
||||
url={url}
|
||||
message={<FormattedMessage id='hints.profiles.posts_may_be_missing' defaultMessage='Some posts from this profile may be missing.' />}
|
||||
label={<FormattedMessage id='hints.profiles.see_more_posts' defaultMessage='See more posts on {domain}' values={{ domain: <strong>{domain}</strong> }} />}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
RemoteHint.propTypes = {
|
||||
url: PropTypes.string.isRequired,
|
||||
accountId: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
class AccountTimeline extends ImmutablePureComponent {
|
||||
|
@ -176,12 +187,12 @@ class AccountTimeline extends ImmutablePureComponent {
|
|||
} else if (hidden) {
|
||||
emptyMessage = <LimitedAccountHint accountId={accountId} />;
|
||||
} else if (remote && statusIds.isEmpty()) {
|
||||
emptyMessage = <RemoteHint url={remoteUrl} />;
|
||||
emptyMessage = <RemoteHint accountId={accountId} url={remoteUrl} />;
|
||||
} else {
|
||||
emptyMessage = <FormattedMessage id='empty_column.account_timeline' defaultMessage='No posts found' />;
|
||||
}
|
||||
|
||||
const remoteMessage = remote ? <RemoteHint url={remoteUrl} /> : null;
|
||||
const remoteMessage = remote ? <RemoteHint accountId={accountId} url={remoteUrl} /> : null;
|
||||
|
||||
return (
|
||||
<Column ref={this.setRef}>
|
||||
|
|
|
@ -12,6 +12,7 @@ import { TimelineHint } from 'flavours/glitch/components/timeline_hint';
|
|||
import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error';
|
||||
import { normalizeForLookup } from 'flavours/glitch/reducers/accounts_map';
|
||||
import { getAccountHidden } from 'flavours/glitch/selectors';
|
||||
import { useAppSelector } from 'flavours/glitch/store';
|
||||
|
||||
import {
|
||||
lookupAccount,
|
||||
|
@ -50,12 +51,22 @@ const mapStateToProps = (state, { params: { acct, id } }) => {
|
|||
};
|
||||
};
|
||||
|
||||
const RemoteHint = ({ url }) => (
|
||||
<TimelineHint url={url} resource={<FormattedMessage id='timeline_hint.resources.followers' defaultMessage='Followers' />} />
|
||||
);
|
||||
const RemoteHint = ({ accountId, url }) => {
|
||||
const acct = useAppSelector(state => state.accounts.get(accountId)?.acct);
|
||||
const domain = acct ? acct.split('@')[1] : undefined;
|
||||
|
||||
return (
|
||||
<TimelineHint
|
||||
url={url}
|
||||
message={<FormattedMessage id='hints.profiles.followers_may_be_missing' defaultMessage='Followers for this profile may be missing.' />}
|
||||
label={<FormattedMessage id='hints.profiles.see_more_followers' defaultMessage='See more followers on {domain}' values={{ domain: <strong>{domain}</strong> }} />}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
RemoteHint.propTypes = {
|
||||
url: PropTypes.string.isRequired,
|
||||
accountId: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
class Followers extends ImmutablePureComponent {
|
||||
|
@ -145,12 +156,12 @@ class Followers extends ImmutablePureComponent {
|
|||
} else if (hideCollections && accountIds.isEmpty()) {
|
||||
emptyMessage = <FormattedMessage id='empty_column.account_hides_collections' defaultMessage='This user has chosen to not make this information available' />;
|
||||
} else if (remote && accountIds.isEmpty()) {
|
||||
emptyMessage = <RemoteHint url={remoteUrl} />;
|
||||
emptyMessage = <RemoteHint accountId={accountId} url={remoteUrl} />;
|
||||
} else {
|
||||
emptyMessage = <FormattedMessage id='account.followers.empty' defaultMessage='No one follows this user yet.' />;
|
||||
}
|
||||
|
||||
const remoteMessage = remote ? <RemoteHint url={remoteUrl} /> : null;
|
||||
const remoteMessage = remote ? <RemoteHint accountId={accountId} url={remoteUrl} /> : null;
|
||||
|
||||
return (
|
||||
<Column ref={this.setRef}>
|
||||
|
|
|
@ -12,6 +12,7 @@ import { TimelineHint } from 'flavours/glitch/components/timeline_hint';
|
|||
import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error';
|
||||
import { normalizeForLookup } from 'flavours/glitch/reducers/accounts_map';
|
||||
import { getAccountHidden } from 'flavours/glitch/selectors';
|
||||
import { useAppSelector } from 'flavours/glitch/store';
|
||||
|
||||
import {
|
||||
lookupAccount,
|
||||
|
@ -50,12 +51,22 @@ const mapStateToProps = (state, { params: { acct, id } }) => {
|
|||
};
|
||||
};
|
||||
|
||||
const RemoteHint = ({ url }) => (
|
||||
<TimelineHint url={url} resource={<FormattedMessage id='timeline_hint.resources.follows' defaultMessage='Follows' />} />
|
||||
);
|
||||
const RemoteHint = ({ accountId, url }) => {
|
||||
const acct = useAppSelector(state => state.accounts.get(accountId)?.acct);
|
||||
const domain = acct ? acct.split('@')[1] : undefined;
|
||||
|
||||
return (
|
||||
<TimelineHint
|
||||
url={url}
|
||||
message={<FormattedMessage id='hints.profiles.follows_may_be_missing' defaultMessage='Follows for this profile may be missing.' />}
|
||||
label={<FormattedMessage id='hints.profiles.see_more_follows' defaultMessage='See more follows on {domain}' values={{ domain: <strong>{domain}</strong> }} />}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
RemoteHint.propTypes = {
|
||||
url: PropTypes.string.isRequired,
|
||||
accountId: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
class Following extends ImmutablePureComponent {
|
||||
|
@ -145,12 +156,12 @@ class Following extends ImmutablePureComponent {
|
|||
} else if (hideCollections && accountIds.isEmpty()) {
|
||||
emptyMessage = <FormattedMessage id='empty_column.account_hides_collections' defaultMessage='This user has chosen to not make this information available' />;
|
||||
} else if (remote && accountIds.isEmpty()) {
|
||||
emptyMessage = <RemoteHint url={remoteUrl} />;
|
||||
emptyMessage = <RemoteHint accountId={accountId} url={remoteUrl} />;
|
||||
} else {
|
||||
emptyMessage = <FormattedMessage id='account.follows.empty' defaultMessage="This user doesn't follow anyone yet." />;
|
||||
}
|
||||
|
||||
const remoteMessage = remote ? <RemoteHint url={remoteUrl} /> : null;
|
||||
const remoteMessage = remote ? <RemoteHint accountId={accountId} url={remoteUrl} /> : null;
|
||||
|
||||
return (
|
||||
<Column ref={this.setRef}>
|
||||
|
|
|
@ -36,13 +36,13 @@ export const LinkTimeline: React.FC<{
|
|||
|
||||
const handleLoadMore = useCallback(
|
||||
(maxId: string) => {
|
||||
dispatch(expandLinkTimeline(decodedUrl, { maxId }));
|
||||
void dispatch(expandLinkTimeline(decodedUrl, { maxId }));
|
||||
},
|
||||
[dispatch, decodedUrl],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(expandLinkTimeline(decodedUrl));
|
||||
void dispatch(expandLinkTimeline(decodedUrl));
|
||||
}, [dispatch, decodedUrl]);
|
||||
|
||||
return (
|
||||
|
|
|
@ -7,6 +7,7 @@ import { Helmet } from 'react-helmet';
|
|||
|
||||
import { useSelector, useDispatch } from 'react-redux';
|
||||
|
||||
import ArrowDropDownIcon from '@/material-icons/400-24px/arrow_drop_down.svg?react';
|
||||
import InventoryIcon from '@/material-icons/400-24px/inventory_2.svg?react';
|
||||
import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react';
|
||||
import { openModal } from 'flavours/glitch/actions/modal';
|
||||
|
@ -15,6 +16,7 @@ import { changeSetting } from 'flavours/glitch/actions/settings';
|
|||
import { CheckBox } from 'flavours/glitch/components/check_box';
|
||||
import Column from 'flavours/glitch/components/column';
|
||||
import ColumnHeader from 'flavours/glitch/components/column_header';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import ScrollableList from 'flavours/glitch/components/scrollable_list';
|
||||
import DropdownMenuContainer from 'flavours/glitch/containers/dropdown_menu_container';
|
||||
|
||||
|
@ -26,16 +28,14 @@ const messages = defineMessages({
|
|||
title: { id: 'notification_requests.title', defaultMessage: 'Filtered notifications' },
|
||||
maximize: { id: 'notification_requests.maximize', defaultMessage: 'Maximize' },
|
||||
more: { id: 'status.more', defaultMessage: 'More' },
|
||||
acceptAll: { id: 'notification_requests.accept_all', defaultMessage: 'Accept all' },
|
||||
dismissAll: { id: 'notification_requests.dismiss_all', defaultMessage: 'Dismiss all' },
|
||||
acceptMultiple: { id: 'notification_requests.accept_multiple', defaultMessage: '{count, plural, one {Accept # request} other {Accept # requests}}' },
|
||||
dismissMultiple: { id: 'notification_requests.dismiss_multiple', defaultMessage: '{count, plural, one {Dismiss # request} other {Dismiss # requests}}' },
|
||||
confirmAcceptAllTitle: { id: 'notification_requests.confirm_accept_all.title', defaultMessage: 'Accept notification requests?' },
|
||||
confirmAcceptAllMessage: { id: 'notification_requests.confirm_accept_all.message', defaultMessage: 'You are about to accept {count, plural, one {one notification request} other {# notification requests}}. Are you sure you want to proceed?' },
|
||||
confirmAcceptAllButton: { id: 'notification_requests.confirm_accept_all.button', defaultMessage: 'Accept all' },
|
||||
confirmDismissAllTitle: { id: 'notification_requests.confirm_dismiss_all.title', defaultMessage: 'Dismiss notification requests?' },
|
||||
confirmDismissAllMessage: { id: 'notification_requests.confirm_dismiss_all.message', defaultMessage: "You are about to dismiss {count, plural, one {one notification request} other {# notification requests}}. You won't be able to easily access {count, plural, one {it} other {them}} again. Are you sure you want to proceed?" },
|
||||
confirmDismissAllButton: { id: 'notification_requests.confirm_dismiss_all.button', defaultMessage: 'Dismiss all' },
|
||||
acceptMultiple: { id: 'notification_requests.accept_multiple', defaultMessage: '{count, plural, one {Accept # request…} other {Accept # requests…}}' },
|
||||
dismissMultiple: { id: 'notification_requests.dismiss_multiple', defaultMessage: '{count, plural, one {Dismiss # request…} other {Dismiss # requests…}}' },
|
||||
confirmAcceptMultipleTitle: { id: 'notification_requests.confirm_accept_multiple.title', defaultMessage: 'Accept notification requests?' },
|
||||
confirmAcceptMultipleMessage: { id: 'notification_requests.confirm_accept_multiple.message', defaultMessage: 'You are about to accept {count, plural, one {one notification request} other {# notification requests}}. Are you sure you want to proceed?' },
|
||||
confirmAcceptMultipleButton: { id: 'notification_requests.confirm_accept_multiple.button', defaultMessage: '{count, plural, one {Accept request} other {Accept requests}}' },
|
||||
confirmDismissMultipleTitle: { id: 'notification_requests.confirm_dismiss_multiple.title', defaultMessage: 'Dismiss notification requests?' },
|
||||
confirmDismissMultipleMessage: { id: 'notification_requests.confirm_dismiss_multiple.message', defaultMessage: "You are about to dismiss {count, plural, one {one notification request} other {# notification requests}}. You won't be able to easily access {count, plural, one {it} other {them}} again. Are you sure you want to proceed?" },
|
||||
confirmDismissMultipleButton: { id: 'notification_requests.confirm_dismiss_multiple.button', defaultMessage: '{count, plural, one {Dismiss request} other {Dismiss requests}}' },
|
||||
});
|
||||
|
||||
const ColumnSettings = () => {
|
||||
|
@ -74,45 +74,15 @@ const SelectRow = ({selectAllChecked, toggleSelectAll, selectedItems, selectionM
|
|||
const intl = useIntl();
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const notificationRequests = useSelector(state => state.getIn(['notificationRequests', 'items']));
|
||||
|
||||
const selectedCount = selectedItems.length;
|
||||
|
||||
const handleAcceptAll = useCallback(() => {
|
||||
const items = notificationRequests.map(request => request.get('id')).toArray();
|
||||
dispatch(openModal({
|
||||
modalType: 'CONFIRM',
|
||||
modalProps: {
|
||||
title: intl.formatMessage(messages.confirmAcceptAllTitle),
|
||||
message: intl.formatMessage(messages.confirmAcceptAllMessage, { count: items.length }),
|
||||
confirm: intl.formatMessage(messages.confirmAcceptAllButton),
|
||||
onConfirm: () =>
|
||||
dispatch(acceptNotificationRequests(items)),
|
||||
},
|
||||
}));
|
||||
}, [dispatch, intl, notificationRequests]);
|
||||
|
||||
const handleDismissAll = useCallback(() => {
|
||||
const items = notificationRequests.map(request => request.get('id')).toArray();
|
||||
dispatch(openModal({
|
||||
modalType: 'CONFIRM',
|
||||
modalProps: {
|
||||
title: intl.formatMessage(messages.confirmDismissAllTitle),
|
||||
message: intl.formatMessage(messages.confirmDismissAllMessage, { count: items.length }),
|
||||
confirm: intl.formatMessage(messages.confirmDismissAllButton),
|
||||
onConfirm: () =>
|
||||
dispatch(dismissNotificationRequests(items)),
|
||||
},
|
||||
}));
|
||||
}, [dispatch, intl, notificationRequests]);
|
||||
|
||||
const handleAcceptMultiple = useCallback(() => {
|
||||
dispatch(openModal({
|
||||
modalType: 'CONFIRM',
|
||||
modalProps: {
|
||||
title: intl.formatMessage(messages.confirmAcceptAllTitle),
|
||||
message: intl.formatMessage(messages.confirmAcceptAllMessage, { count: selectedItems.length }),
|
||||
confirm: intl.formatMessage(messages.confirmAcceptAllButton),
|
||||
title: intl.formatMessage(messages.confirmAcceptMultipleTitle),
|
||||
message: intl.formatMessage(messages.confirmAcceptMultipleMessage, { count: selectedItems.length }),
|
||||
confirm: intl.formatMessage(messages.confirmAcceptMultipleButton, { count: selectedItems.length}),
|
||||
onConfirm: () =>
|
||||
dispatch(acceptNotificationRequests(selectedItems)),
|
||||
},
|
||||
|
@ -123,9 +93,9 @@ const SelectRow = ({selectAllChecked, toggleSelectAll, selectedItems, selectionM
|
|||
dispatch(openModal({
|
||||
modalType: 'CONFIRM',
|
||||
modalProps: {
|
||||
title: intl.formatMessage(messages.confirmDismissAllTitle),
|
||||
message: intl.formatMessage(messages.confirmDismissAllMessage, { count: selectedItems.length }),
|
||||
confirm: intl.formatMessage(messages.confirmDismissAllButton),
|
||||
title: intl.formatMessage(messages.confirmDismissMultipleTitle),
|
||||
message: intl.formatMessage(messages.confirmDismissMultipleMessage, { count: selectedItems.length }),
|
||||
confirm: intl.formatMessage(messages.confirmDismissMultipleButton, { count: selectedItems.length}),
|
||||
onConfirm: () =>
|
||||
dispatch(dismissNotificationRequests(selectedItems)),
|
||||
},
|
||||
|
@ -136,46 +106,45 @@ const SelectRow = ({selectAllChecked, toggleSelectAll, selectedItems, selectionM
|
|||
setSelectionMode((mode) => !mode);
|
||||
}, [setSelectionMode]);
|
||||
|
||||
const menu = selectedCount === 0 ?
|
||||
[
|
||||
{ text: intl.formatMessage(messages.acceptAll), action: handleAcceptAll },
|
||||
{ text: intl.formatMessage(messages.dismissAll), action: handleDismissAll },
|
||||
] : [
|
||||
{ text: intl.formatMessage(messages.acceptMultiple, { count: selectedCount }), action: handleAcceptMultiple },
|
||||
{ text: intl.formatMessage(messages.dismissMultiple, { count: selectedCount }), action: handleDismissMultiple },
|
||||
];
|
||||
const menu = [
|
||||
{ text: intl.formatMessage(messages.acceptMultiple, { count: selectedCount }), action: handleAcceptMultiple },
|
||||
{ text: intl.formatMessage(messages.dismissMultiple, { count: selectedCount }), action: handleDismissMultiple },
|
||||
];
|
||||
|
||||
const handleSelectAll = useCallback(() => {
|
||||
setSelectionMode(true);
|
||||
toggleSelectAll();
|
||||
}, [setSelectionMode, toggleSelectAll]);
|
||||
|
||||
return (
|
||||
<div className='column-header__select-row'>
|
||||
{selectionMode && (
|
||||
<div className='column-header__select-row__checkbox'>
|
||||
<CheckBox checked={selectAllChecked} indeterminate={selectedCount > 0 && !selectAllChecked} onChange={toggleSelectAll} />
|
||||
</div>
|
||||
)}
|
||||
<div className='column-header__select-row__selection-mode'>
|
||||
<div className='column-header__select-row__checkbox'>
|
||||
<CheckBox checked={selectAllChecked} indeterminate={selectedCount > 0 && !selectAllChecked} onChange={handleSelectAll} />
|
||||
</div>
|
||||
<DropdownMenuContainer
|
||||
items={menu}
|
||||
icons='ellipsis-h'
|
||||
iconComponent={MoreHorizIcon}
|
||||
direction='right'
|
||||
title={intl.formatMessage(messages.more)}
|
||||
>
|
||||
<button className='dropdown-button column-header__select-row__select-menu' disabled={selectedItems.length === 0}>
|
||||
<span className='dropdown-button__label'>
|
||||
{selectedCount} selected
|
||||
</span>
|
||||
<Icon id='down' icon={ArrowDropDownIcon} />
|
||||
</button>
|
||||
</DropdownMenuContainer>
|
||||
<div className='column-header__select-row__mode-button'>
|
||||
<button className='text-btn' tabIndex={0} onClick={handleToggleSelectionMode}>
|
||||
{selectionMode ? (
|
||||
<FormattedMessage id='notification_requests.exit_selection_mode' defaultMessage='Cancel' />
|
||||
<FormattedMessage id='notification_requests.exit_selection' defaultMessage='Done' />
|
||||
) :
|
||||
(
|
||||
<FormattedMessage id='notification_requests.enter_selection_mode' defaultMessage='Select' />
|
||||
<FormattedMessage id='notification_requests.edit_selection' defaultMessage='Edit' />
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
{selectedCount > 0 &&
|
||||
<div className='column-header__select-row__selected-count'>
|
||||
{selectedCount} selected
|
||||
</div>
|
||||
}
|
||||
<div className='column-header__select-row__actions'>
|
||||
<DropdownMenuContainer
|
||||
items={menu}
|
||||
icons='ellipsis-h'
|
||||
iconComponent={MoreHorizIcon}
|
||||
direction='right'
|
||||
title={intl.formatMessage(messages.more)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -248,7 +217,9 @@ export const NotificationRequests = ({ multiColumn }) => {
|
|||
multiColumn={multiColumn}
|
||||
showBackButton
|
||||
appendContent={
|
||||
<SelectRow selectionMode={selectionMode} setSelectionMode={setSelectionMode} selectAllChecked={selectAllChecked} toggleSelectAll={toggleSelectAll} selectedItems={checkedRequestIds} />}
|
||||
notificationRequests.size > 0 && (
|
||||
<SelectRow selectionMode={selectionMode} setSelectionMode={setSelectionMode} selectAllChecked={selectAllChecked} toggleSelectAll={toggleSelectAll} selectedItems={checkedRequestIds} />
|
||||
)}
|
||||
>
|
||||
<ColumnSettings />
|
||||
</ColumnHeader>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { useAppSelector } from 'flavours/glitch/store';
|
||||
|
||||
export const DisplayedName: React.FC<{
|
||||
accountIds: string[];
|
||||
}> = ({ accountIds }) => {
|
||||
const lastAccountId = accountIds[0] ?? '0';
|
||||
const account = useAppSelector((state) => state.accounts.get(lastAccountId));
|
||||
|
||||
if (!account) return null;
|
||||
|
||||
return (
|
||||
<Link
|
||||
to={`/@${account.acct}`}
|
||||
title={`@${account.acct}`}
|
||||
data-hover-card-account={account.id}
|
||||
>
|
||||
<bdi dangerouslySetInnerHTML={{ __html: account.display_name_html }} />
|
||||
</Link>
|
||||
);
|
||||
};
|
|
@ -1,51 +0,0 @@
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { useAppSelector } from 'flavours/glitch/store';
|
||||
|
||||
export const NamesList: React.FC<{
|
||||
accountIds: string[];
|
||||
total: number;
|
||||
seeMoreHref?: string;
|
||||
}> = ({ accountIds, total, seeMoreHref }) => {
|
||||
const lastAccountId = accountIds[0] ?? '0';
|
||||
const account = useAppSelector((state) => state.accounts.get(lastAccountId));
|
||||
|
||||
if (!account) return null;
|
||||
|
||||
const displayedName = (
|
||||
<Link
|
||||
to={`/@${account.acct}`}
|
||||
title={`@${account.acct}`}
|
||||
data-hover-card-account={account.id}
|
||||
>
|
||||
<bdi dangerouslySetInnerHTML={{ __html: account.display_name_html }} />
|
||||
</Link>
|
||||
);
|
||||
|
||||
if (total === 1) {
|
||||
return displayedName;
|
||||
}
|
||||
|
||||
if (seeMoreHref)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='name_and_others_with_link'
|
||||
defaultMessage='{name} and <a>{count, plural, one {# other} other {# others}}</a>'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
a: (chunks) => <Link to={seeMoreHref}>{chunks}</Link>,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='name_and_others'
|
||||
defaultMessage='{name} and {count, plural, one {# other} other {# others}}'
|
||||
values={{ name: displayedName, count: total - 1 }}
|
||||
/>
|
||||
);
|
||||
};
|
|
@ -6,13 +6,27 @@ import type { NotificationGroupAdminSignUp } from 'flavours/glitch/models/notifi
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationGroupWithStatus } from './notification_group_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
<FormattedMessage
|
||||
id='notification.admin.sign_up'
|
||||
defaultMessage='{name} signed up'
|
||||
values={values}
|
||||
/>
|
||||
);
|
||||
const labelRenderer: LabelRenderer = (displayedName, total) => {
|
||||
if (total === 1)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.admin.sign_up'
|
||||
defaultMessage='{name} signed up'
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.admin.sign_up.name_and_others'
|
||||
defaultMessage='{name} and {count, plural, one {# other} other {# others}} signed up'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const NotificationAdminSignUp: React.FC<{
|
||||
notification: NotificationGroupAdminSignUp;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import StarIcon from '@/material-icons/400-24px/star-fill.svg?react';
|
||||
import type { NotificationGroupFavourite } from 'flavours/glitch/models/notification_group';
|
||||
import { useAppSelector } from 'flavours/glitch/store';
|
||||
|
@ -7,13 +9,29 @@ import { useAppSelector } from 'flavours/glitch/store';
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationGroupWithStatus } from './notification_group_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
<FormattedMessage
|
||||
id='notification.favourite'
|
||||
defaultMessage='{name} favorited your status'
|
||||
values={values}
|
||||
/>
|
||||
);
|
||||
const labelRenderer: LabelRenderer = (displayedName, total, seeMoreHref) => {
|
||||
if (total === 1)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.favourite'
|
||||
defaultMessage='{name} favorited your status'
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.favourite.name_and_others_with_link'
|
||||
defaultMessage='{name} and <a>{count, plural, one {# other} other {# others}}</a> favorited your post'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
a: (chunks) =>
|
||||
seeMoreHref ? <Link to={seeMoreHref}>{chunks}</Link> : chunks,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const NotificationFavourite: React.FC<{
|
||||
notification: NotificationGroupFavourite;
|
||||
|
|
|
@ -10,13 +10,27 @@ import { useAppSelector } from 'flavours/glitch/store';
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationGroupWithStatus } from './notification_group_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
<FormattedMessage
|
||||
id='notification.follow'
|
||||
defaultMessage='{name} followed you'
|
||||
values={values}
|
||||
/>
|
||||
);
|
||||
const labelRenderer: LabelRenderer = (displayedName, total) => {
|
||||
if (total === 1)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.follow'
|
||||
defaultMessage='{name} followed you'
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.follow.name_and_others'
|
||||
defaultMessage='{name} and {count, plural, one {# other} other {# others}} followed you'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const FollowerCount: React.FC<{ accountId: string }> = ({ accountId }) => {
|
||||
const account = useAppSelector((s) => s.accounts.get(accountId));
|
||||
|
|
|
@ -21,13 +21,27 @@ const messages = defineMessages({
|
|||
reject: { id: 'follow_request.reject', defaultMessage: 'Reject' },
|
||||
});
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
<FormattedMessage
|
||||
id='notification.follow_request'
|
||||
defaultMessage='{name} has requested to follow you'
|
||||
values={values}
|
||||
/>
|
||||
);
|
||||
const labelRenderer: LabelRenderer = (displayedName, total) => {
|
||||
if (total === 1)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.follow_request'
|
||||
defaultMessage='{name} has requested to follow you'
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.follow_request.name_and_others'
|
||||
defaultMessage='{name} and {count, plural, one {# other} other {# others}} has requested to follow you'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const NotificationFollowRequest: React.FC<{
|
||||
notification: NotificationGroupFollowRequest;
|
||||
|
|
|
@ -12,11 +12,13 @@ import { RelativeTimestamp } from 'flavours/glitch/components/relative_timestamp
|
|||
import { useAppDispatch } from 'flavours/glitch/store';
|
||||
|
||||
import { AvatarGroup } from './avatar_group';
|
||||
import { DisplayedName } from './displayed_name';
|
||||
import { EmbeddedStatus } from './embedded_status';
|
||||
import { NamesList } from './names_list';
|
||||
|
||||
export type LabelRenderer = (
|
||||
values: Record<string, React.ReactNode>,
|
||||
displayedName: JSX.Element,
|
||||
total: number,
|
||||
seeMoreHref?: string,
|
||||
) => JSX.Element;
|
||||
|
||||
export const NotificationGroupWithStatus: React.FC<{
|
||||
|
@ -50,15 +52,11 @@ export const NotificationGroupWithStatus: React.FC<{
|
|||
|
||||
const label = useMemo(
|
||||
() =>
|
||||
labelRenderer({
|
||||
name: (
|
||||
<NamesList
|
||||
accountIds={accountIds}
|
||||
total={count}
|
||||
seeMoreHref={labelSeeMoreHref}
|
||||
/>
|
||||
),
|
||||
}),
|
||||
labelRenderer(
|
||||
<DisplayedName accountIds={accountIds} />,
|
||||
count,
|
||||
labelSeeMoreHref,
|
||||
),
|
||||
[labelRenderer, accountIds, count, labelSeeMoreHref],
|
||||
);
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react';
|
||||
import type { NotificationGroupReblog } from 'flavours/glitch/models/notification_group';
|
||||
import { useAppSelector } from 'flavours/glitch/store';
|
||||
|
@ -7,13 +9,29 @@ import { useAppSelector } from 'flavours/glitch/store';
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationGroupWithStatus } from './notification_group_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
<FormattedMessage
|
||||
id='notification.reblog'
|
||||
defaultMessage='{name} boosted your status'
|
||||
values={values}
|
||||
/>
|
||||
);
|
||||
const labelRenderer: LabelRenderer = (displayedName, total, seeMoreHref) => {
|
||||
if (total === 1)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.reblog'
|
||||
defaultMessage='{name} boosted your status'
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.reblog.name_and_others_with_link'
|
||||
defaultMessage='{name} and <a>{count, plural, one {# other} other {# others}}</a> boosted your post'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
a: (chunks) =>
|
||||
seeMoreHref ? <Link to={seeMoreHref}>{chunks}</Link> : chunks,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const NotificationReblog: React.FC<{
|
||||
notification: NotificationGroupReblog;
|
||||
|
|
|
@ -6,11 +6,11 @@ import type { NotificationGroupStatus } from 'flavours/glitch/models/notificatio
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationWithStatus } from './notification_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
const labelRenderer: LabelRenderer = (displayedName) => (
|
||||
<FormattedMessage
|
||||
id='notification.status'
|
||||
defaultMessage='{name} just posted'
|
||||
values={values}
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ import type { NotificationGroupUpdate } from 'flavours/glitch/models/notificatio
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationWithStatus } from './notification_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
const labelRenderer: LabelRenderer = (displayedName) => (
|
||||
<FormattedMessage
|
||||
id='notification.update'
|
||||
defaultMessage='{name} edited a post'
|
||||
values={values}
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import { Icon } from 'flavours/glitch/components/icon';
|
|||
import Status from 'flavours/glitch/containers/status_container';
|
||||
import { useAppSelector, useAppDispatch } from 'flavours/glitch/store';
|
||||
|
||||
import { NamesList } from './names_list';
|
||||
import { DisplayedName } from './displayed_name';
|
||||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
|
||||
export const NotificationWithStatus: React.FC<{
|
||||
|
@ -43,10 +43,7 @@ export const NotificationWithStatus: React.FC<{
|
|||
const dispatch = useAppDispatch();
|
||||
|
||||
const label = useMemo(
|
||||
() =>
|
||||
labelRenderer({
|
||||
name: <NamesList accountIds={accountIds} total={count} />,
|
||||
}),
|
||||
() => labelRenderer(<DisplayedName accountIds={accountIds} />, count),
|
||||
[labelRenderer, accountIds, count],
|
||||
);
|
||||
|
||||
|
|
|
@ -81,7 +81,11 @@ export const Notifications: React.FC<{
|
|||
|
||||
const anyPendingNotification = useAppSelector(selectAnyPendingNotification);
|
||||
|
||||
const isUnread = unreadNotificationsCount > 0;
|
||||
const needsReload = useAppSelector(
|
||||
(state) => state.notificationGroups.mergedNotifications === 'needs-reload',
|
||||
);
|
||||
|
||||
const isUnread = unreadNotificationsCount > 0 || needsReload;
|
||||
|
||||
const canMarkAsRead =
|
||||
useAppSelector(selectSettingsNotificationsShowUnread) &&
|
||||
|
@ -118,11 +122,11 @@ export const Notifications: React.FC<{
|
|||
|
||||
// Keep track of mounted components for unread notification handling
|
||||
useEffect(() => {
|
||||
dispatch(mountNotifications());
|
||||
void dispatch(mountNotifications());
|
||||
|
||||
return () => {
|
||||
dispatch(unmountNotifications());
|
||||
dispatch(updateScrollPosition({ top: false }));
|
||||
void dispatch(updateScrollPosition({ top: false }));
|
||||
};
|
||||
}, [dispatch]);
|
||||
|
||||
|
@ -147,11 +151,11 @@ export const Notifications: React.FC<{
|
|||
}, [dispatch]);
|
||||
|
||||
const handleScrollToTop = useDebouncedCallback(() => {
|
||||
dispatch(updateScrollPosition({ top: true }));
|
||||
void dispatch(updateScrollPosition({ top: true }));
|
||||
}, 100);
|
||||
|
||||
const handleScroll = useDebouncedCallback(() => {
|
||||
dispatch(updateScrollPosition({ top: false }));
|
||||
void dispatch(updateScrollPosition({ top: false }));
|
||||
}, 100);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -670,7 +670,14 @@ class Status extends ImmutablePureComponent {
|
|||
const isIndexable = !status.getIn(['account', 'noindex']);
|
||||
|
||||
if (!isLocal) {
|
||||
remoteHint = <TimelineHint className={classNames(!!descendants && 'timeline-hint--with-descendants')} url={status.get('url')} resource={<FormattedMessage id='timeline_hint.resources.replies' defaultMessage='Some replies' />} />;
|
||||
remoteHint = (
|
||||
<TimelineHint
|
||||
className={classNames(!!descendants && 'timeline-hint--with-descendants')}
|
||||
url={status.get('url')}
|
||||
message={<FormattedMessage id='hints.threads.replies_may_be_missing' defaultMessage='Replies from other servers may be missing.' />}
|
||||
label={<FormattedMessage id='hints.threads.see_more' defaultMessage='See more replies on {domain}' values={{ domain: <strong>{status.getIn(['account', 'acct']).split('@')[1]}</strong> }} />}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const handlers = {
|
||||
|
|
|
@ -148,13 +148,18 @@
|
|||
"settings.wide_view": "Wide view (Desktop mode only)",
|
||||
"settings.wide_view_hint": "Stretches columns to better fill the available space.",
|
||||
"status.collapse": "Collapse",
|
||||
"status.filtered": "Filtered",
|
||||
"status.has_audio": "Features attached audio files",
|
||||
"status.has_pictures": "Features attached pictures",
|
||||
"status.has_preview_card": "Features an attached preview card",
|
||||
"status.has_video": "Features attached videos",
|
||||
"status.hide": "Hide post",
|
||||
"status.in_reply_to": "This toot is a reply",
|
||||
"status.is_poll": "This toot is a poll",
|
||||
"status.local_only": "Only visible from your instance",
|
||||
"status.react": "React",
|
||||
"status.show_filter_reason": "Show anyway",
|
||||
"status.show_less": "Show less",
|
||||
"status.show_more": "Show more",
|
||||
"status.uncollapse": "Uncollapse"
|
||||
}
|
||||
|
|
|
@ -19,12 +19,17 @@ import {
|
|||
markNotificationsAsRead,
|
||||
mountNotifications,
|
||||
unmountNotifications,
|
||||
refreshStaleNotificationGroups,
|
||||
pollRecentNotifications,
|
||||
} from 'flavours/glitch/actions/notification_groups';
|
||||
import {
|
||||
disconnectTimeline,
|
||||
timelineDelete,
|
||||
} from 'flavours/glitch/actions/timelines_typed';
|
||||
import type { ApiNotificationJSON } from 'flavours/glitch/api_types/notifications';
|
||||
import type {
|
||||
ApiNotificationJSON,
|
||||
ApiNotificationGroupJSON,
|
||||
} from 'flavours/glitch/api_types/notifications';
|
||||
import { compareId } from 'flavours/glitch/compare_id';
|
||||
import { usePendingItems } from 'flavours/glitch/initial_state';
|
||||
import {
|
||||
|
@ -51,6 +56,7 @@ interface NotificationGroupsState {
|
|||
readMarkerId: string;
|
||||
mounted: number;
|
||||
isTabVisible: boolean;
|
||||
mergedNotifications: 'ok' | 'pending' | 'needs-reload';
|
||||
}
|
||||
|
||||
const initialState: NotificationGroupsState = {
|
||||
|
@ -58,6 +64,8 @@ const initialState: NotificationGroupsState = {
|
|||
pendingGroups: [], // holds pending groups in slow mode
|
||||
scrolledToTop: false,
|
||||
isLoading: false,
|
||||
// this is used to track whether we need to refresh notifications after accepting requests
|
||||
mergedNotifications: 'ok',
|
||||
// The following properties are used to track unread notifications
|
||||
lastReadId: '0', // used internally for unread notifications
|
||||
readMarkerId: '0', // user-facing and updated when focus changes
|
||||
|
@ -292,6 +300,106 @@ function commitLastReadId(state: NotificationGroupsState) {
|
|||
}
|
||||
}
|
||||
|
||||
function fillNotificationsGap(
|
||||
groups: NotificationGroupsState['groups'],
|
||||
gap: NotificationGap,
|
||||
notifications: ApiNotificationGroupJSON[],
|
||||
): NotificationGroupsState['groups'] {
|
||||
// find the gap in the existing notifications
|
||||
const gapIndex = groups.findIndex(
|
||||
(groupOrGap) =>
|
||||
groupOrGap.type === 'gap' &&
|
||||
groupOrGap.sinceId === gap.sinceId &&
|
||||
groupOrGap.maxId === gap.maxId,
|
||||
);
|
||||
|
||||
if (gapIndex < 0)
|
||||
// We do not know where to insert, let's return
|
||||
return groups;
|
||||
|
||||
// Filling a disconnection gap means we're getting historical data
|
||||
// about groups we may know or may not know about.
|
||||
|
||||
// The notifications timeline is split in two by the gap, with
|
||||
// group information newer than the gap, and group information older
|
||||
// than the gap.
|
||||
|
||||
// Filling a gap should not touch anything before the gap, so any
|
||||
// information on groups already appearing before the gap should be
|
||||
// discarded, while any information on groups appearing after the gap
|
||||
// can be updated and re-ordered.
|
||||
|
||||
const oldestPageNotification = notifications.at(-1)?.page_min_id;
|
||||
|
||||
// replace the gap with the notifications + a new gap
|
||||
|
||||
const newerGroupKeys = groups
|
||||
.slice(0, gapIndex)
|
||||
.filter(isNotificationGroup)
|
||||
.map((group) => group.group_key);
|
||||
|
||||
const toInsert: NotificationGroupsState['groups'] = notifications
|
||||
.map((json) => createNotificationGroupFromJSON(json))
|
||||
.filter((notification) => !newerGroupKeys.includes(notification.group_key));
|
||||
|
||||
const apiGroupKeys = (toInsert as NotificationGroup[]).map(
|
||||
(group) => group.group_key,
|
||||
);
|
||||
|
||||
const sinceId = gap.sinceId;
|
||||
if (
|
||||
notifications.length > 0 &&
|
||||
!(
|
||||
oldestPageNotification &&
|
||||
sinceId &&
|
||||
compareId(oldestPageNotification, sinceId) <= 0
|
||||
)
|
||||
) {
|
||||
// If we get an empty page, it means we reached the bottom, so we do not need to insert a new gap
|
||||
// Similarly, if we've fetched more than the gap's, this means we have completely filled it
|
||||
toInsert.push({
|
||||
type: 'gap',
|
||||
maxId: notifications.at(-1)?.page_max_id,
|
||||
sinceId,
|
||||
} as NotificationGap);
|
||||
}
|
||||
|
||||
// Remove older groups covered by the API
|
||||
groups = groups.filter(
|
||||
(groupOrGap) =>
|
||||
groupOrGap.type !== 'gap' && !apiGroupKeys.includes(groupOrGap.group_key),
|
||||
);
|
||||
|
||||
// Replace the gap with API results (+ the new gap if needed)
|
||||
groups.splice(gapIndex, 1, ...toInsert);
|
||||
|
||||
// Finally, merge any adjacent gaps that could have been created by filtering
|
||||
// groups earlier
|
||||
mergeGaps(groups);
|
||||
|
||||
return groups;
|
||||
}
|
||||
|
||||
// Ensure the groups list starts with a gap, mutating it to prepend one if needed
|
||||
function ensureLeadingGap(
|
||||
groups: NotificationGroupsState['groups'],
|
||||
): NotificationGap {
|
||||
if (groups[0]?.type === 'gap') {
|
||||
// We're expecting new notifications, so discard the maxId if there is one
|
||||
groups[0].maxId = undefined;
|
||||
|
||||
return groups[0];
|
||||
} else {
|
||||
const gap: NotificationGap = {
|
||||
type: 'gap',
|
||||
sinceId: groups[0]?.page_min_id,
|
||||
};
|
||||
|
||||
groups.unshift(gap);
|
||||
return gap;
|
||||
}
|
||||
}
|
||||
|
||||
export const notificationGroupsReducer = createReducer<NotificationGroupsState>(
|
||||
initialState,
|
||||
(builder) => {
|
||||
|
@ -301,89 +409,40 @@ export const notificationGroupsReducer = createReducer<NotificationGroupsState>(
|
|||
json.type === 'gap' ? json : createNotificationGroupFromJSON(json),
|
||||
);
|
||||
state.isLoading = false;
|
||||
state.mergedNotifications = 'ok';
|
||||
updateLastReadId(state);
|
||||
})
|
||||
.addCase(fetchNotificationsGap.fulfilled, (state, action) => {
|
||||
const { notifications } = action.payload;
|
||||
|
||||
// find the gap in the existing notifications
|
||||
const gapIndex = state.groups.findIndex(
|
||||
(groupOrGap) =>
|
||||
groupOrGap.type === 'gap' &&
|
||||
groupOrGap.sinceId === action.meta.arg.gap.sinceId &&
|
||||
groupOrGap.maxId === action.meta.arg.gap.maxId,
|
||||
state.groups = fillNotificationsGap(
|
||||
state.groups,
|
||||
action.meta.arg.gap,
|
||||
action.payload.notifications,
|
||||
);
|
||||
state.isLoading = false;
|
||||
|
||||
if (gapIndex < 0)
|
||||
// We do not know where to insert, let's return
|
||||
return;
|
||||
|
||||
// Filling a disconnection gap means we're getting historical data
|
||||
// about groups we may know or may not know about.
|
||||
|
||||
// The notifications timeline is split in two by the gap, with
|
||||
// group information newer than the gap, and group information older
|
||||
// than the gap.
|
||||
|
||||
// Filling a gap should not touch anything before the gap, so any
|
||||
// information on groups already appearing before the gap should be
|
||||
// discarded, while any information on groups appearing after the gap
|
||||
// can be updated and re-ordered.
|
||||
|
||||
const oldestPageNotification = notifications.at(-1)?.page_min_id;
|
||||
|
||||
// replace the gap with the notifications + a new gap
|
||||
|
||||
const newerGroupKeys = state.groups
|
||||
.slice(0, gapIndex)
|
||||
.filter(isNotificationGroup)
|
||||
.map((group) => group.group_key);
|
||||
|
||||
const toInsert: NotificationGroupsState['groups'] = notifications
|
||||
.map((json) => createNotificationGroupFromJSON(json))
|
||||
.filter(
|
||||
(notification) => !newerGroupKeys.includes(notification.group_key),
|
||||
updateLastReadId(state);
|
||||
})
|
||||
.addCase(pollRecentNotifications.fulfilled, (state, action) => {
|
||||
if (usePendingItems) {
|
||||
const gap = ensureLeadingGap(state.pendingGroups);
|
||||
state.pendingGroups = fillNotificationsGap(
|
||||
state.pendingGroups,
|
||||
gap,
|
||||
action.payload.notifications,
|
||||
);
|
||||
} else {
|
||||
const gap = ensureLeadingGap(state.groups);
|
||||
state.groups = fillNotificationsGap(
|
||||
state.groups,
|
||||
gap,
|
||||
action.payload.notifications,
|
||||
);
|
||||
|
||||
const apiGroupKeys = (toInsert as NotificationGroup[]).map(
|
||||
(group) => group.group_key,
|
||||
);
|
||||
|
||||
const sinceId = action.meta.arg.gap.sinceId;
|
||||
if (
|
||||
notifications.length > 0 &&
|
||||
!(
|
||||
oldestPageNotification &&
|
||||
sinceId &&
|
||||
compareId(oldestPageNotification, sinceId) <= 0
|
||||
)
|
||||
) {
|
||||
// If we get an empty page, it means we reached the bottom, so we do not need to insert a new gap
|
||||
// Similarly, if we've fetched more than the gap's, this means we have completely filled it
|
||||
toInsert.push({
|
||||
type: 'gap',
|
||||
maxId: notifications.at(-1)?.page_max_id,
|
||||
sinceId,
|
||||
} as NotificationGap);
|
||||
}
|
||||
|
||||
// Remove older groups covered by the API
|
||||
state.groups = state.groups.filter(
|
||||
(groupOrGap) =>
|
||||
groupOrGap.type !== 'gap' &&
|
||||
!apiGroupKeys.includes(groupOrGap.group_key),
|
||||
);
|
||||
|
||||
// Replace the gap with API results (+ the new gap if needed)
|
||||
state.groups.splice(gapIndex, 1, ...toInsert);
|
||||
|
||||
// Finally, merge any adjacent gaps that could have been created by filtering
|
||||
// groups earlier
|
||||
mergeGaps(state.groups);
|
||||
|
||||
state.isLoading = false;
|
||||
|
||||
updateLastReadId(state);
|
||||
trimNotifications(state);
|
||||
})
|
||||
.addCase(processNewNotificationForGroups.fulfilled, (state, action) => {
|
||||
const notification = action.payload;
|
||||
|
@ -398,10 +457,11 @@ export const notificationGroupsReducer = createReducer<NotificationGroupsState>(
|
|||
})
|
||||
.addCase(disconnectTimeline, (state, action) => {
|
||||
if (action.payload.timeline === 'home') {
|
||||
if (state.groups.length > 0 && state.groups[0]?.type !== 'gap') {
|
||||
state.groups.unshift({
|
||||
const groups = usePendingItems ? state.pendingGroups : state.groups;
|
||||
if (groups.length > 0 && groups[0]?.type !== 'gap') {
|
||||
groups.unshift({
|
||||
type: 'gap',
|
||||
sinceId: state.groups[0]?.page_min_id,
|
||||
sinceId: groups[0]?.page_min_id,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -448,14 +508,15 @@ export const notificationGroupsReducer = createReducer<NotificationGroupsState>(
|
|||
}
|
||||
}
|
||||
}
|
||||
trimNotifications(state);
|
||||
});
|
||||
|
||||
// Then build the consolidated list and clear pending groups
|
||||
state.groups = state.pendingGroups.concat(state.groups);
|
||||
state.pendingGroups = [];
|
||||
mergeGaps(state.groups);
|
||||
trimNotifications(state);
|
||||
})
|
||||
.addCase(updateScrollPosition, (state, action) => {
|
||||
.addCase(updateScrollPosition.fulfilled, (state, action) => {
|
||||
state.scrolledToTop = action.payload.top;
|
||||
updateLastReadId(state);
|
||||
trimNotifications(state);
|
||||
|
@ -482,7 +543,7 @@ export const notificationGroupsReducer = createReducer<NotificationGroupsState>(
|
|||
action.payload.markers.notifications.last_read_id;
|
||||
}
|
||||
})
|
||||
.addCase(mountNotifications, (state) => {
|
||||
.addCase(mountNotifications.fulfilled, (state) => {
|
||||
state.mounted += 1;
|
||||
commitLastReadId(state);
|
||||
updateLastReadId(state);
|
||||
|
@ -498,6 +559,10 @@ export const notificationGroupsReducer = createReducer<NotificationGroupsState>(
|
|||
.addCase(unfocusApp, (state) => {
|
||||
state.isTabVisible = false;
|
||||
})
|
||||
.addCase(refreshStaleNotificationGroups.fulfilled, (state, action) => {
|
||||
if (action.payload.deferredRefresh)
|
||||
state.mergedNotifications = 'needs-reload';
|
||||
})
|
||||
.addMatcher(
|
||||
isAnyOf(authorizeFollowRequestSuccess, rejectFollowRequestSuccess),
|
||||
(state, action) => {
|
||||
|
@ -509,13 +574,21 @@ export const notificationGroupsReducer = createReducer<NotificationGroupsState>(
|
|||
},
|
||||
)
|
||||
.addMatcher(
|
||||
isAnyOf(fetchNotifications.pending, fetchNotificationsGap.pending),
|
||||
isAnyOf(
|
||||
fetchNotifications.pending,
|
||||
fetchNotificationsGap.pending,
|
||||
pollRecentNotifications.pending,
|
||||
),
|
||||
(state) => {
|
||||
state.isLoading = true;
|
||||
},
|
||||
)
|
||||
.addMatcher(
|
||||
isAnyOf(fetchNotifications.rejected, fetchNotificationsGap.rejected),
|
||||
isAnyOf(
|
||||
fetchNotifications.rejected,
|
||||
fetchNotificationsGap.rejected,
|
||||
pollRecentNotifications.rejected,
|
||||
),
|
||||
(state) => {
|
||||
state.isLoading = false;
|
||||
},
|
||||
|
|
|
@ -130,21 +130,11 @@
|
|||
.older {
|
||||
float: left;
|
||||
padding-inline-start: 0;
|
||||
|
||||
.fa {
|
||||
display: inline-block;
|
||||
margin-inline-end: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.newer {
|
||||
float: right;
|
||||
padding-inline-start: 0;
|
||||
|
||||
.fa {
|
||||
display: inline-block;
|
||||
margin-inline-start: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.disabled {
|
||||
|
|
|
@ -122,10 +122,6 @@ $content-width: 840px;
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
i.fa {
|
||||
margin-inline-end: 5px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $primary-text-color;
|
||||
transition: all 100ms linear;
|
||||
|
@ -248,6 +244,11 @@ $content-width: 840px;
|
|||
display: inline-flex;
|
||||
flex-flow: wrap;
|
||||
gap: 5px;
|
||||
align-items: center;
|
||||
|
||||
.time-period {
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
|
||||
h2 small {
|
||||
|
@ -306,10 +307,6 @@ $content-width: 840px;
|
|||
box-shadow: none;
|
||||
}
|
||||
|
||||
.directory__tag .table-action-link .fa {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.directory__tag h4 {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
|
|
|
@ -811,16 +811,6 @@ body > [data-popper-placement] {
|
|||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.button {
|
||||
display: block; // Otherwise text-ellipsis doesn't work
|
||||
font-size: 14px;
|
||||
line-height: normal;
|
||||
font-weight: 700;
|
||||
flex: 1 1 auto;
|
||||
padding: 5px 12px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.icon-button {
|
||||
box-sizing: content-box;
|
||||
color: $highlight-text-color;
|
||||
|
@ -3096,10 +3086,6 @@ $ui-header-logo-wordmark-width: 99px;
|
|||
padding-inline-end: 30px;
|
||||
}
|
||||
|
||||
.search__icon .fa {
|
||||
top: 15px;
|
||||
}
|
||||
|
||||
.scrollable {
|
||||
overflow: visible;
|
||||
|
||||
|
@ -3631,26 +3617,6 @@ $ui-header-logo-wordmark-width: 99px;
|
|||
height: calc(100% - 10px);
|
||||
overflow-y: hidden;
|
||||
|
||||
.hero-widget {
|
||||
box-shadow: none;
|
||||
|
||||
&__text,
|
||||
&__img,
|
||||
&__img img {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
&__text {
|
||||
padding: 15px;
|
||||
color: $secondary-text-color;
|
||||
|
||||
strong {
|
||||
font-weight: 700;
|
||||
color: $primary-text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.compose-form {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
|
@ -4435,7 +4401,7 @@ a.status-card {
|
|||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
background: lighten($ui-base-color, 2%);
|
||||
background: var(--on-surface-color);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4445,11 +4411,12 @@ a.status-card {
|
|||
|
||||
.timeline-hint {
|
||||
text-align: center;
|
||||
color: $darker-text-color;
|
||||
padding: 15px;
|
||||
color: $dark-text-color;
|
||||
padding: 16px;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
cursor: default;
|
||||
font-size: 14px;
|
||||
line-height: 21px;
|
||||
|
||||
strong {
|
||||
font-weight: 500;
|
||||
|
@ -4466,10 +4433,10 @@ a.status-card {
|
|||
color: lighten($highlight-text-color, 4%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.timeline-hint--with-descendants {
|
||||
border-top: 1px solid var(--background-border-color);
|
||||
&--with-descendants {
|
||||
border-top: 1px solid var(--background-border-color);
|
||||
}
|
||||
}
|
||||
|
||||
.regeneration-indicator {
|
||||
|
@ -4564,19 +4531,18 @@ a.status-card {
|
|||
display: flex;
|
||||
}
|
||||
|
||||
&__selection-mode {
|
||||
flex-grow: 1;
|
||||
|
||||
.text-btn:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
&__select-menu:disabled {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
&__actions {
|
||||
.icon-button {
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--background-border-color);
|
||||
padding: 5px;
|
||||
&__mode-button {
|
||||
margin-left: auto;
|
||||
color: $highlight-text-color;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
|
||||
&:hover {
|
||||
color: lighten($highlight-text-color, 6%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4929,6 +4895,7 @@ a.status-card {
|
|||
padding: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
color: inherit;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
|
@ -6752,7 +6719,7 @@ a.status-card {
|
|||
}
|
||||
|
||||
.boost-modal__container {
|
||||
overflow-x: scroll;
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
|
||||
.status {
|
||||
|
@ -8127,10 +8094,6 @@ img.modal-warning {
|
|||
}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
noscript {
|
||||
text-align: center;
|
||||
|
||||
|
@ -10942,7 +10905,7 @@ noscript {
|
|||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: lighten($ui-base-color, 1%);
|
||||
background: var(--on-surface-color);
|
||||
}
|
||||
|
||||
.notification-request__checkbox {
|
||||
|
@ -11114,8 +11077,10 @@ noscript {
|
|||
}
|
||||
|
||||
&__additional-content {
|
||||
color: $darker-text-color;
|
||||
color: $dark-text-color;
|
||||
margin-top: -8px; // to offset the parent's `gap` property
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11169,6 +11134,19 @@ noscript {
|
|||
}
|
||||
}
|
||||
|
||||
.notification-group__actions,
|
||||
.compose-form__actions {
|
||||
.button {
|
||||
display: block; // Otherwise text-ellipsis doesn't work
|
||||
font-size: 14px;
|
||||
line-height: normal;
|
||||
font-weight: 700;
|
||||
flex: 1 1 auto;
|
||||
padding: 5px 12px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.notification-ungrouped {
|
||||
padding: 10px 14px; // glitch: reduced padding
|
||||
border-bottom: 1px solid var(--background-border-color);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// Dependent colors
|
||||
$black: #000000;
|
||||
|
||||
$classic-base-color: #282c37;
|
||||
$classic-primary-color: #9baec8;
|
||||
$classic-secondary-color: #d9e1e8;
|
||||
$classic-highlight-color: #6364ff;
|
||||
$classic-base-color: hsl(240deg, 16%, 19%);
|
||||
$classic-primary-color: hsl(240deg, 29%, 70%);
|
||||
$classic-secondary-color: hsl(255deg, 25%, 88%);
|
||||
$classic-highlight-color: hsl(240deg, 100%, 69%);
|
||||
|
||||
$ui-base-color: $classic-base-color !default;
|
||||
$ui-primary-color: $classic-primary-color !default;
|
||||
|
|
|
@ -113,10 +113,6 @@
|
|||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.fa {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
|
|
@ -931,10 +931,6 @@ code {
|
|||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.fa {
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
// Notes!
|
||||
// Sass color functions, "darken" and "lighten" are automatically replaced.
|
||||
|
||||
html {
|
||||
scrollbar-color: $ui-base-color rgba($ui-base-color, 0.25);
|
||||
}
|
||||
|
||||
.simple_form .button.button-tertiary {
|
||||
color: $highlight-text-color;
|
||||
}
|
||||
|
@ -418,9 +414,6 @@ html {
|
|||
border-color: transparent transparent $white;
|
||||
}
|
||||
|
||||
.hero-widget,
|
||||
.moved-account-widget,
|
||||
.memoriam-widget,
|
||||
.activity-stream,
|
||||
.nothing-here,
|
||||
.directory__tag > a,
|
||||
|
@ -624,3 +617,14 @@ a.sparkline {
|
|||
color: $dark-text-color;
|
||||
}
|
||||
}
|
||||
|
||||
@supports not selector(::-webkit-scrollbar) {
|
||||
html {
|
||||
scrollbar-color: rgba($action-button-color, 0.25)
|
||||
var(--background-border-color);
|
||||
}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
|
|
@ -2,25 +2,25 @@
|
|||
$black: #000000;
|
||||
$white: #ffffff;
|
||||
|
||||
$classic-base-color: #282c37;
|
||||
$classic-primary-color: #9baec8;
|
||||
$classic-secondary-color: #d9e1e8;
|
||||
$classic-highlight-color: #6364ff;
|
||||
$classic-base-color: hsl(240deg, 16%, 19%);
|
||||
$classic-primary-color: hsl(240deg, 29%, 70%);
|
||||
$classic-secondary-color: hsl(255deg, 25%, 88%);
|
||||
$classic-highlight-color: hsl(240deg, 100%, 69%);
|
||||
|
||||
$blurple-600: #563acc; // Iris
|
||||
$blurple-500: #6364ff; // Brand purple
|
||||
$blurple-300: #858afa; // Faded Blue
|
||||
$grey-600: #4e4c5a; // Trout
|
||||
$grey-100: #dadaf3; // Topaz
|
||||
$blurple-600: hsl(252deg, 59%, 51%); // Iris
|
||||
$blurple-500: hsl(240deg, 100%, 69%); // Brand purple
|
||||
$blurple-300: hsl(237deg, 92%, 75%); // Faded Blue
|
||||
$grey-600: hsl(240deg, 8%, 33%); // Trout
|
||||
$grey-100: hsl(240deg, 51%, 90%); // Topaz
|
||||
|
||||
// Differences
|
||||
$success-green: lighten(#3c754d, 8%);
|
||||
$success-green: lighten(hsl(138deg, 32%, 35%), 8%);
|
||||
|
||||
$base-overlay-background: $white !default;
|
||||
$valid-value-color: $success-green !default;
|
||||
|
||||
$ui-base-color: $classic-secondary-color !default;
|
||||
$ui-base-lighter-color: #b0c0cf;
|
||||
$ui-base-lighter-color: hsl(250deg, 24%, 75%);
|
||||
$ui-primary-color: $classic-primary-color !default;
|
||||
$ui-secondary-color: $classic-base-color !default;
|
||||
$ui-highlight-color: $classic-highlight-color !default;
|
||||
|
@ -35,12 +35,12 @@ $ui-button-tertiary-border-color: $blurple-500 !default;
|
|||
$primary-text-color: $black !default;
|
||||
$darker-text-color: $classic-base-color !default;
|
||||
$highlight-text-color: $ui-highlight-color !default;
|
||||
$dark-text-color: #444b5d;
|
||||
$action-button-color: #606984;
|
||||
$dark-text-color: hsl(240deg, 16%, 32%);
|
||||
$action-button-color: hsl(240deg, 16%, 45%);
|
||||
|
||||
$inverted-text-color: $black !default;
|
||||
$lighter-text-color: $classic-base-color !default;
|
||||
$light-text-color: #444b5d;
|
||||
$light-text-color: hsl(240deg, 16%, 32%);
|
||||
|
||||
// Newly added colors
|
||||
$account-background-color: $white !default;
|
||||
|
@ -57,12 +57,13 @@ $account-background-color: $white !default;
|
|||
$emojis-requiring-inversion: 'chains';
|
||||
|
||||
body {
|
||||
--dropdown-border-color: #d9e1e8;
|
||||
--dropdown-border-color: hsl(240deg, 25%, 88%);
|
||||
--dropdown-background-color: #fff;
|
||||
--modal-border-color: #d9e1e8;
|
||||
--modal-border-color: hsl(240deg, 25%, 88%);
|
||||
--modal-background-color: var(--background-color-tint);
|
||||
--background-border-color: #d9e1e8;
|
||||
--background-border-color: hsl(240deg, 25%, 88%);
|
||||
--background-color: #fff;
|
||||
--background-color-tint: rgba(255, 255, 255, 80%);
|
||||
--background-filter: blur(10px);
|
||||
--on-surface-color: #{transparentize($ui-base-color, 0.65)};
|
||||
}
|
||||
|
|
|
@ -53,22 +53,29 @@ table {
|
|||
border-spacing: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
scrollbar-color: var(--background-border-color);
|
||||
@supports not selector(::-webkit-scrollbar) {
|
||||
html {
|
||||
scrollbar-color: $action-button-color var(--background-border-color);
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: $ui-highlight-color;
|
||||
opacity: .25;
|
||||
background-color: $action-button-color;
|
||||
border: 2px var(--background-border-color);
|
||||
border-radius: 12px;
|
||||
width: 6px;
|
||||
box-shadow: inset 0 0 0 2px var(--background-border-color);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: var(--background-border-color);
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
|
|
|
@ -96,14 +96,6 @@ body.rtl {
|
|||
no-repeat left 8px center / auto 16px;
|
||||
}
|
||||
|
||||
.fa-chevron-left::before {
|
||||
content: '\F054';
|
||||
}
|
||||
|
||||
.fa-chevron-right::before {
|
||||
content: '\F053';
|
||||
}
|
||||
|
||||
.dismissable-banner,
|
||||
.warning-banner {
|
||||
&__action {
|
||||
|
|
|
@ -142,11 +142,6 @@ a.table-action-link {
|
|||
color: $highlight-text-color;
|
||||
}
|
||||
|
||||
i.fa {
|
||||
font-weight: 400;
|
||||
margin-inline-end: 5px;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ $blurple-600: #563acc; // Iris
|
|||
$blurple-500: #6364ff; // Brand purple
|
||||
$blurple-400: #7477fd; // Medium slate blue
|
||||
$blurple-300: #858afa; // Faded Blue
|
||||
$grey-600: #4e4c5a; // Trout
|
||||
$grey-100: #dadaf3; // Topaz
|
||||
$grey-600: hsl(240deg, 8%, 33%); // Trout
|
||||
$grey-100: hsl(240deg, 51%, 90%); // Topaz
|
||||
|
||||
$success-green: #79bd9a !default; // Padua
|
||||
$error-red: $red-500 !default; // Cerise
|
||||
|
@ -18,10 +18,10 @@ $gold-star: #ca8f04 !default; // Dark Goldenrod
|
|||
$red-bookmark: $warning-red;
|
||||
|
||||
// Values from the classic Mastodon UI
|
||||
$classic-base-color: #282c37; // Midnight Express
|
||||
$classic-primary-color: #9baec8; // Echo Blue
|
||||
$classic-secondary-color: #d9e1e8; // Pattens Blue
|
||||
$classic-highlight-color: #6364ff; // Brand purple
|
||||
$classic-base-color: hsl(240deg, 16%, 19%);
|
||||
$classic-primary-color: hsl(240deg, 29%, 70%);
|
||||
$classic-secondary-color: hsl(255deg, 25%, 88%);
|
||||
$classic-highlight-color: $blurple-500;
|
||||
|
||||
// Variables for defaults in UI
|
||||
$base-shadow-color: $black !default;
|
||||
|
@ -115,5 +115,6 @@ $dismiss-overlay-width: 4rem;
|
|||
--surface-background-color: #{darken($ui-base-color, 4%)};
|
||||
--surface-variant-background-color: #{$ui-base-color};
|
||||
--surface-variant-active-background-color: #{lighten($ui-base-color, 4%)};
|
||||
--on-surface-color: #{transparentize($ui-base-color, 0.5)};
|
||||
--avatar-border-radius: 8px;
|
||||
}
|
||||
|
|
|
@ -1,207 +1,4 @@
|
|||
@use 'sass:math';
|
||||
|
||||
.hero-widget {
|
||||
margin-bottom: 10px;
|
||||
box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
|
||||
|
||||
&__img {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: 4px 4px 0 0;
|
||||
background: $base-shadow-color;
|
||||
|
||||
img {
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__text {
|
||||
background: $ui-base-color;
|
||||
padding: 20px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
font-size: 15px;
|
||||
color: $darker-text-color;
|
||||
line-height: 20px;
|
||||
word-wrap: break-word;
|
||||
font-weight: 400;
|
||||
|
||||
.emojione {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: -3px 0 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 20px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
em {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-weight: 700;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
color: lighten($darker-text-color, 10%);
|
||||
}
|
||||
|
||||
a {
|
||||
color: $secondary-text-color;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: $no-gap-breakpoint) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.endorsements-widget {
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 10px;
|
||||
|
||||
h4 {
|
||||
padding: 10px;
|
||||
text-transform: uppercase;
|
||||
font-weight: 700;
|
||||
font-size: 13px;
|
||||
color: $darker-text-color;
|
||||
}
|
||||
|
||||
.account {
|
||||
padding: 10px 0;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.account__display-name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.trends__item {
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.trends-widget {
|
||||
h4 {
|
||||
color: $darker-text-color;
|
||||
}
|
||||
}
|
||||
|
||||
.placeholder-widget {
|
||||
padding: 16px;
|
||||
border-radius: 4px;
|
||||
border: 2px dashed $dark-text-color;
|
||||
text-align: center;
|
||||
color: $darker-text-color;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.moved-account-widget {
|
||||
padding: 15px;
|
||||
padding-bottom: 20px;
|
||||
border-radius: 4px;
|
||||
background: $ui-base-color;
|
||||
box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
|
||||
color: $secondary-text-color;
|
||||
font-weight: 400;
|
||||
margin-bottom: 10px;
|
||||
|
||||
strong,
|
||||
a {
|
||||
font-weight: 500;
|
||||
|
||||
@each $lang in $cjk-langs {
|
||||
&:lang(#{$lang}) {
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: underline;
|
||||
|
||||
&.mention {
|
||||
text-decoration: none;
|
||||
|
||||
span {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&:hover,
|
||||
&:active {
|
||||
text-decoration: none;
|
||||
|
||||
span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__message {
|
||||
margin-bottom: 15px;
|
||||
|
||||
.fa {
|
||||
margin-inline-end: 5px;
|
||||
color: $darker-text-color;
|
||||
}
|
||||
}
|
||||
|
||||
&__card {
|
||||
.detailed-status__display-avatar {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.detailed-status__display-name {
|
||||
margin-bottom: 0;
|
||||
text-decoration: none;
|
||||
|
||||
span {
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.memoriam-widget {
|
||||
padding: 20px;
|
||||
border-radius: 4px;
|
||||
background: $base-shadow-color;
|
||||
box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
|
||||
font-size: 14px;
|
||||
color: $darker-text-color;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.directory {
|
||||
background: var(--background-color);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
|
||||
|
||||
&__tag {
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 10px;
|
||||
|
@ -262,7 +59,8 @@
|
|||
&.active h4 {
|
||||
&,
|
||||
.fa,
|
||||
small {
|
||||
small,
|
||||
.trends__item__current {
|
||||
color: $primary-text-color;
|
||||
}
|
||||
}
|
||||
|
@ -275,6 +73,10 @@
|
|||
&.active .avatar-stack .account__avatar {
|
||||
border-color: $ui-highlight-color;
|
||||
}
|
||||
|
||||
.trends__item__current {
|
||||
padding-inline-end: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -350,13 +152,12 @@
|
|||
vertical-align: initial !important;
|
||||
}
|
||||
|
||||
&__interrelationships {
|
||||
tbody td.accounts-table__interrelationships {
|
||||
width: 21px;
|
||||
padding-inline-end: 16px;
|
||||
}
|
||||
|
||||
.fa {
|
||||
font-size: 16px;
|
||||
|
||||
.icon {
|
||||
&.active {
|
||||
color: $highlight-text-color;
|
||||
}
|
||||
|
@ -376,27 +177,3 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.moved-account-widget,
|
||||
.memoriam-widget,
|
||||
.directory {
|
||||
@media screen and (max-width: $no-gap-breakpoint) {
|
||||
margin-bottom: 0;
|
||||
box-shadow: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.placeholder-widget {
|
||||
a {
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
color: $ui-highlight-color;
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
24
app/javascript/images/filter-stripes.svg
Executable file
24
app/javascript/images/filter-stripes.svg
Executable file
|
@ -0,0 +1,24 @@
|
|||
<svg width="5" height="80" viewBox="0 0 5 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_954_5239)">
|
||||
<rect width="5" height="80" transform="matrix(1 0 0 -1 0 80)" fill="#2F0C7A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 84C6.46234 83.9609 6.57112 83.9208 6.68172 83.8795C6.79039 83.839 7.16116 83.7 7.21197 83.681C10.0919 82.6043 11.8941 82.2 15 82.2C18.0813 82.2 19.6086 82.5665 22.3886 83.6785C22.6753 83.7932 22.9494 83.9003 23.2136 84H25.0812C24.3279 83.7808 23.5395 83.4927 22.6114 83.1215C19.7664 81.9835 18.1687 81.6 15 81.6C11.8122 81.6 9.94344 82.0192 7.00185 83.119C6.95066 83.1381 6.58016 83.277 6.47198 83.3174C5.72954 83.5944 5.0738 83.8198 4.45483 84H6.35524ZM6.35524 78C3.97726 78.8676 2.42302 79.2 0 79.2L0 78.6C1.72318 78.6 2.98542 78.4277 4.45483 78H6.35524ZM23.2136 78C25.5716 78.8899 27.1507 79.2 30 79.2V78.6C27.9473 78.6 26.5843 78.4373 25.0812 78L23.2136 78ZM0 82.2C2.53215 82.2 4.1155 81.837 6.68172 80.8795C6.79039 80.839 7.16116 80.7 7.21197 80.681C10.0919 79.6043 11.8941 79.2 15 79.2C18.0813 79.2 19.6086 79.5665 22.3886 80.6785C25.2336 81.8165 26.8313 82.2 30 82.2V81.6C26.9187 81.6 25.3914 81.2335 22.6114 80.1215C19.7664 78.9835 18.1687 78.6 15 78.6C11.8122 78.6 9.94344 79.0192 7.00185 80.119C6.95066 80.1381 6.58016 80.277 6.47198 80.3174C3.96706 81.2519 2.44905 81.6 0 81.6L0 82.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 78C6.46234 77.9609 6.57112 77.9208 6.68172 77.8795C6.79039 77.839 7.16116 77.7 7.21197 77.681C10.0919 76.6043 11.8941 76.2 15 76.2C18.0813 76.2 19.6086 76.5665 22.3886 77.6785C22.6753 77.7932 22.9494 77.9003 23.2136 78H25.0812C24.3279 77.7808 23.5395 77.4927 22.6114 77.1215C19.7664 75.9835 18.1687 75.6 15 75.6C11.8122 75.6 9.94344 76.0192 7.00185 77.119C6.95066 77.1381 6.58016 77.277 6.47198 77.3174C5.72954 77.5944 5.0738 77.8198 4.45483 78H6.35524ZM6.35524 72C3.97726 72.8676 2.42302 73.2 0 73.2L0 72.6C1.72318 72.6 2.98542 72.4277 4.45483 72H6.35524ZM23.2136 72C25.5716 72.8899 27.1507 73.2 30 73.2V72.6C27.9473 72.6 26.5843 72.4373 25.0812 72L23.2136 72ZM0 76.2C2.53215 76.2 4.1155 75.837 6.68172 74.8795C6.79039 74.839 7.16116 74.7 7.21197 74.681C10.0919 73.6043 11.8941 73.2 15 73.2C18.0813 73.2 19.6086 73.5665 22.3886 74.6785C25.2336 75.8165 26.8313 76.2 30 76.2V75.6C26.9187 75.6 25.3914 75.2335 22.6114 74.1215C19.7664 72.9835 18.1687 72.6 15 72.6C11.8122 72.6 9.94344 73.0192 7.00185 74.119C6.95066 74.1381 6.58016 74.277 6.47198 74.3174C3.96706 75.2519 2.44905 75.6 0 75.6L0 76.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 72C6.46234 71.9609 6.57112 71.9208 6.68172 71.8795C6.79039 71.839 7.16116 71.7 7.21197 71.681C10.0919 70.6043 11.8941 70.2 15 70.2C18.0813 70.2 19.6086 70.5665 22.3886 71.6785C22.6753 71.7932 22.9494 71.9003 23.2136 72H25.0812C24.3279 71.7808 23.5395 71.4927 22.6114 71.1215C19.7664 69.9835 18.1687 69.6 15 69.6C11.8122 69.6 9.94344 70.0192 7.00185 71.119C6.95066 71.1381 6.58016 71.277 6.47198 71.3174C5.72954 71.5944 5.0738 71.8198 4.45483 72H6.35524ZM6.35524 66C3.97726 66.8676 2.42302 67.2 0 67.2L0 66.6C1.72318 66.6 2.98542 66.4277 4.45483 66H6.35524ZM23.2136 66C25.5716 66.8899 27.1507 67.2 30 67.2V66.6C27.9473 66.6 26.5843 66.4373 25.0812 66L23.2136 66ZM0 70.2C2.53215 70.2 4.1155 69.837 6.68172 68.8795C6.79039 68.839 7.16116 68.7 7.21197 68.681C10.0919 67.6043 11.8941 67.2 15 67.2C18.0813 67.2 19.6086 67.5665 22.3886 68.6785C25.2336 69.8165 26.8313 70.2 30 70.2V69.6C26.9187 69.6 25.3914 69.2335 22.6114 68.1215C19.7664 66.9835 18.1687 66.6 15 66.6C11.8122 66.6 9.94344 67.0192 7.00185 68.119C6.95066 68.1381 6.58016 68.277 6.47198 68.3174C3.96706 69.2519 2.44905 69.6 0 69.6L0 70.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 66C6.46234 65.9609 6.57112 65.9208 6.68172 65.8795C6.79039 65.839 7.16116 65.7 7.21197 65.681C10.0919 64.6043 11.8941 64.2 15 64.2C18.0813 64.2 19.6086 64.5665 22.3886 65.6785C22.6753 65.7932 22.9494 65.9003 23.2136 66H25.0812C24.3279 65.7808 23.5395 65.4927 22.6114 65.1215C19.7664 63.9835 18.1687 63.6 15 63.6C11.8122 63.6 9.94344 64.0192 7.00185 65.119C6.95066 65.1381 6.58016 65.277 6.47198 65.3174C5.72954 65.5944 5.0738 65.8198 4.45483 66H6.35524ZM6.35524 60C3.97726 60.8676 2.42302 61.2 0 61.2L0 60.6C1.72318 60.6 2.98542 60.4277 4.45483 60H6.35524ZM23.2136 60C25.5716 60.8899 27.1507 61.2 30 61.2V60.6C27.9473 60.6 26.5843 60.4373 25.0812 60L23.2136 60ZM0 64.2C2.53215 64.2 4.1155 63.837 6.68172 62.8795C6.79039 62.839 7.16116 62.7 7.21197 62.681C10.0919 61.6043 11.8941 61.2 15 61.2C18.0813 61.2 19.6086 61.5665 22.3886 62.6785C25.2336 63.8165 26.8313 64.2 30 64.2V63.6C26.9187 63.6 25.3914 63.2335 22.6114 62.1215C19.7664 60.9835 18.1687 60.6 15 60.6C11.8122 60.6 9.94344 61.0192 7.00185 62.119C6.95066 62.1381 6.58016 62.277 6.47198 62.3174C3.96706 63.2519 2.44905 63.6 0 63.6L0 64.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 60C6.46234 59.9609 6.57112 59.9208 6.68172 59.8795C6.79039 59.839 7.16116 59.7 7.21197 59.681C10.0919 58.6043 11.8941 58.2 15 58.2C18.0813 58.2 19.6086 58.5665 22.3886 59.6785C22.6753 59.7932 22.9494 59.9003 23.2136 60H25.0812C24.3279 59.7808 23.5395 59.4927 22.6114 59.1215C19.7664 57.9835 18.1687 57.6 15 57.6C11.8122 57.6 9.94344 58.0192 7.00185 59.119C6.95066 59.1381 6.58016 59.277 6.47198 59.3174C5.72954 59.5944 5.0738 59.8198 4.45483 60H6.35524ZM6.35524 54C3.97726 54.8676 2.42302 55.2 0 55.2L0 54.6C1.72318 54.6 2.98542 54.4277 4.45483 54H6.35524ZM23.2136 54C25.5716 54.8899 27.1507 55.2 30 55.2V54.6C27.9473 54.6 26.5843 54.4373 25.0812 54L23.2136 54ZM0 58.2C2.53215 58.2 4.1155 57.837 6.68172 56.8795C6.79039 56.839 7.16116 56.7 7.21197 56.681C10.0919 55.6043 11.8941 55.2 15 55.2C18.0813 55.2 19.6086 55.5665 22.3886 56.6785C25.2336 57.8165 26.8313 58.2 30 58.2V57.6C26.9187 57.6 25.3914 57.2335 22.6114 56.1215C19.7664 54.9835 18.1687 54.6 15 54.6C11.8122 54.6 9.94344 55.0192 7.00185 56.119C6.95066 56.1381 6.58016 56.277 6.47198 56.3174C3.96706 57.2519 2.44905 57.6 0 57.6L0 58.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 54C6.46234 53.9609 6.57112 53.9208 6.68172 53.8795C6.79039 53.839 7.16116 53.7 7.21197 53.681C10.0919 52.6043 11.8941 52.2 15 52.2C18.0813 52.2 19.6086 52.5665 22.3886 53.6785C22.6753 53.7932 22.9494 53.9003 23.2136 54H25.0812C24.3279 53.7808 23.5395 53.4927 22.6114 53.1215C19.7664 51.9835 18.1687 51.6 15 51.6C11.8122 51.6 9.94344 52.0192 7.00185 53.119C6.95066 53.1381 6.58016 53.277 6.47198 53.3174C5.72954 53.5944 5.0738 53.8198 4.45483 54H6.35524ZM6.35524 48C3.97726 48.8676 2.42302 49.2 0 49.2L0 48.6C1.72318 48.6 2.98542 48.4277 4.45483 48H6.35524ZM23.2136 48C25.5716 48.8899 27.1507 49.2 30 49.2V48.6C27.9473 48.6 26.5843 48.4373 25.0812 48L23.2136 48ZM0 52.2C2.53215 52.2 4.1155 51.837 6.68172 50.8795C6.79039 50.839 7.16116 50.7 7.21197 50.681C10.0919 49.6043 11.8941 49.2 15 49.2C18.0813 49.2 19.6086 49.5665 22.3886 50.6785C25.2336 51.8165 26.8313 52.2 30 52.2V51.6C26.9187 51.6 25.3914 51.2335 22.6114 50.1215C19.7664 48.9835 18.1687 48.6 15 48.6C11.8122 48.6 9.94344 49.0192 7.00185 50.119C6.95066 50.1381 6.58016 50.277 6.47198 50.3174C3.96706 51.2519 2.44905 51.6 0 51.6L0 52.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 48C6.46234 47.9609 6.57112 47.9208 6.68172 47.8795C6.79039 47.839 7.16116 47.7 7.21197 47.681C10.0919 46.6043 11.8941 46.2 15 46.2C18.0813 46.2 19.6086 46.5665 22.3886 47.6785C22.6753 47.7932 22.9494 47.9003 23.2136 48H25.0812C24.3279 47.7808 23.5395 47.4927 22.6114 47.1215C19.7664 45.9835 18.1687 45.6 15 45.6C11.8122 45.6 9.94344 46.0192 7.00185 47.119C6.95066 47.1381 6.58016 47.277 6.47198 47.3174C5.72954 47.5944 5.0738 47.8198 4.45483 48H6.35524ZM6.35524 42C3.97726 42.8676 2.42302 43.2 0 43.2L0 42.6C1.72318 42.6 2.98542 42.4277 4.45483 42H6.35524ZM23.2136 42C25.5716 42.8899 27.1507 43.2 30 43.2V42.6C27.9473 42.6 26.5843 42.4373 25.0812 42L23.2136 42ZM0 46.2C2.53215 46.2 4.1155 45.837 6.68172 44.8795C6.79039 44.839 7.16116 44.7 7.21197 44.681C10.0919 43.6043 11.8941 43.2 15 43.2C18.0813 43.2 19.6086 43.5665 22.3886 44.6785C25.2336 45.8165 26.8313 46.2 30 46.2V45.6C26.9187 45.6 25.3914 45.2335 22.6114 44.1215C19.7664 42.9835 18.1687 42.6 15 42.6C11.8122 42.6 9.94344 43.0192 7.00185 44.119C6.95066 44.1381 6.58016 44.277 6.47198 44.3174C3.96706 45.2519 2.44905 45.6 0 45.6L0 46.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 42C6.46234 41.9609 6.57112 41.9208 6.68172 41.8795C6.79039 41.839 7.16116 41.7 7.21197 41.681C10.0919 40.6043 11.8941 40.2 15 40.2C18.0813 40.2 19.6086 40.5665 22.3886 41.6785C22.6753 41.7932 22.9494 41.9003 23.2136 42H25.0812C24.3279 41.7808 23.5395 41.4927 22.6114 41.1215C19.7664 39.9835 18.1687 39.6 15 39.6C11.8122 39.6 9.94344 40.0192 7.00185 41.119C6.95066 41.1381 6.58016 41.277 6.47198 41.3174C5.72954 41.5944 5.0738 41.8198 4.45483 42H6.35524ZM6.35524 36C3.97726 36.8676 2.42302 37.2 0 37.2L0 36.6C1.72318 36.6 2.98542 36.4277 4.45483 36H6.35524ZM23.2136 36C25.5716 36.8899 27.1507 37.2 30 37.2V36.6C27.9473 36.6 26.5843 36.4373 25.0812 36L23.2136 36ZM0 40.2C2.53215 40.2 4.1155 39.837 6.68172 38.8795C6.79039 38.839 7.16116 38.7 7.21197 38.681C10.0919 37.6043 11.8941 37.2 15 37.2C18.0813 37.2 19.6086 37.5665 22.3886 38.6785C25.2336 39.8165 26.8313 40.2 30 40.2V39.6C26.9187 39.6 25.3914 39.2335 22.6114 38.1215C19.7664 36.9835 18.1687 36.6 15 36.6C11.8122 36.6 9.94344 37.0192 7.00185 38.119C6.95066 38.1381 6.58016 38.277 6.47198 38.3174C3.96706 39.2519 2.44905 39.6 0 39.6L0 40.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 36C6.46234 35.9609 6.57112 35.9208 6.68172 35.8795C6.79039 35.839 7.16116 35.7 7.21197 35.681C10.0919 34.6043 11.8941 34.2 15 34.2C18.0813 34.2 19.6086 34.5665 22.3886 35.6785C22.6753 35.7932 22.9494 35.9003 23.2136 36H25.0812C24.3279 35.7808 23.5395 35.4927 22.6114 35.1215C19.7664 33.9835 18.1687 33.6 15 33.6C11.8122 33.6 9.94344 34.0192 7.00185 35.119C6.95066 35.1381 6.58016 35.277 6.47198 35.3174C5.72954 35.5944 5.0738 35.8198 4.45483 36H6.35524ZM6.35524 30C3.97726 30.8676 2.42302 31.2 0 31.2L0 30.6C1.72318 30.6 2.98542 30.4277 4.45483 30H6.35524ZM23.2136 30C25.5716 30.8899 27.1507 31.2 30 31.2V30.6C27.9473 30.6 26.5843 30.4373 25.0812 30L23.2136 30ZM0 34.2C2.53215 34.2 4.1155 33.837 6.68172 32.8795C6.79039 32.839 7.16116 32.7 7.21197 32.681C10.0919 31.6043 11.8941 31.2 15 31.2C18.0813 31.2 19.6086 31.5665 22.3886 32.6785C25.2336 33.8165 26.8313 34.2 30 34.2V33.6C26.9187 33.6 25.3914 33.2335 22.6114 32.1215C19.7664 30.9835 18.1687 30.6 15 30.6C11.8122 30.6 9.94344 31.0192 7.00185 32.119C6.95066 32.1381 6.58016 32.277 6.47198 32.3174C3.96706 33.2519 2.44905 33.6 0 33.6L0 34.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 30C6.46234 29.9609 6.57112 29.9208 6.68172 29.8795C6.79039 29.839 7.16116 29.7 7.21197 29.681C10.0919 28.6043 11.8941 28.2 15 28.2C18.0813 28.2 19.6086 28.5665 22.3886 29.6785C22.6753 29.7932 22.9494 29.9003 23.2136 30H25.0812C24.3279 29.7808 23.5395 29.4927 22.6114 29.1215C19.7664 27.9835 18.1687 27.6 15 27.6C11.8122 27.6 9.94344 28.0192 7.00185 29.119C6.95066 29.1381 6.58016 29.277 6.47198 29.3174C5.72954 29.5944 5.0738 29.8198 4.45483 30H6.35524ZM6.35524 24C3.97726 24.8676 2.42302 25.2 0 25.2L0 24.6C1.72318 24.6 2.98542 24.4277 4.45483 24H6.35524ZM23.2136 24C25.5716 24.8899 27.1507 25.2 30 25.2V24.6C27.9473 24.6 26.5843 24.4373 25.0812 24L23.2136 24ZM0 28.2C2.53215 28.2 4.1155 27.837 6.68172 26.8795C6.79039 26.839 7.16116 26.7 7.21197 26.681C10.0919 25.6043 11.8941 25.2 15 25.2C18.0813 25.2 19.6086 25.5665 22.3886 26.6785C25.2336 27.8165 26.8313 28.2 30 28.2V27.6C26.9187 27.6 25.3914 27.2335 22.6114 26.1215C19.7664 24.9835 18.1687 24.6 15 24.6C11.8122 24.6 9.94344 25.0192 7.00185 26.119C6.95066 26.1381 6.58016 26.277 6.47198 26.3174C3.96706 27.2519 2.44905 27.6 0 27.6L0 28.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 24C6.46234 23.9609 6.57112 23.9208 6.68172 23.8795C6.79039 23.839 7.16116 23.7 7.21197 23.681C10.0919 22.6043 11.8941 22.2 15 22.2C18.0813 22.2 19.6086 22.5665 22.3886 23.6785C22.6753 23.7932 22.9494 23.9003 23.2136 24H25.0812C24.3279 23.7808 23.5395 23.4927 22.6114 23.1215C19.7664 21.9835 18.1687 21.6 15 21.6C11.8122 21.6 9.94344 22.0192 7.00185 23.119C6.95066 23.1381 6.58016 23.277 6.47198 23.3174C5.72954 23.5944 5.0738 23.8198 4.45483 24H6.35524ZM6.35524 18C3.97726 18.8676 2.42302 19.2 0 19.2L0 18.6C1.72318 18.6 2.98542 18.4277 4.45483 18H6.35524ZM23.2136 18C25.5716 18.8899 27.1507 19.2 30 19.2V18.6C27.9473 18.6 26.5843 18.4373 25.0812 18L23.2136 18ZM0 22.2C2.53215 22.2 4.1155 21.837 6.68172 20.8795C6.79039 20.839 7.16116 20.7 7.21197 20.681C10.0919 19.6043 11.8941 19.2 15 19.2C18.0813 19.2 19.6086 19.5665 22.3886 20.6785C25.2336 21.8165 26.8313 22.2 30 22.2V21.6C26.9187 21.6 25.3914 21.2335 22.6114 20.1215C19.7664 18.9835 18.1687 18.6 15 18.6C11.8122 18.6 9.94344 19.0192 7.00185 20.119C6.95066 20.1381 6.58016 20.277 6.47198 20.3174C3.96706 21.2519 2.44905 21.6 0 21.6L0 22.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 18C6.46234 17.9609 6.57112 17.9208 6.68172 17.8795C6.79039 17.839 7.16116 17.7 7.21197 17.681C10.0919 16.6043 11.8941 16.2 15 16.2C18.0813 16.2 19.6086 16.5665 22.3886 17.6785C22.6753 17.7932 22.9494 17.9003 23.2136 18H25.0812C24.3279 17.7808 23.5395 17.4927 22.6114 17.1215C19.7664 15.9835 18.1687 15.6 15 15.6C11.8122 15.6 9.94344 16.0192 7.00185 17.119C6.95066 17.1381 6.58016 17.277 6.47198 17.3174C5.72954 17.5944 5.0738 17.8198 4.45483 18H6.35524ZM6.35524 12C3.97726 12.8676 2.42302 13.2 0 13.2L0 12.6C1.72318 12.6 2.98542 12.4277 4.45483 12H6.35524ZM23.2136 12C25.5716 12.8899 27.1507 13.2 30 13.2V12.6C27.9473 12.6 26.5843 12.4373 25.0812 12L23.2136 12ZM0 16.2C2.53215 16.2 4.1155 15.837 6.68172 14.8795C6.79039 14.839 7.16116 14.7 7.21197 14.681C10.0919 13.6043 11.8941 13.2 15 13.2C18.0813 13.2 19.6086 13.5665 22.3886 14.6785C25.2336 15.8165 26.8313 16.2 30 16.2V15.6C26.9187 15.6 25.3914 15.2335 22.6114 14.1215C19.7664 12.9835 18.1687 12.6 15 12.6C11.8122 12.6 9.94344 13.0192 7.00185 14.119C6.95066 14.1381 6.58016 14.277 6.47198 14.3174C3.96706 15.2519 2.44905 15.6 0 15.6L0 16.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 12C6.46234 11.9609 6.57112 11.9208 6.68172 11.8795C6.79039 11.839 7.16116 11.7 7.21197 11.681C10.0919 10.6043 11.8941 10.2 15 10.2C18.0813 10.2 19.6086 10.5665 22.3886 11.6785C22.6753 11.7932 22.9494 11.9003 23.2136 12H25.0812C24.3279 11.7808 23.5395 11.4927 22.6114 11.1215C19.7664 9.98347 18.1687 9.6 15 9.6C11.8122 9.6 9.94344 10.0192 7.00185 11.119C6.95066 11.1381 6.58016 11.277 6.47198 11.3174C5.72954 11.5944 5.0738 11.8198 4.45483 12H6.35524ZM6.35524 6C3.97726 6.86758 2.42302 7.2 0 7.2L0 6.6C1.72318 6.6 2.98542 6.42769 4.45483 6H6.35524ZM23.2136 6C25.5716 6.88993 27.1507 7.2 30 7.2V6.6C27.9473 6.6 26.5843 6.43734 25.0812 6L23.2136 6ZM0 10.2C2.53215 10.2 4.1155 9.83697 6.68172 8.8795C6.79039 8.83895 7.16116 8.7 7.21197 8.681C10.0919 7.60427 11.8941 7.2 15 7.2C18.0813 7.2 19.6086 7.56653 22.3886 8.67854C25.2336 9.81653 26.8313 10.2 30 10.2V9.6C26.9187 9.6 25.3914 9.23347 22.6114 8.12146C19.7664 6.98347 18.1687 6.6 15 6.6C11.8122 6.6 9.94344 7.01922 7.00185 8.119C6.95066 8.13814 6.58016 8.27699 6.47198 8.31735C3.96706 9.25195 2.44905 9.6 0 9.6L0 10.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35524 6C6.46234 5.96092 6.57112 5.92076 6.68172 5.8795C6.79039 5.83895 7.16116 5.7 7.21197 5.681C10.0919 4.60427 11.8941 4.2 15 4.2C18.0813 4.2 19.6086 4.56653 22.3886 5.67854C22.6753 5.79323 22.9494 5.90026 23.2136 6H25.0812C24.3279 5.78083 23.5395 5.49269 22.6114 5.12146C19.7664 3.98347 18.1687 3.6 15 3.6C11.8122 3.6 9.94344 4.01922 7.00185 5.119C6.95066 5.13814 6.58016 5.27699 6.47198 5.31735C5.72954 5.59436 5.0738 5.81984 4.45483 6H6.35524ZM6.35524 0C3.97726 0.867585 2.42302 1.2 0 1.2L0 0.6C1.72318 0.6 2.98542 0.427692 4.45483 0L6.35524 0ZM23.2136 0C25.5716 0.88993 27.1507 1.2 30 1.2V0.6C27.9473 0.6 26.5843 0.437343 25.0812 0L23.2136 0ZM0 4.2C2.53215 4.2 4.1155 3.83697 6.68172 2.8795C6.79039 2.83895 7.16116 2.7 7.21197 2.681C10.0919 1.60427 11.8941 1.2 15 1.2C18.0813 1.2 19.6086 1.56653 22.3886 2.67854C25.2336 3.81653 26.8313 4.2 30 4.2V3.6C26.9187 3.6 25.3914 3.23347 22.6114 2.12146C19.7664 0.983469 18.1687 0.6 15 0.6C11.8122 0.6 9.94344 1.01922 7.00185 2.119C6.95066 2.13814 6.58016 2.27699 6.47198 2.31735C3.96706 3.25195 2.44905 3.6 0 3.6L0 4.2Z" fill="#858AFA" stroke="#858AFA" stroke-width="0.5"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_954_5239">
|
||||
<rect width="5" height="80" fill="white" transform="matrix(1 0 0 -1 0 80)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 17 KiB |
|
@ -437,12 +437,12 @@ export function unpinFail(status, error) {
|
|||
};
|
||||
}
|
||||
|
||||
function toggleReblogWithoutConfirmation(status, privacy) {
|
||||
function toggleReblogWithoutConfirmation(status, visibility) {
|
||||
return (dispatch) => {
|
||||
if (status.get('reblogged')) {
|
||||
dispatch(unreblog({ statusId: status.get('id') }));
|
||||
} else {
|
||||
dispatch(reblog({ statusId: status.get('id'), privacy }));
|
||||
dispatch(reblog({ statusId: status.get('id'), visibility }));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import type {
|
|||
} from 'mastodon/api_types/notifications';
|
||||
import { allNotificationTypes } from 'mastodon/api_types/notifications';
|
||||
import type { ApiStatusJSON } from 'mastodon/api_types/statuses';
|
||||
import { usePendingItems } from 'mastodon/initial_state';
|
||||
import type { NotificationGap } from 'mastodon/reducers/notification_groups';
|
||||
import {
|
||||
selectSettingsNotificationsExcludedTypes,
|
||||
|
@ -103,6 +104,28 @@ export const fetchNotificationsGap = createDataLoadingThunk(
|
|||
},
|
||||
);
|
||||
|
||||
export const pollRecentNotifications = createDataLoadingThunk(
|
||||
'notificationGroups/pollRecentNotifications',
|
||||
async (_params, { getState }) => {
|
||||
return apiFetchNotifications({
|
||||
max_id: undefined,
|
||||
// In slow mode, we don't want to include notifications that duplicate the already-displayed ones
|
||||
since_id: usePendingItems
|
||||
? getState().notificationGroups.groups.find(
|
||||
(group) => group.type !== 'gap',
|
||||
)?.page_max_id
|
||||
: undefined,
|
||||
});
|
||||
},
|
||||
({ notifications, accounts, statuses }, { dispatch }) => {
|
||||
dispatch(importFetchedAccounts(accounts));
|
||||
dispatch(importFetchedStatuses(statuses));
|
||||
dispatchAssociatedRecords(dispatch, notifications);
|
||||
|
||||
return { notifications };
|
||||
},
|
||||
);
|
||||
|
||||
export const processNewNotificationForGroups = createAppAsyncThunk(
|
||||
'notificationGroups/processNew',
|
||||
(notification: ApiNotificationJSON, { dispatch, getState }) => {
|
||||
|
@ -138,8 +161,18 @@ export const processNewNotificationForGroups = createAppAsyncThunk(
|
|||
|
||||
export const loadPending = createAction('notificationGroups/loadPending');
|
||||
|
||||
export const updateScrollPosition = createAction<{ top: boolean }>(
|
||||
export const updateScrollPosition = createAppAsyncThunk(
|
||||
'notificationGroups/updateScrollPosition',
|
||||
({ top }: { top: boolean }, { dispatch, getState }) => {
|
||||
if (
|
||||
top &&
|
||||
getState().notificationGroups.mergedNotifications === 'needs-reload'
|
||||
) {
|
||||
void dispatch(fetchNotifications());
|
||||
}
|
||||
|
||||
return { top };
|
||||
},
|
||||
);
|
||||
|
||||
export const setNotificationsFilter = createAppAsyncThunk(
|
||||
|
@ -165,5 +198,34 @@ export const markNotificationsAsRead = createAction(
|
|||
'notificationGroups/markAsRead',
|
||||
);
|
||||
|
||||
export const mountNotifications = createAction('notificationGroups/mount');
|
||||
export const mountNotifications = createAppAsyncThunk(
|
||||
'notificationGroups/mount',
|
||||
(_, { dispatch, getState }) => {
|
||||
const state = getState();
|
||||
|
||||
if (
|
||||
state.notificationGroups.mounted === 0 &&
|
||||
state.notificationGroups.mergedNotifications === 'needs-reload'
|
||||
) {
|
||||
void dispatch(fetchNotifications());
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
export const unmountNotifications = createAction('notificationGroups/unmount');
|
||||
|
||||
export const refreshStaleNotificationGroups = createAppAsyncThunk<{
|
||||
deferredRefresh: boolean;
|
||||
}>('notificationGroups/refreshStale', (_, { dispatch, getState }) => {
|
||||
const state = getState();
|
||||
|
||||
if (
|
||||
state.notificationGroups.scrolledToTop ||
|
||||
!state.notificationGroups.mounted
|
||||
) {
|
||||
void dispatch(fetchNotifications());
|
||||
return { deferredRefresh: false };
|
||||
}
|
||||
|
||||
return { deferredRefresh: true };
|
||||
});
|
||||
|
|
|
@ -188,8 +188,8 @@ const noOp = () => {};
|
|||
|
||||
let expandNotificationsController = new AbortController();
|
||||
|
||||
export function expandNotifications({ maxId, forceLoad = false } = {}, done = noOp) {
|
||||
return (dispatch, getState) => {
|
||||
export function expandNotifications({ maxId = undefined, forceLoad = false }) {
|
||||
return async (dispatch, getState) => {
|
||||
const activeFilter = getState().getIn(['settings', 'notifications', 'quickFilter', 'active']);
|
||||
const notifications = getState().get('notifications');
|
||||
const isLoadingMore = !!maxId;
|
||||
|
@ -199,7 +199,6 @@ export function expandNotifications({ maxId, forceLoad = false } = {}, done = no
|
|||
expandNotificationsController.abort();
|
||||
expandNotificationsController = new AbortController();
|
||||
} else {
|
||||
done();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -226,7 +225,8 @@ export function expandNotifications({ maxId, forceLoad = false } = {}, done = no
|
|||
|
||||
dispatch(expandNotificationsRequest(isLoadingMore));
|
||||
|
||||
api().get('/api/v1/notifications', { params, signal: expandNotificationsController.signal }).then(response => {
|
||||
try {
|
||||
const response = await api().get('/api/v1/notifications', { params, signal: expandNotificationsController.signal });
|
||||
const next = getLinks(response).refs.find(link => link.rel === 'next');
|
||||
|
||||
dispatch(importFetchedAccounts(response.data.map(item => item.account)));
|
||||
|
@ -236,11 +236,9 @@ export function expandNotifications({ maxId, forceLoad = false } = {}, done = no
|
|||
dispatch(expandNotificationsSuccess(response.data, next ? next.uri : null, isLoadingMore, isLoadingRecent, isLoadingRecent && preferPendingItems));
|
||||
fetchRelatedRelationships(dispatch, response.data);
|
||||
dispatch(submitMarkers());
|
||||
}).catch(error => {
|
||||
} catch(error) {
|
||||
dispatch(expandNotificationsFail(error, isLoadingMore));
|
||||
}).finally(() => {
|
||||
done();
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,6 @@ export const initializeNotifications = createAppAsyncThunk(
|
|||
) as boolean;
|
||||
|
||||
if (enableBeta) void dispatch(fetchNotifications());
|
||||
else dispatch(expandNotifications());
|
||||
else void dispatch(expandNotifications({}));
|
||||
},
|
||||
);
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
deleteAnnouncement,
|
||||
} from './announcements';
|
||||
import { updateConversations } from './conversations';
|
||||
import { processNewNotificationForGroups } from './notification_groups';
|
||||
import { processNewNotificationForGroups, refreshStaleNotificationGroups, pollRecentNotifications as pollRecentGroupNotifications } from './notification_groups';
|
||||
import { updateNotifications, expandNotifications } from './notifications';
|
||||
import { updateStatus } from './statuses';
|
||||
import {
|
||||
|
@ -37,7 +37,7 @@ const randomUpTo = max =>
|
|||
* @param {string} channelName
|
||||
* @param {Object.<string, string>} params
|
||||
* @param {Object} options
|
||||
* @param {function(Function, Function): void} [options.fallback]
|
||||
* @param {function(Function, Function): Promise<void>} [options.fallback]
|
||||
* @param {function(): void} [options.fillGaps]
|
||||
* @param {function(object): boolean} [options.accept]
|
||||
* @returns {function(): void}
|
||||
|
@ -52,14 +52,13 @@ export const connectTimelineStream = (timelineId, channelName, params = {}, opti
|
|||
let pollingId;
|
||||
|
||||
/**
|
||||
* @param {function(Function, Function): void} fallback
|
||||
* @param {function(Function, Function): Promise<void>} fallback
|
||||
*/
|
||||
|
||||
const useFallback = fallback => {
|
||||
fallback(dispatch, () => {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks -- this is not a react hook
|
||||
pollingId = setTimeout(() => useFallback(fallback), 20000 + randomUpTo(20000));
|
||||
});
|
||||
const useFallback = async fallback => {
|
||||
await fallback(dispatch, getState);
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks -- this is not a react hook
|
||||
pollingId = setTimeout(() => useFallback(fallback), 20000 + randomUpTo(20000));
|
||||
};
|
||||
|
||||
return {
|
||||
|
@ -109,6 +108,14 @@ export const connectTimelineStream = (timelineId, channelName, params = {}, opti
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 'notifications_merged':
|
||||
const state = getState();
|
||||
if (state.notifications.top || !state.notifications.mounted)
|
||||
dispatch(expandNotifications({ forceLoad: true, maxId: undefined }));
|
||||
if(state.settings.getIn(['notifications', 'groupingBeta'], false)) {
|
||||
dispatch(refreshStaleNotificationGroups());
|
||||
}
|
||||
break;
|
||||
case 'conversation':
|
||||
// @ts-expect-error
|
||||
dispatch(updateConversations(JSON.parse(data.payload)));
|
||||
|
@ -132,21 +139,30 @@ export const connectTimelineStream = (timelineId, channelName, params = {}, opti
|
|||
|
||||
/**
|
||||
* @param {Function} dispatch
|
||||
* @param {function(): void} done
|
||||
* @param {Function} getState
|
||||
*/
|
||||
const refreshHomeTimelineAndNotification = (dispatch, done) => {
|
||||
// @ts-expect-error
|
||||
dispatch(expandHomeTimeline({}, () =>
|
||||
// @ts-expect-error
|
||||
dispatch(expandNotifications({}, () =>
|
||||
dispatch(fetchAnnouncements(done))))));
|
||||
};
|
||||
async function refreshHomeTimelineAndNotification(dispatch, getState) {
|
||||
await dispatch(expandHomeTimeline({ maxId: undefined }));
|
||||
|
||||
// TODO: remove this once the groups feature replaces the previous one
|
||||
if(getState().settings.getIn(['notifications', 'groupingBeta'], false)) {
|
||||
// TODO: polling for merged notifications
|
||||
try {
|
||||
await dispatch(pollRecentGroupNotifications());
|
||||
} catch (error) {
|
||||
// TODO
|
||||
}
|
||||
} else {
|
||||
await dispatch(expandNotifications({}));
|
||||
}
|
||||
|
||||
await dispatch(fetchAnnouncements());
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {function(): void}
|
||||
*/
|
||||
export const connectUserStream = () =>
|
||||
// @ts-expect-error
|
||||
connectTimelineStream('home', 'user', {}, { fallback: refreshHomeTimelineAndNotification, fillGaps: fillHomeTimelineGaps });
|
||||
|
||||
/**
|
||||
|
|
|
@ -76,21 +76,18 @@ export function clearTimeline(timeline) {
|
|||
};
|
||||
}
|
||||
|
||||
const noOp = () => {};
|
||||
|
||||
const parseTags = (tags = {}, mode) => {
|
||||
return (tags[mode] || []).map((tag) => {
|
||||
return tag.value;
|
||||
});
|
||||
};
|
||||
|
||||
export function expandTimeline(timelineId, path, params = {}, done = noOp) {
|
||||
return (dispatch, getState) => {
|
||||
export function expandTimeline(timelineId, path, params = {}) {
|
||||
return async (dispatch, getState) => {
|
||||
const timeline = getState().getIn(['timelines', timelineId], ImmutableMap());
|
||||
const isLoadingMore = !!params.max_id;
|
||||
|
||||
if (timeline.get('isLoading')) {
|
||||
done();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -109,7 +106,8 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) {
|
|||
|
||||
dispatch(expandTimelineRequest(timelineId, isLoadingMore));
|
||||
|
||||
api().get(path, { params }).then(response => {
|
||||
try {
|
||||
const response = await api().get(path, { params });
|
||||
const next = getLinks(response).refs.find(link => link.rel === 'next');
|
||||
|
||||
dispatch(importFetchedStatuses(response.data));
|
||||
|
@ -127,52 +125,48 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) {
|
|||
if (timelineId === 'home') {
|
||||
dispatch(submitMarkers());
|
||||
}
|
||||
}).catch(error => {
|
||||
} catch(error) {
|
||||
dispatch(expandTimelineFail(timelineId, error, isLoadingMore));
|
||||
}).finally(() => {
|
||||
done();
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function fillTimelineGaps(timelineId, path, params = {}, done = noOp) {
|
||||
return (dispatch, getState) => {
|
||||
export function fillTimelineGaps(timelineId, path, params = {}) {
|
||||
return async (dispatch, getState) => {
|
||||
const timeline = getState().getIn(['timelines', timelineId], ImmutableMap());
|
||||
const items = timeline.get('items');
|
||||
const nullIndexes = items.map((statusId, index) => statusId === null ? index : null);
|
||||
const gaps = nullIndexes.map(index => index > 0 ? items.get(index - 1) : null);
|
||||
|
||||
// Only expand at most two gaps to avoid doing too many requests
|
||||
done = gaps.take(2).reduce((done, maxId) => {
|
||||
return (() => dispatch(expandTimeline(timelineId, path, { ...params, maxId }, done)));
|
||||
}, done);
|
||||
|
||||
done();
|
||||
for (const maxId of gaps.take(2)) {
|
||||
await dispatch(expandTimeline(timelineId, path, { ...params, maxId }));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export const expandHomeTimeline = ({ maxId } = {}, done = noOp) => expandTimeline('home', '/api/v1/timelines/home', { max_id: maxId }, done);
|
||||
export const expandPublicTimeline = ({ maxId, onlyMedia, onlyRemote } = {}, done = noOp) => expandTimeline(`public${onlyRemote ? ':remote' : ''}${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { remote: !!onlyRemote, max_id: maxId, only_media: !!onlyMedia }, done);
|
||||
export const expandCommunityTimeline = ({ maxId, onlyMedia } = {}, done = noOp) => expandTimeline(`community${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { local: true, max_id: maxId, only_media: !!onlyMedia }, done);
|
||||
export const expandHomeTimeline = ({ maxId } = {}) => expandTimeline('home', '/api/v1/timelines/home', { max_id: maxId });
|
||||
export const expandPublicTimeline = ({ maxId, onlyMedia, onlyRemote } = {}) => expandTimeline(`public${onlyRemote ? ':remote' : ''}${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { remote: !!onlyRemote, max_id: maxId, only_media: !!onlyMedia });
|
||||
export const expandCommunityTimeline = ({ maxId, onlyMedia } = {}) => expandTimeline(`community${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { local: true, max_id: maxId, only_media: !!onlyMedia });
|
||||
export const expandAccountTimeline = (accountId, { maxId, withReplies, tagged } = {}) => expandTimeline(`account:${accountId}${withReplies ? ':with_replies' : ''}${tagged ? `:${tagged}` : ''}`, `/api/v1/accounts/${accountId}/statuses`, { exclude_replies: !withReplies, exclude_reblogs: withReplies, tagged, max_id: maxId });
|
||||
export const expandAccountFeaturedTimeline = (accountId, { tagged } = {}) => expandTimeline(`account:${accountId}:pinned${tagged ? `:${tagged}` : ''}`, `/api/v1/accounts/${accountId}/statuses`, { pinned: true, tagged });
|
||||
export const expandAccountMediaTimeline = (accountId, { maxId } = {}) => expandTimeline(`account:${accountId}:media`, `/api/v1/accounts/${accountId}/statuses`, { max_id: maxId, only_media: true, limit: 40 });
|
||||
export const expandListTimeline = (id, { maxId } = {}, done = noOp) => expandTimeline(`list:${id}`, `/api/v1/timelines/list/${id}`, { max_id: maxId }, done);
|
||||
export const expandLinkTimeline = (url, { maxId } = {}, done = noOp) => expandTimeline(`link:${url}`, `/api/v1/timelines/link`, { url, max_id: maxId }, done);
|
||||
export const expandHashtagTimeline = (hashtag, { maxId, tags, local } = {}, done = noOp) => {
|
||||
export const expandListTimeline = (id, { maxId } = {}) => expandTimeline(`list:${id}`, `/api/v1/timelines/list/${id}`, { max_id: maxId });
|
||||
export const expandLinkTimeline = (url, { maxId } = {}) => expandTimeline(`link:${url}`, `/api/v1/timelines/link`, { url, max_id: maxId });
|
||||
export const expandHashtagTimeline = (hashtag, { maxId, tags, local } = {}) => {
|
||||
return expandTimeline(`hashtag:${hashtag}${local ? ':local' : ''}`, `/api/v1/timelines/tag/${hashtag}`, {
|
||||
max_id: maxId,
|
||||
any: parseTags(tags, 'any'),
|
||||
all: parseTags(tags, 'all'),
|
||||
none: parseTags(tags, 'none'),
|
||||
local: local,
|
||||
}, done);
|
||||
});
|
||||
};
|
||||
|
||||
export const fillHomeTimelineGaps = (done = noOp) => fillTimelineGaps('home', '/api/v1/timelines/home', {}, done);
|
||||
export const fillPublicTimelineGaps = ({ onlyMedia, onlyRemote } = {}, done = noOp) => fillTimelineGaps(`public${onlyRemote ? ':remote' : ''}${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { remote: !!onlyRemote, only_media: !!onlyMedia }, done);
|
||||
export const fillCommunityTimelineGaps = ({ onlyMedia } = {}, done = noOp) => fillTimelineGaps(`community${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { local: true, only_media: !!onlyMedia }, done);
|
||||
export const fillListTimelineGaps = (id, done = noOp) => fillTimelineGaps(`list:${id}`, `/api/v1/timelines/list/${id}`, {}, done);
|
||||
export const fillHomeTimelineGaps = () => fillTimelineGaps('home', '/api/v1/timelines/home', {});
|
||||
export const fillPublicTimelineGaps = ({ onlyMedia, onlyRemote } = {}) => fillTimelineGaps(`public${onlyRemote ? ':remote' : ''}${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { remote: !!onlyRemote, only_media: !!onlyMedia });
|
||||
export const fillCommunityTimelineGaps = ({ onlyMedia } = {}) => fillTimelineGaps(`community${onlyMedia ? ':media' : ''}`, '/api/v1/timelines/public', { local: true, only_media: !!onlyMedia });
|
||||
export const fillListTimelineGaps = (id) => fillTimelineGaps(`list:${id}`, `/api/v1/timelines/list/${id}`, {});
|
||||
|
||||
export function expandTimelineRequest(timeline, isLoadingMore) {
|
||||
return {
|
||||
|
|
|
@ -4,6 +4,7 @@ import type { ApiNotificationGroupsResultJSON } from 'mastodon/api_types/notific
|
|||
export const apiFetchNotifications = async (params?: {
|
||||
exclude_types?: string[];
|
||||
max_id?: string;
|
||||
since_id?: string;
|
||||
}) => {
|
||||
const response = await api().request<ApiNotificationGroupsResultJSON>({
|
||||
method: 'GET',
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import Rails from '@rails/ujs';
|
||||
import 'font-awesome/css/font-awesome.css';
|
||||
|
||||
export function start() {
|
||||
require.context('../images/', true, /\.(jpg|png|svg)$/);
|
||||
|
|
|
@ -153,7 +153,7 @@ class ReportReasonSelector extends PureComponent {
|
|||
<Category id='other' text={intl.formatMessage(messages.other)} selected={category === 'other'} onSelect={this.handleSelect} disabled={disabled} />
|
||||
<Category id='legal' text={intl.formatMessage(messages.legal)} selected={category === 'legal'} onSelect={this.handleSelect} disabled={disabled} />
|
||||
<Category id='spam' text={intl.formatMessage(messages.spam)} selected={category === 'spam'} onSelect={this.handleSelect} disabled={disabled} />
|
||||
<Category id='violation' text={intl.formatMessage(messages.violation)} selected={category === 'violation'} onSelect={this.handleSelect} disabled={disabled}>
|
||||
<Category id='violation' text={intl.formatMessage(messages.violation)} selected={category === 'violation'} onSelect={this.handleSelect} disabled={disabled || rules.length === 0}>
|
||||
{rules.map(rule => <Rule key={rule.id} id={rule.id} text={rule.text} selected={rule_ids.includes(rule.id)} onToggle={this.handleToggle} disabled={disabled} />)}
|
||||
</Category>
|
||||
</div>
|
||||
|
|
15
app/javascript/mastodon/components/content_warning.tsx
Normal file
15
app/javascript/mastodon/components/content_warning.tsx
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { StatusBanner, BannerVariant } from './status_banner';
|
||||
|
||||
export const ContentWarning: React.FC<{
|
||||
text: string;
|
||||
expanded?: boolean;
|
||||
onClick?: () => void;
|
||||
}> = ({ text, expanded, onClick }) => (
|
||||
<StatusBanner
|
||||
expanded={expanded}
|
||||
onClick={onClick}
|
||||
variant={BannerVariant.Yellow}
|
||||
>
|
||||
<p dangerouslySetInnerHTML={{ __html: text }} />
|
||||
</StatusBanner>
|
||||
);
|
23
app/javascript/mastodon/components/filter_warning.tsx
Normal file
23
app/javascript/mastodon/components/filter_warning.tsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { StatusBanner, BannerVariant } from './status_banner';
|
||||
|
||||
export const FilterWarning: React.FC<{
|
||||
title: string;
|
||||
expanded?: boolean;
|
||||
onClick?: () => void;
|
||||
}> = ({ title, expanded, onClick }) => (
|
||||
<StatusBanner
|
||||
expanded={expanded}
|
||||
onClick={onClick}
|
||||
variant={BannerVariant.Blue}
|
||||
>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id='filter_warning.matches_filter'
|
||||
defaultMessage='Matches filter “{title}”'
|
||||
values={{ title }}
|
||||
/>
|
||||
</p>
|
||||
</StatusBanner>
|
||||
);
|
|
@ -13,6 +13,8 @@ import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?re
|
|||
import PushPinIcon from '@/material-icons/400-24px/push_pin.svg?react';
|
||||
import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react';
|
||||
import ReplyIcon from '@/material-icons/400-24px/reply.svg?react';
|
||||
import { ContentWarning } from 'mastodon/components/content_warning';
|
||||
import { FilterWarning } from 'mastodon/components/filter_warning';
|
||||
import { Icon } from 'mastodon/components/icon';
|
||||
import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder';
|
||||
import { withOptionalRouter, WithOptionalRouterPropTypes } from 'mastodon/utils/react_router';
|
||||
|
@ -140,7 +142,7 @@ class Status extends ImmutablePureComponent {
|
|||
|
||||
state = {
|
||||
showMedia: defaultMediaVisibility(this.props.status) && !(this.context?.hideMediaByDefault),
|
||||
forceFilter: undefined,
|
||||
showDespiteFilter: undefined,
|
||||
};
|
||||
|
||||
componentDidUpdate (prevProps) {
|
||||
|
@ -152,7 +154,7 @@ class Status extends ImmutablePureComponent {
|
|||
if (this.props.status?.get('id') !== prevProps.status?.get('id')) {
|
||||
this.setState({
|
||||
showMedia: defaultMediaVisibility(this.props.status) && !(this.context?.hideMediaByDefault),
|
||||
forceFilter: undefined,
|
||||
showDespiteFilter: undefined,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -325,20 +327,32 @@ class Status extends ImmutablePureComponent {
|
|||
};
|
||||
|
||||
handleHotkeyToggleHidden = () => {
|
||||
this.props.onToggleHidden(this._properStatus());
|
||||
const { onToggleHidden } = this.props;
|
||||
const status = this._properStatus();
|
||||
|
||||
if (status.get('matched_filters')) {
|
||||
const expandedBecauseOfCW = !status.get('hidden') || status.get('spoiler_text').length === 0;
|
||||
const expandedBecauseOfFilter = this.state.showDespiteFilter;
|
||||
|
||||
if (expandedBecauseOfFilter && !expandedBecauseOfCW) {
|
||||
onToggleHidden(status);
|
||||
} else if (expandedBecauseOfFilter && expandedBecauseOfCW) {
|
||||
onToggleHidden(status);
|
||||
this.handleFilterToggle();
|
||||
} else {
|
||||
this.handleFilterToggle();
|
||||
}
|
||||
} else {
|
||||
onToggleHidden(status);
|
||||
}
|
||||
};
|
||||
|
||||
handleHotkeyToggleSensitive = () => {
|
||||
this.handleToggleMediaVisibility();
|
||||
};
|
||||
|
||||
handleUnfilterClick = e => {
|
||||
this.setState({ forceFilter: false });
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
handleFilterClick = () => {
|
||||
this.setState({ forceFilter: true });
|
||||
handleFilterToggle = () => {
|
||||
this.setState(state => ({ ...state, showDespiteFilter: !state.showDespiteFilter }));
|
||||
};
|
||||
|
||||
_properStatus () {
|
||||
|
@ -396,25 +410,6 @@ class Status extends ImmutablePureComponent {
|
|||
const connectReply = nextInReplyToId && nextInReplyToId === status.get('id');
|
||||
const matchedFilters = status.get('matched_filters');
|
||||
|
||||
if (this.state.forceFilter === undefined ? matchedFilters : this.state.forceFilter) {
|
||||
const minHandlers = this.props.muted ? {} : {
|
||||
moveUp: this.handleHotkeyMoveUp,
|
||||
moveDown: this.handleHotkeyMoveDown,
|
||||
};
|
||||
|
||||
return (
|
||||
<HotKeys handlers={minHandlers} tabIndex={unfocusable ? null : -1}>
|
||||
<div className='status__wrapper status__wrapper--filtered focusable' tabIndex={unfocusable ? null : 0} ref={this.handleRef}>
|
||||
<FormattedMessage id='status.filtered' defaultMessage='Filtered' />: {matchedFilters.join(', ')}.
|
||||
{' '}
|
||||
<button className='status__wrapper--filtered__button' onClick={this.handleUnfilterClick}>
|
||||
<FormattedMessage id='status.show_filter_reason' defaultMessage='Show anyway' />
|
||||
</button>
|
||||
</div>
|
||||
</HotKeys>
|
||||
);
|
||||
}
|
||||
|
||||
if (featured) {
|
||||
prepend = (
|
||||
<div className='status__prepend'>
|
||||
|
@ -548,7 +543,7 @@ class Status extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status);
|
||||
const expanded = !status.get('hidden') || status.get('spoiler_text').length === 0;
|
||||
const expanded = (!matchedFilters || this.state.showDespiteFilter) && (!status.get('hidden') || status.get('spoiler_text').length === 0);
|
||||
|
||||
return (
|
||||
<HotKeys handlers={handlers} tabIndex={unfocusable ? null : -1}>
|
||||
|
@ -574,22 +569,27 @@ class Status extends ImmutablePureComponent {
|
|||
</a>
|
||||
</div>
|
||||
|
||||
<StatusContent
|
||||
status={status}
|
||||
onClick={this.handleClick}
|
||||
expanded={expanded}
|
||||
onExpandedToggle={this.handleExpandedToggle}
|
||||
onTranslate={this.handleTranslate}
|
||||
collapsible
|
||||
onCollapsedToggle={this.handleCollapsedToggle}
|
||||
{...statusContentProps}
|
||||
/>
|
||||
{matchedFilters && <FilterWarning title={matchedFilters.join(', ')} expanded={this.state.showDespiteFilter} onClick={this.handleFilterToggle} />}
|
||||
|
||||
{media}
|
||||
{(status.get('spoiler_text').length > 0 && (!matchedFilters || this.state.showDespiteFilter)) && <ContentWarning text={status.getIn(['translation', 'spoilerHtml']) || status.get('spoilerHtml')} expanded={expanded} onClick={this.handleExpandedToggle} />}
|
||||
|
||||
{expanded && hashtagBar}
|
||||
{expanded && (
|
||||
<>
|
||||
<StatusContent
|
||||
status={status}
|
||||
onClick={this.handleClick}
|
||||
onTranslate={this.handleTranslate}
|
||||
collapsible
|
||||
onCollapsedToggle={this.handleCollapsedToggle}
|
||||
{...statusContentProps}
|
||||
/>
|
||||
|
||||
<StatusActionBar scrollKey={scrollKey} status={status} account={account} onFilter={matchedFilters ? this.handleFilterClick : null} {...other} />
|
||||
{media}
|
||||
{hashtagBar}
|
||||
</>
|
||||
)}
|
||||
|
||||
<StatusActionBar scrollKey={scrollKey} status={status} account={account} {...other} />
|
||||
</div>
|
||||
</div>
|
||||
</HotKeys>
|
||||
|
|
|
@ -17,7 +17,6 @@ import ReplyIcon from '@/material-icons/400-24px/reply.svg?react';
|
|||
import ReplyAllIcon from '@/material-icons/400-24px/reply_all.svg?react';
|
||||
import StarIcon from '@/material-icons/400-24px/star-fill.svg?react';
|
||||
import StarBorderIcon from '@/material-icons/400-24px/star.svg?react';
|
||||
import VisibilityIcon from '@/material-icons/400-24px/visibility.svg?react';
|
||||
import RepeatActiveIcon from '@/svg-icons/repeat_active.svg?react';
|
||||
import RepeatDisabledIcon from '@/svg-icons/repeat_disabled.svg?react';
|
||||
import RepeatPrivateIcon from '@/svg-icons/repeat_private.svg?react';
|
||||
|
@ -61,7 +60,6 @@ const messages = defineMessages({
|
|||
admin_status: { id: 'status.admin_status', defaultMessage: 'Open this post in the moderation interface' },
|
||||
admin_domain: { id: 'status.admin_domain', defaultMessage: 'Open moderation interface for {domain}' },
|
||||
copy: { id: 'status.copy', defaultMessage: 'Copy link to post' },
|
||||
hide: { id: 'status.hide', defaultMessage: 'Hide post' },
|
||||
blockDomain: { id: 'account.block_domain', defaultMessage: 'Block domain {domain}' },
|
||||
unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unblock domain {domain}' },
|
||||
unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' },
|
||||
|
@ -241,10 +239,6 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
navigator.clipboard.writeText(url);
|
||||
};
|
||||
|
||||
handleHideClick = () => {
|
||||
this.props.onFilter();
|
||||
};
|
||||
|
||||
render () {
|
||||
const { status, relationship, intl, withDismiss, withCounters, scrollKey } = this.props;
|
||||
const { signedIn, permissions } = this.props.identity;
|
||||
|
@ -377,10 +371,6 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
reblogIconComponent = RepeatDisabledIcon;
|
||||
}
|
||||
|
||||
const filterButton = this.props.onFilter && (
|
||||
<IconButton className='status__action-bar__button' title={intl.formatMessage(messages.hide)} icon='eye' iconComponent={VisibilityIcon} onClick={this.handleHideClick} />
|
||||
);
|
||||
|
||||
const isReply = status.get('in_reply_to_account_id') === status.getIn(['account', 'id']);
|
||||
|
||||
return (
|
||||
|
@ -390,8 +380,6 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
<IconButton className='status__action-bar__button star-icon' animate active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' iconComponent={status.get('favourited') ? StarIcon : StarBorderIcon} onClick={this.handleFavouriteClick} counter={withCounters ? status.get('favourites_count') : undefined} />
|
||||
<IconButton className='status__action-bar__button bookmark-icon' disabled={!signedIn} active={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' iconComponent={status.get('bookmarked') ? BookmarkIcon : BookmarkBorderIcon} onClick={this.handleBookmarkClick} />
|
||||
|
||||
{filterButton}
|
||||
|
||||
<DropdownMenuContainer
|
||||
scrollKey={scrollKey}
|
||||
status={status}
|
||||
|
|
37
app/javascript/mastodon/components/status_banner.tsx
Normal file
37
app/javascript/mastodon/components/status_banner.tsx
Normal file
|
@ -0,0 +1,37 @@
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
export enum BannerVariant {
|
||||
Yellow = 'yellow',
|
||||
Blue = 'blue',
|
||||
}
|
||||
|
||||
export const StatusBanner: React.FC<{
|
||||
children: React.ReactNode;
|
||||
variant: BannerVariant;
|
||||
expanded?: boolean;
|
||||
onClick?: () => void;
|
||||
}> = ({ children, variant, expanded, onClick }) => (
|
||||
<div
|
||||
className={
|
||||
variant === BannerVariant.Yellow
|
||||
? 'content-warning'
|
||||
: 'content-warning content-warning--filter'
|
||||
}
|
||||
>
|
||||
{children}
|
||||
|
||||
<button className='link-button' onClick={onClick}>
|
||||
{expanded ? (
|
||||
<FormattedMessage
|
||||
id='content_warning.hide'
|
||||
defaultMessage='Hide post'
|
||||
/>
|
||||
) : (
|
||||
<FormattedMessage
|
||||
id='content_warning.show'
|
||||
defaultMessage='Show anyway'
|
||||
/>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
);
|
|
@ -4,7 +4,7 @@ import { PureComponent } from 'react';
|
|||
import { FormattedMessage, injectIntl } from 'react-intl';
|
||||
|
||||
import classnames from 'classnames';
|
||||
import { Link, withRouter } from 'react-router-dom';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import { connect } from 'react-redux';
|
||||
|
@ -15,7 +15,6 @@ import PollContainer from 'mastodon/containers/poll_container';
|
|||
import { identityContextPropShape, withIdentity } from 'mastodon/identity_context';
|
||||
import { autoPlayGif, languages as preloadedLanguages } from 'mastodon/initial_state';
|
||||
|
||||
|
||||
const MAX_HEIGHT = 706; // 22px * 32 (+ 2px padding at the top)
|
||||
|
||||
/**
|
||||
|
@ -73,8 +72,6 @@ class StatusContent extends PureComponent {
|
|||
identity: identityContextPropShape,
|
||||
status: ImmutablePropTypes.map.isRequired,
|
||||
statusContent: PropTypes.string,
|
||||
expanded: PropTypes.bool,
|
||||
onExpandedToggle: PropTypes.func,
|
||||
onTranslate: PropTypes.func,
|
||||
onClick: PropTypes.func,
|
||||
collapsible: PropTypes.bool,
|
||||
|
@ -87,10 +84,6 @@ class StatusContent extends PureComponent {
|
|||
history: PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
state = {
|
||||
hidden: true,
|
||||
};
|
||||
|
||||
_updateStatusLinks () {
|
||||
const node = this.node;
|
||||
|
||||
|
@ -218,17 +211,6 @@ class StatusContent extends PureComponent {
|
|||
this.startXY = null;
|
||||
};
|
||||
|
||||
handleSpoilerClick = (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (this.props.onExpandedToggle) {
|
||||
// The parent manages the state
|
||||
this.props.onExpandedToggle();
|
||||
} else {
|
||||
this.setState({ hidden: !this.state.hidden });
|
||||
}
|
||||
};
|
||||
|
||||
handleTranslate = () => {
|
||||
this.props.onTranslate();
|
||||
};
|
||||
|
@ -240,18 +222,15 @@ class StatusContent extends PureComponent {
|
|||
render () {
|
||||
const { status, intl, statusContent } = this.props;
|
||||
|
||||
const hidden = this.props.onExpandedToggle ? !this.props.expanded : this.state.hidden;
|
||||
const renderReadMore = this.props.onClick && status.get('collapsed');
|
||||
const contentLocale = intl.locale.replace(/[_-].*/, '');
|
||||
const targetLanguages = this.props.languages?.get(status.get('language') || 'und');
|
||||
const renderTranslate = this.props.onTranslate && this.props.identity.signedIn && ['public', 'unlisted'].includes(status.get('visibility')) && status.get('search_index').trim().length > 0 && targetLanguages?.includes(contentLocale);
|
||||
|
||||
const content = { __html: statusContent ?? getStatusContent(status) };
|
||||
const spoilerContent = { __html: status.getIn(['translation', 'spoilerHtml']) || status.get('spoilerHtml') };
|
||||
const language = status.getIn(['translation', 'language']) || status.get('language');
|
||||
const classNames = classnames('status__content', {
|
||||
'status__content--with-action': this.props.onClick && this.props.history,
|
||||
'status__content--with-spoiler': status.get('spoiler_text').length > 0,
|
||||
'status__content--collapsed': renderReadMore,
|
||||
});
|
||||
|
||||
|
@ -269,38 +248,7 @@ class StatusContent extends PureComponent {
|
|||
<PollContainer pollId={status.get('poll')} lang={language} />
|
||||
);
|
||||
|
||||
if (status.get('spoiler_text').length > 0) {
|
||||
let mentionsPlaceholder = '';
|
||||
|
||||
const mentionLinks = status.get('mentions').map(item => (
|
||||
<Link to={`/@${item.get('acct')}`} key={item.get('id')} className='status-link mention'>
|
||||
@<span>{item.get('username')}</span>
|
||||
</Link>
|
||||
)).reduce((aggregate, item) => [...aggregate, item, ' '], []);
|
||||
|
||||
const toggleText = hidden ? <FormattedMessage id='status.show_more' defaultMessage='Show more' /> : <FormattedMessage id='status.show_less' defaultMessage='Show less' />;
|
||||
|
||||
if (hidden) {
|
||||
mentionsPlaceholder = <div>{mentionLinks}</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={classNames} ref={this.setRef} tabIndex={0} onMouseDown={this.handleMouseDown} onMouseUp={this.handleMouseUp} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>
|
||||
<p style={{ marginBottom: hidden && status.get('mentions').isEmpty() ? '0px' : null }}>
|
||||
<span dangerouslySetInnerHTML={spoilerContent} className='translate' lang={language} />
|
||||
{' '}
|
||||
<button type='button' className={`status__content__spoiler-link ${hidden ? 'status__content__spoiler-link--show-more' : 'status__content__spoiler-link--show-less'}`} onClick={this.handleSpoilerClick} aria-expanded={!hidden}>{toggleText}</button>
|
||||
</p>
|
||||
|
||||
{mentionsPlaceholder}
|
||||
|
||||
<div tabIndex={!hidden ? 0 : null} className={`status__content__text ${!hidden ? 'status__content__text--visible' : ''} translate`} lang={language} dangerouslySetInnerHTML={content} />
|
||||
|
||||
{!hidden && poll}
|
||||
{translateButton}
|
||||
</div>
|
||||
);
|
||||
} else if (this.props.onClick) {
|
||||
if (this.props.onClick) {
|
||||
return (
|
||||
<>
|
||||
<div className={classNames} ref={this.setRef} tabIndex={0} onMouseDown={this.handleMouseDown} onMouseUp={this.handleMouseUp} key='status-content' onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>
|
||||
|
|
|
@ -1,28 +1,23 @@
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
interface Props {
|
||||
resource: JSX.Element;
|
||||
message: React.ReactNode;
|
||||
label: React.ReactNode;
|
||||
url: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export const TimelineHint: React.FC<Props> = ({ className, resource, url }) => (
|
||||
export const TimelineHint: React.FC<Props> = ({
|
||||
className,
|
||||
message,
|
||||
label,
|
||||
url,
|
||||
}) => (
|
||||
<div className={classNames('timeline-hint', className)}>
|
||||
<strong>
|
||||
<FormattedMessage
|
||||
id='timeline_hint.remote_resource_not_displayed'
|
||||
defaultMessage='{resource} from other servers are not displayed.'
|
||||
values={{ resource }}
|
||||
/>
|
||||
</strong>
|
||||
<br />
|
||||
<p>{message}</p>
|
||||
|
||||
<a href={url} target='_blank' rel='noopener noreferrer'>
|
||||
<FormattedMessage
|
||||
id='account.browse_more_on_origin_server'
|
||||
defaultMessage='Browse more on the original profile'
|
||||
/>
|
||||
{label}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -12,6 +12,7 @@ import BundleColumnError from 'mastodon/features/ui/components/bundle_column_err
|
|||
import { me } from 'mastodon/initial_state';
|
||||
import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
|
||||
import { getAccountHidden } from 'mastodon/selectors';
|
||||
import { useAppSelector } from 'mastodon/store';
|
||||
|
||||
import { lookupAccount, fetchAccount } from '../../actions/accounts';
|
||||
import { fetchFeaturedTags } from '../../actions/featured_tags';
|
||||
|
@ -59,12 +60,22 @@ const mapStateToProps = (state, { params: { acct, id, tagged }, withReplies = fa
|
|||
};
|
||||
};
|
||||
|
||||
const RemoteHint = ({ url }) => (
|
||||
<TimelineHint url={url} resource={<FormattedMessage id='timeline_hint.resources.statuses' defaultMessage='Older posts' />} />
|
||||
);
|
||||
const RemoteHint = ({ accountId, url }) => {
|
||||
const acct = useAppSelector(state => state.accounts.get(accountId)?.acct);
|
||||
const domain = acct ? acct.split('@')[1] : undefined;
|
||||
|
||||
return (
|
||||
<TimelineHint
|
||||
url={url}
|
||||
message={<FormattedMessage id='hints.profiles.posts_may_be_missing' defaultMessage='Some posts from this profile may be missing.' />}
|
||||
label={<FormattedMessage id='hints.profiles.see_more_posts' defaultMessage='See more posts on {domain}' values={{ domain: <strong>{domain}</strong> }} />}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
RemoteHint.propTypes = {
|
||||
url: PropTypes.string.isRequired,
|
||||
accountId: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
class AccountTimeline extends ImmutablePureComponent {
|
||||
|
@ -175,12 +186,12 @@ class AccountTimeline extends ImmutablePureComponent {
|
|||
} else if (blockedBy) {
|
||||
emptyMessage = <FormattedMessage id='empty_column.account_unavailable' defaultMessage='Profile unavailable' />;
|
||||
} else if (remote && statusIds.isEmpty()) {
|
||||
emptyMessage = <RemoteHint url={remoteUrl} />;
|
||||
emptyMessage = <RemoteHint accountId={accountId} url={remoteUrl} />;
|
||||
} else {
|
||||
emptyMessage = <FormattedMessage id='empty_column.account_timeline' defaultMessage='No posts found' />;
|
||||
}
|
||||
|
||||
const remoteMessage = remote ? <RemoteHint url={remoteUrl} /> : null;
|
||||
const remoteMessage = remote ? <RemoteHint accountId={accountId} url={remoteUrl} /> : null;
|
||||
|
||||
return (
|
||||
<Column>
|
||||
|
|
|
@ -12,6 +12,7 @@ import { TimelineHint } from 'mastodon/components/timeline_hint';
|
|||
import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
|
||||
import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
|
||||
import { getAccountHidden } from 'mastodon/selectors';
|
||||
import { useAppSelector } from 'mastodon/store';
|
||||
|
||||
import {
|
||||
lookupAccount,
|
||||
|
@ -51,12 +52,22 @@ const mapStateToProps = (state, { params: { acct, id } }) => {
|
|||
};
|
||||
};
|
||||
|
||||
const RemoteHint = ({ url }) => (
|
||||
<TimelineHint url={url} resource={<FormattedMessage id='timeline_hint.resources.followers' defaultMessage='Followers' />} />
|
||||
);
|
||||
const RemoteHint = ({ accountId, url }) => {
|
||||
const acct = useAppSelector(state => state.accounts.get(accountId)?.acct);
|
||||
const domain = acct ? acct.split('@')[1] : undefined;
|
||||
|
||||
return (
|
||||
<TimelineHint
|
||||
url={url}
|
||||
message={<FormattedMessage id='hints.profiles.followers_may_be_missing' defaultMessage='Followers for this profile may be missing.' />}
|
||||
label={<FormattedMessage id='hints.profiles.see_more_followers' defaultMessage='See more followers on {domain}' values={{ domain: <strong>{domain}</strong> }} />}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
RemoteHint.propTypes = {
|
||||
url: PropTypes.string.isRequired,
|
||||
accountId: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
class Followers extends ImmutablePureComponent {
|
||||
|
@ -141,12 +152,12 @@ class Followers extends ImmutablePureComponent {
|
|||
} else if (hideCollections && accountIds.isEmpty()) {
|
||||
emptyMessage = <FormattedMessage id='empty_column.account_hides_collections' defaultMessage='This user has chosen to not make this information available' />;
|
||||
} else if (remote && accountIds.isEmpty()) {
|
||||
emptyMessage = <RemoteHint url={remoteUrl} />;
|
||||
emptyMessage = <RemoteHint accountId={accountId} url={remoteUrl} />;
|
||||
} else {
|
||||
emptyMessage = <FormattedMessage id='account.followers.empty' defaultMessage='No one follows this user yet.' />;
|
||||
}
|
||||
|
||||
const remoteMessage = remote ? <RemoteHint url={remoteUrl} /> : null;
|
||||
const remoteMessage = remote ? <RemoteHint accountId={accountId} url={remoteUrl} /> : null;
|
||||
|
||||
return (
|
||||
<Column>
|
||||
|
|
|
@ -12,6 +12,7 @@ import { TimelineHint } from 'mastodon/components/timeline_hint';
|
|||
import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
|
||||
import { normalizeForLookup } from 'mastodon/reducers/accounts_map';
|
||||
import { getAccountHidden } from 'mastodon/selectors';
|
||||
import { useAppSelector } from 'mastodon/store';
|
||||
|
||||
import {
|
||||
lookupAccount,
|
||||
|
@ -51,12 +52,22 @@ const mapStateToProps = (state, { params: { acct, id } }) => {
|
|||
};
|
||||
};
|
||||
|
||||
const RemoteHint = ({ url }) => (
|
||||
<TimelineHint url={url} resource={<FormattedMessage id='timeline_hint.resources.follows' defaultMessage='Follows' />} />
|
||||
);
|
||||
const RemoteHint = ({ accountId, url }) => {
|
||||
const acct = useAppSelector(state => state.accounts.get(accountId)?.acct);
|
||||
const domain = acct ? acct.split('@')[1] : undefined;
|
||||
|
||||
return (
|
||||
<TimelineHint
|
||||
url={url}
|
||||
message={<FormattedMessage id='hints.profiles.follows_may_be_missing' defaultMessage='Follows for this profile may be missing.' />}
|
||||
label={<FormattedMessage id='hints.profiles.see_more_follows' defaultMessage='See more follows on {domain}' values={{ domain: <strong>{domain}</strong> }} />}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
RemoteHint.propTypes = {
|
||||
url: PropTypes.string.isRequired,
|
||||
accountId: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
class Following extends ImmutablePureComponent {
|
||||
|
@ -141,12 +152,12 @@ class Following extends ImmutablePureComponent {
|
|||
} else if (hideCollections && accountIds.isEmpty()) {
|
||||
emptyMessage = <FormattedMessage id='empty_column.account_hides_collections' defaultMessage='This user has chosen to not make this information available' />;
|
||||
} else if (remote && accountIds.isEmpty()) {
|
||||
emptyMessage = <RemoteHint url={remoteUrl} />;
|
||||
emptyMessage = <RemoteHint accountId={accountId} url={remoteUrl} />;
|
||||
} else {
|
||||
emptyMessage = <FormattedMessage id='account.follows.empty' defaultMessage="This user doesn't follow anyone yet." />;
|
||||
}
|
||||
|
||||
const remoteMessage = remote ? <RemoteHint url={remoteUrl} /> : null;
|
||||
const remoteMessage = remote ? <RemoteHint accountId={accountId} url={remoteUrl} /> : null;
|
||||
|
||||
return (
|
||||
<Column>
|
||||
|
|
|
@ -36,13 +36,13 @@ export const LinkTimeline: React.FC<{
|
|||
|
||||
const handleLoadMore = useCallback(
|
||||
(maxId: string) => {
|
||||
dispatch(expandLinkTimeline(decodedUrl, { maxId }));
|
||||
void dispatch(expandLinkTimeline(decodedUrl, { maxId }));
|
||||
},
|
||||
[dispatch, decodedUrl],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(expandLinkTimeline(decodedUrl));
|
||||
void dispatch(expandLinkTimeline(decodedUrl));
|
||||
}, [dispatch, decodedUrl]);
|
||||
|
||||
return (
|
||||
|
|
|
@ -7,6 +7,7 @@ import { Helmet } from 'react-helmet';
|
|||
|
||||
import { useSelector, useDispatch } from 'react-redux';
|
||||
|
||||
import ArrowDropDownIcon from '@/material-icons/400-24px/arrow_drop_down.svg?react';
|
||||
import InventoryIcon from '@/material-icons/400-24px/inventory_2.svg?react';
|
||||
import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react';
|
||||
import { openModal } from 'mastodon/actions/modal';
|
||||
|
@ -15,6 +16,7 @@ import { changeSetting } from 'mastodon/actions/settings';
|
|||
import { CheckBox } from 'mastodon/components/check_box';
|
||||
import Column from 'mastodon/components/column';
|
||||
import ColumnHeader from 'mastodon/components/column_header';
|
||||
import { Icon } from 'mastodon/components/icon';
|
||||
import ScrollableList from 'mastodon/components/scrollable_list';
|
||||
import DropdownMenuContainer from 'mastodon/containers/dropdown_menu_container';
|
||||
|
||||
|
@ -26,16 +28,14 @@ const messages = defineMessages({
|
|||
title: { id: 'notification_requests.title', defaultMessage: 'Filtered notifications' },
|
||||
maximize: { id: 'notification_requests.maximize', defaultMessage: 'Maximize' },
|
||||
more: { id: 'status.more', defaultMessage: 'More' },
|
||||
acceptAll: { id: 'notification_requests.accept_all', defaultMessage: 'Accept all' },
|
||||
dismissAll: { id: 'notification_requests.dismiss_all', defaultMessage: 'Dismiss all' },
|
||||
acceptMultiple: { id: 'notification_requests.accept_multiple', defaultMessage: '{count, plural, one {Accept # request} other {Accept # requests}}' },
|
||||
dismissMultiple: { id: 'notification_requests.dismiss_multiple', defaultMessage: '{count, plural, one {Dismiss # request} other {Dismiss # requests}}' },
|
||||
confirmAcceptAllTitle: { id: 'notification_requests.confirm_accept_all.title', defaultMessage: 'Accept notification requests?' },
|
||||
confirmAcceptAllMessage: { id: 'notification_requests.confirm_accept_all.message', defaultMessage: 'You are about to accept {count, plural, one {one notification request} other {# notification requests}}. Are you sure you want to proceed?' },
|
||||
confirmAcceptAllButton: { id: 'notification_requests.confirm_accept_all.button', defaultMessage: 'Accept all' },
|
||||
confirmDismissAllTitle: { id: 'notification_requests.confirm_dismiss_all.title', defaultMessage: 'Dismiss notification requests?' },
|
||||
confirmDismissAllMessage: { id: 'notification_requests.confirm_dismiss_all.message', defaultMessage: "You are about to dismiss {count, plural, one {one notification request} other {# notification requests}}. You won't be able to easily access {count, plural, one {it} other {them}} again. Are you sure you want to proceed?" },
|
||||
confirmDismissAllButton: { id: 'notification_requests.confirm_dismiss_all.button', defaultMessage: 'Dismiss all' },
|
||||
acceptMultiple: { id: 'notification_requests.accept_multiple', defaultMessage: '{count, plural, one {Accept # request…} other {Accept # requests…}}' },
|
||||
dismissMultiple: { id: 'notification_requests.dismiss_multiple', defaultMessage: '{count, plural, one {Dismiss # request…} other {Dismiss # requests…}}' },
|
||||
confirmAcceptMultipleTitle: { id: 'notification_requests.confirm_accept_multiple.title', defaultMessage: 'Accept notification requests?' },
|
||||
confirmAcceptMultipleMessage: { id: 'notification_requests.confirm_accept_multiple.message', defaultMessage: 'You are about to accept {count, plural, one {one notification request} other {# notification requests}}. Are you sure you want to proceed?' },
|
||||
confirmAcceptMultipleButton: { id: 'notification_requests.confirm_accept_multiple.button', defaultMessage: '{count, plural, one {Accept request} other {Accept requests}}' },
|
||||
confirmDismissMultipleTitle: { id: 'notification_requests.confirm_dismiss_multiple.title', defaultMessage: 'Dismiss notification requests?' },
|
||||
confirmDismissMultipleMessage: { id: 'notification_requests.confirm_dismiss_multiple.message', defaultMessage: "You are about to dismiss {count, plural, one {one notification request} other {# notification requests}}. You won't be able to easily access {count, plural, one {it} other {them}} again. Are you sure you want to proceed?" },
|
||||
confirmDismissMultipleButton: { id: 'notification_requests.confirm_dismiss_multiple.button', defaultMessage: '{count, plural, one {Dismiss request} other {Dismiss requests}}' },
|
||||
});
|
||||
|
||||
const ColumnSettings = () => {
|
||||
|
@ -74,45 +74,15 @@ const SelectRow = ({selectAllChecked, toggleSelectAll, selectedItems, selectionM
|
|||
const intl = useIntl();
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const notificationRequests = useSelector(state => state.getIn(['notificationRequests', 'items']));
|
||||
|
||||
const selectedCount = selectedItems.length;
|
||||
|
||||
const handleAcceptAll = useCallback(() => {
|
||||
const items = notificationRequests.map(request => request.get('id')).toArray();
|
||||
dispatch(openModal({
|
||||
modalType: 'CONFIRM',
|
||||
modalProps: {
|
||||
title: intl.formatMessage(messages.confirmAcceptAllTitle),
|
||||
message: intl.formatMessage(messages.confirmAcceptAllMessage, { count: items.length }),
|
||||
confirm: intl.formatMessage(messages.confirmAcceptAllButton),
|
||||
onConfirm: () =>
|
||||
dispatch(acceptNotificationRequests(items)),
|
||||
},
|
||||
}));
|
||||
}, [dispatch, intl, notificationRequests]);
|
||||
|
||||
const handleDismissAll = useCallback(() => {
|
||||
const items = notificationRequests.map(request => request.get('id')).toArray();
|
||||
dispatch(openModal({
|
||||
modalType: 'CONFIRM',
|
||||
modalProps: {
|
||||
title: intl.formatMessage(messages.confirmDismissAllTitle),
|
||||
message: intl.formatMessage(messages.confirmDismissAllMessage, { count: items.length }),
|
||||
confirm: intl.formatMessage(messages.confirmDismissAllButton),
|
||||
onConfirm: () =>
|
||||
dispatch(dismissNotificationRequests(items)),
|
||||
},
|
||||
}));
|
||||
}, [dispatch, intl, notificationRequests]);
|
||||
|
||||
const handleAcceptMultiple = useCallback(() => {
|
||||
dispatch(openModal({
|
||||
modalType: 'CONFIRM',
|
||||
modalProps: {
|
||||
title: intl.formatMessage(messages.confirmAcceptAllTitle),
|
||||
message: intl.formatMessage(messages.confirmAcceptAllMessage, { count: selectedItems.length }),
|
||||
confirm: intl.formatMessage(messages.confirmAcceptAllButton),
|
||||
title: intl.formatMessage(messages.confirmAcceptMultipleTitle),
|
||||
message: intl.formatMessage(messages.confirmAcceptMultipleMessage, { count: selectedItems.length }),
|
||||
confirm: intl.formatMessage(messages.confirmAcceptMultipleButton, { count: selectedItems.length}),
|
||||
onConfirm: () =>
|
||||
dispatch(acceptNotificationRequests(selectedItems)),
|
||||
},
|
||||
|
@ -123,9 +93,9 @@ const SelectRow = ({selectAllChecked, toggleSelectAll, selectedItems, selectionM
|
|||
dispatch(openModal({
|
||||
modalType: 'CONFIRM',
|
||||
modalProps: {
|
||||
title: intl.formatMessage(messages.confirmDismissAllTitle),
|
||||
message: intl.formatMessage(messages.confirmDismissAllMessage, { count: selectedItems.length }),
|
||||
confirm: intl.formatMessage(messages.confirmDismissAllButton),
|
||||
title: intl.formatMessage(messages.confirmDismissMultipleTitle),
|
||||
message: intl.formatMessage(messages.confirmDismissMultipleMessage, { count: selectedItems.length }),
|
||||
confirm: intl.formatMessage(messages.confirmDismissMultipleButton, { count: selectedItems.length}),
|
||||
onConfirm: () =>
|
||||
dispatch(dismissNotificationRequests(selectedItems)),
|
||||
},
|
||||
|
@ -136,46 +106,45 @@ const SelectRow = ({selectAllChecked, toggleSelectAll, selectedItems, selectionM
|
|||
setSelectionMode((mode) => !mode);
|
||||
}, [setSelectionMode]);
|
||||
|
||||
const menu = selectedCount === 0 ?
|
||||
[
|
||||
{ text: intl.formatMessage(messages.acceptAll), action: handleAcceptAll },
|
||||
{ text: intl.formatMessage(messages.dismissAll), action: handleDismissAll },
|
||||
] : [
|
||||
{ text: intl.formatMessage(messages.acceptMultiple, { count: selectedCount }), action: handleAcceptMultiple },
|
||||
{ text: intl.formatMessage(messages.dismissMultiple, { count: selectedCount }), action: handleDismissMultiple },
|
||||
];
|
||||
const menu = [
|
||||
{ text: intl.formatMessage(messages.acceptMultiple, { count: selectedCount }), action: handleAcceptMultiple },
|
||||
{ text: intl.formatMessage(messages.dismissMultiple, { count: selectedCount }), action: handleDismissMultiple },
|
||||
];
|
||||
|
||||
const handleSelectAll = useCallback(() => {
|
||||
setSelectionMode(true);
|
||||
toggleSelectAll();
|
||||
}, [setSelectionMode, toggleSelectAll]);
|
||||
|
||||
return (
|
||||
<div className='column-header__select-row'>
|
||||
{selectionMode && (
|
||||
<div className='column-header__select-row__checkbox'>
|
||||
<CheckBox checked={selectAllChecked} indeterminate={selectedCount > 0 && !selectAllChecked} onChange={toggleSelectAll} />
|
||||
</div>
|
||||
)}
|
||||
<div className='column-header__select-row__selection-mode'>
|
||||
<div className='column-header__select-row__checkbox'>
|
||||
<CheckBox checked={selectAllChecked} indeterminate={selectedCount > 0 && !selectAllChecked} onChange={handleSelectAll} />
|
||||
</div>
|
||||
<DropdownMenuContainer
|
||||
items={menu}
|
||||
icons='ellipsis-h'
|
||||
iconComponent={MoreHorizIcon}
|
||||
direction='right'
|
||||
title={intl.formatMessage(messages.more)}
|
||||
>
|
||||
<button className='dropdown-button column-header__select-row__select-menu' disabled={selectedItems.length === 0}>
|
||||
<span className='dropdown-button__label'>
|
||||
{selectedCount} selected
|
||||
</span>
|
||||
<Icon id='down' icon={ArrowDropDownIcon} />
|
||||
</button>
|
||||
</DropdownMenuContainer>
|
||||
<div className='column-header__select-row__mode-button'>
|
||||
<button className='text-btn' tabIndex={0} onClick={handleToggleSelectionMode}>
|
||||
{selectionMode ? (
|
||||
<FormattedMessage id='notification_requests.exit_selection_mode' defaultMessage='Cancel' />
|
||||
<FormattedMessage id='notification_requests.exit_selection' defaultMessage='Done' />
|
||||
) :
|
||||
(
|
||||
<FormattedMessage id='notification_requests.enter_selection_mode' defaultMessage='Select' />
|
||||
<FormattedMessage id='notification_requests.edit_selection' defaultMessage='Edit' />
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
{selectedCount > 0 &&
|
||||
<div className='column-header__select-row__selected-count'>
|
||||
{selectedCount} selected
|
||||
</div>
|
||||
}
|
||||
<div className='column-header__select-row__actions'>
|
||||
<DropdownMenuContainer
|
||||
items={menu}
|
||||
icons='ellipsis-h'
|
||||
iconComponent={MoreHorizIcon}
|
||||
direction='right'
|
||||
title={intl.formatMessage(messages.more)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -248,7 +217,9 @@ export const NotificationRequests = ({ multiColumn }) => {
|
|||
multiColumn={multiColumn}
|
||||
showBackButton
|
||||
appendContent={
|
||||
<SelectRow selectionMode={selectionMode} setSelectionMode={setSelectionMode} selectAllChecked={selectAllChecked} toggleSelectAll={toggleSelectAll} selectedItems={checkedRequestIds} />}
|
||||
notificationRequests.size > 0 && (
|
||||
<SelectRow selectionMode={selectionMode} setSelectionMode={setSelectionMode} selectAllChecked={selectAllChecked} toggleSelectAll={toggleSelectAll} selectedItems={checkedRequestIds} />
|
||||
)}
|
||||
>
|
||||
<ColumnSettings />
|
||||
</ColumnHeader>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { useAppSelector } from 'mastodon/store';
|
||||
|
||||
export const DisplayedName: React.FC<{
|
||||
accountIds: string[];
|
||||
}> = ({ accountIds }) => {
|
||||
const lastAccountId = accountIds[0] ?? '0';
|
||||
const account = useAppSelector((state) => state.accounts.get(lastAccountId));
|
||||
|
||||
if (!account) return null;
|
||||
|
||||
return (
|
||||
<Link
|
||||
to={`/@${account.acct}`}
|
||||
title={`@${account.acct}`}
|
||||
data-hover-card-account={account.id}
|
||||
>
|
||||
<bdi dangerouslySetInnerHTML={{ __html: account.display_name_html }} />
|
||||
</Link>
|
||||
);
|
||||
};
|
|
@ -8,11 +8,13 @@ import type { List as ImmutableList, RecordOf } from 'immutable';
|
|||
|
||||
import BarChart4BarsIcon from '@/material-icons/400-24px/bar_chart_4_bars.svg?react';
|
||||
import PhotoLibraryIcon from '@/material-icons/400-24px/photo_library.svg?react';
|
||||
import { toggleStatusSpoilers } from 'mastodon/actions/statuses';
|
||||
import { Avatar } from 'mastodon/components/avatar';
|
||||
import { ContentWarning } from 'mastodon/components/content_warning';
|
||||
import { DisplayName } from 'mastodon/components/display_name';
|
||||
import { Icon } from 'mastodon/components/icon';
|
||||
import type { Status } from 'mastodon/models/status';
|
||||
import { useAppSelector } from 'mastodon/store';
|
||||
import { useAppSelector, useAppDispatch } from 'mastodon/store';
|
||||
|
||||
import { EmbeddedStatusContent } from './embedded_status_content';
|
||||
|
||||
|
@ -23,6 +25,7 @@ export const EmbeddedStatus: React.FC<{ statusId: string }> = ({
|
|||
}) => {
|
||||
const history = useHistory();
|
||||
const clickCoordinatesRef = useRef<[number, number] | null>();
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const status = useAppSelector(
|
||||
(state) => state.statuses.get(statusId) as Status | undefined,
|
||||
|
@ -96,15 +99,21 @@ export const EmbeddedStatus: React.FC<{ statusId: string }> = ({
|
|||
[],
|
||||
);
|
||||
|
||||
const handleContentWarningClick = useCallback(() => {
|
||||
dispatch(toggleStatusSpoilers(statusId));
|
||||
}, [dispatch, statusId]);
|
||||
|
||||
if (!status) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Assign status attributes to variables with a forced type, as status is not yet properly typed
|
||||
const contentHtml = status.get('contentHtml') as string;
|
||||
const contentWarning = status.get('spoilerHtml') as string;
|
||||
const poll = status.get('poll');
|
||||
const language = status.get('language') as string;
|
||||
const mentions = status.get('mentions') as ImmutableList<Mention>;
|
||||
const expanded = !status.get('hidden') || !contentWarning;
|
||||
const mediaAttachmentsSize = (
|
||||
status.get('media_attachments') as ImmutableList<unknown>
|
||||
).size;
|
||||
|
@ -124,14 +133,24 @@ export const EmbeddedStatus: React.FC<{ statusId: string }> = ({
|
|||
<DisplayName account={account} />
|
||||
</div>
|
||||
|
||||
<EmbeddedStatusContent
|
||||
className='notification-group__embedded-status__content reply-indicator__content translate'
|
||||
content={contentHtml}
|
||||
language={language}
|
||||
mentions={mentions}
|
||||
/>
|
||||
{contentWarning && (
|
||||
<ContentWarning
|
||||
text={contentWarning}
|
||||
onClick={handleContentWarningClick}
|
||||
expanded={expanded}
|
||||
/>
|
||||
)}
|
||||
|
||||
{(poll || mediaAttachmentsSize > 0) && (
|
||||
{(!contentWarning || expanded) && (
|
||||
<EmbeddedStatusContent
|
||||
className='notification-group__embedded-status__content reply-indicator__content translate'
|
||||
content={contentHtml}
|
||||
language={language}
|
||||
mentions={mentions}
|
||||
/>
|
||||
)}
|
||||
|
||||
{expanded && (poll || mediaAttachmentsSize > 0) && (
|
||||
<div className='notification-group__embedded-status__attachments reply-indicator__attachments'>
|
||||
{!!poll && (
|
||||
<>
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { useAppSelector } from 'mastodon/store';
|
||||
|
||||
export const NamesList: React.FC<{
|
||||
accountIds: string[];
|
||||
total: number;
|
||||
seeMoreHref?: string;
|
||||
}> = ({ accountIds, total, seeMoreHref }) => {
|
||||
const lastAccountId = accountIds[0] ?? '0';
|
||||
const account = useAppSelector((state) => state.accounts.get(lastAccountId));
|
||||
|
||||
if (!account) return null;
|
||||
|
||||
const displayedName = (
|
||||
<Link
|
||||
to={`/@${account.acct}`}
|
||||
title={`@${account.acct}`}
|
||||
data-hover-card-account={account.id}
|
||||
>
|
||||
<bdi dangerouslySetInnerHTML={{ __html: account.display_name_html }} />
|
||||
</Link>
|
||||
);
|
||||
|
||||
if (total === 1) {
|
||||
return displayedName;
|
||||
}
|
||||
|
||||
if (seeMoreHref)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='name_and_others_with_link'
|
||||
defaultMessage='{name} and <a>{count, plural, one {# other} other {# others}}</a>'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
a: (chunks) => <Link to={seeMoreHref}>{chunks}</Link>,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='name_and_others'
|
||||
defaultMessage='{name} and {count, plural, one {# other} other {# others}}'
|
||||
values={{ name: displayedName, count: total - 1 }}
|
||||
/>
|
||||
);
|
||||
};
|
|
@ -6,13 +6,27 @@ import type { NotificationGroupAdminSignUp } from 'mastodon/models/notification_
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationGroupWithStatus } from './notification_group_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
<FormattedMessage
|
||||
id='notification.admin.sign_up'
|
||||
defaultMessage='{name} signed up'
|
||||
values={values}
|
||||
/>
|
||||
);
|
||||
const labelRenderer: LabelRenderer = (displayedName, total) => {
|
||||
if (total === 1)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.admin.sign_up'
|
||||
defaultMessage='{name} signed up'
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.admin.sign_up.name_and_others'
|
||||
defaultMessage='{name} and {count, plural, one {# other} other {# others}} signed up'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const NotificationAdminSignUp: React.FC<{
|
||||
notification: NotificationGroupAdminSignUp;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import StarIcon from '@/material-icons/400-24px/star-fill.svg?react';
|
||||
import type { NotificationGroupFavourite } from 'mastodon/models/notification_group';
|
||||
import { useAppSelector } from 'mastodon/store';
|
||||
|
@ -7,13 +9,29 @@ import { useAppSelector } from 'mastodon/store';
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationGroupWithStatus } from './notification_group_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
<FormattedMessage
|
||||
id='notification.favourite'
|
||||
defaultMessage='{name} favorited your status'
|
||||
values={values}
|
||||
/>
|
||||
);
|
||||
const labelRenderer: LabelRenderer = (displayedName, total, seeMoreHref) => {
|
||||
if (total === 1)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.favourite'
|
||||
defaultMessage='{name} favorited your status'
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.favourite.name_and_others_with_link'
|
||||
defaultMessage='{name} and <a>{count, plural, one {# other} other {# others}}</a> favorited your post'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
a: (chunks) =>
|
||||
seeMoreHref ? <Link to={seeMoreHref}>{chunks}</Link> : chunks,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const NotificationFavourite: React.FC<{
|
||||
notification: NotificationGroupFavourite;
|
||||
|
|
|
@ -10,13 +10,27 @@ import { useAppSelector } from 'mastodon/store';
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationGroupWithStatus } from './notification_group_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
<FormattedMessage
|
||||
id='notification.follow'
|
||||
defaultMessage='{name} followed you'
|
||||
values={values}
|
||||
/>
|
||||
);
|
||||
const labelRenderer: LabelRenderer = (displayedName, total) => {
|
||||
if (total === 1)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.follow'
|
||||
defaultMessage='{name} followed you'
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.follow.name_and_others'
|
||||
defaultMessage='{name} and {count, plural, one {# other} other {# others}} followed you'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const FollowerCount: React.FC<{ accountId: string }> = ({ accountId }) => {
|
||||
const account = useAppSelector((s) => s.accounts.get(accountId));
|
||||
|
|
|
@ -21,13 +21,27 @@ const messages = defineMessages({
|
|||
reject: { id: 'follow_request.reject', defaultMessage: 'Reject' },
|
||||
});
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
<FormattedMessage
|
||||
id='notification.follow_request'
|
||||
defaultMessage='{name} has requested to follow you'
|
||||
values={values}
|
||||
/>
|
||||
);
|
||||
const labelRenderer: LabelRenderer = (displayedName, total) => {
|
||||
if (total === 1)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.follow_request'
|
||||
defaultMessage='{name} has requested to follow you'
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.follow_request.name_and_others'
|
||||
defaultMessage='{name} and {count, plural, one {# other} other {# others}} has requested to follow you'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const NotificationFollowRequest: React.FC<{
|
||||
notification: NotificationGroupFollowRequest;
|
||||
|
|
|
@ -12,11 +12,13 @@ import { RelativeTimestamp } from 'mastodon/components/relative_timestamp';
|
|||
import { useAppDispatch } from 'mastodon/store';
|
||||
|
||||
import { AvatarGroup } from './avatar_group';
|
||||
import { DisplayedName } from './displayed_name';
|
||||
import { EmbeddedStatus } from './embedded_status';
|
||||
import { NamesList } from './names_list';
|
||||
|
||||
export type LabelRenderer = (
|
||||
values: Record<string, React.ReactNode>,
|
||||
displayedName: JSX.Element,
|
||||
total: number,
|
||||
seeMoreHref?: string,
|
||||
) => JSX.Element;
|
||||
|
||||
export const NotificationGroupWithStatus: React.FC<{
|
||||
|
@ -50,15 +52,11 @@ export const NotificationGroupWithStatus: React.FC<{
|
|||
|
||||
const label = useMemo(
|
||||
() =>
|
||||
labelRenderer({
|
||||
name: (
|
||||
<NamesList
|
||||
accountIds={accountIds}
|
||||
total={count}
|
||||
seeMoreHref={labelSeeMoreHref}
|
||||
/>
|
||||
),
|
||||
}),
|
||||
labelRenderer(
|
||||
<DisplayedName accountIds={accountIds} />,
|
||||
count,
|
||||
labelSeeMoreHref,
|
||||
),
|
||||
[labelRenderer, accountIds, count, labelSeeMoreHref],
|
||||
);
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react';
|
||||
import type { NotificationGroupReblog } from 'mastodon/models/notification_group';
|
||||
import { useAppSelector } from 'mastodon/store';
|
||||
|
@ -7,13 +9,29 @@ import { useAppSelector } from 'mastodon/store';
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationGroupWithStatus } from './notification_group_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
<FormattedMessage
|
||||
id='notification.reblog'
|
||||
defaultMessage='{name} boosted your status'
|
||||
values={values}
|
||||
/>
|
||||
);
|
||||
const labelRenderer: LabelRenderer = (displayedName, total, seeMoreHref) => {
|
||||
if (total === 1)
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.reblog'
|
||||
defaultMessage='{name} boosted your status'
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='notification.reblog.name_and_others_with_link'
|
||||
defaultMessage='{name} and <a>{count, plural, one {# other} other {# others}}</a> boosted your post'
|
||||
values={{
|
||||
name: displayedName,
|
||||
count: total - 1,
|
||||
a: (chunks) =>
|
||||
seeMoreHref ? <Link to={seeMoreHref}>{chunks}</Link> : chunks,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const NotificationReblog: React.FC<{
|
||||
notification: NotificationGroupReblog;
|
||||
|
|
|
@ -6,11 +6,11 @@ import type { NotificationGroupStatus } from 'mastodon/models/notification_group
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationWithStatus } from './notification_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
const labelRenderer: LabelRenderer = (displayedName) => (
|
||||
<FormattedMessage
|
||||
id='notification.status'
|
||||
defaultMessage='{name} just posted'
|
||||
values={values}
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ import type { NotificationGroupUpdate } from 'mastodon/models/notification_group
|
|||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
import { NotificationWithStatus } from './notification_with_status';
|
||||
|
||||
const labelRenderer: LabelRenderer = (values) => (
|
||||
const labelRenderer: LabelRenderer = (displayedName) => (
|
||||
<FormattedMessage
|
||||
id='notification.update'
|
||||
defaultMessage='{name} edited a post'
|
||||
values={values}
|
||||
values={{ name: displayedName }}
|
||||
/>
|
||||
);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import { Icon } from 'mastodon/components/icon';
|
|||
import Status from 'mastodon/containers/status_container';
|
||||
import { useAppSelector, useAppDispatch } from 'mastodon/store';
|
||||
|
||||
import { NamesList } from './names_list';
|
||||
import { DisplayedName } from './displayed_name';
|
||||
import type { LabelRenderer } from './notification_group_with_status';
|
||||
|
||||
export const NotificationWithStatus: React.FC<{
|
||||
|
@ -40,10 +40,7 @@ export const NotificationWithStatus: React.FC<{
|
|||
const dispatch = useAppDispatch();
|
||||
|
||||
const label = useMemo(
|
||||
() =>
|
||||
labelRenderer({
|
||||
name: <NamesList accountIds={accountIds} total={count} />,
|
||||
}),
|
||||
() => labelRenderer(<DisplayedName accountIds={accountIds} />, count),
|
||||
[labelRenderer, accountIds, count],
|
||||
);
|
||||
|
||||
|
|
|
@ -81,7 +81,11 @@ export const Notifications: React.FC<{
|
|||
|
||||
const anyPendingNotification = useAppSelector(selectAnyPendingNotification);
|
||||
|
||||
const isUnread = unreadNotificationsCount > 0;
|
||||
const needsReload = useAppSelector(
|
||||
(state) => state.notificationGroups.mergedNotifications === 'needs-reload',
|
||||
);
|
||||
|
||||
const isUnread = unreadNotificationsCount > 0 || needsReload;
|
||||
|
||||
const canMarkAsRead =
|
||||
useAppSelector(selectSettingsNotificationsShowUnread) &&
|
||||
|
@ -118,11 +122,11 @@ export const Notifications: React.FC<{
|
|||
|
||||
// Keep track of mounted components for unread notification handling
|
||||
useEffect(() => {
|
||||
dispatch(mountNotifications());
|
||||
void dispatch(mountNotifications());
|
||||
|
||||
return () => {
|
||||
dispatch(unmountNotifications());
|
||||
dispatch(updateScrollPosition({ top: false }));
|
||||
void dispatch(updateScrollPosition({ top: false }));
|
||||
};
|
||||
}, [dispatch]);
|
||||
|
||||
|
@ -147,11 +151,11 @@ export const Notifications: React.FC<{
|
|||
}, [dispatch]);
|
||||
|
||||
const handleScrollToTop = useDebouncedCallback(() => {
|
||||
dispatch(updateScrollPosition({ top: true }));
|
||||
void dispatch(updateScrollPosition({ top: true }));
|
||||
}, 100);
|
||||
|
||||
const handleScroll = useDebouncedCallback(() => {
|
||||
dispatch(updateScrollPosition({ top: false }));
|
||||
void dispatch(updateScrollPosition({ top: false }));
|
||||
}, 100);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -10,6 +10,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
|
|||
|
||||
import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react';
|
||||
import { AnimatedNumber } from 'mastodon/components/animated_number';
|
||||
import { ContentWarning } from 'mastodon/components/content_warning';
|
||||
import EditedTimestamp from 'mastodon/components/edited_timestamp';
|
||||
import { getHashtagBarForStatus } from 'mastodon/components/hashtag_bar';
|
||||
import { Icon } from 'mastodon/components/icon';
|
||||
|
@ -277,17 +278,20 @@ class DetailedStatus extends ImmutablePureComponent {
|
|||
<DisplayName account={status.get('account')} localDomain={this.props.domain} />
|
||||
</a>
|
||||
|
||||
<StatusContent
|
||||
status={status}
|
||||
expanded={!status.get('hidden')}
|
||||
onExpandedToggle={this.handleExpandedToggle}
|
||||
onTranslate={this.handleTranslate}
|
||||
{...statusContentProps}
|
||||
/>
|
||||
{status.get('spoiler_text').length > 0 && <ContentWarning text={status.getIn(['translation', 'spoilerHtml']) || status.get('spoilerHtml')} expanded={expanded} onClick={this.handleExpandedToggle} />}
|
||||
|
||||
{media}
|
||||
{expanded && (
|
||||
<>
|
||||
<StatusContent
|
||||
status={status}
|
||||
onTranslate={this.handleTranslate}
|
||||
{...statusContentProps}
|
||||
/>
|
||||
|
||||
{expanded && hashtagBar}
|
||||
{media}
|
||||
{hashtagBar}
|
||||
</>
|
||||
)}
|
||||
|
||||
<div className='detailed-status__meta'>
|
||||
<div className='detailed-status__meta__line'>
|
||||
|
|
|
@ -629,7 +629,14 @@ class Status extends ImmutablePureComponent {
|
|||
const isIndexable = !status.getIn(['account', 'noindex']);
|
||||
|
||||
if (!isLocal) {
|
||||
remoteHint = <TimelineHint className={classNames(!!descendants && 'timeline-hint--with-descendants')} url={status.get('url')} resource={<FormattedMessage id='timeline_hint.resources.replies' defaultMessage='Some replies' />} />;
|
||||
remoteHint = (
|
||||
<TimelineHint
|
||||
className={classNames(!!descendants && 'timeline-hint--with-descendants')}
|
||||
url={status.get('url')}
|
||||
message={<FormattedMessage id='hints.threads.replies_may_be_missing' defaultMessage='Replies from other servers may be missing.' />}
|
||||
label={<FormattedMessage id='hints.threads.see_more' defaultMessage='See more replies on {domain}' values={{ domain: <strong>{status.getIn(['account', 'acct']).split('@')[1]}</strong> }} />}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const handlers = {
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
"account.block_domain": "Blokkeer domein {domain}",
|
||||
"account.block_short": "Blokkeer",
|
||||
"account.blocked": "Geblokkeer",
|
||||
"account.browse_more_on_origin_server": "Verken die oorspronklike profiel",
|
||||
"account.cancel_follow_request": "Herroep volgversoek",
|
||||
"account.disable_notifications": "Hou op om my van @{name} se plasings te laat weet",
|
||||
"account.domain_blocked": "Domein geblokkeer",
|
||||
|
@ -308,7 +307,6 @@
|
|||
"status.translated_from_with": "Uit {lang} vertaal deur {provider}",
|
||||
"tabs_bar.home": "Tuis",
|
||||
"tabs_bar.notifications": "Kennisgewings",
|
||||
"timeline_hint.resources.statuses": "Ouer plasings",
|
||||
"trends.counter_by_accounts": "{count, plural, one {{counter} person} other {{counter} people}} in the past {days, plural, one {day} other {# days}}",
|
||||
"upload_form.audio_description": "Describe for people with hearing loss",
|
||||
"upload_form.description": "Describe for the visually impaired",
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
"account.block": "Blocar a @{name}",
|
||||
"account.block_domain": "Blocar dominio {domain}",
|
||||
"account.blocked": "Blocau",
|
||||
"account.browse_more_on_origin_server": "Veyer mas en o perfil orichinal",
|
||||
"account.cancel_follow_request": "Retirar solicitut de seguimiento",
|
||||
"account.disable_notifications": "Deixar de notificar-me quan @{name} publique bella cosa",
|
||||
"account.domain_blocked": "Dominio blocau",
|
||||
|
@ -484,8 +483,6 @@
|
|||
"status.edited_x_times": "Editau {count, plural, one {{count} vez} other {{count} veces}}",
|
||||
"status.embed": "Incrustado",
|
||||
"status.filter": "Filtrar esta publicación",
|
||||
"status.filtered": "Filtrau",
|
||||
"status.hide": "Amagar la publicación",
|
||||
"status.history.created": "{name} creyó {date}",
|
||||
"status.history.edited": "{name} editó {date}",
|
||||
"status.load_more": "Cargar mas",
|
||||
|
@ -510,10 +507,7 @@
|
|||
"status.report": "Denunciar €{name}",
|
||||
"status.sensitive_warning": "Conteniu sensible",
|
||||
"status.share": "Compartir",
|
||||
"status.show_filter_reason": "Amostrar de totz modos",
|
||||
"status.show_less": "Amostrar menos",
|
||||
"status.show_less_all": "Amostrar menos pa tot",
|
||||
"status.show_more": "Amostrar mas",
|
||||
"status.show_more_all": "Amostrar mas pa tot",
|
||||
"status.show_original": "Amostrar orichinal",
|
||||
"status.title.with_attachments": "{user} posted {attachmentCount, plural, one {an attachment} other {# attachments}}",
|
||||
|
@ -531,10 +525,6 @@
|
|||
"time_remaining.minutes": "{number, plural, one {# menuto restante} other {# menutos restantes}}",
|
||||
"time_remaining.moments": "Momentos restantes",
|
||||
"time_remaining.seconds": "{number, plural, one {# segundo restante} other {# segundos restantes}}",
|
||||
"timeline_hint.remote_resource_not_displayed": "{resource} d'atros servidors no s'amuestran.",
|
||||
"timeline_hint.resources.followers": "Seguidores",
|
||||
"timeline_hint.resources.follows": "Seguius",
|
||||
"timeline_hint.resources.statuses": "Publicacions mas antigas",
|
||||
"trends.counter_by_accounts": "{count, plural, one {{counter} persona} other {{counter} personas}} en os zaguers {days, plural, one {días} other {{days} días}}",
|
||||
"trends.trending_now": "Tendencia agora",
|
||||
"ui.beforeunload": "Lo tuyo borrador se perderá si sales de Mastodon.",
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
"account.block_domain": "حظر اسم النِّطاق {domain}",
|
||||
"account.block_short": "حظر",
|
||||
"account.blocked": "محظور",
|
||||
"account.browse_more_on_origin_server": "تصفح المزيد في الملف الشخصي الأصلي",
|
||||
"account.cancel_follow_request": "إلغاء طلب المتابعة",
|
||||
"account.copy": "نسخ الرابط إلى الملف الشخصي",
|
||||
"account.direct": "إشارة خاصة لـ @{name}",
|
||||
|
@ -32,7 +31,7 @@
|
|||
"account.featured_tags.last_status_never": "لا توجد رسائل",
|
||||
"account.featured_tags.title": "وسوم {name} المميَّزة",
|
||||
"account.follow": "متابعة",
|
||||
"account.follow_back": "تابعهم بالمثل",
|
||||
"account.follow_back": "تابعه بالمثل",
|
||||
"account.followers": "مُتابِعون",
|
||||
"account.followers.empty": "لا أحدَ يُتابع هذا المُستخدم إلى حد الآن.",
|
||||
"account.followers_counter": "{count, plural, zero {}one {{counter} متابع} two {{counter} متابعين} few {{counter} متابعين} many {{counter} متابعين} other {{counter} متابعين}}",
|
||||
|
@ -169,12 +168,15 @@
|
|||
"confirmations.block.confirm": "حظر",
|
||||
"confirmations.delete.confirm": "حذف",
|
||||
"confirmations.delete.message": "هل أنتَ مُتأكدٌ أنك تُريدُ حَذفَ هذا المنشور؟",
|
||||
"confirmations.delete.title": "أتريد حذف المنشور؟",
|
||||
"confirmations.delete_list.confirm": "حذف",
|
||||
"confirmations.delete_list.message": "هل أنتَ مُتأكدٌ أنكَ تُريدُ حَذفَ هذِهِ القائمة بشكلٍ دائم؟",
|
||||
"confirmations.delete_list.title": "أتريد حذف القائمة؟",
|
||||
"confirmations.discard_edit_media.confirm": "تجاهل",
|
||||
"confirmations.discard_edit_media.message": "لديك تغييرات غير محفوظة لوصف الوسائط أو معاينتها، أتريد تجاهلها على أي حال؟",
|
||||
"confirmations.edit.confirm": "تعديل",
|
||||
"confirmations.edit.message": "التعديل في الحين سوف يُعيد كتابة الرسالة التي أنت بصدد تحريرها. متأكد من أنك تريد المواصلة؟",
|
||||
"confirmations.edit.title": "هل تريد استبدال المنشور؟",
|
||||
"confirmations.logout.confirm": "خروج",
|
||||
"confirmations.logout.message": "متأكد من أنك تريد الخروج؟",
|
||||
"confirmations.logout.title": "أتريد المغادرة؟",
|
||||
|
@ -184,8 +186,10 @@
|
|||
"confirmations.redraft.title": "أتريد حذف وإعادة صياغة المنشور؟",
|
||||
"confirmations.reply.confirm": "رد",
|
||||
"confirmations.reply.message": "الرد في الحين سوف يُعيد كتابة الرسالة التي أنت بصدد كتابتها. متأكد من أنك تريد المواصلة؟",
|
||||
"confirmations.reply.title": "هل تريد استبدال المنشور؟",
|
||||
"confirmations.unfollow.confirm": "إلغاء المتابعة",
|
||||
"confirmations.unfollow.message": "متأكد من أنك تريد إلغاء متابعة {name} ؟",
|
||||
"confirmations.unfollow.title": "إلغاء متابعة المستخدم؟",
|
||||
"conversation.delete": "احذف المحادثة",
|
||||
"conversation.mark_as_read": "اعتبرها كمقروءة",
|
||||
"conversation.open": "اعرض المحادثة",
|
||||
|
@ -221,8 +225,8 @@
|
|||
"domain_pill.their_username": "مُعرّفُهم الفريد على الخادم. من الممكن العثور على مستخدمين بنفس اسم المستخدم على خوادم مختلفة.",
|
||||
"domain_pill.username": "اسم المستخدم",
|
||||
"domain_pill.whats_in_a_handle": "ما المقصود بالمُعرِّف؟",
|
||||
"domain_pill.who_they_are": "بما أن المعالجات تقول من هو الشخص ومكان وجوده، يمكنك التفاعل مع الناس عبر الشبكة الاجتماعية لـ <button>ActivityPub-Power منصات</button>.",
|
||||
"domain_pill.who_you_are": "لأن معالجتك تقول من أنت ومكان وجودك، يمكن الناس التفاعل معك عبر الشبكة الاجتماعية لـ <button>ActivityPub-Power منصات</button>.",
|
||||
"domain_pill.who_they_are": "بما أن المعرفات تقول من هو الشخص ومكان وجوده، يمكنك التفاعل مع الناس عبر الويب الاجتماعي لل <button>منصات التي تعمل ب ActivityPub</button>.",
|
||||
"domain_pill.who_you_are": "بما أن معرفك يقول من أنت ومكان وجوده، يمكن للناس التفاعل معك عبر الويب الاجتماعي لل <button>منصات التي تعمل ب ActivityPub</button>.",
|
||||
"domain_pill.your_handle": "عنوانك الكامل:",
|
||||
"domain_pill.your_server": "منزلك الرقمي، حيث تعيش جميع مشاركاتك. لا تحب هذا؟ إنقل الخوادم في أي وقت واخضر متابعينك أيضًا.",
|
||||
"domain_pill.your_username": "معرفك الفريد على هذا الخادم. من الممكن العثور على مستخدمين بنفس إسم المستخدم على خوادم مختلفة.",
|
||||
|
@ -348,6 +352,9 @@
|
|||
"home.pending_critical_update.link": "اطّلع على التحديثات",
|
||||
"home.pending_critical_update.title": "تحديث أمان حرج متوفر!",
|
||||
"home.show_announcements": "إظهار الإعلانات",
|
||||
"ignore_notifications_modal.disclaimer": "لا يمكن لـ Mastodon إبلاغ المستخدمين بأنك قد تجاهلت إشعاراتهم. تجاهل الإشعارات لن يمنع إرسال الرسائل نفسها.",
|
||||
"ignore_notifications_modal.ignore": "تجاهل الإشعارات",
|
||||
"ignore_notifications_modal.limited_accounts_title": "تجاهل الإشعارات من الحسابات التي هي تحت الإشراف؟",
|
||||
"interaction_modal.description.favourite": "بفضل حساب على ماستدون، يمكنك إضافة هذا المنشور إلى مفضلتك لإبلاغ الناشر عن تقديرك وكذا للاحتفاظ بالمنشور إلى وقت لاحق.",
|
||||
"interaction_modal.description.follow": "بفضل حساب في ماستدون، يمكنك متابعة {name} وتلقي منشوراته في موجزات خيطك الرئيس.",
|
||||
"interaction_modal.description.reblog": "مع حساب في ماستدون، يمكنك تعزيز هذا المنشور ومشاركته مع مُتابِعيك.",
|
||||
|
@ -434,7 +441,7 @@
|
|||
"mute_modal.they_can_mention_and_follow": "سيكون بإمكانه الإشارة إليك ومتابعتك، لكنك لن تره.",
|
||||
"mute_modal.they_wont_know": "لن يَعرف أنه قد تم كتمه.",
|
||||
"mute_modal.title": "أتريد كتم المُستخدم؟",
|
||||
"mute_modal.you_wont_see_mentions": "سوف لن تر المنشورات التي يُشار إليه.",
|
||||
"mute_modal.you_wont_see_mentions": "لن تر المنشورات التي يُشار فيها إليه.",
|
||||
"mute_modal.you_wont_see_posts": "سيكون بإمكانه رؤية منشوراتك، لكنك لن ترى منشوراته.",
|
||||
"navigation_bar.about": "عن",
|
||||
"navigation_bar.advanced_interface": "افتحه في واجهة الويب المتقدمة",
|
||||
|
@ -492,13 +499,8 @@
|
|||
"notification.status": "{name} نشر للتو",
|
||||
"notification.update": "عدّلَ {name} منشورًا",
|
||||
"notification_requests.accept": "موافقة",
|
||||
"notification_requests.accept_all": "قبول الكل",
|
||||
"notification_requests.confirm_accept_all.button": "قبول الكل",
|
||||
"notification_requests.confirm_dismiss_all.button": "تجاهل الكل",
|
||||
"notification_requests.dismiss": "تخطي",
|
||||
"notification_requests.dismiss_all": "تجاهل الكل",
|
||||
"notification_requests.enter_selection_mode": "اختر",
|
||||
"notification_requests.exit_selection_mode": "إلغاء",
|
||||
"notification_requests.explainer_for_limited_account": "تم تصفية الإشعارات من هذا الحساب لأن الحساب تم تقييده من قبل مشرف.",
|
||||
"notification_requests.notifications_from": "إشعارات من {name}",
|
||||
"notification_requests.title": "الإشعارات المصفاة",
|
||||
"notifications.clear": "مسح الإشعارات",
|
||||
|
@ -506,6 +508,8 @@
|
|||
"notifications.column_settings.admin.report": "التبليغات الجديدة:",
|
||||
"notifications.column_settings.admin.sign_up": "التسجيلات الجديدة:",
|
||||
"notifications.column_settings.alert": "إشعارات سطح المكتب",
|
||||
"notifications.column_settings.beta.category": "ميزات تجريبية",
|
||||
"notifications.column_settings.beta.grouping": "جمّع الإشعارات",
|
||||
"notifications.column_settings.favourite": "المفضلة:",
|
||||
"notifications.column_settings.filter_bar.advanced": "عرض جميع الفئات",
|
||||
"notifications.column_settings.filter_bar.category": "شريط التصفية السريعة",
|
||||
|
@ -534,14 +538,21 @@
|
|||
"notifications.permission_denied": "تنبيهات سطح المكتب غير متوفرة بسبب رفض أذونات المتصفح مسبقاً",
|
||||
"notifications.permission_denied_alert": "لا يمكن تفعيل إشعارات سطح المكتب، لأن إذن المتصفح قد تم رفضه سابقاً",
|
||||
"notifications.permission_required": "إشعارات سطح المكتب غير متوفرة لأنه لم يتم منح الإذن المطلوب.",
|
||||
"notifications.policy.accept": "قبول",
|
||||
"notifications.policy.accept_hint": "إظهار في الإشعارات",
|
||||
"notifications.policy.drop": "تجاهل",
|
||||
"notifications.policy.filter": "تصفية",
|
||||
"notifications.policy.filter_limited_accounts_hint": "المحدودة من قبل مشرفي الخادم",
|
||||
"notifications.policy.filter_limited_accounts_title": "حسابات تحت الإشراف",
|
||||
"notifications.policy.filter_new_accounts.hint": "تم إنشاؤها منذ {days, plural, zero {}one {يوم واحد} two {يومان} few {# أيام} many {# أيام} other {# أيام}}",
|
||||
"notifications.policy.filter_new_accounts_title": "حسابات جديدة",
|
||||
"notifications.policy.filter_not_followers_hint": "بما في ذلك الأشخاص الذين يتابعونك أقل من {days, plural, zero {}one {يوم واحد} two {يومان} few {# أيام} many {# أيام} other {# أيام}}",
|
||||
"notifications.policy.filter_not_followers_hint": "بما في ذلك الأشخاص الذين يتابعونك منذ أقل من {days, plural, zero {}one {يوم واحد} two {يومين} few {# أيام} many {# يوما} other {# أيام}}",
|
||||
"notifications.policy.filter_not_followers_title": "أشخاص لا يتابعونك",
|
||||
"notifications.policy.filter_not_following_hint": "حتى توافق عليهم يدويا",
|
||||
"notifications.policy.filter_not_following_title": "أشخاص لا تتابعهم",
|
||||
"notifications.policy.filter_private_mentions_hint": "تمت تصفيته إلا إذا أن يكون ردًا على ذكرك أو إذا كنت تتابع الحساب",
|
||||
"notifications.policy.filter_private_mentions_title": "إشارات خاصة غير مرغوب فيها",
|
||||
"notifications.policy.filter_private_mentions_hint": "يتم تصفيتها إلا إن كانت ردًا على أحد ردودك أو إذا كنت متابعا للمرسل",
|
||||
"notifications.policy.filter_private_mentions_title": "الإشارات الخاصة غير المرغوب فيها",
|
||||
"notifications.policy.title": "إدارة الإشعارات الواردة من…",
|
||||
"notifications_permission_banner.enable": "تفعيل إشعارات سطح المكتب",
|
||||
"notifications_permission_banner.how_to_control": "لتلقي الإشعارات عندما لا يكون ماستدون مفتوح، قم بتفعيل إشعارات سطح المكتب، يمكنك التحكم بدقة في أنواع التفاعلات التي تولد إشعارات سطح المكتب من خلال زر الـ{icon} أعلاه بمجرد تفعيلها.",
|
||||
"notifications_permission_banner.title": "لا تفوت شيئاً أبداً",
|
||||
|
@ -650,7 +661,7 @@
|
|||
"report.reasons.legal_description": "أنت تعتقد أنه ينتهك قانون بلدك أو دولة الخادم",
|
||||
"report.reasons.other": "شيء آخر",
|
||||
"report.reasons.other_description": "لا تندرج هذه المشكلة ضمن فئات أخرى",
|
||||
"report.reasons.spam": "إنها رسالة مزعجة",
|
||||
"report.reasons.spam": "إنه منشور غير مرغوب فيه",
|
||||
"report.reasons.spam_description": "روابط خبيثة أو تفاعل كاذب أو ردود متكررة",
|
||||
"report.reasons.violation": "ينتهك قواعد الخادم",
|
||||
"report.reasons.violation_description": "تعلم أنه ينتهك قواعد محددة",
|
||||
|
@ -668,6 +679,7 @@
|
|||
"report.unfollow_explanation": "أنت تتابع هذا الحساب، لإزالة مَنشوراته من موجزات خيطك الرئيس، ألغ متابعته.",
|
||||
"report_notification.attached_statuses": "{count, plural, one {{count} منشور} other {{count} منشورات}} مرفقة",
|
||||
"report_notification.categories.legal": "أمور قانونية",
|
||||
"report_notification.categories.legal_sentence": "محتوى غير قانوني",
|
||||
"report_notification.categories.other": "آخر",
|
||||
"report_notification.categories.other_sentence": "آخر",
|
||||
"report_notification.categories.spam": "مزعج",
|
||||
|
@ -723,9 +735,7 @@
|
|||
"status.embed": "إدماج",
|
||||
"status.favourite": "فضّل",
|
||||
"status.favourites": "{count, plural, zero {}one {مفضلة واحدة} two {مفضلتان} few {# مفضلات} many {# مفضلات} other {# مفضلات}}",
|
||||
"status.filter": "تصفية هذه الرسالة",
|
||||
"status.filtered": "مُصفّى",
|
||||
"status.hide": "إخفاء المنشور",
|
||||
"status.filter": "تصفية هذا المنشور",
|
||||
"status.history.created": "أنشأه {name} {date}",
|
||||
"status.history.edited": "عدله {name} {date}",
|
||||
"status.load_more": "حمّل المزيد",
|
||||
|
@ -753,10 +763,7 @@
|
|||
"status.report": "ابلِغ عن @{name}",
|
||||
"status.sensitive_warning": "محتوى حساس",
|
||||
"status.share": "مشاركة",
|
||||
"status.show_filter_reason": "إظهار على أي حال",
|
||||
"status.show_less": "اعرض أقلّ",
|
||||
"status.show_less_all": "طي الكل",
|
||||
"status.show_more": "أظهر المزيد",
|
||||
"status.show_more_all": "توسيع الكل",
|
||||
"status.show_original": "إظهار الأصل",
|
||||
"status.title.with_attachments": "{user} posted {attachmentCount, plural, one {an attachment} other {# attachments}}",
|
||||
|
@ -775,11 +782,6 @@
|
|||
"time_remaining.minutes": "{number, plural, one {# دقيقة} other {# دقائق}} متبقية",
|
||||
"time_remaining.moments": "لحظات متبقية",
|
||||
"time_remaining.seconds": "{number, plural, one {# ثانية} other {# ثوانٍ}} متبقية",
|
||||
"timeline_hint.remote_resource_not_displayed": "{resource} من الخوادم الأخرى لا يتم عرضها.",
|
||||
"timeline_hint.resources.followers": "المتابِعون",
|
||||
"timeline_hint.resources.follows": "المتابَعون",
|
||||
"timeline_hint.resources.replies": "بعض الردود",
|
||||
"timeline_hint.resources.statuses": "المنشورات القديمة",
|
||||
"trends.counter_by_accounts": "{count, plural, one {شخص واحد} two {شخصان} few {{counter} أشخاصٍ} many {{counter} شخصًا} other {{counter} شخصًا}} {days, plural, one {خلال اليوم الماضي} two {خلال اليومَيْنِ الماضيَيْنِ} few {خلال {days} أيام الماضية} many {خلال {days} يومًا الماضية} other {خلال {days} يومٍ الماضية}}",
|
||||
"trends.trending_now": "المتداولة الآن",
|
||||
"ui.beforeunload": "سوف تفقد مسودتك إن تركت ماستدون.",
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
"account.block": "Bloquiar a @{name}",
|
||||
"account.block_domain": "Bloquiar el dominiu {domain}",
|
||||
"account.blocked": "Perfil bloquiáu",
|
||||
"account.browse_more_on_origin_server": "Restolar más nel perfil orixinal",
|
||||
"account.direct": "Mentar a @{name} per privao",
|
||||
"account.disable_notifications": "Dexar d'avisame cuando @{name} espublice artículos",
|
||||
"account.domain_blocked": "Dominiu bloquiáu",
|
||||
|
@ -270,8 +269,6 @@
|
|||
"lists.subheading": "Les tos llistes",
|
||||
"load_pending": "{count, plural, one {# elementu nuevu} other {# elementos nuevos}}",
|
||||
"media_gallery.toggle_visible": "{number, plural, one {Anubrir la imaxe} other {Anubrir les imáxenes}}",
|
||||
"name_and_others": "{name} y {count, plural, one {# más} other {# más}}",
|
||||
"name_and_others_with_link": "{name} y <a>{count, plural, one {# más} other {# más}}</a>",
|
||||
"navigation_bar.about": "Tocante a",
|
||||
"navigation_bar.blocks": "Perfiles bloquiaos",
|
||||
"navigation_bar.bookmarks": "Marcadores",
|
||||
|
@ -425,8 +422,6 @@
|
|||
"status.edited_x_times": "Editóse {count, plural, one {{count} vegada} other {{count} vegaes}}",
|
||||
"status.embed": "Empotrar",
|
||||
"status.filter": "Peñerar esti artículu",
|
||||
"status.filtered": "Peñeróse",
|
||||
"status.hide": "Anubrir l'artículu",
|
||||
"status.history.created": "{name} creó {date}",
|
||||
"status.history.edited": "{name} editó {date}",
|
||||
"status.load_more": "Cargar más",
|
||||
|
@ -449,9 +444,6 @@
|
|||
"status.report": "Informar de @{name}",
|
||||
"status.sensitive_warning": "Conteníu sensible",
|
||||
"status.share": "Compartir",
|
||||
"status.show_filter_reason": "Amosar de toes toes",
|
||||
"status.show_less": "Amosar menos",
|
||||
"status.show_more": "Amosar más",
|
||||
"status.show_original": "Amosar l'orixinal",
|
||||
"status.translate": "Traducir",
|
||||
"status.translated_from_with": "Tradúxose del {lang} con {provider}",
|
||||
|
@ -464,9 +456,6 @@
|
|||
"time_remaining.hours": "{number, plural, one {Queda # hora} other {Queden # hores}}",
|
||||
"time_remaining.minutes": "{number, plural, one {Queda # minutu} other {Queden # minutos}}",
|
||||
"time_remaining.seconds": "{number, plural, one {Queda # segundu} other {Queden # segundos}}",
|
||||
"timeline_hint.remote_resource_not_displayed": "Nun s'amuesa'l recursu «{resource}» d'otros sirvidores.",
|
||||
"timeline_hint.resources.followers": "Siguidores",
|
||||
"timeline_hint.resources.statuses": "Artículos antiguos",
|
||||
"trends.counter_by_accounts": "{count, plural, one {{counter} persona} other {{counter} persones}} {days, plural, one {nel últimu día} other {nos últimos {days} díes}}",
|
||||
"trends.trending_now": "En tendencia",
|
||||
"ui.beforeunload": "El borrador piérdese si coles de Mastodon.",
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
"about.not_available": "Дадзеная інфармацыя не дасяжная на гэтым серверы.",
|
||||
"about.powered_by": "Дэцэнтралізаваная сацыяльная сетка, створаная {mastodon}",
|
||||
"about.rules": "Правілы сервера",
|
||||
"account.account_note_header": "Асабістая нататка",
|
||||
"account.add_or_remove_from_list": "Дадаць або выдаліць са спісаў",
|
||||
"account.badges.bot": "Бот",
|
||||
"account.badges.group": "Група",
|
||||
|
@ -18,7 +19,6 @@
|
|||
"account.block_domain": "Заблакіраваць дамен {domain}",
|
||||
"account.block_short": "Заблакіраваць",
|
||||
"account.blocked": "Заблакіраваны",
|
||||
"account.browse_more_on_origin_server": "Глядзіце больш у арыгінальным профілі",
|
||||
"account.cancel_follow_request": "Скасаваць запыт на падпіску",
|
||||
"account.copy": "Скапіраваць спасылку на профіль",
|
||||
"account.direct": "Згадаць асабіста @{name}",
|
||||
|
@ -444,8 +444,6 @@
|
|||
"mute_modal.title": "Ігнараваць карыстальніка?",
|
||||
"mute_modal.you_wont_see_mentions": "Вы не ўбачыце паведамленняў са згадваннем карыстальніка.",
|
||||
"mute_modal.you_wont_see_posts": "Карыстальнік па-ранейшаму будзе бачыць вашыя паведамленні, але вы не будзеце паведамленні карыстальніка.",
|
||||
"name_and_others": "{name} і {count, plural, one {# іншы} many {# іншых} other {# іншых}}",
|
||||
"name_and_others_with_link": "{name} і <a>{count, plural, one {# іншы} many {# іншых} other {# іншых}}</a>",
|
||||
"navigation_bar.about": "Пра нас",
|
||||
"navigation_bar.advanced_interface": "Адкрыць у пашыраным вэб-інтэрфейсе",
|
||||
"navigation_bar.blocks": "Заблакіраваныя карыстальнікі",
|
||||
|
@ -481,6 +479,11 @@
|
|||
"notification.favourite": "Ваш допіс упадабаны {name}",
|
||||
"notification.follow": "{name} падпісаўся на вас",
|
||||
"notification.follow_request": "{name} адправіў запыт на падпіску",
|
||||
"notification.label.mention": "Згадванне",
|
||||
"notification.label.private_mention": "Асабістае згадванне",
|
||||
"notification.label.private_reply": "Асабісты адказ",
|
||||
"notification.label.reply": "Адказ",
|
||||
"notification.mention": "Згадванне",
|
||||
"notification.moderation-warning.learn_more": "Даведацца больш",
|
||||
"notification.moderation_warning": "Вы атрымалі папярэджанне аб мадэрацыі",
|
||||
"notification.moderation_warning.action_delete_statuses": "Некаторыя вашыя допісы былі выдаленыя.",
|
||||
|
@ -506,6 +509,7 @@
|
|||
"notification_requests.minimize_banner": "Згарнуць банер адфільтраваных апавяшчэнняў",
|
||||
"notification_requests.notifications_from": "Апавяшчэнні ад {name}",
|
||||
"notification_requests.title": "Адфільтраваныя апавяшчэнні",
|
||||
"notification_requests.view": "Прагляд апавяшчэнняў",
|
||||
"notifications.clear": "Ачысціць апавяшчэнні",
|
||||
"notifications.clear_confirmation": "Вы ўпэўнены, што жадаеце назаўсёды сцерці ўсё паведамленні?",
|
||||
"notifications.clear_title": "Ачысціць апавяшчэнні?",
|
||||
|
@ -542,6 +546,10 @@
|
|||
"notifications.permission_denied": "Апавяшчэнні на працоўным стале недаступныя з-за папярэдне адхіленага запыта праў браўзера",
|
||||
"notifications.permission_denied_alert": "Апавяшчэнні на працоўным стале не могуць быць уключаныя, з-за таго што запыт браўзера быў адхілены",
|
||||
"notifications.permission_required": "Апавяшчэнні на працоўным стале недаступныя, з-за таго што неабходны дазвол не быў дадзены.",
|
||||
"notifications.policy.accept": "Прыняць",
|
||||
"notifications.policy.accept_hint": "Паказваць у апавяшчэннях",
|
||||
"notifications.policy.drop": "Iгнараваць",
|
||||
"notifications.policy.filter": "Фільтраваць",
|
||||
"notifications.policy.filter_new_accounts.hint": "Створаныя на працягу {days, plural, one {апошняга # дня} few {апошніх # дзён} many {апошніх # дзён} other {апошняй # дня}}",
|
||||
"notifications.policy.filter_new_accounts_title": "Новыя ўліковыя запісы",
|
||||
"notifications.policy.filter_not_followers_hint": "Уключаючы людзей, якія падпісаны на вас менш, чым {days, plural, one {# дзень} few {# дні} many {# дзён} other {# дня}}",
|
||||
|
@ -550,6 +558,7 @@
|
|||
"notifications.policy.filter_not_following_title": "Людзі, на якіх вы не падпісаны",
|
||||
"notifications.policy.filter_private_mentions_hint": "Фільтруецца за выключэннем адказу на вашае згадванне ці калі вы падпісаны на адпраўніка",
|
||||
"notifications.policy.filter_private_mentions_title": "Непажаданыя асаблівыя згадванні",
|
||||
"notifications.policy.title": "Наладзіць апавяшчэнні ад…",
|
||||
"notifications_permission_banner.enable": "Уключыць апавяшчэнні на працоўным стале",
|
||||
"notifications_permission_banner.how_to_control": "Каб атрымліваць апавяшчэнні, калі Mastodon не адкрыты, уключыце апавяшчэнні працоўнага стала. Вы зможаце дакладна кантраляваць, якія падзеі будуць ствараць апавяшчэнні з дапамогай {icon} кнопкі, як толькі яны будуць уключаны.",
|
||||
"notifications_permission_banner.title": "Не прапусціце нічога",
|
||||
|
@ -736,8 +745,6 @@
|
|||
"status.favourite": "Упадабанае",
|
||||
"status.favourites": "{count, plural, one {# упадабанае} few {# упадабаныя} many {# упадабаных} other {# упадабанага}}",
|
||||
"status.filter": "Фільтраваць гэты допіс",
|
||||
"status.filtered": "Адфільтравана",
|
||||
"status.hide": "Схаваць допіс",
|
||||
"status.history.created": "Створана {name} {date}",
|
||||
"status.history.edited": "Адрэдагавана {name} {date}",
|
||||
"status.load_more": "Загрузіць яшчэ",
|
||||
|
@ -765,10 +772,7 @@
|
|||
"status.report": "Паскардзіцца на @{name}",
|
||||
"status.sensitive_warning": "Уражвальны змест",
|
||||
"status.share": "Абагуліць",
|
||||
"status.show_filter_reason": "Усё адно паказаць",
|
||||
"status.show_less": "Паказаць меньш",
|
||||
"status.show_less_all": "Згарнуць усё",
|
||||
"status.show_more": "Паказаць болей",
|
||||
"status.show_more_all": "Разгарнуць усё",
|
||||
"status.show_original": "Паказаць арыгінал",
|
||||
"status.title.with_attachments": "{user} апублікаваў {attachmentCount, plural, one {далучэнне} few {{attachmentCount} далучэнні} many {{attachmentCount} далучэнняў} other {{attachmentCount} далучэння}}",
|
||||
|
@ -787,10 +791,6 @@
|
|||
"time_remaining.minutes": "{number, plural, one {засталася # хвіліна} few {засталося # хвіліны} many {засталося # хвілін} other {засталося # хвіліны}}",
|
||||
"time_remaining.moments": "Засталося некалькі секунд",
|
||||
"time_remaining.seconds": "{number, plural, one {засталася # секунда} few {засталося # секунды} many {засталося # секунд} other {засталося # секунды}}",
|
||||
"timeline_hint.remote_resource_not_displayed": "{resource} з іншых сервераў не адлюстроўваецца.",
|
||||
"timeline_hint.resources.followers": "Падпісчыкі",
|
||||
"timeline_hint.resources.follows": "Падпіскі",
|
||||
"timeline_hint.resources.statuses": "Старыя допісы",
|
||||
"trends.counter_by_accounts": "{count, plural, one {{counter} чалавек} few {{counter} чалавекі} many {{counter} людзей} other {{counter} чалавек}} за {days, plural, one {{days} апошні дзень} few {{days} апошнія дні} many {{days} апошніх дзён} other {{days} апошніх дзён}}",
|
||||
"trends.trending_now": "Актуальнае",
|
||||
"ui.beforeunload": "Ваш чарнавік знішчыцца калі вы пакінеце Mastodon.",
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
"account.block_domain": "Блокиране на домейн {domain}",
|
||||
"account.block_short": "Блокиране",
|
||||
"account.blocked": "Блокирани",
|
||||
"account.browse_more_on_origin_server": "Разглеждане на още в оригиналния профил",
|
||||
"account.cancel_follow_request": "Оттегляне на заявката за последване",
|
||||
"account.copy": "Копиране на връзка към профила",
|
||||
"account.direct": "Частно споменаване на @{name}",
|
||||
|
@ -445,8 +444,6 @@
|
|||
"mute_modal.title": "Заглушавате ли потребител?",
|
||||
"mute_modal.you_wont_see_mentions": "Няма да виждате споменаващите ги публикации.",
|
||||
"mute_modal.you_wont_see_posts": "Още могат да виждат публикациите ви, но вие техните не.",
|
||||
"name_and_others": "{name} и {count, plural, one {# друг} other {# други}}",
|
||||
"name_and_others_with_link": "{name} и <a>{count, plural, one {# друг} other {# други}}</a>",
|
||||
"navigation_bar.about": "Относно",
|
||||
"navigation_bar.advanced_interface": "Отваряне в разширен уебинтерфейс",
|
||||
"navigation_bar.blocks": "Блокирани потребители",
|
||||
|
@ -505,8 +502,8 @@
|
|||
"notification.update": "{name} промени публикация",
|
||||
"notification_requests.accept": "Приемам",
|
||||
"notification_requests.dismiss": "Отхвърлям",
|
||||
"notification_requests.enter_selection_mode": "Изберете",
|
||||
"notification_requests.exit_selection_mode": "Отказ",
|
||||
"notification_requests.edit_selection": "Редактиране",
|
||||
"notification_requests.exit_selection": "Готово",
|
||||
"notification_requests.explainer_for_limited_account": "Известията от този акаунт са прецедени, защото акаунтът е ограничен от модератор.",
|
||||
"notification_requests.explainer_for_limited_remote_account": "Известията от този акаунт са прецедени, защото акаунтът или сървърът му е ограничен от модератор.",
|
||||
"notification_requests.maximize": "Максимизиране",
|
||||
|
@ -749,8 +746,6 @@
|
|||
"status.favourite": "Любимо",
|
||||
"status.favourites": "{count, plural, one {любимо} other {любими}}",
|
||||
"status.filter": "Филтриране на публ.",
|
||||
"status.filtered": "Филтрирано",
|
||||
"status.hide": "Скриване на публ.",
|
||||
"status.history.created": "{name} създаде {date}",
|
||||
"status.history.edited": "{name} редактира {date}",
|
||||
"status.load_more": "Зареждане на още",
|
||||
|
@ -778,10 +773,7 @@
|
|||
"status.report": "Докладване на @{name}",
|
||||
"status.sensitive_warning": "Деликатно съдържание",
|
||||
"status.share": "Споделяне",
|
||||
"status.show_filter_reason": "Покажи въпреки това",
|
||||
"status.show_less": "Показване на по-малко",
|
||||
"status.show_less_all": "Показване на по-малко за всички",
|
||||
"status.show_more": "Показване на повече",
|
||||
"status.show_more_all": "Показване на повече за всички",
|
||||
"status.show_original": "Показване на първообраза",
|
||||
"status.title.with_attachments": "{user} публикува {attachmentCount, plural, one {прикачване} other {{attachmentCount} прикачвания}}",
|
||||
|
@ -800,10 +792,6 @@
|
|||
"time_remaining.minutes": "{number, plural, one {остава # минута} other {остават # минути}}",
|
||||
"time_remaining.moments": "Оставащи моменти",
|
||||
"time_remaining.seconds": "{number, plural, one {# секунда} other {# секунди}} остава",
|
||||
"timeline_hint.remote_resource_not_displayed": "{resource} от други сървъри не се показват.",
|
||||
"timeline_hint.resources.followers": "Последователи",
|
||||
"timeline_hint.resources.follows": "Последвани",
|
||||
"timeline_hint.resources.statuses": "По-стари публикации",
|
||||
"trends.counter_by_accounts": "{count, plural, one {{counter} човек} other {{counter} души}} {days, plural, one {за последния {days} ден} other {за последните {days} дни}}",
|
||||
"trends.trending_now": "Налагащи се сега",
|
||||
"ui.beforeunload": "Черновата ви ще се загуби, излизайки от Mastodon.",
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue