Compare commits

...
This repository has been archived on 2023-07-01. You can view files and clone it, but cannot push or open issues or pull requests.

340 Commits

Author SHA1 Message Date
Jill b870ecc2ef Merge pull request 'main' (#4) from remote/mastodon:main into main
Reviewed-on: #4
2022-12-03 14:59:04 +01:00
kibigo! 2cabc5d188
Use a tree‐based approach for advanced text formatting (#1907)
* Use a tree‐based approach for adv. text formatting

Sanitizing HTML/Markdown means parsing the content into an HTML tree
under‐the‐hood anyway, and it is more accurate to do mention/hashtag
replacement on the text nodes in that tree than it is to try to hack it
in with regexes et cetera.

This undoes the overrides of `#entities` and `#rewrite` on
`AdvancedTextFormatter` but also stops using them, instead keeping
track of the parsed Nokogiri tree itself and using that in the `#to_s`
method.

Internally, this tree uses `<mastodon-entity>` nodes to keep track of
hashtags, links, and mentions. Sanitization is moved to the beginning,
so it should be known that these do not appear in the input.

* Also disallow entities inside of `<code>`

I think this is generally expected behaviour, and people are annoyed
when their code gets turned into links/hashtags/mentions.

* Minor cleanup to AdvancedTextFormatter

* Change AdvancedTextFormatter to rewrite entities in one pass and sanitize at the end

Also, minor refactoring to better match how other formatters are organized.

* Add some tests

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2022-12-02 10:29:42 +01:00
Claire 4ac6601476
Port navigation bar from upstream (#1986)
Fixes #1977
2022-12-01 20:06:08 +01:00
Claire 105d9743ae
Merge pull request #1984 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-12-01 11:35:13 +01:00
Claire fd6f9bf7a7 Merge branch 'main' into glitch-soc/merge-upstream 2022-12-01 11:08:52 +01:00
Nick Schonning 491ab8de89
Fix GitHub form label type (#21833) 2022-12-01 10:49:25 +01:00
Claire 68d1df8bc3
Fix some performance issues with /admin/instances (#21907)
/admin/instances?availability=failing remains wholly unefficient
2022-12-01 10:32:10 +01:00
Claire fc0e11abdb
Merge pull request #1983 from ClearlyClaire/glitch-soc/features/translation
Port “Translate” feature from upstream
2022-11-30 18:12:53 +01:00
Claire e64909d8bf Move translate button above media attachments/preview cards 2022-11-30 15:03:47 +01:00
Claire afdd75e1f9 Fix translate button not being shown when the toot has no Content Warning 2022-11-30 14:44:06 +01:00
Claire 620b079a78 Fix inconsistent with “translate” button padding 2022-11-30 13:53:38 +01:00
Eugen Rochko f7684a31fe [Glitch] Change design of translations in web UI
Port fcca781aae to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-30 13:53:38 +01:00
Claire 44c0ba445a [Glitch] Add mention of the translation provider when translating a post
Port 30453fab80 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-30 13:53:38 +01:00
Claire 47bd934061 [Glitch] Change “Translate” button to only show up when a translation backend is configured
Port 8046cf34d6 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-30 13:53:38 +01:00
Eugen Rochko e8d0a1b320 [Glitch] Fix showing translate button when status has no language in web UI
Port 4adb267f91 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-30 13:53:38 +01:00
Eugen Rochko 5e143db13a [Glitch] Don't show translate button to logged-out users
Port part of e623c302d5 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-30 13:53:38 +01:00
Eugen Rochko b5ee275ed9 [Glitch] Fix translations not being formatted, other issues in web UI
Port 55a2e9b5be to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-30 13:53:38 +01:00
Eugen Rochko a3052dad04 [Glitch] Add user content translations with configurable backends
Port 0d6b878808 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-30 13:53:38 +01:00
Claire f3ce9653eb
Merge pull request #1982 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-30 11:13:58 +01:00
Claire fe111a8bad Merge branch 'main' into glitch-soc/merge-upstream 2022-11-30 10:29:19 +01:00
mhkhung 1122697b37
3.0.5 version of cimg/ruby:3.0-node upgraded to node 18 (#21873)
Node 18 caused build to fail
2022-11-30 09:56:27 +01:00
Claire 2d4d99f135
Fix expanded statuses not always being scrolled into view (#21797) 2022-11-28 16:42:04 +01:00
Claire 1a7aa37b60
Merge pull request #1976 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-28 14:17:00 +01:00
Connor Shea f51990bd62 [Glitch] Make the 'Trending now' header a link to Explore.
Port cec1e902e0 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-28 11:59:00 +01:00
Claire 98c5ca1037 [Glitch] Fix infinite loading instead of soft 404 for non-existing remote accounts
Port 3ffaa966b0 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-28 11:55:56 +01:00
James Adney 2815ac4155 [Glitch] fix gif autoplay on iOS
Port c0dcf15d1e to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-28 11:55:09 +01:00
Claire c0bf90ac19 [Glitch] Fix “Share @{name}'s profile” profile menu item
Port fe421257e5 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-28 11:54:00 +01:00
kedama 32b43a96a7 [Glitch] Fix status mismatch of sensitive check
Port 14e2354eea to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-28 11:53:21 +01:00
Claire a2e7997592 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `README.md`:
  Our README is completely different.
  Discarded upstream changes.
2022-11-28 11:33:34 +01:00
Connor Shea cec1e902e0
Make the 'Trending now' header a link to Explore. (#21759)
This keeps the same design that exists currently, but makes "Trending
now" into a link to the Hashtags section of "Explore".

Resolves #21758.
2022-11-27 23:49:32 +01:00
Claire 3ffaa966b0
Fix infinite loading instead of soft 404 for non-existing remote accounts (#21303)
Fixes #21278, #21021
2022-11-27 20:48:12 +01:00
Claire 57b893d505
Fix spaces not being stripped in admin account search (#21324)
Fixes #21058

Regression from #18641
2022-11-27 20:47:29 +01:00
James Adney c0dcf15d1e
fix gif autoplay on iOS (#21422) 2022-11-27 20:46:23 +01:00
Bramus! e617ee7fd9
Add user profile OG tag on status page (#21423) 2022-11-27 20:45:28 +01:00
Claire f4f2b062ec
Remove LDSignature on actor Delete activities (#21466)
They are currently not used for anything and represent more than half of the
payload size.
2022-11-27 20:43:24 +01:00
Claire fe421257e5
Fix “Share @{name}'s profile” profile menu item (#21490) 2022-11-27 20:42:17 +01:00
Claire 098ced7420
Remove support for Ruby 2.6 (#21477)
As pointed out by https://github.com/mastodon/mastodon/pull/21297#discussion_r1028372193
at least one of our dependencies already dropped support for Ruby 2.6, and we
had removed Ruby 2.6 tests from the CI over a year ago (#16861).

So stop advertising Ruby 2.6 support, bump targeted version, and drop some
compatibility code.
2022-11-27 20:41:39 +01:00
Kaspar V 47f0d7021e
refactor(vacuum statuses): reduce amount of db queries and load for each query - improve performance (#21487)
* refactor(statuses_vacuum): remove dead code - unused

Method is not called inside class and private.
Clean up dead code.

* refactor(statuses_vacuum): make retention_period present test explicit

This private method only hides functionality.
It is best practice to be as explicit as possible.

* refactor(statuses_vacuum): improve query performance

- fix statuses_scope having sub-select for Account.remote scope by
  `joins(:account).merge(Account.remote)`
- fix statuses_scope unnecessary use of `Status.arel_table[:id].lt`
  because it is inexplicit, bad practice and even slower than normal
  `.where('statuses.id < ?'`
- fix statuses_scope remove select(:id, :visibility) for having reusable
  active record query batches (no re queries)
- fix vacuum_statuses! to use in_batches instead of find_in_batches,
  because in_batches delivers a full blown active record query result,
  in stead of an array - no requeries necessary
- send(:unlink_from_conversations) not to perform another db query, but
  reuse the in_batches result instead.
- remove now obsolete remove_from_account_conversations method
- remove_from_search_index uses array of ids, instead of mapping
  the ids from an array - this should be more efficient
- use the in_batches scope to call delete_all, instead of running
  another db query for this - because it is again more efficient
- add TODO comment for calling models private method with send

* refactor(status): simplify unlink_from_conversations

- add `has_many through:` relation mentioned_accounts
- use model scope local instead of method call `Status#local?`
- more readable add account to inbox_owners when account.local?

* refactor(status): searchable_by way less sub selects

These queries all included a sub-select. Doing the same with a joins
should be more efficient.
Since this method does 5 such queries, this should be significant,
since it technically halves the query count.

This is how it was:

```ruby
[3] pry(main)> Status.first.mentions.where(account: Account.local, silent: false).explain
  Status Load (1.6ms)  SELECT "statuses".* FROM "statuses" WHERE "statuses"."deleted_at" IS NULL ORDER BY "statuses"."id" DESC LIMIT $1  [["LIMIT", 1]]
  Mention Load (1.5ms)  SELECT "mentions".* FROM "mentions" WHERE "mentions"."status_id" = $1 AND "mentions"."account_id" IN (SELECT "accounts"."id" FROM "accounts" WHERE "accounts"."domain" IS NULL) AND "mentions"."silent" = $2  [["status_id", 109382923142288414], ["silent", false]]
=> EXPLAIN for: SELECT "mentions".* FROM "mentions" WHERE "mentions"."status_id" = $1 AND "mentions"."account_id" IN (SELECT "accounts"."id" FROM "accounts" WHERE "accounts"."domain" IS NULL) AND "mentions"."silent" = $2 [["status_id", 109382923142288414], ["silent", false]]
                                                    QUERY PLAN
------------------------------------------------------------------------------------------------------------------
 Nested Loop  (cost=0.15..23.08 rows=1 width=41)
   ->  Seq Scan on accounts  (cost=0.00..10.90 rows=1 width=8)
         Filter: (domain IS NULL)
   ->  Index Scan using index_mentions_on_account_id_and_status_id on mentions  (cost=0.15..8.17 rows=1 width=41)
         Index Cond: ((account_id = accounts.id) AND (status_id = '109382923142288414'::bigint))
         Filter: (NOT silent)
(6 rows)
```

This is how it is with this change:

```ruby
[4] pry(main)> Status.first.mentions.joins(:account).merge(Account.local).active.explain
  Status Load (1.7ms)  SELECT "statuses".* FROM "statuses" WHERE "statuses"."deleted_at" IS NULL ORDER BY "statuses"."id" DESC LIMIT $1  [["LIMIT", 1]]
  Mention Load (0.7ms)  SELECT "mentions".* FROM "mentions" INNER JOIN "accounts" ON "accounts"."id" = "mentions"."account_id" WHERE "mentions"."status_id" = $1 AND "accounts"."domain" IS NULL AND "mentions"."silent" = $2  [["status_id", 109382923142288414], ["silent", false]]
=> EXPLAIN for: SELECT "mentions".* FROM "mentions" INNER JOIN "accounts" ON "accounts"."id" = "mentions"."account_id" WHERE "mentions"."status_id" = $1 AND "accounts"."domain" IS NULL AND "mentions"."silent" = $2 [["status_id", 109382923142288414], ["silent", false]]
                                                    QUERY PLAN
------------------------------------------------------------------------------------------------------------------
 Nested Loop  (cost=0.15..23.08 rows=1 width=41)
   ->  Seq Scan on accounts  (cost=0.00..10.90 rows=1 width=8)
         Filter: (domain IS NULL)
   ->  Index Scan using index_mentions_on_account_id_and_status_id on mentions  (cost=0.15..8.17 rows=1 width=41)
         Index Cond: ((account_id = accounts.id) AND (status_id = '109382923142288414'::bigint))
         Filter: (NOT silent)
(6 rows)
```
2022-11-27 20:41:18 +01:00
Claire 625216d8e1
Fix attachments of edited statuses not being fetched (#21565)
* Fix attachments of edited statuses not being fetched

* Fix tests
2022-11-27 20:39:05 +01:00
Claire d587a268fd
Add logging for Rails cache timeouts (#21667)
* Reduce redis cache store connect timeout from default 20 seconds to 5 seconds

* Log cache store errors
2022-11-27 20:37:37 +01:00
kedama 14e2354eea
Fix status mismatch of sensitive check (#21724) 2022-11-27 20:36:21 +01:00
afontenot f17fc5742e
Clear voter count when poll is reset (#21700)
When a poll is edited, we reset the poll and remove all previous
votes. However, prior to this commit, the voter count on the poll
was not reset. This leads to incorrect percentages being shown in
poll results.

Fixes #21696
2022-11-26 23:08:25 +01:00
dependabot[bot] 95b24c51ec
Bump sass from 1.55.0 to 1.56.1 (#20681)
Bumps [sass](https://github.com/sass/dart-sass) from 1.55.0 to 1.56.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.55.0...1.56.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 14:07:52 +09:00
dependabot[bot] 4ed2b3590b
Bump webpack-bundle-analyzer from 4.6.1 to 4.7.0 (#19604)
Bumps [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) from 4.6.1 to 4.7.0.
- [Release notes](https://github.com/webpack-contrib/webpack-bundle-analyzer/releases)
- [Changelog](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/webpack-bundle-analyzer/compare/v4.6.1...v4.7.0)

---
updated-dependencies:
- dependency-name: webpack-bundle-analyzer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 14:07:12 +09:00
dependabot[bot] 593a652090
Bump babel-loader from 8.2.5 to 8.3.0 (#20059)
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.2.5 to 8.3.0.
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.2.5...v8.3.0)

---
updated-dependencies:
- dependency-name: babel-loader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 13:52:40 +09:00
dependabot[bot] 00466763e2
Bump capybara from 3.37.1 to 3.38.0 (#20036)
Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.37.1 to 3.38.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](https://github.com/teamcapybara/capybara/compare/3.37.1...3.38.0)

---
updated-dependencies:
- dependency-name: capybara
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 13:51:53 +09:00
dependabot[bot] 7b86e3a6ce
Bump @babel/runtime from 7.19.4 to 7.20.1 (#20038)
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.19.4 to 7.20.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.20.1/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 13:50:07 +09:00
dependabot[bot] dc7a49ddf6
Bump @babel/preset-env from 7.19.4 to 7.20.2 (#20037)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.19.4 to 7.20.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.20.2/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 13:49:48 +09:00
dependabot[bot] 08a50d3a71
Bump @babel/plugin-proposal-decorators from 7.19.6 to 7.20.2 (#20061)
Bumps [@babel/plugin-proposal-decorators](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-decorators) from 7.19.6 to 7.20.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.20.2/packages/babel-plugin-proposal-decorators)

---
updated-dependencies:
- dependency-name: "@babel/plugin-proposal-decorators"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 13:43:00 +09:00
dependabot[bot] 99428cba55
Bump @babel/core from 7.19.6 to 7.20.2 (#20051)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.19.6 to 7.20.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.20.2/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 13:35:26 +09:00
dependabot[bot] 86cbee77d6
Bump brakeman from 5.3.1 to 5.4.0 (#21351)
Bumps [brakeman](https://github.com/presidentbeef/brakeman) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/presidentbeef/brakeman/releases)
- [Changelog](https://github.com/presidentbeef/brakeman/blob/main/CHANGES.md)
- [Commits](https://github.com/presidentbeef/brakeman/compare/v5.3.1...v5.4.0)

---
updated-dependencies:
- dependency-name: brakeman
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 13:34:19 +09:00
dependabot[bot] fefda70ee0
Bump bootsnap from 1.13.0 to 1.14.0 (#21344)
Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/Shopify/bootsnap/releases)
- [Changelog](https://github.com/Shopify/bootsnap/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Shopify/bootsnap/compare/v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: bootsnap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 13:25:53 +09:00
Skyler Hawthorne 5b2ff8d32d
fix media uploads with ffmpeg 5 (#21191) 2022-11-25 16:20:47 +01:00
Claire 6517b7b9f0
Fix pillbar buttons in light theme (#1972)
* Simplify pillbar button design and make it more consistent with toggles

* Fix pillbar buttons in light theme

Fixes #1970
2022-11-25 13:54:43 +01:00
Eugen Rochko 3d906d8e62
New Crowdin updates (#20942)
* New translations en.yml (Belarusian)

* New translations simple_form.en.yml (Belarusian)

* New translations doorkeeper.en.yml (Belarusian)

* New translations devise.en.yml (Finnish)

* New translations en.json (Norwegian)

* New translations en.json (Serbian (Cyrillic))

* New translations en.yml (Esperanto)

* New translations en.yml (Scots)

* New translations en.yml (Italian)

* New translations en.json (Welsh)

* New translations en.yml (Welsh)

* New translations en.yml (Esperanto)

* New translations en.yml (Belarusian)

* New translations simple_form.en.yml (Belarusian)

* New translations en.yml (German)

* New translations simple_form.en.yml (Belarusian)

* New translations en.yml (Belarusian)

* New translations en.json (Belarusian)

* New translations en.yml (Faroese)

* New translations simple_form.en.yml (Estonian)

* New translations en.json (German)

* New translations simple_form.en.yml (German)

* New translations en.yml (Esperanto)

* New translations en.yml (Welsh)

* New translations en.yml (Estonian)

* New translations en.json (Estonian)

* New translations en.yml (Italian)

* New translations doorkeeper.en.yml (Belarusian)

* New translations en.yml (German)

* New translations en.json (Estonian)

* New translations en.yml (Estonian)

* New translations en.yml (Welsh)

* New translations simple_form.en.yml (German)

* New translations simple_form.en.yml (Estonian)

* New translations doorkeeper.en.yml (Welsh)

* New translations activerecord.en.yml (Welsh)

* New translations devise.en.yml (Welsh)

* New translations en.yml (Faroese)

* New translations en.yml (Scots)

* New translations simple_form.en.yml (Belarusian)

* New translations doorkeeper.en.yml (Belarusian)

* New translations en.yml (German)

* New translations en.json (Hungarian)

* New translations en.json (Bengali)

* New translations en.yml (Estonian)

* New translations simple_form.en.yml (German)

* New translations simple_form.en.yml (Estonian)

* New translations simple_form.en.yml (Welsh)

* New translations en.yml (Scots)

* New translations doorkeeper.en.yml (German)

* New translations en.yml (Russian)

* New translations en.yml (Estonian)

* New translations en.json (Belarusian)

* New translations simple_form.en.yml (Belarusian)

* New translations en.json (Indonesian)

* New translations en.yml (Indonesian)

* New translations simple_form.en.yml (Serbian (Latin))

* New translations en.json (Belarusian)

* New translations en.yml (Belarusian)

* New translations devise.en.yml (Serbian (Latin))

* New translations en.yml (Belarusian)

* New translations simple_form.en.yml (Belarusian)

* New translations doorkeeper.en.yml (Belarusian)

* New translations en.yml (German)

* New translations en.json (German)

* New translations en.yml (Portuguese, Brazilian)

* New translations simple_form.en.yml (German)

* New translations doorkeeper.en.yml (German)

* New translations devise.en.yml (German)

* New translations en.yml (Faroese)

* New translations simple_form.en.yml (Faroese)

* New translations en.yml (Belarusian)

* New translations doorkeeper.en.yml (Belarusian)

* New translations en.json (Spanish)

* New translations en.json (Welsh)

* New translations en.yml (Welsh)

* New translations doorkeeper.en.yml (Welsh)

* New translations en.yml (Belarusian)

* New translations en.json (German)

* New translations en.yml (Welsh)

* New translations en.json (Asturian)

* New translations simple_form.en.yml (German)

* New translations en.yml (Faroese)

* New translations en.yml (Belarusian)

* New translations en.json (Asturian)

* New translations en.yml (Asturian)

* New translations en.json (French, Quebec)

* New translations en.json (Faroese)

* New translations en.yml (Faroese)

* New translations en.json (Belarusian)

* New translations en.yml (Belarusian)

* New translations devise.en.yml (Asturian)

* New translations en.json (Spanish)

* New translations en.json (French, Quebec)

* New translations en.yml (Faroese)

* New translations en.yml (Scots)

* New translations en.json (Belarusian)

* New translations en.yml (Belarusian)

* New translations en.json (French, Quebec)

* New translations en.yml (Scots)

* New translations en.yml (Belarusian)

* New translations en.yml (Asturian)

* New translations simple_form.en.yml (Asturian)

* New translations doorkeeper.en.yml (Asturian)

* New translations en.json (Asturian)

* New translations en.yml (Asturian)

* New translations simple_form.en.yml (Asturian)

* New translations en.json (Asturian)

* New translations en.yml (Faroese)

* New translations en.yml (Faroese)

* New translations simple_form.en.yml (Faroese)

* New translations simple_form.en.yml (Belarusian)

* New translations devise.en.yml (Serbian (Latin))

* New translations en.yml (Japanese)

* New translations en.json (Serbian (Latin))

* New translations en.yml (Faroese)

* New translations en.yml (Belarusian)

* New translations simple_form.en.yml (Belarusian)

* New translations en.yml (German)

* New translations en.json (German)

* New translations en.yml (Estonian)

* New translations en.json (Estonian)

* New translations en.yml (Estonian)

* New translations simple_form.en.yml (Estonian)

* New translations devise.en.yml (Estonian)

* New translations en.yml (German)

* New translations en.json (German)

* New translations en.yml (Estonian)

* New translations simple_form.en.yml (German)

* New translations simple_form.en.yml (Estonian)

* New translations devise.en.yml (Estonian)

* New translations en.yml (German)

* New translations en.json (German)

* New translations en.yml (Catalan)

* New translations en.json (Estonian)

* New translations en.yml (Estonian)

* New translations simple_form.en.yml (Catalan)

* New translations doorkeeper.en.yml (Catalan)

* New translations simple_form.en.yml (German)

* New translations simple_form.en.yml (Estonian)

* New translations activerecord.en.yml (Serbian (Cyrillic))

* New translations en.yml (Faroese)

* New translations simple_form.en.yml (Faroese)

* New translations en.yml (Scots)

* New translations doorkeeper.en.yml (Serbian (Cyrillic))

* New translations en.yml (Belarusian)

* New translations devise.en.yml (German)

* New translations en.json (Estonian)

* New translations en.yml (Estonian)

* New translations simple_form.en.yml (Estonian)

* New translations doorkeeper.en.yml (Serbian (Cyrillic))

* New translations doorkeeper.en.yml (Estonian)

* New translations en.yml (Romanian)

* New translations en.yml (Estonian)

* New translations simple_form.en.yml (Estonian)

* New translations en.yml (Scots)

* New translations doorkeeper.en.yml (Estonian)

* New translations simple_form.en.yml (Bulgarian)

* New translations simple_form.en.yml (German)

* New translations activerecord.en.yml (Serbian (Cyrillic))

* New translations en.yml (Scots)

* New translations en.yml (Bulgarian)

* New translations simple_form.en.yml (Bulgarian)

* New translations en.yml (Asturian)

* New translations devise.en.yml (Asturian)

* New translations en.yml (Scots)

* New translations simple_form.en.yml (Hebrew)

* New translations en.yml (Belarusian)

* New translations en.yml (Belarusian)

* New translations en.yml (Belarusian)

* New translations en.yml (Scots)

* New translations en.yml (Belarusian)

* New translations en.json (Ukrainian)

* New translations doorkeeper.en.yml (Ukrainian)

* New translations en.yml (Scots)

* New translations doorkeeper.en.yml (Serbian (Cyrillic))

* New translations en.yml (Scots)

* New translations doorkeeper.en.yml (Serbian (Cyrillic))

* New translations en.yml (Czech)

* New translations en.json (Czech)

* New translations en.yml (Bulgarian)

* New translations en.json (Catalan)

* New translations en.yml (Catalan)

* New translations en.yml (Scots)

* New translations doorkeeper.en.yml (Serbian (Cyrillic))

* New translations en.json (Belarusian)

* New translations simple_form.en.yml (Belarusian)

* New translations en.yml (Ukrainian)

* New translations simple_form.en.yml (Dutch)

* New translations en.json (Ukrainian)

* New translations en.yml (Esperanto)

* New translations simple_form.en.yml (Ukrainian)

* New translations simple_form.en.yml (Esperanto)

* New translations en.yml (Faroese)

* New translations en.yml (Faroese)

* New translations en.yml (Scots)

* New translations en.yml (Scots)

* New translations en.yml (Belarusian)

* New translations en.yml (Belarusian)

* New translations en.json (Czech)

* New translations en.json (Malayalam)

* New translations en.yml (Scots)

* New translations en.json (Czech)

* New translations en.json (Hindi)

* New translations en.json (Malayalam)

* New translations activerecord.en.yml (Serbian (Latin))

* New translations en.yml (Scots)

* New translations doorkeeper.en.yml (Serbian (Latin))

* New translations en.json (Czech)

* New translations en.json (Serbian (Cyrillic))

* New translations simple_form.en.yml (Asturian)

* New translations en.yml (Scots)

* New translations en.json (Czech)

* New translations en.json (Frisian)

* New translations en.json (Serbian (Cyrillic))

* New translations en.yml (Scots)

* New translations en.yml (Belarusian)

* New translations devise.en.yml (Frisian)

* New translations en.json (Czech)

* New translations en.json (Serbian (Cyrillic))

* New translations en.json (Estonian)

* New translations en.yml (Estonian)

* New translations en.yml (Faroese)

* New translations en.yml (Belarusian)

* New translations en.yml (Ukrainian)

* New translations en.yml (Bulgarian)

* New translations en.json (Italian)

* New translations en.json (Ukrainian)

* New translations en.json (Spanish, Mexico)

* New translations en.json (Estonian)

* New translations en.yml (Estonian)

* New translations simple_form.en.yml (Bulgarian)

* New translations simple_form.en.yml (Estonian)

* New translations en.yml (Faroese)

* New translations en.yml (Belarusian)

* New translations simple_form.en.yml (Belarusian)

* New translations devise.en.yml (Ukrainian)

* New translations en.yml (Ukrainian)

* New translations en.json (Italian)

* New translations en.json (Ukrainian)

* New translations en.json (Spanish, Mexico)

* New translations simple_form.en.yml (Ukrainian)

* New translations activerecord.en.yml (Italian)

* New translations en.yml (Belarusian)

* New translations simple_form.en.yml (Belarusian)

* Run `yarn manage:translations`

* Run `bundle exec i18n-tasks normalize`

* Add `app/javascript/mastodon/locales/whitelist_be.json`

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-11-25 09:40:05 +09:00
Chris Funderburg 8acf18a960
Fix the command to create the admin user (#19827)
* fix the command to create the admin user

* change Admin to Owner
2022-11-24 21:32:03 +01:00
Sheogorath cddcafec31
Helm: Major refactoring regarding Deployments, Environment variables and more (#20733)
* fix(chart): Remove non-functional Horizontal Pod Autoscaler

The Horizontal Pod Autoscaler (HPA) refers to a Deployment that
doesn't exist and therefore can not work. As a result it's
pointless to carry it around in this chart and give the wrong
impression it could work. This patch removes it from the helm
chart and drops all references to it.

* refactor(chart): Refactor sidekiq deployments to scale

This patch reworks how the sidekiq deployment is set up, by
splitting it into many sidekiq deployments, but at least one,
which should allow to scale the number of sidekiq jobs as
expected while being friendly to single user instances as well
as larger ones.

Further it introduces per deployment overwrites for the most
relevant pod fields like resources, affinities and processed
queues, number of jobs and the sidekiq security contexts.

The exact implementation was inspired by an upstream issue:

https://github.com/mastodon/mastodon/issues/20453

* fix(chart): Remove linode default values from values

This patch drops the linode defaults from the values.yaml since
these are not obvious and can cause unexpected connections as
well as leaking secrets to linode, when other s3 storage
backends are used and don't explicitly configure these options
by accident.

Mastodon will then try to authenticate to the linode backends
and therefore disclose the authentication secrets.

* refactor(chart): Rework reduce value reference duplication

Since most of the values are simply setup like this:

```
{{- if .Values.someVariable }}
SOME_VARIABLE: {{ .Values.someVariable }}
{{- end }}
```

There is a lot of duplication in the references in order to
full in the variables. There is an equivalent notation, which
reduces the usage of the variable name to just once:

```
{{- with .Values.someVariable }}
SOME_VARIABLE: {{ . }}
{{- end }}
```

What seems like a pointless replacement, will reduce potential
mistakes down the line by possibly only adjusting one of the
two references.

* fix(chart): Switch to new OMNIAUTH_ONLY variable

This patch adjusts the helm chart to use the new `OMNIAUTH_ONLY`
variable, which replaced the former
`OAUTH_REDIRECT_AT_SIGN_IN` variable in the following commit:

https://github.com/mastodon/mastodon/pull/17288
3c8857917e

* fix(chart): Repair connection test to existing service

Currently the connect test can't work, since it's connecting to
a non-existing service this patch fixes the service name to
make the job connect to the mastodon web service to verify the
connection.

* docs(chart): Adjust values.yaml to support helm-docs

This patch updates most values to prepare an introduction of
helm-docs. This should help to make the chart more user
friendly by explaining the variables and provide a standardised
README file, like many other helm charts do.

References:
https://github.com/norwoodj/helm-docs

* refactor(chart): Allow individual overwrites for streaming and web deployment

This patch works how the streaming and web deployments work by
adding various fields to overwrite values such as affinities,
resources, replica count, and security contexts.

BREAKING CHANGE: This commit removes `.Values.replicaCount` in
favour of `.Values.mastodon.web.replicas` and
`.Values.mastodon.streaming.values`.

* feat(chart): Add option for authorized fetch

Currently the helm chart doesn't support authorized fetch aka.
"Secure Mode" this patch fixes that by adding the needed config
option to the values file and the configmap.

* docs(chart): Improve helm-docs compatiblity

This patch adjust a few more comments in the values.yaml to be
picked up by helm-docs. This way, future adoption is properly
prepared.

* fix(chart): Add automatic detection of scheduler sidekiq queue

This patch adds an automatic switch to the `Recreate` strategy
for the sidekiq Pod in order to prevent accidental concurrency
for the scheduler queue.

* fix(chart): Repair broken DB_POOL variable
2022-11-24 21:30:29 +01:00
dependabot[bot] 75bbe3b1b8
Bump regenerator-runtime from 0.13.10 to 0.13.11 (#21343)
Bumps [regenerator-runtime](https://github.com/facebook/regenerator) from 0.13.10 to 0.13.11.
- [Release notes](https://github.com/facebook/regenerator/releases)
- [Commits](https://github.com/facebook/regenerator/compare/regenerator-runtime@0.13.10...regenerator-runtime@0.13.11)

---
updated-dependencies:
- dependency-name: regenerator-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-22 23:11:25 +09:00
dependabot[bot] 8654603b3f
Bump jsdom from 20.0.2 to 20.0.3 (#21347)
Bumps [jsdom](https://github.com/jsdom/jsdom) from 20.0.2 to 20.0.3.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/20.0.2...20.0.3)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-22 23:11:00 +09:00
dependabot[bot] e5cd79cd9c
Bump idn-ruby from 0.1.4 to 0.1.5 (#21348)
Bumps [idn-ruby](https://github.com/deepfryed/idn-ruby) from 0.1.4 to 0.1.5.
- [Release notes](https://github.com/deepfryed/idn-ruby/releases)
- [Changelog](https://github.com/deepfryed/idn-ruby/blob/master/CHANGES)
- [Commits](https://github.com/deepfryed/idn-ruby/compare/v0.1.4...v0.1.5)

---
updated-dependencies:
- dependency-name: idn-ruby
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-22 23:10:45 +09:00
dependabot[bot] f83166ae74
Bump eslint-plugin-react from 7.31.10 to 7.31.11 (#21349)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.31.10 to 7.31.11.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.31.10...v7.31.11)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-22 23:10:00 +09:00
dependabot[bot] b02cda69e8
Bump pg from 1.4.4 to 1.4.5 (#21350)
Bumps [pg](https://github.com/ged/ruby-pg) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/ged/ruby-pg/releases)
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.rdoc)
- [Commits](https://github.com/ged/ruby-pg/compare/v1.4.4...v1.4.5)

---
updated-dependencies:
- dependency-name: pg
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-22 23:09:43 +09:00
dependabot[bot] 94fe9c3075
Bump httplog from 1.6.0 to 1.6.2 (#21345)
Bumps [httplog](https://github.com/trusche/httplog) from 1.6.0 to 1.6.2.
- [Release notes](https://github.com/trusche/httplog/releases)
- [Changelog](https://github.com/trusche/httplog/blob/master/CHANGELOG.md)
- [Commits](https://github.com/trusche/httplog/compare/v1.6.0...v1.6.2)

---
updated-dependencies:
- dependency-name: httplog
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-22 23:08:20 +09:00
Claire 43dbc62568
Fix privacy dropdown in boost modal on mobile (#1967)
Fixes #1965
2022-11-22 11:26:14 +01:00
Claire bdc61d467d
Merge pull request #1966 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-22 11:25:59 +01:00
Claire ff42233aae Merge branch 'main' into glitch-soc/merge-upstream 2022-11-22 10:28:43 +01:00
BtbN f343ed42ff
Add missing procps package to Dockerfile (#21028)
The new Debian-Base does not come with this by default, making the ps based health-check in the compose file fail
2022-11-22 05:52:18 +01:00
Claire 51a33ce77a
Fix not being able to follow more than one hashtag (#21285)
Fixes regression from #20860
2022-11-21 10:35:09 +01:00
Jill 7cb3b3f2df Merge pull request 'merge upstream' (#3) from remote/mastodon:main into main
Reviewed-on: #3
2022-11-21 04:13:51 +01:00
David Leadbeater 69378eac99
Don't allow URLs that contain non-normalized paths to be verified (#20999)
* Don't allow URLs that contain non-normalized paths to be verified

This stops things like https://example.com/otheruser/../realuser where
"/otheruser" appears to be the verified URL, but the actual URL being
verified is "/realuser" due to the "/../".

Also fix a test to use 'https', so it is testing the right thing, now
that since #20304 https is required.

* missing do
2022-11-20 19:28:13 +01:00
Claire e0e7a09cfe
Merge pull request #1955 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-18 11:30:03 +01:00
Claire 597a783742 Merge branch 'main' into glitch-soc/merge-upstream 2022-11-18 11:19:44 +01:00
Claire 48e136605a
Fix form-action CSP directive for external login (#20962) 2022-11-17 22:59:07 +01:00
Claire f233b5ed25
Merge pull request #1954 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-17 22:04:25 +01:00
Claire 367db8222f Merge branch 'main' into glitch-soc/merge-upstream 2022-11-17 21:56:05 +01:00
Claire 4ae97a2e4c
Fix OAuth flow being broken by recent CSP change (#20958) 2022-11-17 21:31:52 +01:00
Jill 1620a85954 add themes. this is a mess 2022-11-17 20:39:21 +01:00
Effy Elden 231e3ec552
Remove blank line from start of Dockerfile breaking syntax declaration (#20948) 2022-11-17 10:25:07 -05:00
Eugen Rochko 0a78631e86
New Crowdin updates (#20759)
* New translations en.json (German)

* New translations en.json (Italian)

* New translations en.yml (Kurmanji (Kurdish))

* New translations simple_form.en.yml (German)

* New translations doorkeeper.en.yml (Kurmanji (Kurdish))

* New translations en.json (Dutch)

* New translations en.json (Esperanto)

* New translations en.json (Dutch)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.json (Faroese)

* New translations en.json (Esperanto)

* New translations en.json (Irish)

* New translations simple_form.en.yml (Esperanto)

* New translations doorkeeper.en.yml (Esperanto)

* New translations en.json (Faroese)

* New translations simple_form.en.yml (Faroese)

* New translations en.json (Scots)

* New translations simple_form.en.yml (Esperanto)

* New translations doorkeeper.en.yml (Esperanto)

* New translations en.json (Scots)

* New translations en.yml (Korean)

* New translations simple_form.en.yml (Korean)

* New translations en.yml (Esperanto)

* New translations en.yml (Chinese Simplified)

* New translations en.yml (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations simple_form.en.yml (Chinese Simplified)

* New translations doorkeeper.en.yml (Chinese Simplified)

* New translations en.json (Lithuanian)

* New translations en.yml (Galician)

* New translations en.json (Icelandic)

* New translations en.yml (Galician)

* New translations en.json (Icelandic)

* New translations en.yml (Thai)

* New translations en.yml (Slovenian)

* New translations en.yml (Lithuanian)

* New translations en.yml (Macedonian)

* New translations en.yml (Dutch)

* New translations en.yml (Punjabi)

* New translations en.yml (Polish)

* New translations en.yml (Portuguese)

* New translations en.yml (Russian)

* New translations en.yml (Slovak)

* New translations en.yml (Serbian (Cyrillic))

* New translations en.yml (Georgian)

* New translations en.yml (Swedish)

* New translations en.yml (Chinese Traditional)

* New translations en.yml (Urdu (Pakistan))

* New translations en.yml (Vietnamese)

* New translations en.yml (Galician)

* New translations en.yml (Icelandic)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (Indonesian)

* New translations en.yml (Persian)

* New translations en.yml (Tamil)

* New translations en.yml (Korean)

* New translations en.yml (Japanese)

* New translations en.yml (German)

* New translations en.yml (Arabic)

* New translations en.yml (Czech)

* New translations en.yml (Chinese Simplified)

* New translations en.yml (Ido)

* New translations en.yml (Spanish)

* New translations en.yml (Turkish)

* New translations en.yml (Albanian)

* New translations en.yml (Ukrainian)

* New translations en.yml (Romanian)

* New translations en.yml (French)

* New translations en.yml (Afrikaans)

* New translations en.yml (Bulgarian)

* New translations en.yml (Italian)

* New translations en.yml (Catalan)

* New translations en.yml (Danish)

* New translations en.yml (Frisian)

* New translations en.yml (Basque)

* New translations en.yml (Finnish)

* New translations en.yml (Hebrew)

* New translations en.yml (Hungarian)

* New translations en.yml (Armenian)

* New translations en.yml (Spanish, Argentina)

* New translations en.yml (Spanish, Mexico)

* New translations en.yml (Silesian)

* New translations en.yml (Serbian (Latin))

* New translations en.yml (Kurmanji (Kurdish))

* New translations en.yml (Sorani (Kurdish))

* New translations en.yml (Corsican)

* New translations en.yml (Sardinian)

* New translations en.yml (Sanskrit)

* New translations en.yml (Taigi)

* New translations en.yml (Standard Moroccan Tamazight)

* New translations en.yml (Asturian)

* New translations en.yml (Burmese)

* New translations en.yml (Igbo)

* New translations en.yml (French, Quebec)

* New translations en.json (Faroese)

* New translations en.yml (Faroese)

* New translations simple_form.en.yml (Faroese)

* New translations en.yml (Occitan)

* New translations en.yml (Scottish Gaelic)

* New translations en.yml (Bengali)

* New translations en.yml (Telugu)

* New translations en.yml (Marathi)

* New translations en.yml (Croatian)

* New translations en.yml (Norwegian Nynorsk)

* New translations en.yml (Kazakh)

* New translations en.yml (Estonian)

* New translations en.yml (Latvian)

* New translations en.yml (Hindi)

* New translations en.yml (English, United Kingdom)

* New translations en.yml (Kannada)

* New translations en.yml (Welsh)

* New translations en.yml (Uyghur)

* New translations en.yml (Chinese Traditional, Hong Kong)

* New translations en.yml (Tatar)

* New translations en.yml (Malayalam)

* New translations en.yml (Sinhala)

* New translations en.yml (Cornish)

* New translations en.yml (Thai)

* New translations en.yml (Portuguese)

* New translations en.yml (Georgian)

* New translations en.yml (Korean)

* New translations en.yml (Lithuanian)

* New translations en.yml (Dutch)

* New translations simple_form.en.yml (Dutch)

* New translations en.yml (Norwegian)

* New translations en.yml (Polish)

* New translations en.yml (Russian)

* New translations en.yml (Italian)

* New translations en.yml (Slovak)

* New translations en.yml (Slovenian)

* New translations en.yml (Serbian (Cyrillic))

* New translations en.yml (Swedish)

* New translations en.yml (Chinese Traditional)

* New translations en.yml (Vietnamese)

* New translations en.yml (Galician)

* New translations en.yml (Icelandic)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (Japanese)

* New translations en.yml (Armenian)

* New translations en.json (Hebrew)

* New translations en.yml (French)

* New translations en.yml (German)

* New translations en.yml (Czech)

* New translations en.yml (Chinese Simplified)

* New translations en.yml (Spanish)

* New translations en.yml (Turkish)

* New translations simple_form.en.yml (Czech)

* New translations en.yml (Albanian)

* New translations en.yml (Ukrainian)

* New translations en.yml (Afrikaans)

* New translations en.yml (Hungarian)

* New translations en.yml (Arabic)

* New translations en.yml (Bulgarian)

* New translations en.yml (Catalan)

* New translations en.yml (Danish)

* New translations en.yml (Greek)

* New translations en.yml (Basque)

* New translations en.yml (Finnish)

* New translations en.yml (Irish)

* New translations en.yml (Hebrew)

* New translations en.yml (Indonesian)

* New translations en.yml (Ido)

* New translations en.yml (Persian)

* New translations simple_form.en.yml (Polish)

* New translations en.yml (Breton)

* New translations en.yml (Sinhala)

* New translations en.yml (Scottish Gaelic)

* New translations simple_form.en.yml (Sinhala)

* New translations simple_form.en.yml (Vietnamese)

* New translations simple_form.en.yml (Romanian)

* New translations simple_form.en.yml (French)

* New translations simple_form.en.yml (Spanish)

* New translations simple_form.en.yml (Afrikaans)

* New translations simple_form.en.yml (Arabic)

* New translations simple_form.en.yml (Bulgarian)

* New translations en.yml (Chinese Traditional, Hong Kong)

* New translations en.yml (Spanish, Argentina)

* New translations en.yml (Spanish, Mexico)

* New translations en.yml (Norwegian Nynorsk)

* New translations en.yml (Kazakh)

* New translations en.yml (Estonian)

* New translations en.yml (Latvian)

* New translations simple_form.en.yml (Catalan)

* New translations en.yml (Esperanto)

* New translations en.yml (Welsh)

* New translations en.yml (Malay)

* New translations en.yml (Corsican)

* New translations en.yml (Occitan)

* New translations en.yml (Sardinian)

* New translations en.yml (Serbian (Latin))

* New translations en.yml (Kurmanji (Kurdish))

* New translations en.yml (Kabyle)

* New translations en.yml (Sorani (Kurdish))

* New translations simple_form.en.yml (Bengali)

* New translations simple_form.en.yml (Galician)

* New translations simple_form.en.yml (Icelandic)

* New translations simple_form.en.yml (Portuguese, Brazilian)

* New translations simple_form.en.yml (Indonesian)

* New translations simple_form.en.yml (Persian)

* New translations simple_form.en.yml (Tamil)

* New translations simple_form.en.yml (Spanish, Argentina)

* New translations simple_form.en.yml (Spanish, Mexico)

* New translations simple_form.en.yml (Ukrainian)

* New translations simple_form.en.yml (Croatian)

* New translations simple_form.en.yml (Norwegian Nynorsk)

* New translations simple_form.en.yml (Kazakh)

* New translations simple_form.en.yml (Estonian)

* New translations simple_form.en.yml (Latvian)

* New translations simple_form.en.yml (English, United Kingdom)

* New translations simple_form.en.yml (Chinese Traditional)

* New translations simple_form.en.yml (Turkish)

* New translations simple_form.en.yml (Georgian)

* New translations simple_form.en.yml (Frisian)

* New translations simple_form.en.yml (Basque)

* New translations simple_form.en.yml (Finnish)

* New translations simple_form.en.yml (Hebrew)

* New translations simple_form.en.yml (Hungarian)

* New translations simple_form.en.yml (Armenian)

* New translations simple_form.en.yml (Italian)

* New translations simple_form.en.yml (Japanese)

* New translations simple_form.en.yml (Swedish)

* New translations simple_form.en.yml (Portuguese)

* New translations simple_form.en.yml (Slovak)

* New translations simple_form.en.yml (Slovenian)

* New translations simple_form.en.yml (Albanian)

* New translations simple_form.en.yml (Serbian (Cyrillic))

* New translations en.yml (French, Quebec)

* New translations en.json (Faroese)

* New translations en.yml (Faroese)

* New translations simple_form.en.yml (Scottish Gaelic)

* New translations simple_form.en.yml (Malayalam)

* New translations simple_form.en.yml (Tatar)

* New translations simple_form.en.yml (Chinese Traditional, Hong Kong)

* New translations simple_form.en.yml (Standard Moroccan Tamazight)

* New translations simple_form.en.yml (Ido)

* New translations simple_form.en.yml (Sardinian)

* New translations simple_form.en.yml (Corsican)

* New translations simple_form.en.yml (Sorani (Kurdish))

* New translations simple_form.en.yml (Serbian (Latin))

* New translations simple_form.en.yml (Occitan)

* New translations simple_form.en.yml (Asturian)

* New translations en.yml (Chinese Simplified)

* New translations en.yml (Hebrew)

* New translations en.yml (Korean)

* New translations en.yml (Dutch)

* New translations en.yml (Slovenian)

* New translations en.yml (Chinese Traditional)

* New translations en.yml (Kurmanji (Kurdish))

* normalize

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-11-17 21:59:15 +09:00
Claire 381137c94e
Merge pull request #1951 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-17 13:55:37 +01:00
Claire c22f3a87a3 [Glitch] Remove use of DOMParser in front-end emoji rewriting code
Port 585cc1a604 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-17 12:59:29 +01:00
Levi Bard 4b449fff23 [Glitch] Make the button that expands the publish form differentiable from the button that publishes a post
Port 654d348aac to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-17 12:58:39 +01:00
nyura123dev 87929ad866 [Glitch] Fix safari explore disappearing tabs
Port aaca78da78 to glitch-soc

Co-authored-by: nyura <nyura@hidden.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-17 12:57:58 +01:00
Moritz Heiber 1b5ed32085
Split off Dockerfile components for faster build times (#20933) 2022-11-17 12:56:14 +01:00
Claire 5ef92dff57 Remove glitch-soc-specific translations of upstreamed feature (domain block import) 2022-11-17 12:08:59 +01:00
Claire aec61a703f Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `.github/workflows/build-image.yml`:
  Upstream changed how docker images were built, including how
  they were cached.
  I don't know much about it, so applied upstream's changes.
- `app/controllers/admin/domain_blocks_controller.rb`:
  The feature, that was in glitch-soc, got backported upstream.
  It also had a few fixes upstream, so those have been ported!
- `app/javascript/packs/admin.js`:
  Glitch-soc changes have been backported upstream. As a result,
  some code from `app/javascript/core/admin.js` got added upstream.
  Kept our version since our shared Javascript already has that feature.
- `app/models/user.rb`:
  Upstream added something to distinguish unusable and unusable-because-moved
  accounts, while glitch-soc considers moved accounts usable.
  Took upstream's code for `functional_or_moved?` and made `functional?`
  call it.
- `app/views/statuses/_simple_status.html.haml`:
  Upstream cleaned up code style a bit, on a line that we had custom changes
  for.
  Applied upstream's change while keeping our change.
- `config/initializers/content_security_policy.rb`:
  Upstream adopted one CSP directive we already had.
  The conflict is because of our files being structurally different, but the
  change itself was already part of glitch-soc.
  Kept our version.
2022-11-17 12:01:37 +01:00
Claire ab7d99e035
Fix various issues with domain block import (#1944)
- stop using Paperclip for processing domain allow/block imports
- stop leaving temporary files
- better error handling
- assume CSV files are UTF-8-encoded
2022-11-17 11:42:20 +01:00
Claire 585cc1a604
Remove use of DOMParser in front-end emoji rewriting code (#20758)
* Add jstest for node ordering in emojify

* Remove use of DOMParser in front-end emoji rewriting code
2022-11-17 11:24:59 +01:00
Rose 4f15fd0ba1
Fix style for hashes (#20518)
* Fix style for hashes

Make the style for hashes consistent.

* New style

More consistency
2022-11-17 11:05:39 +01:00
lenore gilbert c373148b3d
Support for import/export of instance-level domain blocks/allows for 4.x w/ additional fixes (#20597)
* Allow import/export of instance-level domain blocks/allows (#1754)

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

* Pacify circleci

* Address simple code review feedback

* Add headers to exported CSV

* Extract common import/export functionality to
AdminExportControllerConcern

* Add additional fields to instance-blocked domain export

* Address review feedback

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

* Address code review feedback

* Pacify DeepSource

* Work around Paperclip::HasAttachmentFile for Rails 6

* Fix deprecated API warning in export tests

* Remove after_commit workaround

(cherry picked from commit 94e98864e3)

* Add confirmation page when importing blocked domains (#1773)

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

* Add confirmation page when importing blocked domains

(cherry picked from commit b91196f4b7)

* Fix authorization check in domain blocks controller

(cherry picked from commit 7527937758)

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

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

* Ran i18n-tasks normalize to address test failure

* Removed unused admin.export_domain_blocks.not_permitted string

Removing unused string as indicated by Check i18n

* Fix tests

(cherry picked from commit 9094c2f52c)

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

(cherry picked from commit 26ff48ee48)

* Fix various issues with domain block import

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

(cherry picked from commit cad824d8f501b95377e4f0a957e5a00d517a1902)

Co-authored-by: Levi Bard <taktaktaktaktaktaktaktaktaktak@gmail.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2022-11-17 11:05:09 +01:00
Ell Bradshaw e7deea62d1
Remove last references to "silencing" in UI text (#20637)
* Remove last references to "silencing" in en and en_GB locales

* Remove stray the, rephrase a bit

* Revert changes to generated files

I assume these will get updated via Crowdin
2022-11-17 11:01:51 +01:00
Kohei Ota (inductor) 92734e3df1
Use buildx functions for faster build (#20692)
* Use buildx functions for faster build

* move link

* cannot use --link with --chown
2022-11-17 11:01:16 +01:00
Joshua Wood daf6f3453e
Handle links with no href in VerifyLinkService (#20741)
Before this change, the following error would cause VerifyAccountLinksWorker to fail:

NoMethodError: undefined method `downcase' for nil:NilClass
  [PROJECT_ROOT]/app/services/verify_link_service.rb:31 :in `block in link_back_present?`
2022-11-17 10:59:35 +01:00
Claire cbb0153bd0
Fix invalid/empty RSS feed link on account pages (#20772)
Fixes #20770
2022-11-17 10:58:33 +01:00
trwnh 7fdeed5fbc
Make tag following idempotent (#20860) 2022-11-17 10:55:59 +01:00
trwnh 72618ebf03
Fix getting a single EmailDomainBlock (#20846) 2022-11-17 10:55:50 +01:00
Claire 00b2720ef0
Change automatic post deletion configuration to be accessible to redirected users (#20774)
Fixes #20550
2022-11-17 10:55:23 +01:00
Claire 7955d4b959
Add form-action CSP directive (#20781) 2022-11-17 10:55:03 +01:00
Claire eb80789b0b
Fix misleading wording about waitlists (#20850) 2022-11-17 10:54:33 +01:00
trwnh e1f819fd78
Fix pagination of followed tags (#20861)
* Fix missing pagination headers on followed tags

* Fix typo
2022-11-17 10:54:10 +01:00
Levi Bard 654d348aac
Make the button that expands the publish form differentiable from the button that publishes a post (#20864) 2022-11-17 10:53:38 +01:00
Alex Nordlund 642870c82b
Bump Helm chart version to account for mastodon 4 (#20886) 2022-11-17 10:53:04 +01:00
Claire 0cc77263fc
Change batch account suspension to create a strike (#20897) 2022-11-17 10:52:51 +01:00
Chris Johnson 413481f953
Add maskable icon support for Android (#20904)
* Add maskable icon support for Android

* Update manifest_serializer.rb

* Fix linting issue
2022-11-17 10:52:30 +01:00
trwnh a2931d19ae
Add missing admin scopes (fix #20892) (#20918) 2022-11-17 10:50:21 +01:00
nyura123dev aaca78da78
Fix safari explore disappearing tabs (#20917)
* fix disappearing Explore tabs on Safari

* fix lint

Co-authored-by: nyura <nyura@hidden.com>
2022-11-17 08:54:43 +01:00
Jill dec38b4b98 Merge pull request 'merge upstream' (#2) from remote/mastodon:main into main
Reviewed-on: #2
2022-11-17 00:39:51 +01:00
Claire 23ea0e7508
Add aria-label and title attributes to local settings navigation items (#1949) 2022-11-16 20:56:06 +01:00
Claire 8c56441b4a
Add form-action CSP directive (#1948) 2022-11-16 16:28:48 +01:00
Effy Elden f890fdca41
Bump Helm app version to 4.0.2 (#20697)
* Bump Helm app version to 4.0.1

* Bump Helm app version to 4.0.1
2022-11-16 11:59:28 +01:00
Claire ad84fd25f1
Merge pull request #1941 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-16 09:38:31 +01:00
Effy Elden 7efe2cf00f
Modify image build workflow for Glitch workflows (#1942) 2022-11-16 09:27:34 +01:00
Claire 1901829f9a Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `config/initializers/content_security_policy.rb`:
  Our config file is pretty different from upstream.
  Upstream changed CSP directive `script-src` to include
  `wasm-unsafe-eval` instead of `unsafe-eval`, which we
  did not include.
  Added `wasm-unsafe-eval` to `script-src` to fix
  execution of the OCR web worker.
- `package.json`:
  Upstream updated a dependency (`array-includes`) textually
  adjacent to a glitch-soc-only dependency (`atrament`).
  Updated `array-includes` as upstream did.
2022-11-16 08:30:00 +01:00
Daniel Axtens 4d85c27d1a
Add 'private' to Cache-Control, match Rails expectations (#20608)
Several controlers set quite intricate Cache-Control headers in order to
hopefully not be cached by any intermediate proxies or local caches. Unfortunately,
these headers are processed by ActionDispatch::HTTP::Cache in a way that squashes
and discards any values set alongside no-store other than private:
8015c2c2cf/actionpack/lib/action_dispatch/http/cache.rb (L207-L209)

We want to preserve no-store on these responses, but we might as well remove
parts that are going to be dropped anyway. As many of the endpoints in these
controllers are private to a particular user, we should also add "private",
which will be preserved alongside no-store.
2022-11-16 04:56:30 +01:00
dependabot[bot] ac7a29f068
Bump loader-utils from 1.4.1 to 1.4.2 (#20826)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 12:03:58 +09:00
dependabot[bot] f7d261cac7
Bump sidekiq from 6.5.7 to 6.5.8 (#20035)
Bumps [sidekiq](https://github.com/mperham/sidekiq) from 6.5.7 to 6.5.8.
- [Release notes](https://github.com/mperham/sidekiq/releases)
- [Changelog](https://github.com/mperham/sidekiq/blob/main/Changes.md)
- [Commits](https://github.com/mperham/sidekiq/compare/v6.5.7...v6.5.8)

---
updated-dependencies:
- dependency-name: sidekiq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 23:52:44 +09:00
dependabot[bot] 575bf3fa20
Bump oj from 3.13.21 to 3.13.23 (#20046)
Bumps [oj](https://github.com/ohler55/oj) from 3.13.21 to 3.13.23.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.13.21...v3.13.23)

---
updated-dependencies:
- dependency-name: oj
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 23:42:59 +09:00
dependabot[bot] dde60e2634
Bump object.values from 1.1.5 to 1.1.6 (#20047)
Bumps [object.values](https://github.com/es-shims/Object.values) from 1.1.5 to 1.1.6.
- [Release notes](https://github.com/es-shims/Object.values/releases)
- [Changelog](https://github.com/es-shims/Object.values/blob/main/CHANGELOG.md)
- [Commits](https://github.com/es-shims/Object.values/compare/v1.1.5...v1.1.6)

---
updated-dependencies:
- dependency-name: object.values
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 23:42:20 +09:00
dependabot[bot] f32c2de6af
Bump pg from 1.4.3 to 1.4.4 (#19597)
Bumps [pg](https://github.com/ged/ruby-pg) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/ged/ruby-pg/releases)
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.rdoc)
- [Commits](https://github.com/ged/ruby-pg/compare/v1.4.3...v1.4.4)

---
updated-dependencies:
- dependency-name: pg
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:49:50 +09:00
dependabot[bot] acbf4d0dfe
Bump jsdom from 20.0.1 to 20.0.2 (#19603)
Bumps [jsdom](https://github.com/jsdom/jsdom) from 20.0.1 to 20.0.2.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/20.0.1...20.0.2)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:49:21 +09:00
dependabot[bot] dd360e653e
Bump blurhash from 2.0.3 to 2.0.4 (#19601)
Bumps [blurhash](https://github.com/woltapp/blurhash) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/woltapp/blurhash/releases)
- [Commits](https://github.com/woltapp/blurhash/commits)

---
updated-dependencies:
- dependency-name: blurhash
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:49:00 +09:00
dependabot[bot] ca6106603b
Bump array-includes from 3.1.5 to 3.1.6 (#20680)
Bumps [array-includes](https://github.com/es-shims/array-includes) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/es-shims/array-includes/releases)
- [Changelog](https://github.com/es-shims/array-includes/blob/main/CHANGELOG.md)
- [Commits](https://github.com/es-shims/array-includes/compare/v3.1.5...v3.1.6)

---
updated-dependencies:
- dependency-name: array-includes
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:48:01 +09:00
dependabot[bot] dba1645bf0
Bump postcss from 8.4.18 to 8.4.19 (#20684)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.18 to 8.4.19.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.18...8.4.19)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:38:23 +09:00
dependabot[bot] 9f95c419d2
Bump yargs from 17.6.0 to 17.6.2 (#20063)
Bumps [yargs](https://github.com/yargs/yargs) from 17.6.0 to 17.6.2.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v17.6.0...v17.6.2)

---
updated-dependencies:
- dependency-name: yargs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:26:51 +09:00
dependabot[bot] 3301aadba8
Bump redux-thunk from 2.4.1 to 2.4.2 (#20060)
Bumps [redux-thunk](https://github.com/reduxjs/redux-thunk) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/reduxjs/redux-thunk/releases)
- [Commits](https://github.com/reduxjs/redux-thunk/compare/v2.4.1...v2.4.2)

---
updated-dependencies:
- dependency-name: redux-thunk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:23:00 +09:00
dependabot[bot] 4ef4db2a5a
Bump loader-utils from 1.4.0 to 1.4.1 (#20085)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:21:35 +09:00
dependabot[bot] fc4452104c
Bump json-ld-preloaded from 3.2.0 to 3.2.2 (#20058)
Bumps [json-ld-preloaded](https://github.com/ruby-rdf/json-ld-preloaded) from 3.2.0 to 3.2.2.
- [Release notes](https://github.com/ruby-rdf/json-ld-preloaded/releases)
- [Commits](https://github.com/ruby-rdf/json-ld-preloaded/compare/3.2.0...3.2.2)

---
updated-dependencies:
- dependency-name: json-ld-preloaded
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:21:04 +09:00
dependabot[bot] c76f29ae45
Bump tzinfo-data from 1.2022.4 to 1.2022.6 (#20056)
Bumps [tzinfo-data](https://github.com/tzinfo/tzinfo-data) from 1.2022.4 to 1.2022.6.
- [Release notes](https://github.com/tzinfo/tzinfo-data/releases)
- [Commits](https://github.com/tzinfo/tzinfo-data/compare/v1.2022.4...v1.2022.6)

---
updated-dependencies:
- dependency-name: tzinfo-data
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:20:42 +09:00
dependabot[bot] 61264e52cc
Bump memory_profiler from 1.0.0 to 1.0.1 (#20054)
Bumps [memory_profiler](https://github.com/SamSaffron/memory_profiler) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/SamSaffron/memory_profiler/releases)
- [Changelog](https://github.com/SamSaffron/memory_profiler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/SamSaffron/memory_profiler/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: memory_profiler
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:19:34 +09:00
dependabot[bot] 3b82d1ef68
Bump reselect from 4.1.6 to 4.1.7 (#20052)
Bumps [reselect](https://github.com/reduxjs/reselect) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/reduxjs/reselect/releases)
- [Changelog](https://github.com/reduxjs/reselect/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reduxjs/reselect/compare/v4.1.6...v4.1.7)

---
updated-dependencies:
- dependency-name: reselect
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:19:09 +09:00
dependabot[bot] 66a22ab391
Bump promise.prototype.finally from 3.1.3 to 3.1.4 (#20050)
Bumps [promise.prototype.finally](https://github.com/es-shims/Promise.prototype.finally) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/es-shims/Promise.prototype.finally/releases)
- [Changelog](https://github.com/es-shims/Promise.prototype.finally/blob/main/CHANGELOG.md)
- [Commits](https://github.com/es-shims/Promise.prototype.finally/compare/v3.1.3...v3.1.4)

---
updated-dependencies:
- dependency-name: promise.prototype.finally
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 20:18:48 +09:00
Eugen Rochko a1738f8991
New Crowdin updates (#20580)
* New translations en.json (Catalan)

* New translations en.yml (Chinese Traditional)

* New translations en.yml (Thai)

* New translations en.yml (Spanish)

* New translations en.yml (Ukrainian)

* New translations en.json (Catalan)

* New translations en.yml (Catalan)

* New translations en.yml (Hungarian)

* New translations en.json (Slovak)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (Asturian)

* New translations simple_form.en.yml (Catalan)

* New translations en.yml (Turkish)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (Thai)

* New translations en.yml (German)

* New translations en.json (German)

* New translations simple_form.en.yml (Thai)

* New translations en.json (Irish)

* New translations en.yml (Norwegian)

* New translations en.yml (German)

* New translations en.json (Romanian)

* New translations en.yml (Danish)

* New translations en.json (Irish)

* New translations en.yml (Irish)

* New translations en.yml (Norwegian)

* New translations en.yml (Russian)

* New translations en.yml (Norwegian Nynorsk)

* New translations simple_form.en.yml (Irish)

* New translations doorkeeper.en.yml (Irish)

* New translations en.yml (Danish)

* New translations en.json (Catalan)

* New translations en.yml (Norwegian)

* New translations en.yml (Scottish Gaelic)

* New translations simple_form.en.yml (Norwegian)

* New translations en.json (Catalan)

* New translations en.json (Portuguese, Brazilian)

* New translations simple_form.en.yml (Portuguese, Brazilian)

* New translations en.yml (Portuguese, Brazilian)

* New translations simple_form.en.yml (Portuguese, Brazilian)

* New translations en.yml (Latvian)

* New translations en.json (Irish)

* New translations en.json (Swedish)

* New translations en.yml (Galician)

* New translations en.json (Latvian)

* New translations en.yml (Latvian)

* New translations en.json (Kabyle)

* New translations en.yml (Welsh)

* New translations en.json (Breton)

* New translations en.json (Kabyle)

* New translations en.yml (Kabyle)

* New translations simple_form.en.yml (Kabyle)

* New translations en.json (Malay)

* New translations simple_form.en.yml (Spanish)

* New translations simple_form.en.yml (Malay)

* New translations activerecord.en.yml (Malay)

* New translations devise.en.yml (Malay)

* New translations doorkeeper.en.yml (Malay)

* New translations en.json (Malay)

* New translations en.yml (Malay)

* New translations en.json (Welsh)

* New translations en.yml (Welsh)

* New translations simple_form.en.yml (Malay)

* New translations simple_form.en.yml (Welsh)

* New translations doorkeeper.en.yml (Welsh)

* New translations activerecord.en.yml (Malay)

* New translations activerecord.en.yml (Welsh)

* New translations devise.en.yml (Welsh)

* New translations doorkeeper.en.yml (Malay)

* New translations en.yml (Dutch)

* New translations en.json (Malay)

* New translations en.yml (Malay)

* New translations en.json (English, United Kingdom)

* New translations en.yml (Welsh)

* New translations simple_form.en.yml (Malay)

* New translations devise.en.yml (Welsh)

* New translations en.yml (German)

* New translations en.yml (Vietnamese)

* New translations en.yml (Malay)

* New translations en.json (Welsh)

* New translations en.yml (Welsh)

* New translations simple_form.en.yml (German)

* New translations simple_form.en.yml (Malay)

* New translations simple_form.en.yml (Welsh)

* New translations doorkeeper.en.yml (Welsh)

* New translations devise.en.yml (Welsh)

* New translations devise.en.yml (Malay)

* New translations en.json (Vietnamese)

* New translations en.yml (Malay)

* New translations en.json (Welsh)

* New translations simple_form.en.yml (German)

* New translations en.yml (Thai)

* New translations en.yml (German)

* New translations en.json (German)

* New translations en.json (Catalan)

* New translations en.json (Welsh)

* New translations simple_form.en.yml (German)

* New translations simple_form.en.yml (Malay)

* New translations devise.en.yml (Thai)

* New translations en.yml (Thai)

* New translations en.json (Thai)

* New translations en.yml (German)

* New translations en.json (German)

* New translations en.json (Catalan)

* New translations en.json (Norwegian)

* New translations en.json (Welsh)

* New translations simple_form.en.yml (German)

* New translations simple_form.en.yml (Norwegian)

* New translations devise.en.yml (Thai)

* New translations en.yml (German)

* New translations en.json (German)

* New translations en.json (Korean)

* New translations en.yml (Korean)

* New translations en.yml (Norwegian)

* New translations simple_form.en.yml (German)

* New translations simple_form.en.yml (Korean)

* New translations en.json (Esperanto)

* New translations en.json (Korean)

* New translations en.yml (Korean)

* New translations en.yml (Norwegian)

* New translations en.json (Welsh)

* New translations simple_form.en.yml (Korean)

* New translations simple_form.en.yml (Norwegian)

* New translations en.json (Korean)

* New translations en.yml (Korean)

* New translations doorkeeper.en.yml (Korean)

* New translations devise.en.yml (Korean)

* New translations en.json (Asturian)

* New translations en.json (Asturian)

* Run `yarn manage:translations`

* Run `bundle exec i18n-tasks normalize`

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-11-15 14:37:37 +09:00
Eugen Rochko 03b0f3ac83
Bump version to 4.0.2 (#20725) 2022-11-15 03:57:18 +01:00
Eugen Rochko 43b0b2f3f4
Fix wrong directive `unsafe-wasm-eval` to `wasm-unsafe-eval` (#20729) 2022-11-15 03:39:06 +01:00
prplecake b46b7c3d5e
Use "unsafe-wasm-eval" instead of "unsafe-eval" in script-src CSP (#20606)
* Add "unsafe-eval" to script-src CSP

* Use 'unsafe-wasm-eval' instead of 'unsafe-eval'
2022-11-15 03:22:38 +01:00
dependabot[bot] b59683c156
Bump nokogiri from 1.13.8 to 1.13.9 (#20041)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.8 to 1.13.9.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.8...v1.13.9)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 03:19:56 +01:00
Eugen Rochko 17bd9a87b9
Fix wrong color on mentions hidden behind content warning in web UI (#20724) 2022-11-15 02:58:00 +01:00
Claire eb675af0fb
Merge pull request #1932 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-15 02:11:22 +01:00
Claire 66461ae79a Merge branch 'main' into glitch-soc/merge-upstream 2022-11-15 02:10:37 +01:00
Claire 8c3c6dcae9
Fix filters from other users being used in the streaming service (#20719) 2022-11-15 02:09:58 +01:00
Claire ceafd1f68f
Fix infinite loop when system emoji font is enabled (#1931)
Fixes #1930
2022-11-15 00:32:59 +01:00
Jill 4301f4b2d2 Merge pull request 'update upstream to 4.0.1' (#1) from remote/mastodon:main into main
Reviewed-on: #1
2022-11-14 22:56:10 +01:00
Jill e7af9564b2 slight changes 2022-11-14 22:54:09 +01:00
Claire e589afa0ef
Merge pull request #1929 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-14 22:43:56 +01:00
Claire 8aa56aedfd [Glitch] Fix nodes order being sometimes mangled when rewriting emoji
Port ccbca50a25 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-14 22:32:00 +01:00
Claire b5698af25f Merge branch 'main' into glitch-soc/merge-upstream 2022-11-14 22:30:30 +01:00
Eugen Rochko 4415dd6036
Bump version to 4.0.1 (#20696) 2022-11-14 22:21:14 +01:00
Claire ccbca50a25
Fix nodes order being sometimes mangled when rewriting emoji (#20677)
* Fix front-end emoji tests

* Fix nodes order being sometimes mangled when rewriting emoji
2022-11-14 22:14:55 +01:00
Claire 7a8cd0cb0a
Merge pull request #1928 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream  changes
2022-11-14 20:29:15 +01:00
Claire 71982e5c83 [Glitch] Fix emoji substitution not applying only to text nodes in Web UI
Port 625e086996 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-14 20:28:22 +01:00
Claire 767630be24 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `Gemfile`:
  Upstream removed blank lines.
2022-11-14 20:27:31 +01:00
Eugen Rochko fb389bd73c
Bump version to 4.0.0 (#20636) 2022-11-14 20:27:12 +01:00
Eugen Rochko 21fd25a269
Fix rate limiting for paths with formats (#20675) 2022-11-14 20:26:31 +01:00
Claire 71c92d3f56
Fix emoji substitution not applying only to text nodes in backend code (#20641)
Signed-off-by: Claire <claire.github-309c@sitedethib.com>

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-14 20:26:21 +01:00
Claire 625e086996
Fix emoji substitution not applying only to text nodes in Web UI (#20640)
Signed-off-by: Claire <claire.github-309c@sitedethib.com>

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-14 20:26:03 +01:00
Jill bda68b7752 nixos compatbility. help me 2022-11-14 19:50:15 +01:00
Claire a34aa2a5f9
Merge pull request #1927 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-14 18:45:54 +01:00
Claire 96c1ef6d50 [Glitch] Fix media metadata being only editable once
Port 2d54986a03 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-14 18:32:33 +01:00
Claire 9ab4e3fc6d Merge branch 'main' into glitch-soc/merge-upstream 2022-11-14 18:31:04 +01:00
Claire 2d54986a03
Fix media metadata being only editable once (#20665) 2022-11-14 17:52:31 +01:00
Claire 7233569474
Merge pull request #1923 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-14 10:31:28 +01:00
trwnh c31e756644 [Glitch] Move V2 Filter methods under /api/v2 prefix
Port b59ce0a60f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-14 09:17:59 +01:00
Eugen Rochko 9db90d2ebe [Glitch] Fix dropdown menu on profiles not being accessible on narrow screens in web UI
Port 6da9df774e to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-14 09:16:41 +01:00
Samuel Kaiser 9fd866f38e [Glitch] Stick batch table toolbar to the top
Port e62b514e95 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-14 09:05:56 +01:00
Claire cd713cac81 Merge branch 'main' into glitch-soc/merge-upstream 2022-11-14 08:57:25 +01:00
Eugen Rochko 75299a042c
Bump version to 4.0.0rc4 (#20634) 2022-11-14 08:50:14 +01:00
Claire 32c70d2f09 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/views/admin/announcements/edit.html.haml`:
  Upstream change too close to theming-related glitch-soc change.
  Ported upstream changes.
- `app/views/admin/announcements/new.html.haml`
  Upstream change too close to theming-related glitch-soc change.
  Ported upstream changes.
2022-11-14 08:35:55 +01:00
trwnh b59ce0a60f
Move V2 Filter methods under /api/v2 prefix (#20622)
* Move V2 Filter methods under /api/v2 prefix

* move over the tests too
2022-11-14 08:34:07 +01:00
Claire 457c37e47a
Fix index name in fix-duplicates task (#20632) 2022-11-14 08:33:48 +01:00
Eugen Rochko 1e83092e47
Update AUTHORS.md (#20630) 2022-11-14 08:33:24 +01:00
Eugen Rochko 552d69ad96
Fix error when invalid domain name is submitted (#19474)
Fix #19175
2022-11-14 08:07:14 +01:00
Eugen Rochko 523e106cbf
Fix style of username in navigation bar above compose form in web UI (#20628)
Regression from #20540
2022-11-14 08:06:17 +01:00
Eugen Rochko b31afc6294
Fix error when passing unknown filter param in REST API (#20626)
Fix #19156
2022-11-14 08:06:06 +01:00
Eugen Rochko 5c826c408d
Fix image type not being set after conversion for convertible image types (#20624) 2022-11-14 07:13:14 +01:00
Eugen Rochko 167d86d21d
Fix `role_ids` not accepting arrays in admin API (#20625)
Fix #19157
2022-11-14 06:56:15 +01:00
Eugen Rochko 2e2ba39abf
Fix rules with same priority being sorted non-deterministically (#20623) 2022-11-14 06:28:19 +01:00
Eugen Rochko 6da9df774e
Fix dropdown menu on profiles not being accessible on narrow screens in web UI (#20620) 2022-11-14 06:05:10 +01:00
Hampton Lintorn-Catlin 147d8bd8fc
Support UTF-8 Characters in Domains During CSV Import (#20592)
* Support UTF-8 Characters in Domains During Import

* Update Changelong
2022-11-14 05:52:13 +01:00
Matt Corallo 9d039209cc
Add `Cache-Control` header to openstack-stored files (#20610)
When storing files in S3, paperclip is configured with a Cache-Control header
indicating the file is immutable, however no such header was added when using
OpenStack storage.

Luckily Paperclip's fog integration makes this trivial, with a simple
`fog_file` `Cache-Control` default doing the trick.
2022-11-14 05:26:49 +01:00
Eugen Rochko d0b7bd4250
Fix wrong cut-off point for "Read more" in web UI (#20599) 2022-11-14 00:43:24 +01:00
Eugen Rochko 24b2c60beb
Fix icons having an image role (#20600) 2022-11-14 00:38:56 +01:00
Erik Sundell 87fbd08f74
helm: Add helm chart tests (#20394)
* helm: Fix consistent list indentation

* helm: Add helm lint and helm template tests

* helm: Add helm template --validate test

* helm: Add helm install test
2022-11-13 22:22:07 +01:00
trwnh 07229089a6
Change in-app links to keep you in-app (#20540)
* Change in-app links to keep you in-app

* refactor Permalink into Link

* rewrite link hrefs in status content

* please linter

* please linter again
2022-11-13 21:10:20 +01:00
Cees-Jan Kiewiet ad66bbed62
Add the option to configure external postgresql port (#20370)
While the normal assumption of port `5432` for a postgresql server is pretty reliable I found that DigitalOcean puts them on a somewhat random port. This adds the ability to specify the port in the helm chart.
2022-11-13 21:06:03 +01:00
Alex Nordlund 82c663300a
Helm: support statsd publishing (#20455)
* Allow statsd publishing from Helm

* Apply suggestions from code review

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
2022-11-13 21:05:30 +01:00
Samuel Kaiser e62b514e95
Stick batch table toolbar to the top (#20442)
Fixes #20441
2022-11-13 21:02:28 +01:00
Emily Strickland c2231539c7
Test blank account field verifiability (#20458)
* Test blank account field verifiability

This change tests the need for #20428, which ensures that we guard against a situation in which `at_xpath` returns `nil`.

* Test verifiability of blank fields for remote account profiles

This adds a counterpart test for remote account profiles' fields' verifiability when those fields are blank. I previously added the same test for local accounts.
2022-11-13 21:02:09 +01:00
Claire bd806a3090
Update fix-duplicates (#20502)
Fixes #19133
2022-11-13 21:01:38 +01:00
Nicholas La Roux a6186da983
Clean up GitHub sourced gem entry (#20542) 2022-11-13 21:00:38 +01:00
Claire cd5e98dbdb
Fix public/local timeline posts not being properly filtered (#20567)
* Fix streaming server using wrong property name for matching filters

Late in the PR, the `filter_results` property has been renamed to `filtered`,
but the change has not been reflected in the streaming server code.

* Fix filter_action attribute being an integer instead of a string
2022-11-13 20:59:49 +01:00
Claire 3d3bd344cb
Fix announcement dates not being validated client-side (#20577) 2022-11-13 20:58:54 +01:00
Arthur Isac 1af482659d
Copied Spaces support from packer .rake (#20573) 2022-11-13 20:58:40 +01:00
Eugen Rochko cf36ee99bb
New Crowdin updates (#20476)
* New translations en.json (Galician)

* New translations en.yml (Galician)

* New translations en.json (Japanese)

* New translations en.yml (Czech)

* New translations en.json (Esperanto)

* New translations en.yml (Norwegian)

* New translations en.json (Spanish, Argentina)

* New translations en.json (Latvian)

* New translations en.json (Esperanto)

* New translations en.yml (Esperanto)

* New translations simple_form.en.yml (Esperanto)

* New translations activerecord.en.yml (Russian)

* New translations activerecord.en.yml (Portuguese, Brazilian)

* New translations en.yml (Thai)

* New translations en.json (Thai)

* New translations en.yml (Norwegian)

* New translations en.json (Welsh)

* New translations en.yml (Welsh)

* New translations en.json (Malayalam)

* New translations simple_form.en.yml (Thai)

* New translations simple_form.en.yml (Welsh)

* New translations doorkeeper.en.yml (Welsh)

* New translations activerecord.en.yml (Welsh)

* New translations devise.en.yml (Thai)

* New translations devise.en.yml (Welsh)

* New translations en.yml (Thai)

* New translations en.json (Thai)

* New translations en.yml (German)

* New translations en.json (German)

* New translations en.yml (Irish)

* New translations simple_form.en.yml (German)

* New translations simple_form.en.yml (Thai)

* New translations en.yml (Thai)

* New translations en.json (Esperanto)

* New translations en.yml (Irish)

* New translations en.json (Norwegian)

* New translations en.json (Polish)

* New translations en.yml (Polish)

* New translations en.json (Slovak)

* New translations en.yml (Slovak)

* New translations en.json (Turkish)

* New translations en.yml (Portuguese, Brazilian)

* New translations simple_form.en.yml (Thai)

* New translations en.yml (Chinese Simplified)

* New translations en.yml (Polish)

* New translations en.json (Slovak)

* New translations en.yml (Slovak)

* New translations simple_form.en.yml (Slovak)

* New translations en.json (Thai)

* New translations simple_form.en.yml (Portuguese, Brazilian)

* New translations doorkeeper.en.yml (Esperanto)

* New translations en.json (Norwegian)

* New translations en.json (Finnish)

* New translations en.json (Norwegian)

* New translations simple_form.en.yml (Norwegian)

* New translations en.yml (Thai)

* New translations en.json (Norwegian Nynorsk)

* New translations en.yml (Norwegian Nynorsk)

* New translations simple_form.en.yml (Arabic)

* New translations en.json (German)

* New translations en.json (Dutch)

* New translations en.yml (Greek)

* New translations en.yml (German)

* New translations en.yml (Hungarian)

* New translations en.yml (Hebrew)

* New translations en.yml (Finnish)

* New translations en.yml (Basque)

* New translations en.yml (Frisian)

* New translations en.yml (Danish)

* New translations en.yml (Catalan)

* New translations en.yml (Bulgarian)

* New translations en.yml (Arabic)

* New translations en.yml (Afrikaans)

* New translations en.yml (French)

* New translations en.yml (Romanian)

* New translations en.yml (Spanish)

* New translations en.yml (Czech)

* New translations en.yml (Armenian)

* New translations en.yml (Urdu (Pakistan))

* New translations en.yml (Vietnamese)

* New translations en.yml (Chinese Traditional)

* New translations en.yml (Swedish)

* New translations en.yml (Serbian (Cyrillic))

* New translations en.yml (Slovenian)

* New translations en.yml (Thai)

* New translations en.yml (Galician)

* New translations en.yml (Russian)

* New translations en.yml (Icelandic)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (Indonesian)

* New translations en.yml (Persian)

* New translations en.yml (Tamil)

* New translations en.yml (Slovak)

* New translations en.yml (Japanese)

* New translations en.yml (Portuguese)

* New translations en.yml (Polish)

* New translations en.yml (Punjabi)

* New translations en.yml (Norwegian)

* New translations en.yml (Dutch)

* New translations en.yml (Macedonian)

* New translations en.yml (Lithuanian)

* New translations en.yml (Korean)

* New translations en.yml (Georgian)

* New translations en.yml (Italian)

* New translations en.yml (Ukrainian)

* New translations en.yml (Albanian)

* New translations en.yml (Turkish)

* New translations en.yml (Ido)

* New translations en.yml (Chinese Simplified)

* New translations en.yml (Spanish, Argentina)

* New translations en.yml (Spanish, Mexico)

* New translations en.yml (Sorani (Kurdish))

* New translations en.yml (Kannada)

* New translations en.yml (Scottish Gaelic)

* New translations en.yml (Asturian)

* New translations en.yml (Occitan)

* New translations en.yml (Serbian (Latin))

* New translations en.yml (Kurmanji (Kurdish))

* New translations en.yml (Corsican)

* New translations en.yml (Sinhala)

* New translations en.yml (Sardinian)

* New translations en.yml (Sanskrit)

* New translations en.yml (Kabyle)

* New translations en.yml (Taigi)

* New translations en.yml (Silesian)

* New translations en.yml (Standard Moroccan Tamazight)

* New translations en.yml (Burmese)

* New translations en.yml (Cornish)

* New translations en.yml (Breton)

* New translations en.yml (Bengali)

* New translations en.yml (Hindi)

* New translations en.yml (Marathi)

* New translations en.yml (Croatian)

* New translations en.yml (Norwegian Nynorsk)

* New translations en.yml (Kazakh)

* New translations en.yml (Estonian)

* New translations en.yml (Latvian)

* New translations en.yml (Malay)

* New translations en.yml (Malayalam)

* New translations en.yml (Telugu)

* New translations en.yml (English, United Kingdom)

* New translations en.yml (Welsh)

* New translations en.yml (Esperanto)

* New translations en.yml (Uyghur)

* New translations en.yml (Chinese Traditional, Hong Kong)

* New translations en.yml (Tatar)

* New translations en.yml (Igbo)

* New translations en.yml (Chinese Simplified)

* New translations en.yml (Afrikaans)

* New translations en.yml (Korean)

* New translations en.yml (Chinese Traditional)

* New translations en.yml (Thai)

* New translations en.yml (German)

* New translations en.yml (Czech)

* New translations en.yml (Catalan)

* New translations en.yml (Greek)

* New translations en.yml (Italian)

* New translations en.yml (Slovenian)

* New translations en.yml (Swedish)

* New translations simple_form.en.yml (Thai)

* New translations en.yml (Thai)

* New translations en.json (Thai)

* New translations en.yml (Basque)

* New translations en.yml (Norwegian)

* New translations en.yml (Portuguese)

* New translations en.yml (Icelandic)

* New translations en.json (Spanish, Argentina)

* New translations en.yml (Spanish, Argentina)

* New translations en.json (Albanian)

* New translations en.yml (Albanian)

* New translations en.yml (French)

* New translations en.yml (Hebrew)

* New translations en.yml (Italian)

* New translations en.yml (Japanese)

* New translations en.yml (Norwegian)

* New translations en.yml (Polish)

* New translations en.yml (Norwegian Nynorsk)

* New translations en.yml (Esperanto)

* New translations en.yml (German)

* New translations en.json (German)

* New translations en.yml (Hebrew)

* New translations en.yml (Norwegian)

* New translations en.yml (German)

* New translations en.json (Spanish)

* New translations en.yml (Finnish)

* New translations en.json (Norwegian)

* New translations en.yml (Latvian)

* New translations en.yml (Esperanto)

* New translations en.json (German)

* New translations en.json (Esperanto)

* New translations en.yml (Dutch)

* New translations en.yml (Norwegian)

* New translations en.yml (Esperanto)

* New translations en.json (Catalan)

* New translations en.yml (Catalan)

* New translations doorkeeper.en.yml (Catalan)

* Run `yarn manage:translations`

* Run `bundle exec i18n-tasks normalize`

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-11-14 01:14:31 +09:00
David Hewitt 290d78cea4
Allow unsetting x-amz-acl S3 Permission headers (#20510)
Some "S3 Compatible" storage providers (Cloudflare R2 is one such example) don't support setting ACLs on individual uploads with the `x-amz-acl` header, and instead just have a visibility for the whole bucket. To support uploads to such providers without getting unsupported errors back, lets use a black `S3_PERMISSION` env var to indicate that these headers shouldn't be sent.

This is tested as working with Cloudflare R2.
2022-11-13 06:57:10 +01:00
Claire cf77d938f8
Fix saving server registration settings redirecting to branding settings (#20505) 2022-11-13 03:33:31 +01:00
helloworldstack e9e4938bc9
Fix casing and spacing of words (#20504) 2022-11-13 03:33:20 +01:00
Claire 81b1d32d5b
Merge pull request #1920 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-12 14:33:14 +01:00
Claire a808ac1fd8 [Glitch] Fix WebUI crash when listing server blocks and rationale is not available
Port 93a6ebc83d to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-12 14:02:23 +01:00
Claire 9255bfb908 [Glitch] Add the ability to edit media attachment metadata for any unattached media
Port 31005aad12 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-12 14:01:47 +01:00
Cutls e2315876f4 [Glitch] Do not show drag&drop dialog when not logined
Port 553b169d48 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-12 13:59:03 +01:00
Claire 8ac4165c72 [Glitch] Remove “No description added” media warning in edit mode
Port 5e796dc6f8 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-12 13:57:41 +01:00
Eugen Rochko 400d168310 [Glitch] Fix domain blocks on about page not working well on small screens in web UI
Port 6774c339b2 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-12 13:56:49 +01:00
Connor Shea d525ae4bdd [Glitch] Only remove padding when listing applications
Port cf4992c918 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-12 13:55:43 +01:00
Yamagishi Kazutoshi 0071582c6d [Glitch] Delay workbox import
Port 53d26cfc1c to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-12 13:55:02 +01:00
Claire 5394ca6807 [Glitch] Fix unnecessary service worker registration and preloading when logged out
Port 894ce3726a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-12 13:54:09 +01:00
Claire 487689f062 [Glitch] Remove preview cards from fav and boost notifications
Port 99734ac936 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-12 13:51:30 +01:00
Claire 3fa6c603ba [Glitch] Fix color of the “No description added“ media upload warning on light theme
Port 89a6b76f99 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-12 13:48:42 +01:00
Claire 93912f0498 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/models/account.rb`:
  Conflict because we (glitch-soc) have disabled trending of posts without
  review.
  Discarded that upstream change.
- `app/views/admin/settings/discovery/show.html.haml`:
  Just an extra setting in glitch-soc.
  Kept that extra setting.
2022-11-12 13:28:03 +01:00
Claire d37f426f95
Add back missing glitch-soc admin settings (#1919)
Fixes #1890
2022-11-12 13:24:53 +01:00
Jared Allard e88f4f5e57
ci: write permissions to packages (#1906) 2022-11-12 11:51:16 +01:00
Claire 210341fba1
Merge pull request #1918 from ClearlyClaire/glitch-soc/features/glitch-label
Add “Glitch-only” label to some settings
2022-11-12 11:45:39 +01:00
Claire af89b14628 Add extended description for glitch-soc only “hide followers count" setting 2022-11-12 11:31:05 +01:00
Claire 6a96b17a2d Add “Glitch-only” label to glitch-specific settings 2022-11-12 11:30:35 +01:00
Claire c813df2ebb
Merge pull request #1917 from ClearlyClaire/glitch-soc/fixes/not-recommended-label
Fix “not recommended” label being shown as “recommended”
2022-11-12 11:10:39 +01:00
Claire 0d43d9926a Make trendable_by_default not apply to posts 2022-11-12 10:59:17 +01:00
Claire 1ce29aeabf Change "Allow trends without prior review' setting to include statuses
Port SCSS changes from 546672e292 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-12 10:59:17 +01:00
Eugen Rochko d26c1cb2fe
Fix missing "not recommended" label on "Allow trends without review" (#20480) 2022-11-12 10:54:51 +01:00
Claire fdfacb0ec0 Revert "Revert "Change "Allow trends without prior review" setting to include statuses (#17977)""
This reverts commit bfc539cfb4.
2022-11-12 10:17:22 +01:00
Claire 73b68fcabb
Fix styling of advanced options dropdown (#1916)
Fixes #1914
2022-11-12 09:59:28 +01:00
Eugen Rochko e1af21cfd0
New Crowdin updates (#20258)
* New translations en.json (Asturian)

* New translations en.yml (Telugu)

* New translations en.yml (Tamil)

* New translations en.json (Norwegian Nynorsk)

* New translations en.json (Spanish, Argentina)

* New translations en.yml (Spanish, Argentina)

* New translations en.json (Spanish, Mexico)

* New translations en.yml (Spanish, Mexico)

* New translations en.yml (Bengali)

* New translations en.yml (Marathi)

* New translations en.yml (Croatian)

* New translations en.yml (Kazakh)

* New translations en.yml (Estonian)

* New translations en.json (Latvian)

* New translations en.yml (Hindi)

* New translations en.yml (Malay)

* New translations en.yml (Asturian)

* New translations en.json (Occitan)

* New translations simple_form.en.yml (Basque)

* New translations simple_form.en.yml (Spanish)

* New translations simple_form.en.yml (Arabic)

* New translations simple_form.en.yml (Bulgarian)

* New translations simple_form.en.yml (Catalan)

* New translations simple_form.en.yml (Danish)

* New translations simple_form.en.yml (German)

* New translations simple_form.en.yml (Greek)

* New translations simple_form.en.yml (Frisian)

* New translations simple_form.en.yml (Finnish)

* New translations simple_form.en.yml (Romanian)

* New translations simple_form.en.yml (Irish)

* New translations simple_form.en.yml (Hebrew)

* New translations simple_form.en.yml (Hungarian)

* New translations simple_form.en.yml (Armenian)

* New translations simple_form.en.yml (Italian)

* New translations simple_form.en.yml (Japanese)

* New translations simple_form.en.yml (Georgian)

* New translations simple_form.en.yml (French)

* New translations simple_form.en.yml (Vietnamese)

* New translations en.yml (Occitan)

* New translations en.yml (Serbian (Latin))

* New translations en.json (Kurmanji (Kurdish))

* New translations en.yml (Kurmanji (Kurdish))

* New translations en.json (Sorani (Kurdish))

* New translations en.yml (Sorani (Kurdish))

* New translations en.yml (Corsican)

* New translations simple_form.en.yml (Norwegian)

* New translations simple_form.en.yml (Polish)

* New translations simple_form.en.yml (Sinhala)

* New translations en.yml (Kabyle)

* New translations en.yml (Sardinian)

* New translations en.yml (Taigi)

* New translations en.yml (Silesian)

* New translations en.yml (Standard Moroccan Tamazight)

* New translations en.yml (Sanskrit)

* New translations simple_form.en.yml (Tatar)

* New translations simple_form.en.yml (Welsh)

* New translations simple_form.en.yml (Esperanto)

* New translations simple_form.en.yml (Chinese Traditional, Hong Kong)

* New translations simple_form.en.yml (Malayalam)

* New translations simple_form.en.yml (Kazakh)

* New translations simple_form.en.yml (Breton)

* New translations simple_form.en.yml (Scottish Gaelic)

* New translations activerecord.en.yml (Scottish Gaelic)

* New translations simple_form.en.yml (Asturian)

* New translations simple_form.en.yml (Occitan)

* New translations simple_form.en.yml (Serbian (Latin))

* New translations simple_form.en.yml (Kurmanji (Kurdish))

* New translations simple_form.en.yml (Sorani (Kurdish))

* New translations simple_form.en.yml (Estonian)

* New translations simple_form.en.yml (Norwegian Nynorsk)

* New translations simple_form.en.yml (Portuguese)

* New translations simple_form.en.yml (Galician)

* New translations simple_form.en.yml (Russian)

* New translations simple_form.en.yml (Slovak)

* New translations simple_form.en.yml (Albanian)

* New translations simple_form.en.yml (Serbian (Cyrillic))

* New translations simple_form.en.yml (Turkish)

* New translations simple_form.en.yml (Ukrainian)

* New translations simple_form.en.yml (Icelandic)

* New translations simple_form.en.yml (Croatian)

* New translations activerecord.en.yml (Icelandic)

* New translations simple_form.en.yml (Persian)

* New translations simple_form.en.yml (Tamil)

* New translations simple_form.en.yml (Spanish, Argentina)

* New translations simple_form.en.yml (Spanish, Mexico)

* New translations simple_form.en.yml (Bengali)

* New translations simple_form.en.yml (Corsican)

* New translations activerecord.en.yml (Portuguese, Brazilian)

* New translations activerecord.en.yml (Slovak)

* New translations activerecord.en.yml (Dutch)

* New translations activerecord.en.yml (Norwegian)

* New translations activerecord.en.yml (Polish)

* New translations activerecord.en.yml (Portuguese)

* New translations activerecord.en.yml (Russian)

* New translations activerecord.en.yml (Japanese)

* New translations activerecord.en.yml (Albanian)

* New translations activerecord.en.yml (Serbian (Cyrillic))

* New translations activerecord.en.yml (Swedish)

* New translations activerecord.en.yml (Turkish)

* New translations activerecord.en.yml (Ukrainian)

* New translations activerecord.en.yml (Chinese Simplified)

* New translations activerecord.en.yml (Vietnamese)

* New translations activerecord.en.yml (Galician)

* New translations activerecord.en.yml (Georgian)

* New translations activerecord.en.yml (Italian)

* New translations activerecord.en.yml (Catalan)

* New translations activerecord.en.yml (Czech)

* New translations activerecord.en.yml (Romanian)

* New translations activerecord.en.yml (French)

* New translations activerecord.en.yml (Spanish)

* New translations activerecord.en.yml (Afrikaans)

* New translations activerecord.en.yml (Arabic)

* New translations activerecord.en.yml (Bulgarian)

* New translations activerecord.en.yml (Armenian)

* New translations activerecord.en.yml (German)

* New translations activerecord.en.yml (Greek)

* New translations activerecord.en.yml (Frisian)

* New translations activerecord.en.yml (Basque)

* New translations activerecord.en.yml (Finnish)

* New translations activerecord.en.yml (Irish)

* New translations activerecord.en.yml (Hebrew)

* New translations activerecord.en.yml (Hungarian)

* New translations simple_form.en.yml (Ido)

* New translations simple_form.en.yml (Kabyle)

* New translations simple_form.en.yml (Standard Moroccan Tamazight)

* New translations simple_form.en.yml (Sardinian)

* New translations activerecord.en.yml (Indonesian)

* New translations activerecord.en.yml (Kurmanji (Kurdish))

* New translations activerecord.en.yml (Breton)

* New translations activerecord.en.yml (Persian)

* New translations activerecord.en.yml (Asturian)

* New translations activerecord.en.yml (Occitan)

* New translations activerecord.en.yml (Serbian (Latin))

* New translations activerecord.en.yml (Sorani (Kurdish))

* New translations activerecord.en.yml (Tatar)

* New translations activerecord.en.yml (Corsican)

* New translations en.yml (Burmese)

* New translations en.yml (Igbo)

* New translations activerecord.en.yml (Malayalam)

* New translations activerecord.en.yml (Sinhala)

* New translations activerecord.en.yml (Chinese Traditional, Hong Kong)

* New translations activerecord.en.yml (Norwegian Nynorsk)

* New translations activerecord.en.yml (Tamil)

* New translations activerecord.en.yml (Spanish, Argentina)

* New translations activerecord.en.yml (Spanish, Mexico)

* New translations activerecord.en.yml (Bengali)

* New translations activerecord.en.yml (Marathi)

* New translations activerecord.en.yml (Thai)

* New translations activerecord.en.yml (Croatian)

* New translations activerecord.en.yml (Kazakh)

* New translations activerecord.en.yml (Estonian)

* New translations activerecord.en.yml (Latvian)

* New translations activerecord.en.yml (Hindi)

* New translations activerecord.en.yml (Welsh)

* New translations activerecord.en.yml (Sardinian)

* New translations activerecord.en.yml (Kabyle)

* New translations activerecord.en.yml (Ido)

* New translations activerecord.en.yml (Standard Moroccan Tamazight)

* New translations en.json (Afrikaans)

* New translations en.yml (Bulgarian)

* New translations en.json (Hungarian)

* New translations en.json (Korean)

* New translations en.yml (Korean)

* New translations en.yml (Slovenian)

* New translations en.json (Swedish)

* New translations en.json (Chinese Simplified)

* New translations en.json (Vietnamese)

* New translations en.json (Icelandic)

* New translations en.json (Kurmanji (Kurdish))

* New translations simple_form.en.yml (Bulgarian)

* New translations doorkeeper.en.yml (Korean)

* New translations activerecord.en.yml (Bulgarian)

* New translations devise.en.yml (Bulgarian)

* New translations en.yml (German)

* New translations en.json (German)

* New translations en.json (Romanian)

* New translations en.json (Catalan)

* New translations en.json (Korean)

* New translations en.yml (Korean)

* New translations en.json (Norwegian)

* New translations en.json (Vietnamese)

* New translations en.json (Portuguese, Brazilian)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.json (Norwegian Nynorsk)

* New translations en.json (Latvian)

* New translations devise.en.yml (Bulgarian)

* New translations en.json (Hebrew)

* New translations en.json (Arabic)

* New translations en.json (Catalan)

* New translations en.yml (Korean)

* New translations en.json (Turkish)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.json (Scottish Gaelic)

* New translations simple_form.en.yml (Portuguese, Brazilian)

* New translations doorkeeper.en.yml (Portuguese, Brazilian)

* New translations devise.en.yml (Bulgarian)

* New translations en.json (Thai)

* New translations en.json (Bulgarian)

* New translations en.yml (Ukrainian)

* New translations en.json (Indonesian)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.json (Scottish Gaelic)

* New translations en.json (Asturian)

* New translations en.json (German)

* New translations en.json (Portuguese)

* New translations en.json (Spanish)

* New translations en.json (Danish)

* New translations en.json (Ukrainian)

* New translations en.json (Tamil)

* New translations en.json (Chinese Traditional)

* New translations simple_form.en.yml (Occitan)

* New translations doorkeeper.en.yml (Occitan)

* New translations en.json (Norwegian)

* New translations en.json (Arabic)

* New translations en.yml (Arabic)

* New translations en.json (Korean)

* New translations en.yml (Esperanto)

* New translations simple_form.en.yml (Arabic)

* New translations en.json (Arabic)

* New translations en.json (Basque)

* New translations en.yml (Basque)

* New translations en.json (Norwegian)

* New translations en.yml (Norwegian)

* New translations en.yml (Esperanto)

* New translations simple_form.en.yml (Basque)

* New translations doorkeeper.en.yml (Esperanto)

* New translations en.json (Esperanto)

* New translations en.json (Norwegian)

* New translations en.yml (Norwegian)

* New translations en.json (Latvian)

* New translations simple_form.en.yml (Occitan)

* New translations devise.en.yml (Esperanto)

* New translations en.yml (Czech)

* New translations en.json (German)

* New translations en.json (Czech)

* New translations en.json (French)

* New translations en.yml (Hebrew)

* New translations en.json (Norwegian)

* New translations en.json (Irish)

* New translations en.yml (Dutch)

* New translations en.json (Ukrainian)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Korean)

* New translations en.yml (Korean)

* New translations doorkeeper.en.yml (Korean)

* New translations doorkeeper.en.yml (Chinese Traditional)

* Run `yarn manage:translations`

* Run `bundle exec i18n-tasks normalize`

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-11-12 15:56:25 +09:00
Alex Nordlund 628b3fa449
Uppercase chart readme.md to help tools discover it (#20438) 2022-11-12 05:11:07 +01:00
Bearice Ren 28cda42af5
fixes ArgumentError when proxy is used (#20420)
* fixes ArgumentError when proxy is used

* Update app/lib/request.rb

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

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2022-11-11 21:31:03 +01:00
Jeong Arm c4c1bee880
Fix trendable status without review (#20214) 2022-11-11 21:24:10 +01:00
Claire 93a6ebc83d
Fix WebUI crash when listing server blocks and rationale is not available (#20408)
Regression from #20391

Fixes #20405
2022-11-11 21:23:03 +01:00
Emily Strickland 96f51e593f
Guard against error extracting `body` from URL (#20428)
If `Nokogiri::HTML(value).at_xpath('//body')` fails to find the `body` element, it will return `nil`. We can guard against that with an early return. Avoids calling `children` on `Nilclass` in those cases.
2022-11-11 21:22:28 +01:00
Claire 31005aad12
Add the ability to edit media attachment metadata for any unattached media (#20402) 2022-11-11 21:22:17 +01:00
Cutls 553b169d48
Do not show drag&drop dialog when not logined (#20400)
* Cannot upload until login

* and do not fire upload

* change username props to context
2022-11-11 21:19:48 +01:00
Claire 5e796dc6f8
Remove “No description added” media warning in edit mode (#20393)
Editing media metadata is not currently possible in edit mode, the button would
open the modal but saving the changes would error out.
2022-11-11 09:20:24 +01:00
Eugen Rochko 9bc0a6c861
Fix metadata scrubbing removing color profile from images (#20389) 2022-11-11 09:20:10 +01:00
Eugen Rochko 53028af10e
Bump version to 4.0.0rc3 (#20378) 2022-11-11 08:39:38 +01:00
Eugen Rochko 6774c339b2
Fix domain blocks on about page not working well on small screens in web UI (#20391) 2022-11-11 08:26:58 +01:00
Pierre Bourdon 36bc90e8aa
blurhash_transcoder: prevent out-of-bound reads with <8bpp images (#20388)
The Blurhash library used by Mastodon requires an input encoded as 24
bits raw RGB data. The conversion to raw RGB using Imagemagick did not
previously specify the desired bit depth. In some situations, this leads
Imagemagick to output in a pixel format using less bpp than expected.
This then manifested as segfaults of the Sidekiq process due to
out-of-bounds read, or potentially a (highly noisy) memory infoleak.

Fixes #19235.
2022-11-11 07:45:16 +01:00
Eugen Rochko 73fecc3358
Change e-mail in SECURITY.md (#20384) 2022-11-11 05:26:43 +01:00
Connor Shea cf4992c918
Only remove padding when listing applications (#20382)
This prevents styling issues on the Authorization page.
2022-11-11 02:55:20 +01:00
F 97f657f818
Note that CircleCI auth may be required to run PR pipelines (#20371)
See #20284
2022-11-11 02:54:02 +01:00
Yamagishi Kazutoshi 53d26cfc1c
Delay workbox import (#20376) 2022-11-11 01:33:59 +01:00
Yamagishi Kazutoshi 19a8563905
Fix `ENV` (#20377) 2022-11-11 01:33:32 +01:00
F d4f973227c
Test the native_locale_name of a non-standard locale (#20284)
`:en` is English for both `standard_locale_name` and
`native_locale_name`, and so makes for a poor test candidate for
differentiating between them.
2022-11-11 00:06:18 +01:00
Erik Sundell 302a58c22b
helm: fix consistent indentation, chomping, and use of with (#19918) 2022-11-10 23:24:39 +01:00
Claire 86f6631d28
Remove dead code and refactor status threading code (#20357)
* Remove dead code

* Remove unneeded/broken parameters and refactor descendant computation
2022-11-10 22:30:00 +01:00
F a02a453a40
Add Scots to the supported locales (#20283)
Fixes #20249
2022-11-10 21:11:38 +01:00
Eugen Rochko c6c7c6223d
Change verification to only work for https links (#20304)
Fix #20242
2022-11-10 21:09:03 +01:00
F 9feba112a7
Make enable_starttls configurable by envvars (#20321)
ENABLE_STARTTLS is designed to replace ENABLE_STARTTLS_AUTO by accepting
three values: 'auto' (the default), 'always', and 'never'. If
ENABLE_STARTTLS isn't provided, we fall back to ENABLE_STARTTLS_AUTO. In
this way, this change should be fully backwards compatible.

Resolves #20311
2022-11-10 21:06:21 +01:00
Claire 1615c3eb6e
Change logged out /api/v1/statuses/:id/context logged out limits (#20355) 2022-11-10 21:06:08 +01:00
Claire 894ce3726a
Fix unnecessary service worker registration and preloading when logged out (#20341) 2022-11-10 20:26:04 +01:00
Alex Nordlund 397845453e
Update Helm README and bump version (#20346)
* Update Helm chart README and comments in values.yaml

* Bump next Helm chart to 2.2.0
2022-11-10 20:25:23 +01:00
Claire 8e1e7fe2e0
Add old logo files back (#20332)
Fixes #20221
2022-11-10 20:25:12 +01:00
Claire 99734ac936
Remove preview cards from fav and boost notifications (#20335)
Fixes #20329
2022-11-10 19:36:12 +01:00
Joe Friedl 86232e68a8
Give web container time to start (#19828) 2022-11-10 19:16:49 +01:00
mickkael 6c7cdedb24
Helm chart improved for ingress (#19826)
* ingressClassName

* ingress values must be optional
2022-11-10 19:11:25 +01:00
Alex Nordlund 60c4df3d1d
Bump next Helm chart to 2.1.0 (#20155) 2022-11-10 19:10:49 +01:00
Sheogorath e868f41923
fix(chart): Fix gitops-incompatible random rolling (#20184)
This patch reworks the Pod rolling mechanism, which is supposed to update Pods
with each migration run, but since the it generates a new random value on each
helm execution, this will constantly roll all pods in a GitOps driven deployment,
which reconciles the helm release.

This is resolved by fixing the upgrade to the `.Release.Revision`, which should
stay identical, unless config or helm release version have been changed. Further
it introduces automatic rolls based on adjustments to the environment variables
and secrets.

The implementation uses a helper template, following the 1-2-N rule, and omitting
code duplication.

References:
https://helm.sh/docs/chart_template_guide/builtin_objects/
https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
2022-11-10 19:10:38 +01:00
Alex Nordlund 86d4b6f7c9
Helm update readme.md (#20154)
* gitignore packaged helm charts

* Add upgrade instructions to helm chart/readme.md

* Note Helm secret changes that are necessary on failed upgrades
2022-11-10 19:10:06 +01:00
Alex Nordlund b907871604
Helm update readme.md (#20154)
* gitignore packaged helm charts

* Add upgrade instructions to helm chart/readme.md

* Note Helm secret changes that are necessary on failed upgrades
2022-11-10 19:09:54 +01:00
atsuchan 6df9d388e7
Update Flavour 'ja' Translation (#1911) 2022-11-10 17:26:28 +01:00
Eugen Rochko f8e8e622e5
Change incoming activity processing to happen in `ingress` queue (#20264) 2022-11-10 14:21:51 +01:00
Claire 89a6b76f99
Fix color of the “No description added“ media upload warning on light theme (#20328) 2022-11-10 14:21:31 +01:00
Claire ee7e49d1b1
Merge pull request #1910 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-10 13:27:40 +01:00
Eugen Rochko c4d2c72924 [Glitch] Add option to open original page in dropdowns of remote content in web UI
Port ef582dc4f2 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-10 11:06:56 +01:00
Sasha Sorokin 099b3011aa [Glitch] Remove aria-pressed where it's redundant
Port d055d75172 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-10 10:25:43 +01:00
Eugen Rochko 65b6c4f6df [Glitch] Change larger reblogs/favourites numbers to be shortened in web UI
Port 7bdb2433f1 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-10 10:15:21 +01:00
Effy Elden c722c4cce8 [Glitch] Remove unused timeline_container to fix linter errors
Port 8fdbb4d00d to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-10 09:54:19 +01:00
Eugen Rochko 41ea39903d [Glitch] Fix confusing wording in interaction modal in web UI
Port 16122761c5 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-10 09:53:06 +01:00
Eugen Rochko d3a29a136c [Glitch] Fix profile header being cut off in light theme in web UI
Port e37e8deb0f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-10 09:51:46 +01:00
Claire c118918520 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/models/custom_emoji.rb`:
  Not a real conflict, just upstream changing a line too close to
  a glitch-soc-specific validation.
  Applied upstream changes.
- `app/models/public_feed.rb`:
  Not a real conflict, just upstream changing a line too close to
  a glitch-soc-specific parameter documentation.
  Applied upstream changes.
2022-11-10 09:36:47 +01:00
Effy Elden 8fdbb4d00d
Remove unused timeline_container to fix linter errors (#20305) 2022-11-10 08:50:45 +01:00
Eugen Rochko 7bdb2433f1
Change larger reblogs/favourites numbers to be shortened in web UI (#20303) 2022-11-10 08:49:59 +01:00
Eugen Rochko 16122761c5
Fix confusing wording in interaction modal in web UI (#20302) 2022-11-10 08:49:48 +01:00
Eugen Rochko ef582dc4f2
Add option to open original page in dropdowns of remote content in web UI (#20299)
Change profile picture click to open profile picture in modal in web UI
2022-11-10 08:49:35 +01:00
Eugen Rochko e37e8deb0f
Fix profile header being cut off in light theme in web UI (#20298) 2022-11-10 07:32:37 +01:00
Eugen Rochko 9965a23b04
Change link verification to ignore IDN domains (#20295)
Fix #3833
2022-11-10 06:27:45 +01:00
James Tucker 78a6b871fe
Improve performance by avoiding regex construction (#20215)
```ruby
10.times { p /#{FOO}/.object_id }
10.times { p FOO_RE.object_id }
```
2022-11-10 05:49:30 +01:00
Eugen Rochko 0cd0786aef
Revert filtering public timelines by locale by default (#20294) 2022-11-10 05:34:42 +01:00
trwnh b280a255c4
Change `master` branch to `main` branch (#20290) 2022-11-10 04:02:05 +01:00
Eugen Rochko 45ce858fd9
Fix `mailers` queue not being used for mailers (#20274)
Regression since Rails 6.1
2022-11-10 02:31:09 +01:00
Claire a5394980f2
Fix NameError in Webfinger redirect handling in ActivityPub::FetchRemoteActorService (#20260) 2022-11-09 20:10:38 +01:00
Eugen Rochko cd0a87f170
New Crowdin updates (#20016)
* New translations en.json (Telugu)

* New translations en.yml (Telugu)

* New translations en.yml (Occitan)

* New translations en.json (Serbian (Latin))

* New translations en.yml (Kabyle)

* New translations en.json (Igbo)

* New translations en.yml (Burmese)

* New translations en.json (Burmese)

* New translations activerecord.en.yml (Frisian)

* New translations en.yml (Standard Moroccan Tamazight)

* New translations en.json (Standard Moroccan Tamazight)

* New translations en.yml (Silesian)

* New translations en.json (Silesian)

* New translations en.yml (Taigi)

* New translations en.json (Taigi)

* New translations en.json (Kabyle)

* New translations en.yml (Serbian (Latin))

* New translations en.yml (Sanskrit)

* New translations en.json (Sanskrit)

* New translations en.yml (Sardinian)

* New translations en.json (Sardinian)

* New translations en.yml (Corsican)

* New translations en.json (Corsican)

* New translations en.yml (Sorani (Kurdish))

* New translations en.json (Sorani (Kurdish))

* New translations en.yml (Kurmanji (Kurdish))

* New translations en.json (Kurmanji (Kurdish))

* New translations en.yml (Igbo)

* New translations en.json (Hebrew)

* New translations en.json (Polish)

* New translations doorkeeper.en.yml (Frisian)

* New translations en.json (Latvian)

* New translations en.json (Icelandic)

* New translations en.yml (Swedish)

* New translations en.json (Swedish)

* New translations en.json (Slovenian)

* New translations en.json (Russian)

* New translations en.json (Italian)

* New translations en.json (German)

* New translations en.yml (Hebrew)

* New translations en.yml (Finnish)

* New translations en.json (Finnish)

* New translations en.yml (Danish)

* New translations en.json (Afrikaans)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Dutch)

* New translations simple_form.en.yml (Hebrew)

* New translations en.json (Hebrew)

* New translations en.json (Spanish, Argentina)

* New translations activerecord.en.yml (Hebrew)

* New translations simple_form.en.yml (Occitan)

* New translations doorkeeper.en.yml (Hebrew)

* New translations simple_form.en.yml (Hebrew)

* New translations en.yml (Occitan)

* New translations en.json (Welsh)

* New translations en.yml (Chinese Traditional)

* New translations en.json (German)

* New translations en.json (Chinese Traditional)

* New translations en.json (Ukrainian)

* New translations en.json (Portuguese)

* New translations en.yml (Hebrew)

* New translations en.json (Finnish)

* New translations en.json (Japanese)

* New translations devise.en.yml (Chinese Traditional)

* New translations en.yml (Thai)

* New translations en.json (Hebrew)

* New translations en.json (Thai)

* New translations en.json (Greek)

* New translations en.yml (Hebrew)

* New translations en.json (Norwegian Nynorsk)

* New translations en.json (Occitan)

* New translations simple_form.en.yml (Hebrew)

* New translations simple_form.en.yml (Thai)

* New translations simple_form.en.yml (Norwegian Nynorsk)

* New translations en.json (Thai)

* New translations en.json (Catalan)

* New translations en.yml (Dutch)

* New translations simple_form.en.yml (Dutch)

* New translations en.json (Polish)

* New translations simple_form.en.yml (Thai)

* New translations en.json (Esperanto)

* New translations en.json (Chinese Simplified)

* New translations en.json (Irish)

* New translations activerecord.en.yml (Irish)

* New translations en.json (Irish)

* New translations en.yml (Dutch)

* New translations en.yml (Portuguese, Brazilian)

* New translations simple_form.en.yml (Italian)

* New translations en.json (Danish)

* New translations en.json (Galician)

* New translations simple_form.en.yml (Galician)

* New translations simple_form.en.yml (Norwegian Nynorsk)

* New translations en.json (Czech)

* New translations en.json (Turkish)

* New translations en.json (Vietnamese)

* New translations simple_form.en.yml (Norwegian Nynorsk)

* New translations en.json (Bulgarian)

* New translations en.json (Czech)

* New translations en.json (Albanian)

* New translations en.json (Arabic)

* New translations en.json (Chinese Traditional, Hong Kong)

* New translations en.json (Bulgarian)

* New translations en.json (Macedonian)

* New translations en.json (Chinese Traditional, Hong Kong)

* New translations en.json (Kurmanji (Kurdish))

* New translations en.json (Bulgarian)

* New translations devise.en.yml (Polish)

* New translations en.json (Bulgarian)

* New translations en.json (Hungarian)

* New translations en.yml (Japanese)

* New translations en.json (Norwegian)

* New translations en.json (Bulgarian)

* New translations en.json (Korean)

* New translations en.json (Scottish Gaelic)

* New translations en.yml (Scottish Gaelic)

* New translations simple_form.en.yml (Scottish Gaelic)

* New translations activerecord.en.yml (Scottish Gaelic)

* New translations devise.en.yml (Scottish Gaelic)

* New translations doorkeeper.en.yml (Scottish Gaelic)

* New translations en.json (Bulgarian)

* New translations en.json (German)

* New translations en.json (Catalan)

* New translations en.yml (Catalan)

* New translations en.json (Latvian)

* New translations en.yml (Latvian)

* New translations simple_form.en.yml (Catalan)

* New translations simple_form.en.yml (Latvian)

* New translations en.json (Esperanto)

* New translations en.json (Catalan)

* New translations en.yml (Catalan)

* New translations en.json (Norwegian)

* New translations en.json (Vietnamese)

* New translations en.yml (Esperanto)

* New translations doorkeeper.en.yml (Frisian)

* New translations en.yml (Romanian)

* New translations en.yml (Frisian)

* New translations en.json (Norwegian)

* New translations en.yml (Russian)

* New translations en.yml (Esperanto)

* New translations doorkeeper.en.yml (Frisian)

* New translations en.json (Norwegian)

* New translations en.yml (Russian)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.json (Norwegian)

* New translations en.json (Swedish)

* New translations en.json (Occitan)

* New translations en.json (Afrikaans)

* New translations en.json (Catalan)

* New translations en.json (Norwegian)

* New translations en.json (Swedish)

* New translations en.yml (Norwegian Nynorsk)

* New translations en.json (Welsh)

* New translations en.yml (Esperanto)

* New translations en.json (Occitan)

* New translations doorkeeper.en.yml (French)

* New translations activerecord.en.yml (Norwegian)

* New translations activerecord.en.yml (Welsh)

* New translations devise.en.yml (Norwegian)

* New translations devise.en.yml (Esperanto)

* New translations en.json (Chinese Simplified)

* New translations en.json (Welsh)

* New translations doorkeeper.en.yml (Norwegian)

* New translations activerecord.en.yml (Norwegian)

* New translations devise.en.yml (Norwegian)

* New translations en.json (Dutch)

* New translations en.json (Irish)

* New translations en.yml (Norwegian)

* New translations doorkeeper.en.yml (Norwegian)

* New translations en.json (Dutch)

* New translations en.json (Irish)

* New translations en.yml (Dutch)

* New translations simple_form.en.yml (Dutch)

* New translations en.json (Norwegian)

* New translations simple_form.en.yml (Dutch)

* New translations en.json (Irish)

* New translations en.yml (Dutch)

* New translations simple_form.en.yml (Dutch)

* New translations en.json (English, United Kingdom)

* New translations simple_form.en.yml (English, United Kingdom)

* New translations doorkeeper.en.yml (English, United Kingdom)

* New translations activerecord.en.yml (English, United Kingdom)

* New translations en.json (Dutch)

* New translations en.json (Irish)

* New translations en.yml (Irish)

* New translations en.json (Portuguese, Brazilian)

* New translations en.yml (Portuguese, Brazilian)

* New translations simple_form.en.yml (Irish)

* New translations en.json (Irish)

* New translations en.yml (Irish)

* New translations en.yml (Portuguese, Brazilian)

* New translations simple_form.en.yml (Irish)

* New translations doorkeeper.en.yml (Irish)

* New translations en.json (Bulgarian)

* New translations en.json (Irish)

* New translations en.yml (Irish)

* New translations simple_form.en.yml (Irish)

* New translations doorkeeper.en.yml (Irish)

* New translations en.json (Bulgarian)

* New translations en.yml (Irish)

* New translations en.json (Chinese Traditional)

* New translations en.json (Galician)

* New translations en.json (Bulgarian)

* New translations en.json (Latvian)

* New translations en.yml (Latvian)

* New translations simple_form.en.yml (Latvian)

* New translations en.json (Igbo)

* New translations en.json (Thai)

* New translations en.json (Bulgarian)

* New translations en.json (Esperanto)

* New translations en.json (Irish)

* New translations en.yml (Chinese Traditional)

* New translations en.yml (Esperanto)

* New translations simple_form.en.yml (Turkish)

* New translations simple_form.en.yml (Esperanto)

* New translations en.yml (Czech)

* New translations en.json (Esperanto)

* New translations en.json (Portuguese, Brazilian)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.json (Breton)

* New translations en.yml (Breton)

* New translations simple_form.en.yml (Portuguese, Brazilian)

* New translations devise.en.yml (Portuguese, Brazilian)

* New translations en.yml (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Esperanto)

* New translations en.json (Afrikaans)

* New translations en.json (Portuguese, Brazilian)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (Esperanto)

* New translations en.json (Breton)

* New translations en.yml (Breton)

* New translations simple_form.en.yml (Portuguese, Brazilian)

* New translations doorkeeper.en.yml (Portuguese, Brazilian)

* New translations simple_form.en.yml (Esperanto)

* New translations doorkeeper.en.yml (Esperanto)

* New translations activerecord.en.yml (Esperanto)

* New translations devise.en.yml (Esperanto)

* New translations en.json (Bulgarian)

* New translations en.json (Afrikaans)

* New translations en.json (Portuguese, Brazilian)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.json (Indonesian)

* New translations en.yml (Portuguese, Brazilian)

* New translations simple_form.en.yml (Portuguese, Brazilian)

* Run `yarn manage:translations`

* Run `bundle exec i18n-tasks normalize`

* New translations en.json (Occitan)

* Run `yarn manage:translations`

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-11-10 00:43:48 +09:00
Vyr Cossont 104157bd01
Add Balaibalan, Láadan, Lingua Franca Nova, Lojban, Toki Pona to language list (#20168)
* Add Balaibalan, Láadan, Lojban, Toki Pona to language list

Fixes #8995.

* Correct translated names for Lojban and Toki Pona

* Correct translated name for Balaibalan

* Add Lingua Franca Nova aka Elefen

* Disable unhelpful Rubocop checks

* Re-enable Rubocop checks at end of file
2022-11-09 15:23:52 +01:00
trwnh 029b5cd5b1
Fix GET /api/v1/admin/ip_blocks/:id (#20207) 2022-11-09 15:22:58 +01:00
Claire 5333447be0
Change account deletion requests to spread out over time (#20222) 2022-11-09 14:08:19 +01:00
Eugen Rochko e98833748e
Fix being able to spoof link verification (#20217)
- Change verification to happen in `default` queue
- Change verification worker to only be queued if there's something to do
- Add `link` tags from metadata fields to page header of profiles
2022-11-09 08:24:21 +01:00
keiya 53817294fc
Fix nginx location matching (#20198) 2022-11-09 04:12:57 +01:00
Claire dd7176a4b5
Fix redirects from /web/ discarding everything after a dot (#20148)
Fixes #20145
2022-11-09 01:30:33 +01:00
luzpaz 6ba52306f9
Fix typos (#19849)
Found via `codespell -q 3 -S ./yarn.lock,./CHANGELOG.md,./AUTHORS.md,./config/locales,./app/javascript/mastodon/locales -L ba,followings,keypair,medias,pattens,pixelx,rememberable,ro,te`
2022-11-08 17:32:03 +01:00
Christian Clauss 6f1559ed0f
CHANGELOG.md: Fix typos (#19838) 2022-11-08 17:31:52 +01:00
Sasha Sorokin d055d75172
Remove aria-pressed where it's redundant (#19912)
This commit removes aria-pressed attribute from all elements which
contents or other descriptive attributes change in active state,
effectively replacing the meaning of the button, in which case
aria-pressed, an attribute specified whether the button is currently
pressed, would create a confusion. (Spoiler: it's everywhere).

See https://github.com/mastodon/mastodon/issues/13545#issuecomment-1304886969
2022-11-08 17:31:32 +01:00
Claire d70303bba6
Add server-side route so that legacy /web/statuses/:id URLs keep being supported (#19978) 2022-11-08 17:29:14 +01:00
trwnh b1a48e05b6
Change Report category to "violation" if rule IDs are provided (#20137)
* Change Report category to "violation" if rule IDs are provided

* Fix LiteralAsCondition

* Add parentheses to conditional statement
2022-11-08 17:28:02 +01:00
Claire c476dfc725
Fix nodeinfo metadata attribute being an array instead of an object (#20114)
Fixes #20111
2022-11-08 17:26:11 +01:00
Alex Nordlund 476e74b4c4
Assign unique set of labels to k8s deployments #19703 (#19706) 2022-11-08 17:21:06 +01:00
Sheogorath f4b78028a3
chore(chart): Update appVersion in helm chart (#19653)
This patch updates the helm chart appVersion to the current release and
removes the additional definition in the image tag field, to reduce
duplication.

Since the image will automatically default to the Charts' app version
anyway and this is the more common place to specifiy application
versions for helm charts, this patch switches the prefering this field.

The reason why to use the tag field for the chart itself, seems to be
gone. Since renovatebot is no longer used.
2022-11-08 17:20:34 +01:00
Moritz Hedtke f7613febb3
helm: Fix ingress pathType (#19729) 2022-11-08 17:20:09 +01:00
Alex Nordlund fd3c482104
Roll pods to pick up db migrations even if podAnnotations is empty (#19702) 2022-11-08 17:19:14 +01:00
Alex Nordlund d3afd7a2f1
Fix helm postgresql secret (#19678)
* Revert "Fix helm chart use of Postgres Password (#19537)"

This reverts commit 6094a916b1.

* Revert "Fix PostgreSQL password reference for jobs (#19504)"

This reverts commit dae954ef11.

* Revert "Fix PostgreSQL password reference (#19502)"

This reverts commit 9bf6a8af82.

* Correct default username in postgresql auth
2022-11-08 17:18:57 +01:00
k.bigwheel (kazufumi nishida) 9358fd295d
Add postgresql password settings hint (#19112) 2022-11-08 17:18:22 +01:00
trwnh c374729225
Add `sensitized` to Admin::Account serializer (fix #19148) (#20094)
* Add `sensitized` to Admin::Account serializer (fix #19148)

* remove whitespace, please linter
2022-11-08 17:15:54 +01:00
Claire b2a25d446a
Merge pull request #1905 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-08 16:42:24 +01:00
trwnh 89e1974f30
Make account endorsements idempotent (fix #19045) (#20118)
* Make account endorsements idempotent (fix #19045)

* Accept suggestion to use exists? instead of find_by + nil check

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

* fix logic (unless, not if)

* switch to using `find_or_create_by!`

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-11-08 16:39:15 +01:00
trwnh 455a754081
Fix missing cast of status and rule IDs to string (fix #19048) (#20122) 2022-11-08 16:37:41 +01:00
trwnh 68d9dcd425
Fix uncaught 500 error on invalid `replies_policy` (Fix #19097) (#20126) 2022-11-08 16:37:28 +01:00
Claire c989faaa62
Change Request connection logic to try both IPv6 and IPv4 when available (#20108)
Fixes #19751
2022-11-08 16:36:26 +01:00
Roni Laukkarinen 36b0ff57b7
Fix grammar (#20106) 2022-11-08 16:35:42 +01:00
Claire 9b6d6a919f [Glitch] Fix redrafting a currently-editing post not leaving edit mode
Port 782b6835f7 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-08 16:26:25 +01:00
Claire fe1b694128 [Glitch] Fix opening the language picker scrolling the single-column view to the top
Port 608343c135 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-08 15:49:09 +01:00
Zach Flanders 6eac1cfccd [Glitch] Fix spoiler buttons css not rendering correct color in light theme
Port 0beb095a4b to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-08 15:47:48 +01:00
Claire a8c854b3ea Merge branch 'main' into glitch-soc/merge-upstream 2022-11-08 15:44:57 +01:00
Claire 782b6835f7
Fix redrafting a currently-editing post not leaving edit mode (#20023) 2022-11-08 04:06:54 +01:00
James Tucker 833d9c2f1c
Improve performance by avoiding method cache busts (#19957)
Switch to monkey-patching http.rb rather than a runtime extend of each
response, so as to avoid busting the global method cache. A guard is
included that will provide developer feedback in development and test
environments should the monkey patch ever collide.
2022-11-08 04:00:27 +01:00
Claire 9f4930ec11
Add password autocomplete hints (#20071)
Fixes #20067

Our password autocomplete hints were “off” but that does not prevent current
browsers from trying to autocomplete them anyway, so use `current-password` and
`new-password` so they don't put a newly-generated password in a password
confirmation prompt, or the old password for a password renewal prompt.
2022-11-08 03:53:06 +01:00
Claire 608343c135
Fix opening the language picker scrolling the single-column view to the top (#19983)
Fixes #19915
2022-11-08 03:52:52 +01:00
Postmodern ca80beb653
Micro-optimization: use `if`/`else` instead of `Array#compact` and `Array#min` (#19906)
* Technically `if`/`else` is faster than using `[value1, value2].compact.min` to find the lesser of two values, one of which may be `nil`.
2022-11-08 03:50:47 +01:00
Zach Flanders 0beb095a4b
Fix spoiler buttons css not rendering correct color in light theme (#19960)
* Updating status__content__spoiler-link css for mastodon-light theme to ensure correct rendering precedence

* Adding focus css selector to status__content__spoiler-link mastodon-light theme

* reformatting code to match convention of having css selectors on separate lines

* fixing code format for  scss linting issue
2022-11-07 22:37:36 +01:00
Claire bbf74498f5
Fix validation error in SynchronizeFeaturedTagsCollectionWorker (#20018)
* Fix followers count not being updated when migrating follows

Fixes #19900

* Fix validation error in SynchronizeFeaturedTagsCollectionWorker

Also saves remote user's chosen case for hashtags

* Limit remote featured tags before validation
2022-11-07 22:35:53 +01:00
Claire ac219dd1f6
Merge pull request #1903 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-07 21:07:01 +01:00
Claire 2bc22be66c [Glitch] Add aria-expanded to content warning toggle button
Port 622f603ac7 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-07 20:04:31 +01:00
Claire be7032b9cf Merge branch 'main' into glitch-soc/merge-upstream 2022-11-07 19:53:30 +01:00
Claire 3114c826a7
Fix filter handling in status cache hydration (#19963) 2022-11-07 19:47:48 +01:00
Postmodern 106648b456
Micro-optimization: only split `acct` into two Strings (#19901)
* Since `acct` is split by `@` and assigned to `username` and `domain`, we only need to split `acct` into two Strings.
2022-11-07 16:17:55 +01:00
Eugen Rochko 86a80acf40
New Crowdin updates (#19771)
* New translations en.yml (Vietnamese)

* New translations en.yml (Galician)

* New translations en.yml (Icelandic)

* New translations en.yml (Japanese)

* New translations en.yml (Armenian)

* New translations en.yml (German)

* New translations en.yml (Czech)

* New translations en.yml (Chinese Simplified)

* New translations en.yml (Ido)

* New translations en.json (Esperanto)

* New translations en.yml (Turkish)

* New translations en.yml (Albanian)

* New translations en.yml (Ukrainian)

* New translations en.yml (Romanian)

* New translations en.yml (Hungarian)

* New translations en.yml (Bulgarian)

* New translations en.yml (Catalan)

* New translations en.yml (Danish)

* New translations en.yml (Greek)

* New translations en.yml (Frisian)

* New translations en.yml (Basque)

* New translations en.json (Finnish)

* New translations en.yml (Finnish)

* New translations en.yml (Irish)

* New translations en.yml (Hebrew)

* New translations en.json (Portuguese, Brazilian)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (Sorani (Kurdish))

* New translations en.yml (Sinhala)

* New translations en.yml (Cornish)

* New translations en.yml (Kannada)

* New translations en.yml (Asturian)

* New translations en.yml (Occitan)

* New translations en.yml (Serbian (Latin))

* New translations en.yml (Kurmanji (Kurdish))

* New translations en.yml (Corsican)

* New translations en.yml (Malayalam)

* New translations en.yml (Sardinian)

* New translations en.yml (Sanskrit)

* New translations en.yml (Kabyle)

* New translations en.yml (Taigi)

* New translations en.yml (Silesian)

* New translations en.yml (Standard Moroccan Tamazight)

* New translations simple_form.en.yml (French)

* New translations simple_form.en.yml (Kurmanji (Kurdish))

* New translations en.yml (Burmese)

* New translations en.yml (Breton)

* New translations en.yml (Tatar)

* New translations en.yml (Indonesian)

* New translations en.yml (Kazakh)

* New translations en.yml (Persian)

* New translations en.yml (Tamil)

* New translations en.yml (Spanish, Argentina)

* New translations en.yml (Spanish, Mexico)

* New translations en.yml (Bengali)

* New translations en.yml (Marathi)

* New translations en.yml (Croatian)

* New translations en.yml (Norwegian Nynorsk)

* New translations en.yml (Estonian)

* New translations en.yml (Chinese Traditional, Hong Kong)

* New translations en.json (Latvian)

* New translations en.yml (Latvian)

* New translations en.yml (Hindi)

* New translations en.yml (Malay)

* New translations en.yml (Telugu)

* New translations en.yml (English, United Kingdom)

* New translations en.yml (Welsh)

* New translations en.yml (Esperanto)

* New translations en.yml (Uyghur)

* New translations en.yml (Igbo)

* New translations en.json (Czech)

* New translations en.json (Dutch)

* New translations en.json (Hungarian)

* New translations en.yml (Hungarian)

* New translations en.yml (Dutch)

* New translations en.yml (Polish)

* New translations en.yml (Swedish)

* New translations en.json (Icelandic)

* New translations en.yml (Icelandic)

* New translations en.json (Dutch)

* New translations en.yml (Ukrainian)

* New translations en.yml (Swedish)

* New translations en.json (Ukrainian)

* New translations en.json (Chinese Simplified)

* New translations simple_form.en.yml (Irish)

* New translations simple_form.en.yml (Asturian)

* New translations devise.en.yml (Asturian)

* New translations en.json (Slovenian)

* New translations en.yml (Slovenian)

* New translations en.json (Vietnamese)

* New translations en.yml (Vietnamese)

* New translations en.yml (Asturian)

* New translations simple_form.en.yml (Vietnamese)

* New translations simple_form.en.yml (Asturian)

* New translations activerecord.en.yml (Asturian)

* New translations devise.en.yml (Asturian)

* New translations en.json (Japanese)

* New translations en.yml (Kurmanji (Kurdish))

* New translations en.json (Japanese)

* New translations en.yml (Japanese)

* New translations en.json (Vietnamese)

* New translations en.yml (Vietnamese)

* New translations simple_form.en.yml (Vietnamese)

* New translations doorkeeper.en.yml (Vietnamese)

* New translations en.json (Afrikaans)

* New translations en.json (Galician)

* New translations en.yml (Turkish)

* New translations en.json (Afrikaans)

* New translations en.yml (Afrikaans)

* New translations en.yml (Galician)

* New translations simple_form.en.yml (Afrikaans)

* New translations en.json (Albanian)

* New translations en.yml (Albanian)

* New translations en.yml (French)

* New translations en.json (Arabic)

* New translations en.yml (Arabic)

* New translations en.json (Slovenian)

* New translations simple_form.en.yml (French)

* New translations simple_form.en.yml (Albanian)

* New translations activerecord.en.yml (French)

* New translations activerecord.en.yml (Sorani (Kurdish))

* New translations devise.en.yml (French)

* New translations en.json (Norwegian Nynorsk)

* New translations en.yml (Occitan)

* New translations doorkeeper.en.yml (Norwegian Nynorsk)

* New translations simple_form.en.yml (Occitan)

* New translations doorkeeper.en.yml (Occitan)

* New translations activerecord.en.yml (Occitan)

* New translations en.yml (Spanish)

* New translations en.yml (Japanese)

* New translations en.json (Occitan)

* New translations en.json (Kurmanji (Kurdish))

* New translations simple_form.en.yml (Japanese)

* New translations simple_form.en.yml (Norwegian Nynorsk)

* New translations doorkeeper.en.yml (Norwegian Nynorsk)

* New translations doorkeeper.en.yml (Occitan)

* New translations en.yml (Thai)

* New translations en.json (Thai)

* New translations en.json (Irish)

* New translations en.json (Slovenian)

* New translations en.json (Scottish Gaelic)

* New translations en.yml (Scottish Gaelic)

* New translations en.yml (Kurmanji (Kurdish))

* New translations simple_form.en.yml (Irish)

* New translations doorkeeper.en.yml (Irish)

* New translations simple_form.en.yml (Thai)

* New translations en.json (Thai)

* New translations en.json (German)

* New translations en.yml (Spanish)

* New translations en.json (Greek)

* New translations en.json (Slovenian)

* New translations en.json (Scottish Gaelic)

* New translations en.yml (Asturian)

* New translations simple_form.en.yml (Thai)

* New translations simple_form.en.yml (Scottish Gaelic)

* New translations devise.en.yml (Asturian)

* New translations en.json (Danish)

* New translations en.json (Korean)

* New translations en.yml (Korean)

* New translations en.yml (Asturian)

* New translations simple_form.en.yml (Korean)

* New translations en.json (French)

* New translations en.json (Danish)

* New translations en.yml (Danish)

* New translations en.json (Ukrainian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.json (Scottish Gaelic)

* New translations en.yml (Scottish Gaelic)

* New translations simple_form.en.yml (Ukrainian)

* New translations doorkeeper.en.yml (Portuguese, Brazilian)

* New translations simple_form.en.yml (Scottish Gaelic)

* New translations doorkeeper.en.yml (Scottish Gaelic)

* New translations en.json (German)

* New translations en.json (Catalan)

* New translations en.json (Danish)

* New translations en.yml (Danish)

* New translations en.json (Portuguese, Brazilian)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (Spanish, Mexico)

* New translations en.json (Asturian)

* New translations en.json (Occitan)

* New translations doorkeeper.en.yml (Catalan)

* New translations en.json (Scottish Gaelic)

* New translations en.yml (Scottish Gaelic)

* New translations simple_form.en.yml (Norwegian Nynorsk)

* New translations simple_form.en.yml (Scottish Gaelic)

* New translations en.json (German)

* New translations simple_form.en.yml (Norwegian Nynorsk)

* New translations en.json (Asturian)

* New translations en.yml (Asturian)

* New translations en.json (Sorani (Kurdish))

* New translations en.json (French)

* New translations en.yml (Dutch)

* New translations en.json (Welsh)

* New translations en.json (Sorani (Kurdish))

* New translations doorkeeper.en.yml (Norwegian Nynorsk)

* New translations en.json (Dutch)

* New translations en.json (French)

* New translations en.yml (Dutch)

* New translations simple_form.en.yml (Dutch)

* New translations doorkeeper.en.yml (Dutch)

* New translations en.json (Irish)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (German)

* New translations en.json (Arabic)

* New translations en.yml (Arabic)

* New translations en.yml (Sorani (Kurdish))

* New translations simple_form.en.yml (Arabic)

* New translations en.yml (Ukrainian)

* New translations en.json (Ukrainian)

* New translations simple_form.en.yml (Ukrainian)

* New translations doorkeeper.en.yml (Ukrainian)

* New translations activerecord.en.yml (Ukrainian)

* New translations en.json (Russian)

* New translations en.json (Bulgarian)

* New translations en.json (Hebrew)

* New translations en.json (Bulgarian)

* New translations en.json (Japanese)

* New translations en.yml (Finnish)

* New translations simple_form.en.yml (Japanese)

* New translations devise.en.yml (Finnish)

* New translations en.json (Hebrew)

* New translations en.yml (German)

* New translations en.json (Bulgarian)

* New translations en.yml (Polish)

* New translations simple_form.en.yml (Japanese)

* New translations activerecord.en.yml (Arabic)

* New translations activerecord.en.yml (Hebrew)

* New translations en.json (Bulgarian)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations simple_form.en.yml (Portuguese, Brazilian)

* New translations en.json (Bulgarian)

* New translations en.json (Frisian)

* New translations en.json (Russian)

* New translations en.json (Turkish)

* New translations en.json (Ukrainian)

* New translations simple_form.en.yml (German)

* New translations simple_form.en.yml (Russian)

* New translations devise.en.yml (Frisian)

* New translations en.yml (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Czech)

* New translations en.json (Frisian)

* New translations en.json (Italian)

* New translations en.json (Polish)

* Run `yarn manage:translations`

* Run `bundle exec i18n-tasks normalize`

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-11-08 00:06:48 +09:00
Claire 622f603ac7
Add aria-expanded to content warning toggle button (#19975)
Fixes #19920
2022-11-07 15:48:46 +01:00
Claire 1e1289b024
Fix crash when external auth provider has no display_name set (#19962)
Fixes #19913
2022-11-07 15:43:24 +01:00
Claire e1227457f1
Fix links to the Web UI in notifications (#19981)
Most of the old routes are broken because of the /web removal.
2022-11-07 15:42:58 +01:00
Sunny Ripert 8515bc7962
Add form element on focal point modal (#19834)
* Add form element on focal point modal

* Add type="button" for detection button
2022-11-07 15:41:42 +01:00
Claire 5925a31b78
Fix followers count not being updated when migrating follows (#19998)
Fixes #19900
2022-11-07 15:38:55 +01:00
Claire c493c967d6
Fix light theme issues with the favourite modal and some background colors (#1902)
* Fix favourite modal styling in glitch-soc light theme

* Fix unnecessary difference between glitch-soc's light theme and upstream's
2022-11-07 10:34:18 +01:00
Claire b67e0c94a6
Merge pull request #1899 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2022-11-07 08:31:36 +01:00
Sunny Ripert 7ba13dddfa [Glitch] Fix double button to clear emoji search input
Port 4b7f32a2a6 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-07 07:55:44 +01:00
Sunny Ripert 71e68dac4e [Glitch] Fix JavaScript console error on Getting Started column
Port ffe735344b to glitch-soc

Co-authored-by: Ilias Tsangaris <iliastsangaris@gmail.com>

Co-authored-by: Ilias Tsangaris <iliastsangaris@gmail.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-07 07:54:18 +01:00
Sunny Ripert d13a2f7901 [Glitch] Fix console log error on column settings load
Port 34c269310d to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2022-11-07 07:53:20 +01:00
Claire 6c0a6097ff Merge branch 'main' into glitch-soc/merge-upstream 2022-11-07 07:50:47 +01:00
Chris Rose a70e2cd649
Tag the OTP field with autocomplete for password managers (#19946)
This is modeled on #19833, and based on the attribute values documented
in https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element?language=objc
2022-11-07 03:57:16 +01:00
Sunny Ripert 4b7f32a2a6
Fix double button to clear emoji search input (#19888) 2022-11-07 03:40:54 +01:00
Jeremy Kescher 02a34252ba
Add null check on application in dispute viewer (#19851) 2022-11-07 03:40:17 +01:00
Sunny Ripert ffe735344b
Fix JavaScript console error on Getting Started column (#19891)
* Fix JavaScript console error on Getting Started column

* Update app/javascript/mastodon/components/column_header.js

Co-authored-by: Ilias Tsangaris <iliastsangaris@gmail.com>

Co-authored-by: Ilias Tsangaris <iliastsangaris@gmail.com>
2022-11-07 03:40:04 +01:00
Sunny Ripert 34c269310d
Fix console log error on column settings load (#19886) 2022-11-07 03:39:48 +01:00
Claire 4cb2323458
Fix crash in legacy filter creation controller (#19878) 2022-11-07 03:38:53 +01:00
nightpool 54f0f1b9ef
Skip Webfinger cache during migrations as well (#19883) 2022-11-07 03:31:38 +01:00
Rob Petti 8c81db5a41
allow /api/v1/streaming to be used as per documentation (#19896) 2022-11-07 03:16:44 +01:00
rcombs e53fc34e9a
Set autocomplete attr for email field on signup page (#19833)
The email address will be used as the "username" for sign-in purposes, so it's the value that should be stored in password managers. We can inform the password manager of this by setting `autocomplete="email"`. Without this hint, password managers may instead store the `username` field, which isn't valid for sign-in (this happens with iCloud Keychain in Safari, for instance).
2022-11-07 03:16:10 +01:00
Yamagishi Kazutoshi bd220c32f1
Update SECURITY.md (#19869) 2022-11-06 16:13:53 +01:00
1328 changed files with 107934 additions and 12306 deletions

View File

@ -68,7 +68,9 @@ jobs:
cache-version: v1
pkg-manager: yarn
- run:
command: ./bin/rails assets:precompile
command: |
export NODE_OPTIONS=--openssl-legacy-provider
./bin/rails assets:precompile
name: Precompile assets
- persist_to_workspace:
paths:

View File

@ -1,6 +1,6 @@
name: Bug Report
description: If something isn't working as expected
labels: bug
labels: [bug]
body:
- type: markdown
attributes:

View File

@ -1,6 +1,6 @@
name: Feature Request
description: I have a suggestion
labels: suggestion
labels: [suggestion]
body:
- type: markdown
attributes:

View File

@ -4,14 +4,13 @@ on:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
paths:
- .github/workflows/build-image.yml
- Dockerfile
permissions:
contents: read
packages: write
jobs:
build-image:
@ -30,18 +29,16 @@ jobs:
id: meta
with:
images: ghcr.io/${{ github.repository_owner }}/mastodon
flavor: |
latest=auto
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=edge,branch=main
type=pep440,pattern={{raw}}
type=pep440,pattern=v{{major}}.{{minor}}
type=ref,event=pr
type=sha,prefix=,format=long
- uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
builder: ${{ steps.buildx.outputs.name }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/mastodon:edge
cache-to: type=inline
cache-from: type=gha
cache-to: type=gha,mode=max

138
.github/workflows/test-chart.yml vendored Normal file
View File

@ -0,0 +1,138 @@
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
name: Test chart
on:
pull_request:
paths:
- "chart/**"
- "!**.md"
- ".github/workflows/test-chart.yml"
push:
paths:
- "chart/**"
- "!**.md"
- ".github/workflows/test-chart.yml"
branches-ignore:
- "dependabot/**"
workflow_dispatch:
permissions:
contents: read
defaults:
run:
working-directory: chart
jobs:
lint-templates:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies (yamllint)
run: pip install yamllint
- run: helm dependency update
- name: helm lint
run: |
helm lint . \
--values dev-values.yaml
- name: helm template
run: |
helm template . \
--values dev-values.yaml \
--output-dir rendered-templates
- name: yamllint (only on templates we manage)
run: |
rm -rf rendered-templates/mastodon/charts
yamllint rendered-templates \
--config-data "{rules: {indentation: {spaces: 2}, line-length: disable}}"
# This job helps us validate that rendered templates are valid k8s resources
# against a k8s api-server, via "helm template --validate", but also that a
# basic configuration can be used to successfully startup mastodon.
#
test-install:
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
include:
# k3s-channel reference: https://update.k3s.io/v1-release/channels
- k3s-channel: latest
- k3s-channel: stable
# This represents the oldest configuration we test against.
#
# The k8s version chosen is based on the oldest still supported k8s
# version among two managed k8s services, GKE, EKS.
# - GKE: https://endoflife.date/google-kubernetes-engine
# - EKS: https://endoflife.date/amazon-eks
#
# The helm client's version can influence what helper functions is
# available for use in the templates, currently we need v3.6.0 or
# higher.
#
- k3s-channel: v1.21
helm-version: v3.6.0
steps:
- uses: actions/checkout@v3
# This action starts a k8s cluster with NetworkPolicy enforcement and
# installs both kubectl and helm.
#
# ref: https://github.com/jupyterhub/action-k3s-helm#readme
#
- uses: jupyterhub/action-k3s-helm@v3
with:
k3s-channel: ${{ matrix.k3s-channel }}
helm-version: ${{ matrix.helm-version }}
metrics-enabled: false
traefik-enabled: false
docker-enabled: false
- run: helm dependency update
# Validate rendered helm templates against the k8s api-server
- name: helm template --validate
run: |
helm template --validate mastodon . \
--values dev-values.yaml
- name: helm install
run: |
helm install mastodon . \
--values dev-values.yaml \
--timeout 10m
# This actions provides a report about the state of the k8s cluster,
# providing logs etc on anything that has failed and workloads marked as
# important.
#
# ref: https://github.com/jupyterhub/action-k8s-namespace-report#readme
#
- name: Kubernetes namespace report
uses: jupyterhub/action-k8s-namespace-report@v1
if: always()
with:
important-workloads: >-
deploy/mastodon-sidekiq
deploy/mastodon-streaming
deploy/mastodon-web
job/mastodon-assets-precompile
job/mastodon-chewy-upgrade
job/mastodon-create-admin
job/mastodon-db-migrate

3
.gitignore vendored
View File

@ -44,6 +44,9 @@
/redis
/elasticsearch
# ignore Helm charts
/chart/*.tgz
# ignore Helm dependency charts
/chart/charts/*.tgz

View File

@ -2,7 +2,7 @@ require:
- rubocop-rails
AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 2.7
NewCops: disable
Exclude:
- 'spec/**/*'
@ -243,6 +243,10 @@ Style/HashTransformKeys:
Style/HashTransformValues:
Enabled: false
Style/HashSyntax:
Enabled: true
EnforcedStyle: ruby19_no_mixed_keys
Style/IfUnlessModifier:
Enabled: false

1121
AUTHORS.md

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,19 @@ Changelog
All notable changes to this project will be documented in this file.
## [Unreleased]
## [4.0.2] - 2022-11-15
### Fixed
- Fix wrong color on mentions hidden behind content warning in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/20724))
- Fix filters from other users being used in the streaming service ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20719))
- Fix `unsafe-eval` being used when `wasm-unsafe-eval` is enough in Content Security Policy ([Gargron](https://github.com/mastodon/mastodon/pull/20729), [prplecake](https://github.com/mastodon/mastodon/pull/20606))
## [4.0.1] - 2022-11-14
### Fixed
- Fix nodes order being sometimes mangled when rewriting emoji ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20677))
## [4.0.0] - 2022-11-14
Some of the features in this release have been funded through the [NGI0 Discovery](https://nlnet.nl/discovery) Fund, a fund established by [NLnet](https://nlnet.nl/) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu/) programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825322.
@ -13,7 +25,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- **Add ability to follow hashtags** ([Gargron](https://github.com/mastodon/mastodon/pull/18809), [Gargron](https://github.com/mastodon/mastodon/pull/18862), [Gargron](https://github.com/mastodon/mastodon/pull/19472), [noellabo](https://github.com/mastodon/mastodon/pull/18924))
- Add ability to filter individual posts ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18945))
- **Add ability to translate posts** ([Gargron](https://github.com/mastodon/mastodon/pull/19218), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19433), [Gargron](https://github.com/mastodon/mastodon/pull/19453), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19434), [Gargron](https://github.com/mastodon/mastodon/pull/19388), [ykzts](https://github.com/mastodon/mastodon/pull/19244), [Gargron](https://github.com/mastodon/mastodon/pull/19245))
- Add featured tags to web UI ([noellabo](https://github.com/mastodon/mastodon/pull/19408), [noellabo](https://github.com/mastodon/mastodon/pull/19380), [noellabo](https://github.com/mastodon/mastodon/pull/19358), [noellabo](https://github.com/mastodon/mastodon/pull/19409), [Gargron](https://github.com/mastodon/mastodon/pull/19382), [ykzts](https://github.com/mastodon/mastodon/pull/19418), [noellabo](https://github.com/mastodon/mastodon/pull/19403), [noellabo](https://github.com/mastodon/mastodon/pull/19404), [Gargron](https://github.com/mastodon/mastodon/pull/19398), [Gargron](https://github.com/mastodon/mastodon/pull/19712))
- Add featured tags to web UI ([noellabo](https://github.com/mastodon/mastodon/pull/19408), [noellabo](https://github.com/mastodon/mastodon/pull/19380), [noellabo](https://github.com/mastodon/mastodon/pull/19358), [noellabo](https://github.com/mastodon/mastodon/pull/19409), [Gargron](https://github.com/mastodon/mastodon/pull/19382), [ykzts](https://github.com/mastodon/mastodon/pull/19418), [noellabo](https://github.com/mastodon/mastodon/pull/19403), [noellabo](https://github.com/mastodon/mastodon/pull/19404), [Gargron](https://github.com/mastodon/mastodon/pull/19398), [Gargron](https://github.com/mastodon/mastodon/pull/19712), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20018))
- **Add support for language preferences for trending statuses and links** ([Gargron](https://github.com/mastodon/mastodon/pull/18288), [Gargron](https://github.com/mastodon/mastodon/pull/19349), [ykzts](https://github.com/mastodon/mastodon/pull/19335))
- Previously, you could only see trends in your current language
- For less popular languages, that meant empty trends
@ -21,6 +33,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Add server rules to sign-up flow ([Gargron](https://github.com/mastodon/mastodon/pull/19296))
- Add privacy icons to report modal in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19190))
- Add `noopener` to links to remote profiles in web UI ([shleeable](https://github.com/mastodon/mastodon/pull/19014))
- Add option to open original page in dropdowns of remote content in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/20299))
- Add warning for sensitive audio posts in web UI ([rgroothuijsen](https://github.com/mastodon/mastodon/pull/17885))
- Add language attribute to posts in web UI ([tribela](https://github.com/mastodon/mastodon/pull/18544))
- Add support for uploading WebP files ([Saiv46](https://github.com/mastodon/mastodon/pull/18506))
@ -43,22 +56,27 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Add admin API for managing domain blocks ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18247))
- Add admin API for managing e-mail domain blocks ([Gargron](https://github.com/mastodon/mastodon/pull/19066))
- Add admin API for managing canonical e-mail blocks ([Gargron](https://github.com/mastodon/mastodon/pull/19067))
- Add admin API for managing IP blocks ([Gargron](https://github.com/mastodon/mastodon/pull/19065))
- Add admin API for managing IP blocks ([Gargron](https://github.com/mastodon/mastodon/pull/19065), [trwnh](https://github.com/mastodon/mastodon/pull/20207))
- Add `sensitized` attribute to accounts in admin REST API ([trwnh](https://github.com/mastodon/mastodon/pull/20094))
- Add `services` and `metadata` to the NodeInfo endpoint ([MFTabriz](https://github.com/mastodon/mastodon/pull/18563))
- Add `--remove-role` option to `tootctl accounts modify` ([Gargron](https://github.com/mastodon/mastodon/pull/19477))
- Add `--days` option to `tootctl media refresh` ([tribela](https://github.com/mastodon/mastodon/pull/18425))
- Add `EMAIL_DOMAIN_LISTS_APPLY_AFTER_CONFIRMATION` environment variable ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18642))
- Add `IP_RETENTION_PERIOD` and `SESSION_RETENTION_PERIOD` environment variables ([kescherCode](https://github.com/mastodon/mastodon/pull/18757))
- Add `http_hidden_proxy` environment variable ([tribela](https://github.com/mastodon/mastodon/pull/18427))
- Add caching for payload serialization during fan-out ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19637), [Gargron](https://github.com/mastodon/mastodon/pull/19642), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19746), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19747))
- Add `ENABLE_STARTTLS` environment variable ([erbridge](https://github.com/mastodon/mastodon/pull/20321))
- Add caching for payload serialization during fan-out ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19637), [Gargron](https://github.com/mastodon/mastodon/pull/19642), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19746), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19747), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19963))
- Add assets from Twemoji 14.0 ([Gargron](https://github.com/mastodon/mastodon/pull/19733))
- Add reputation and followers score boost to SQL-only account search ([Gargron](https://github.com/mastodon/mastodon/pull/19251))
- Add Scots, Balaibalan, Láadan, Lingua Franca Nova, Lojban, Toki Pona to languages list ([VyrCossont](https://github.com/mastodon/mastodon/pull/20168))
- Set autocomplete hints for e-mail, password and OTP fields ([rcombs](https://github.com/mastodon/mastodon/pull/19833), [offbyone](https://github.com/mastodon/mastodon/pull/19946), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20071))
- Add support for DigitalOcean Spaces in setup wizard ([v-aisac](https://github.com/mastodon/mastodon/pull/20573))
### Changed
- **Change brand color and logotypes** ([Gargron](https://github.com/mastodon/mastodon/pull/18592), [Gargron](https://github.com/mastodon/mastodon/pull/18639), [Gargron](https://github.com/mastodon/mastodon/pull/18691), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18634), [Gargron](https://github.com/mastodon/mastodon/pull/19254), [mayaeh](https://github.com/mastodon/mastodon/pull/18710))
- **Change post editing to be enabled in web UI** ([Gargron](https://github.com/mastodon/mastodon/pull/19103))
- **Change web UI to work for logged-out users** ([Gargron](https://github.com/mastodon/mastodon/pull/18961), [Gargron](https://github.com/mastodon/mastodon/pull/19250), [Gargron](https://github.com/mastodon/mastodon/pull/19294), [Gargron](https://github.com/mastodon/mastodon/pull/19306), [Gargron](https://github.com/mastodon/mastodon/pull/19315), [ykzts](https://github.com/mastodon/mastodon/pull/19322), [Gargron](https://github.com/mastodon/mastodon/pull/19412), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19437), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19415), [Gargron](https://github.com/mastodon/mastodon/pull/19348), [Gargron](https://github.com/mastodon/mastodon/pull/19295), [Gargron](https://github.com/mastodon/mastodon/pull/19422), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19414), [Gargron](https://github.com/mastodon/mastodon/pull/19319), [Gargron](https://github.com/mastodon/mastodon/pull/19345), [Gargron](https://github.com/mastodon/mastodon/pull/19310), [Gargron](https://github.com/mastodon/mastodon/pull/19301), [Gargron](https://github.com/mastodon/mastodon/pull/19423), [ykzts](https://github.com/mastodon/mastodon/pull/19471), [ykzts](https://github.com/mastodon/mastodon/pull/19333), [ykzts](https://github.com/mastodon/mastodon/pull/19337), [ykzts](https://github.com/mastodon/mastodon/pull/19272), [ykzts](https://github.com/mastodon/mastodon/pull/19468), [Gargron](https://github.com/mastodon/mastodon/pull/19466), [Gargron](https://github.com/mastodon/mastodon/pull/19457), [Gargron](https://github.com/mastodon/mastodon/pull/19426), [Gargron](https://github.com/mastodon/mastodon/pull/19427), [Gargron](https://github.com/mastodon/mastodon/pull/19421), [Gargron](https://github.com/mastodon/mastodon/pull/19417), [Gargron](https://github.com/mastodon/mastodon/pull/19413), [Gargron](https://github.com/mastodon/mastodon/pull/19397), [Gargron](https://github.com/mastodon/mastodon/pull/19387), [Gargron](https://github.com/mastodon/mastodon/pull/19396), [Gargron](https://github.com/mastodon/mastodon/pull/19385), [ykzts](https://github.com/mastodon/mastodon/pull/19334), [ykzts](https://github.com/mastodon/mastodon/pull/19329), [Gargron](https://github.com/mastodon/mastodon/pull/19324), [Gargron](https://github.com/mastodon/mastodon/pull/19318), [Gargron](https://github.com/mastodon/mastodon/pull/19316), [Gargron](https://github.com/mastodon/mastodon/pull/19263), [trwnh](https://github.com/mastodon/mastodon/pull/19305), [ykzts](https://github.com/mastodon/mastodon/pull/19273), [Gargron](https://github.com/mastodon/mastodon/pull/19801), [Gargron](https://github.com/mastodon/mastodon/pull/19790), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19773), [Gargron](https://github.com/mastodon/mastodon/pull/19798), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19724), [Gargron](https://github.com/mastodon/mastodon/pull/19709), [Gargron](https://github.com/mastodon/mastodon/pull/19514), [Gargron](https://github.com/mastodon/mastodon/pull/19562))
- **Change web UI to work for logged-out users** ([Gargron](https://github.com/mastodon/mastodon/pull/18961), [Gargron](https://github.com/mastodon/mastodon/pull/19250), [Gargron](https://github.com/mastodon/mastodon/pull/19294), [Gargron](https://github.com/mastodon/mastodon/pull/19306), [Gargron](https://github.com/mastodon/mastodon/pull/19315), [ykzts](https://github.com/mastodon/mastodon/pull/19322), [Gargron](https://github.com/mastodon/mastodon/pull/19412), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19437), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19415), [Gargron](https://github.com/mastodon/mastodon/pull/19348), [Gargron](https://github.com/mastodon/mastodon/pull/19295), [Gargron](https://github.com/mastodon/mastodon/pull/19422), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19414), [Gargron](https://github.com/mastodon/mastodon/pull/19319), [Gargron](https://github.com/mastodon/mastodon/pull/19345), [Gargron](https://github.com/mastodon/mastodon/pull/19310), [Gargron](https://github.com/mastodon/mastodon/pull/19301), [Gargron](https://github.com/mastodon/mastodon/pull/19423), [ykzts](https://github.com/mastodon/mastodon/pull/19471), [ykzts](https://github.com/mastodon/mastodon/pull/19333), [ykzts](https://github.com/mastodon/mastodon/pull/19337), [ykzts](https://github.com/mastodon/mastodon/pull/19272), [ykzts](https://github.com/mastodon/mastodon/pull/19468), [Gargron](https://github.com/mastodon/mastodon/pull/19466), [Gargron](https://github.com/mastodon/mastodon/pull/19457), [Gargron](https://github.com/mastodon/mastodon/pull/19426), [Gargron](https://github.com/mastodon/mastodon/pull/19427), [Gargron](https://github.com/mastodon/mastodon/pull/19421), [Gargron](https://github.com/mastodon/mastodon/pull/19417), [Gargron](https://github.com/mastodon/mastodon/pull/19413), [Gargron](https://github.com/mastodon/mastodon/pull/19397), [Gargron](https://github.com/mastodon/mastodon/pull/19387), [Gargron](https://github.com/mastodon/mastodon/pull/19396), [Gargron](https://github.com/mastodon/mastodon/pull/19385), [ykzts](https://github.com/mastodon/mastodon/pull/19334), [ykzts](https://github.com/mastodon/mastodon/pull/19329), [Gargron](https://github.com/mastodon/mastodon/pull/19324), [Gargron](https://github.com/mastodon/mastodon/pull/19318), [Gargron](https://github.com/mastodon/mastodon/pull/19316), [Gargron](https://github.com/mastodon/mastodon/pull/19263), [trwnh](https://github.com/mastodon/mastodon/pull/19305), [ykzts](https://github.com/mastodon/mastodon/pull/19273), [Gargron](https://github.com/mastodon/mastodon/pull/19801), [Gargron](https://github.com/mastodon/mastodon/pull/19790), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19773), [Gargron](https://github.com/mastodon/mastodon/pull/19798), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19724), [Gargron](https://github.com/mastodon/mastodon/pull/19709), [Gargron](https://github.com/mastodon/mastodon/pull/19514), [Gargron](https://github.com/mastodon/mastodon/pull/19562), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19981), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19978), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20148), [Gargron](https://github.com/mastodon/mastodon/pull/20302), [cutls](https://github.com/mastodon/mastodon/pull/20400))
- The web app can now be accessed without being logged in
- No more `/web` prefix on web app paths
- Profiles, posts, and other public pages now use the same interface for logged in and logged out users
@ -74,14 +92,13 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Change label of publish button to be "Publish" again in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/18583))
- Change language to be carried over on reply in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18557))
- Change "Unfollow" to "Cancel follow request" when request still pending in web UI ([prplecake](https://github.com/mastodon/mastodon/pull/19363))
- **Change post filtering system** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18058), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19050), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18894), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19051), [noellabo](https://github.com/mastodon/mastodon/pull/18923), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18956), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18744))
- **Change post filtering system** ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18058), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19050), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18894), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19051), [noellabo](https://github.com/mastodon/mastodon/pull/18923), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18956), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18744), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/19878), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/20567))
- Filtered keywords and phrases can now be grouped into named categories
- Filtered posts show which exact filter was hit
- Individual posts can be added to a filter
- You can peek inside filtered posts anyway
- Change path of privacy policy page from `/terms` to `/privacy-policy` ([Gargron](https://github.com/mastodon/mastodon/pull/19249))
- Change how hashtags are normalized ([Gargron](https://github.com/mastodon/mastodon/pull/18795), [Gargron](https://github.com/mastodon/mastodon/pull/18863), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/18854))
- Change public (but not hashtag) timelines to be filtered by current locale by default ([Gargron](https://github.com/mastodon/mastodon/pull/19291), [Gargron](https://github.com/mastodon/mastodon/pull/19563))
- Change settings area to be separated into categories in admin UI ([Gargron](https://github.com/mastodon/mastodon/pull/19407), [Gargron](https://github.com/mastodon/mastodon/pull/19533))
- Change "No accounts selected" errors to use the appropriate noun in admin UI ([prplecake](https://github.com/mastodon/mastodon/pull/19356))
- Change e-mail domain blocks to match subdomains of blocked domains ([Gargron](https://github.com/mastodon/mastodon/pull/18979))
@ -95,6 +112,14 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Change mentions of blocked users to not be processed ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19725))
- Change max. thumbnail dimensions to 640x360px (360p) ([Gargron](https://github.com/mastodon/mastodon/pull/19619))
- Change post-processing to be deferred only for large media types ([Gargron](https://github.com/mastodon/mastodon/pull/19617))
- Change link verification to only work for https links without unicode ([Gargron](https://github.com/mastodon/mastodon/pull/20304), [Gargron](https://github.com/mastodon/mastodon/pull/20295))
- Change account deletion requests to spread out over time ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20222))
- Change larger reblogs/favourites numbers to be shortened in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/20303))
- Change incoming activity processing to happen in `ingress` queue ([Gargron](https://github.com/mastodon/mastodon/pull/20264))
- Change notifications to not link show preview cards in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20335))
- Change amount of replies returned for logged out users in REST API ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20355))
- Change in-app links to keep you in-app in web UI ([trwnh](https://github.com/mastodon/mastodon/pull/20540), [Gargron](https://github.com/mastodon/mastodon/pull/20628))
- Change table header to be sticky in admin UI ([sk22](https://github.com/mastodon/mastodon/pull/20442))
### Removed
@ -107,6 +132,28 @@ Some of the features in this release have been funded through the [NGI0 Discover
### Fixed
- Fix rules with same priority being sorted non-deterministically ([Gargron](https://github.com/mastodon/mastodon/pull/20623))
- Fix error when invalid domain name is submitted ([Gargron](https://github.com/mastodon/mastodon/pull/19474))
- Fix icons having an image role ([Gargron](https://github.com/mastodon/mastodon/pull/20600))
- Fix connections to IPv6-only servers ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20108))
- Fix unnecessary service worker registration and preloading when logged out in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20341))
- Fix unnecessary and slow regex construction ([raggi](https://github.com/mastodon/mastodon/pull/20215))
- Fix `mailers` queue not being used for mailers ([Gargron](https://github.com/mastodon/mastodon/pull/20274))
- Fix error in webfinger redirect handling ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20260))
- Fix report category not being set to `violation` if rule IDs are provided ([trwnh](https://github.com/mastodon/mastodon/pull/20137))
- Fix nodeinfo metadata attribute being an array instead of an object ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20114))
- Fix account endorsements not being idempotent ([trwnh](https://github.com/mastodon/mastodon/pull/20118))
- Fix status and rule IDs not being strings in admin reports REST API ([trwnh](https://github.com/mastodon/mastodon/pull/20122))
- Fix error on invalid `replies_policy` in REST API ([trwnh](https://github.com/mastodon/mastodon/pull/20126))
- Fix redrafting a currently-editing post not leaving edit mode in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20023))
- Fix performance by avoiding method cache busts ([raggi](https://github.com/mastodon/mastodon/pull/19957))
- Fix opening the language picker scrolling the single-column view to the top in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19983))
- Fix content warning button missing `aria-expanded` attribute in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19975))
- Fix redundant `aria-pressed` attributes in web UI ([Brawaru](https://github.com/mastodon/mastodon/pull/19912))
- Fix crash when external auth provider has no display name set ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19962))
- Fix followers count not being updated when migrating follows ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19998))
- Fix double button to clear emoji search input in web UI ([sunny](https://github.com/mastodon/mastodon/pull/19888))
- Fix missing null check on applications on strike disputes ([kescherCode](https://github.com/mastodon/mastodon/pull/19851))
- Fix featured tags not saving preferred casing ([Gargron](https://github.com/mastodon/mastodon/pull/19732))
- Fix language not being saved when editing status ([Gargron](https://github.com/mastodon/mastodon/pull/19543))
- Fix not being able to input featured tag with hash symbol ([Gargron](https://github.com/mastodon/mastodon/pull/19535))
@ -118,7 +165,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix account action type validation ([Gargron](https://github.com/mastodon/mastodon/pull/19476))
- Fix upload progress not communicating processing phase in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/19530))
- Fix wrong host being used for custom.css when asset host configured ([Gargron](https://github.com/mastodon/mastodon/pull/19521))
- Fix account migration form ever using outdated account data ([Gargron](https://github.com/mastodon/mastodon/pull/18429))
- Fix account migration form ever using outdated account data ([Gargron](https://github.com/mastodon/mastodon/pull/18429), [nightpool](https://github.com/mastodon/mastodon/pull/19883))
- Fix error when uploading malformed CSV import ([Gargron](https://github.com/mastodon/mastodon/pull/19509))
- Fix avatars not using image tags in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/19488))
- Fix handling of duplicate and out-of-order notifications in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/19693))
@ -156,6 +203,15 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Fix `CDN_HOST` not being used in some asset URLs ([tribela](https://github.com/mastodon/mastodon/pull/18662))
- Fix `CAS_DISPLAY_NAME`, `SAML_DISPLAY_NAME` and `OIDC_DISPLAY_NAME` being ignored ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/18568))
- Fix various typos in comments throughout the codebase ([luzpaz](https://github.com/mastodon/mastodon/pull/18604))
- Fix CSV import error when rows include unicode characters ([HamptonMakes](https://github.com/mastodon/mastodon/pull/20592))
### Security
- Fix being able to spoof link verification ([Gargron](https://github.com/mastodon/mastodon/pull/20217))
- Fix emoji substitution not applying only to text nodes in backend code ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20641))
- Fix emoji substitution not applying only to text nodes in web UI ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/20640))
- Fix rate limiting for paths with formats ([Gargron](https://github.com/mastodon/mastodon/pull/20675))
- Fix out-of-bound reads in blurhash transcoder ([delroth](https://github.com/mastodon/mastodon/pull/20388))
## [3.5.3] - 2022-05-26
### Added
@ -276,7 +332,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
### Fixed
- Fix error resposes for `from` search prefix ([single-right-quote](https://github.com/mastodon/mastodon/pull/17963))
- Fix error responses for `from` search prefix ([single-right-quote](https://github.com/mastodon/mastodon/pull/17963))
- Fix dangling language-specific trends ([Gargron](https://github.com/mastodon/mastodon/pull/17997))
- Fix extremely rare race condition when deleting a status or account ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17994))
- Fix trends returning less results per page when filtered in REST API ([Gargron](https://github.com/mastodon/mastodon/pull/17996))
@ -411,7 +467,7 @@ Some of the features in this release have been funded through the [NGI0 Discover
- Remove profile directory link from main navigation panel in web UI ([Gargron](https://github.com/mastodon/mastodon/pull/17688))
- **Remove language detection through cld3** ([Gargron](https://github.com/mastodon/mastodon/pull/17478), [ykzts](https://github.com/mastodon/mastodon/pull/17539), [Gargron](https://github.com/mastodon/mastodon/pull/17496), [Gargron](https://github.com/mastodon/mastodon/pull/17722))
- cld3 is very inaccurate on short-form content even with unique alphabets
- Post language can be overriden individually using `language` param
- Post language can be overridden individually using `language` param
- Otherwise, it defaults to the user's interface language
- Remove support for `OAUTH_REDIRECT_AT_SIGN_IN` ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/17287))
- Use `OMNIAUTH_ONLY` instead

View File

@ -76,6 +76,8 @@ It is not always possible to phrase every change in such a manner, but it is des
- Code style rules (rubocop, eslint)
- Normalization of locale files (i18n-tasks)
**Note**: You may need to log in and authorise the GitHub account your fork of this repository belongs to with CircleCI to enable some of the automated checks to run.
## Documentation
The [Mastodon documentation](https://docs.joinmastodon.org) is a statically generated site. You can [submit merge requests to mastodon/documentation](https://github.com/mastodon/documentation).

View File

@ -1,121 +1,96 @@
FROM ubuntu:20.04 as build-dep
# syntax=docker/dockerfile:1.4
# This needs to be bullseye-slim because the Ruby image is built on bullseye-slim
ARG NODE_VERSION="16.17.1-bullseye-slim"
# Use bash for the shell
SHELL ["/bin/bash", "-c"]
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
FROM ghcr.io/moritzheiber/ruby-jemalloc:3.0.4-slim as ruby
FROM node:${NODE_VERSION} as build
# Install Node v16 (LTS)
ENV NODE_VER="16.17.1"
RUN ARCH= && \
dpkgArch="$(dpkg --print-architecture)" && \
case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac && \
echo "Etc/UTC" > /etc/localtime && \
apt-get update && \
apt-get install -y --no-install-recommends ca-certificates wget python3 apt-utils && \
cd ~ && \
wget -q https://nodejs.org/download/release/v$NODE_VER/node-v$NODE_VER-linux-$ARCH.tar.gz && \
tar xf node-v$NODE_VER-linux-$ARCH.tar.gz && \
rm node-v$NODE_VER-linux-$ARCH.tar.gz && \
mv node-v$NODE_VER-linux-$ARCH /opt/node
COPY --link --from=ruby /opt/ruby /opt/ruby
# Install Ruby 3.0
ENV RUBY_VER="3.0.4"
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential \
bison libyaml-dev libgdbm-dev libreadline-dev libjemalloc-dev \
libncurses5-dev libffi-dev zlib1g-dev libssl-dev && \
cd ~ && \
wget https://cache.ruby-lang.org/pub/ruby/${RUBY_VER%.*}/ruby-$RUBY_VER.tar.gz && \
tar xf ruby-$RUBY_VER.tar.gz && \
cd ruby-$RUBY_VER && \
./configure --prefix=/opt/ruby \
--with-jemalloc \
--with-shared \
--disable-install-doc && \
make -j"$(nproc)" > /dev/null && \
make install && \
rm -rf ../ruby-$RUBY_VER.tar.gz ../ruby-$RUBY_VER
ENV DEBIAN_FRONTEND="noninteractive" \
PATH="${PATH}:/opt/ruby/bin"
ENV PATH="${PATH}:/opt/ruby/bin:/opt/node/bin"
RUN npm install -g npm@latest && \
npm install -g yarn && \
gem install bundler && \
apt-get update && \
apt-get install -y --no-install-recommends git libicu-dev libidn11-dev \
libpq-dev shared-mime-info
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /opt/mastodon
COPY Gemfile* package.json yarn.lock /opt/mastodon/
RUN cd /opt/mastodon && \
bundle config set --local deployment 'true' && \
bundle config set --local without 'development test' && \
bundle config set silence_root_warning true && \
bundle install -j"$(nproc)" && \
yarn install --pure-lockfile
RUN apt update && \
apt-get install -y --no-install-recommends build-essential \
ca-certificates \
git \
libicu-dev \
libidn11-dev \
libpq-dev \
libjemalloc-dev \
zlib1g-dev \
libgdbm-dev \
libgmp-dev \
libssl-dev \
libyaml-0-2 \
ca-certificates \
libreadline8 \
python3 \
shared-mime-info && \
bundle config set --local deployment 'true' && \
bundle config set --local without 'development test' && \
bundle config set silence_root_warning true && \
bundle install -j"$(nproc)" && \
yarn install --pure-lockfile
FROM ubuntu:20.04
FROM node:${NODE_VERSION}
# Copy over all the langs needed for runtime
COPY --from=build-dep /opt/node /opt/node
COPY --from=build-dep /opt/ruby /opt/ruby
ARG UID="991"
ARG GID="991"
# Add more PATHs to the PATH
ENV PATH="${PATH}:/opt/ruby/bin:/opt/node/bin:/opt/mastodon/bin"
COPY --link --from=ruby /opt/ruby /opt/ruby
# Create the mastodon user
ARG UID=991
ARG GID=991
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update && \
echo "Etc/UTC" > /etc/localtime && \
apt-get install -y --no-install-recommends whois wget && \
addgroup --gid $GID mastodon && \
useradd -m -u $UID -g $GID -d /opt/mastodon mastodon && \
echo "mastodon:$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 24 | mkpasswd -s -m sha-256)" | chpasswd && \
rm -rf /var/lib/apt/lists/*
# Install mastodon runtime deps
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update && \
apt-get -y --no-install-recommends install \
libssl1.1 libpq5 imagemagick ffmpeg libjemalloc2 \
libicu66 libidn11 libyaml-0-2 \
file ca-certificates tzdata libreadline8 gcc tini apt-utils && \
ln -s /opt/mastodon /mastodon && \
gem install bundler && \
rm -rf /var/cache && \
rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND="noninteractive" \
PATH="${PATH}:/opt/ruby/bin:/opt/mastodon/bin"
RUN apt-get update && \
echo "Etc/UTC" > /etc/localtime && \
groupadd -g "${GID}" mastodon && \
useradd -u "$UID" -g "${GID}" -m -d /opt/mastodon mastodon && \
apt-get -y --no-install-recommends install whois \
wget \
procps \
libssl1.1 \
libpq5 \
imagemagick \
ffmpeg \
libjemalloc2 \
libicu67 \
libidn11 \
libyaml-0-2 \
file \
ca-certificates \
tzdata \
libreadline8 \
tini && \
ln -s /opt/mastodon /mastodon
# Note: no, cleaning here since Debian does this automatically
# See the file /etc/apt/apt.conf.d/docker-clean within the Docker image's filesystem
# Copy over mastodon source, and dependencies from building, and set permissions
COPY --chown=mastodon:mastodon . /opt/mastodon
COPY --from=build-dep --chown=mastodon:mastodon /opt/mastodon /opt/mastodon
COPY --chown=mastodon:mastodon --from=build /opt/mastodon /opt/mastodon
# Run mastodon services in prod mode
ENV RAILS_ENV="production"
ENV NODE_ENV="production"
# Tell rails to serve static files
ENV RAILS_SERVE_STATIC_FILES="true"
ENV BIND="0.0.0.0"
ENV RAILS_ENV="production" \
NODE_ENV="production" \
RAILS_SERVE_STATIC_FILES="true" \
BIND="0.0.0.0"
# Set the run user
USER mastodon
WORKDIR /opt/mastodon
# Precompile assets
RUN cd ~ && \
OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
yarn cache clean
RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
yarn cache clean
# Set the work dir and the container entry point
WORKDIR /opt/mastodon
ENTRYPOINT ["/usr/bin/tini", "--"]
EXPOSE 3000 4000

14
Gemfile
View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
source 'https://rubygems.org'
ruby '>= 2.6.0', '< 3.1.0'
ruby '>= 2.7.0', '< 3.1.0'
gem 'pkg-config', '~> 1.4'
gem 'rexml', '~> 3.2'
@ -26,7 +26,7 @@ gem 'blurhash', '~> 0.1'
gem 'active_model_serializers', '~> 0.10'
gem 'addressable', '~> 2.8'
gem 'bootsnap', '~> 1.13.0', require: false
gem 'bootsnap', '~> 1.14.0', require: false
gem 'browser'
gem 'charlock_holmes', '~> 0.7.7'
gem 'chewy', '~> 7.2'
@ -55,7 +55,7 @@ gem 'redis-namespace', '~> 1.9'
gem 'htmlentities', '~> 4.3'
gem 'http', '~> 5.1'
gem 'http_accept_language', '~> 2.1'
gem 'httplog', '~> 1.6.0'
gem 'httplog', '~> 1.6.2'
gem 'idn-ruby', require: 'idn'
gem 'kaminari', '~> 1.2'
gem 'link_header', '~> 0.0'
@ -92,7 +92,7 @@ gem 'tty-prompt', '~> 0.23', require: false
gem 'twitter-text', '~> 3.1.0'
gem 'tzinfo-data', '~> 1.2022'
gem 'webpacker', '~> 5.4'
gem 'webpush', git: 'https://github.com/ClearlyClaire/webpush.git', ref: 'f14a4d52e201128b1b00245d11b6de80d6cfdcd9'
gem 'webpush', github: 'ClearlyClaire/webpush', ref: 'f14a4d52e201128b1b00245d11b6de80d6cfdcd9'
gem 'webauthn', '~> 2.5'
gem 'json-ld'
@ -113,7 +113,7 @@ group :production, :test do
end
group :test do
gem 'capybara', '~> 3.37'
gem 'capybara', '~> 3.38'
gem 'climate_control', '~> 0.2'
gem 'faker', '~> 2.23'
gem 'microformats', '~> 4.4'
@ -122,6 +122,7 @@ group :test do
gem 'simplecov', '~> 0.21', require: false
gem 'webmock', '~> 3.18'
gem 'rspec_junit_formatter', '~> 0.6'
gem 'rack-test', '~> 2.0'
end
group :development do
@ -135,7 +136,7 @@ group :development do
gem 'memory_profiler'
gem 'rubocop', '~> 1.30', require: false
gem 'rubocop-rails', '~> 2.15', require: false
gem 'brakeman', '~> 5.3', require: false
gem 'brakeman', '~> 5.4', require: false
gem 'bundler-audit', '~> 0.9', require: false
gem 'capistrano', '~> 3.17'
@ -152,7 +153,6 @@ end
gem 'concurrent-ruby', require: false
gem 'connection_pool', require: false
gem 'xorcist', '~> 1.1'
gem 'hcaptcha', '~> 7.1'

View File

@ -122,9 +122,9 @@ GEM
debug_inspector (>= 0.0.1)
blurhash (0.1.6)
ffi (~> 1.14)
bootsnap (1.13.0)
bootsnap (1.14.0)
msgpack (~> 1.2)
brakeman (5.3.1)
brakeman (5.4.0)
browser (4.2.0)
brpoplpush-redis_script (0.1.2)
concurrent-ruby (~> 1.0, >= 1.0.5)
@ -152,7 +152,7 @@ GEM
sshkit (~> 1.3)
capistrano-yarn (2.0.2)
capistrano (~> 3.0)
capybara (3.37.1)
capybara (3.38.0)
addressable
matrix
mini_mime (>= 0.1.3)
@ -311,7 +311,7 @@ GEM
http-form_data (2.3.0)
http_accept_language (2.1.1)
httpclient (2.8.3)
httplog (1.6.0)
httplog (1.6.2)
rack (>= 2.0)
rainbow (>= 2.0.0)
i18n (1.12.0)
@ -327,7 +327,7 @@ GEM
rails-i18n
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
idn-ruby (0.1.4)
idn-ruby (0.1.5)
ipaddress (0.8.3)
jmespath (1.6.1)
json (2.6.2)
@ -343,7 +343,7 @@ GEM
multi_json (~> 1.15)
rack (~> 2.2)
rdf (~> 3.2, >= 3.2.9)
json-ld-preloaded (3.2.0)
json-ld-preloaded (3.2.2)
json-ld (~> 3.2)
rdf (~> 3.2)
jsonapi-renderer (0.2.2)
@ -395,7 +395,7 @@ GEM
mario-redis-lock (1.2.1)
redis (>= 3.0.5)
matrix (0.4.2)
memory_profiler (1.0.0)
memory_profiler (1.0.1)
method_source (1.0.0)
microformats (4.4.1)
json (~> 2.2)
@ -406,7 +406,7 @@ GEM
mini_mime (1.1.2)
mini_portile2 (2.8.0)
minitest (5.16.3)
msgpack (1.5.4)
msgpack (1.6.0)
multi_json (1.15.0)
multipart-post (2.1.1)
net-ldap (0.17.1)
@ -414,7 +414,7 @@ GEM
net-ssh (>= 2.6.5, < 8.0.0)
net-ssh (7.0.1)
nio4r (2.5.8)
nokogiri (1.13.8)
nokogiri (1.13.9)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nsa (0.2.8)
@ -422,7 +422,7 @@ GEM
concurrent-ruby (~> 1.0, >= 1.0.2)
sidekiq (>= 3.5)
statsd-ruby (~> 1.4, >= 1.4.0)
oj (3.13.21)
oj (3.13.23)
omniauth (1.9.2)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
@ -457,7 +457,7 @@ GEM
parslet (2.0.0)
pastel (0.8.0)
tty-color (~> 0.5)
pg (1.4.3)
pg (1.4.5)
pghero (2.8.3)
activerecord (>= 5)
pkg-config (1.4.9)
@ -545,7 +545,7 @@ GEM
redis (4.5.1)
redis-namespace (1.9.0)
redis (>= 4)
regexp_parser (2.5.0)
regexp_parser (2.6.0)
request_store (1.5.1)
rack (>= 1.4)
responders (3.0.1)
@ -611,8 +611,8 @@ GEM
activerecord (>= 4.0.0)
railties (>= 4.0.0)
semantic_range (3.0.0)
sidekiq (6.5.7)
connection_pool (>= 2.2.5)
sidekiq (6.5.8)
connection_pool (>= 2.2.5, < 3)
rack (~> 2.0)
redis (>= 4.5.0, < 5)
sidekiq-bulk (0.2.0)
@ -684,7 +684,7 @@ GEM
unf (~> 0.1.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2022.4)
tzinfo-data (1.2022.6)
tzinfo (>= 1.0.0)
unf (0.1.4)
unf_ext
@ -741,8 +741,8 @@ DEPENDENCIES
better_errors (~> 2.9)
binding_of_caller (~> 1.0)
blurhash (~> 0.1)
bootsnap (~> 1.13.0)
brakeman (~> 5.3)
bootsnap (~> 1.14.0)
brakeman (~> 5.4)
browser
bullet (~> 7.0)
bundler-audit (~> 0.9)
@ -750,7 +750,7 @@ DEPENDENCIES
capistrano-rails (~> 1.6)
capistrano-rbenv (~> 2.2)
capistrano-yarn (~> 2.0)
capybara (~> 3.37)
capybara (~> 3.38)
charlock_holmes (~> 0.7.7)
chewy (~> 7.2)
climate_control (~> 0.2)
@ -779,7 +779,7 @@ DEPENDENCIES
htmlentities (~> 4.3)
http (~> 5.1)
http_accept_language (~> 2.1)
httplog (~> 1.6.0)
httplog (~> 1.6.2)
i18n-tasks (~> 1.0)
idn-ruby
json-ld
@ -818,6 +818,7 @@ DEPENDENCIES
rack (~> 2.2.4)
rack-attack (~> 6.6)
rack-cors (~> 1.1)
rack-test (~> 2.0)
rails (~> 6.1.7)
rails-controller-testing (~> 1.0)
rails-i18n (~> 6.0)

View File

@ -1,6 +1,6 @@
# Security Policy
If you believe you've identified a security vulnerability in Mastodon (a bug that allows something to happen that shouldn't be possible), you can reach us at <hello@joinmastodon.org>.
If you believe you've identified a security vulnerability in Mastodon (a bug that allows something to happen that shouldn't be possible), you can reach us at <security@joinmastodon.org>.
You should *not* report such issues on GitHub or in other public spaces to give us time to publish a fix for the issue without exposing Mastodon's users to increased risk.
@ -10,9 +10,8 @@ A "vulnerability in Mastodon" is a vulnerability in the code distributed through
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| 3.5.x | Yes |
| 3.4.x | Yes |
| 3.3.x | No |
| < 3.3 | No |
| Version | Supported |
| ------- | ----------|
| 4.0.x | Yes |
| 3.5.x | Yes |
| < 3.5 | No |

View File

@ -79,8 +79,13 @@
"description": "SMTP server certificate verification mode. Defaults is 'peer'.",
"required": false
},
"SMTP_ENABLE_STARTTLS": {
"description": "Enable STARTTLS? Default is 'auto'.",
"value": "auto",
"required": false
},
"SMTP_ENABLE_STARTTLS_AUTO": {
"description": "Enable STARTTLS if SMTP server supports it? Default is true.",
"description": "Enable STARTTLS if SMTP server supports it? Deprecated by SMTP_ENABLE_STARTTLS.",
"required": false
}
},

View File

@ -17,6 +17,8 @@ class AccountsController < ApplicationController
respond_to do |format|
format.html do
expires_in 0, public: true unless user_signed_in?
@rss_url = rss_url
end
format.rss do

View File

@ -9,9 +9,9 @@ module Admin
@form = Form::DomainBlockBatch.new(form_domain_block_batch_params.merge(current_account: current_account, action: action_from_button))
@form.save
rescue ActionController::ParameterMissing
flash[:alert] = I18n.t('admin.email_domain_blocks.no_domain_block_selected')
flash[:alert] = I18n.t('admin.domain_blocks.no_domain_block_selected')
rescue Mastodon::NotPermittedError
flash[:alert] = I18n.t('admin.domain_blocks.created_msg')
flash[:alert] = I18n.t('admin.domain_blocks.not_permitted')
else
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
end

View File

@ -19,7 +19,7 @@ module Admin
rescue ActionController::ParameterMissing
flash[:alert] = I18n.t('admin.email_domain_blocks.no_email_domain_block_selected')
rescue Mastodon::NotPermittedError
flash[:alert] = I18n.t('admin.custom_emojis.not_permitted')
flash[:alert] = I18n.t('admin.email_domain_blocks.not_permitted')
ensure
redirect_to admin_email_domain_blocks_path
end

View File

@ -8,8 +8,6 @@ module Admin
before_action :set_dummy_import!, only: [:new]
ROWS_PROCESSING_LIMIT = 20_000
def new
authorize :domain_allow, :create?
end
@ -23,9 +21,11 @@ module Admin
authorize :domain_allow, :create?
begin
@import = Admin::Import.new(import_params)
return render :new unless @import.validate
parse_import_data!(export_headers)
@data.take(ROWS_PROCESSING_LIMIT).each do |row|
@data.take(Admin::Import::ROWS_PROCESSING_LIMIT).each do |row|
domain = row['#domain'].strip
next if DomainAllow.allowed?(domain)

View File

@ -8,8 +8,6 @@ module Admin
before_action :set_dummy_import!, only: [:new]
ROWS_PROCESSING_LIMIT = 20_000
def new
authorize :domain_block, :create?
end
@ -23,12 +21,14 @@ module Admin
authorize :domain_block, :create?
@import = Admin::Import.new(import_params)
return render :new unless @import.validate
parse_import_data!(export_headers)
@global_private_comment = I18n.t('admin.export_domain_blocks.import.private_comment_template', source: @import.data_file_name, date: I18n.l(Time.now.utc))
@form = Form::DomainBlockBatch.new
@domain_blocks = @data.take(ROWS_PROCESSING_LIMIT).filter_map do |row|
@domain_blocks = @data.take(Admin::Import::ROWS_PROCESSING_LIMIT).filter_map do |row|
domain = row['#domain'].strip
next if DomainBlock.rule_for(domain).present?

View File

@ -57,7 +57,7 @@ module Admin
end
def preload_delivery_failures!
warning_domains_map = DeliveryFailureTracker.warning_domains_map
warning_domains_map = DeliveryFailureTracker.warning_domains_map(@instances.map(&:domain))
@instances.each do |instance|
instance.failure_days = warning_domains_map[instance.domain]

View File

@ -0,0 +1,9 @@
# frozen_string_literal: true
class Admin::Settings::OtherController < Admin::SettingsController
private
def after_update_redirect_path
admin_settings_other_path
end
end

View File

@ -57,7 +57,7 @@ class Api::BaseController < ApplicationController
render json: { error: I18n.t('errors.429') }, status: 429
end
rescue_from ActionController::ParameterMissing do |e|
rescue_from ActionController::ParameterMissing, Mastodon::InvalidParameterError do |e|
render json: { error: e.to_s }, status: 400
end
@ -129,7 +129,7 @@ class Api::BaseController < ApplicationController
end
def set_cache_headers
response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
response.headers['Cache-Control'] = 'private, no-store'
end
def disallow_unauthenticated_api_access?

View File

@ -8,7 +8,7 @@ class Api::V1::Accounts::PinsController < Api::BaseController
before_action :set_account
def create
AccountPin.create!(account: current_account, target_account: @account)
AccountPin.find_or_create_by!(account: current_account, target_account: @account)
render json: @account, serializer: REST::RelationshipSerializer, relationships: relationships_presenter
end

View File

@ -52,7 +52,7 @@ class Api::V1::FiltersController < Api::BaseController
end
def resource_params
params.permit(:phrase, :expires_in, :irreversible, :whole_word, context: [])
params.permit(:phrase, :expires_in, :irreversible, context: [])
end
def filter_params

View File

@ -3,11 +3,11 @@
class Api::V1::FollowedTagsController < Api::BaseController
TAGS_LIMIT = 100
before_action -> { doorkeeper_authorize! :follow, :read, :'read:follows' }, except: :show
before_action -> { doorkeeper_authorize! :follow, :read, :'read:follows' }
before_action :require_user!
before_action :set_results
after_action :insert_pagination_headers, only: :show
after_action :insert_pagination_headers
def index
render json: @results.map(&:tag), each_serializer: REST::TagSerializer, relationships: TagRelationshipsPresenter.new(@results.map(&:tag), current_user&.account_id)
@ -43,7 +43,7 @@ class Api::V1::FollowedTagsController < Api::BaseController
end
def records_continue?
@results.size == limit_param(TAG_LIMIT)
@results.size == limit_param(TAGS_LIMIT)
end
def pagination_params(core_params)

View File

@ -7,6 +7,10 @@ class Api::V1::ListsController < Api::BaseController
before_action :require_user!
before_action :set_list, except: [:index, :create]
rescue_from ArgumentError do |e|
render json: { error: e.to_s }, status: 422
end
def index
@lists = List.where(account: current_account).all
render json: @lists, each_serializer: REST::ListSerializer

View File

@ -18,14 +18,29 @@ class Api::V1::StatusesController < Api::BaseController
# than this anyway
CONTEXT_LIMIT = 4_096
# This remains expensive and we don't want to show everything to logged-out users
ANCESTORS_LIMIT = 40
DESCENDANTS_LIMIT = 60
DESCENDANTS_DEPTH_LIMIT = 20
def show
@status = cache_collection([@status], Status).first
render json: @status, serializer: REST::StatusSerializer
end
def context
ancestors_results = @status.in_reply_to_id.nil? ? [] : @status.ancestors(CONTEXT_LIMIT, current_account)
descendants_results = @status.descendants(CONTEXT_LIMIT, current_account)
ancestors_limit = CONTEXT_LIMIT
descendants_limit = CONTEXT_LIMIT
descendants_depth_limit = nil
if current_account.nil?
ancestors_limit = ANCESTORS_LIMIT
descendants_limit = DESCENDANTS_LIMIT
descendants_depth_limit = DESCENDANTS_DEPTH_LIMIT
end
ancestors_results = @status.in_reply_to_id.nil? ? [] : @status.ancestors(ancestors_limit, current_account)
descendants_results = @status.descendants(descendants_limit, current_account, descendants_depth_limit)
loaded_ancestors = cache_collection(ancestors_results, Status)
loaded_descendants = cache_collection(descendants_results, Status)

View File

@ -12,7 +12,7 @@ class Api::V1::TagsController < Api::BaseController
end
def follow
TagFollow.create!(tag: @tag, account: current_account, rate_limit: true)
TagFollow.create_with(rate_limit: true).find_or_create_by!(tag: @tag, account: current_account)
render json: @tag, serializer: REST::TagSerializer
end
@ -24,7 +24,7 @@ class Api::V1::TagsController < Api::BaseController
private
def set_or_create_tag
return not_found unless /\A(#{Tag::HASHTAG_NAME_RE})\z/.match?(params[:id])
return not_found unless Tag::HASHTAG_NAME_RE.match?(params[:id])
@tag = Tag.find_normalized(params[:id]) || Tag.new(name: Tag.normalize(params[:id]), display_name: params[:id])
end
end

View File

@ -35,7 +35,6 @@ class Api::V1::Timelines::PublicController < Api::BaseController
def public_feed
PublicFeed.new(
current_account,
locale: content_locale,
local: truthy_param?(:local),
remote: truthy_param?(:remote),
only_media: truthy_param?(:only_media),

View File

@ -33,7 +33,7 @@ class Api::V2::Admin::AccountsController < Api::V1::Admin::AccountsController
end
def filter_params
params.permit(*FILTER_PARAMS)
params.permit(*FILTER_PARAMS, role_ids: [])
end
def pagination_params(core_params)

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Api::V1::Filters::KeywordsController < Api::BaseController
class Api::V2::Filters::KeywordsController < Api::BaseController
before_action -> { doorkeeper_authorize! :read, :'read:filters' }, only: [:index, :show]
before_action -> { doorkeeper_authorize! :write, :'write:filters' }, except: [:index, :show]
before_action :require_user!

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Api::V1::Filters::StatusesController < Api::BaseController
class Api::V2::Filters::StatusesController < Api::BaseController
before_action -> { doorkeeper_authorize! :read, :'read:filters' }, only: [:index, :show]
before_action -> { doorkeeper_authorize! :write, :'write:filters' }, except: [:index, :show]
before_action :require_user!

View File

@ -18,7 +18,8 @@ class Auth::OmniauthCallbacksController < Devise::OmniauthCallbacksController
)
sign_in_and_redirect @user, event: :authentication
set_flash_message(:notice, :success, kind: Devise.omniauth_configs[provider].strategy.display_name.capitalize) if is_navigational_format?
label = Devise.omniauth_configs[provider]&.strategy&.display_name.presence || I18n.t("auth.providers.#{provider}", default: provider.to_s.chomp('_oauth2').capitalize)
set_flash_message(:notice, :success, kind: label) if is_navigational_format?
else
session["devise.#{provider}_data"] = request.env['omniauth.auth']
redirect_to new_user_registration_url

View File

@ -159,6 +159,6 @@ class Auth::RegistrationsController < Devise::RegistrationsController
end
def set_cache_headers
response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
response.headers['Cache-Control'] = 'private, no-store'
end
end

View File

@ -15,6 +15,10 @@ class Auth::SessionsController < Devise::SessionsController
before_action :set_instance_presenter, only: [:new]
before_action :set_body_classes
content_security_policy only: :new do |p|
p.form_action(false)
end
def check_suspicious!
user = find_user
@login_is_suspicious = suspicious_sign_in?(user) unless user.nil?

View File

@ -27,13 +27,13 @@ module AdminExportControllerConcern
params.require(:admin_import).permit(:data)
end
def import_data
Paperclip.io_adapters.for(@import.data).read
def import_data_path
params[:admin_import][:data].path
end
def parse_import_data!(default_headers)
data = CSV.parse(import_data, headers: true)
data = CSV.parse(import_data, headers: default_headers) unless data.headers&.first&.strip&.include?(default_headers[0])
data = CSV.read(import_data_path, headers: true, encoding: 'UTF-8')
data = CSV.read(import_data_path, headers: default_headers, encoding: 'UTF-8') unless data.headers&.first&.strip&.include?(default_headers[0])
@data = data.reject(&:blank?)
end
end

View File

@ -1,87 +0,0 @@
# frozen_string_literal: true
module StatusControllerConcern
extend ActiveSupport::Concern
ANCESTORS_LIMIT = 40
DESCENDANTS_LIMIT = 60
DESCENDANTS_DEPTH_LIMIT = 20
def create_descendant_thread(starting_depth, statuses)
depth = starting_depth + statuses.size
if depth < DESCENDANTS_DEPTH_LIMIT
{
statuses: statuses,
starting_depth: starting_depth,
}
else
next_status = statuses.pop
{
statuses: statuses,
starting_depth: starting_depth,
next_status: next_status,
}
end
end
def set_ancestors
@ancestors = @status.reply? ? cache_collection(@status.ancestors(ANCESTORS_LIMIT, current_account), Status) : []
@next_ancestor = @ancestors.size < ANCESTORS_LIMIT ? nil : @ancestors.shift
end
def set_descendants
@max_descendant_thread_id = params[:max_descendant_thread_id]&.to_i
@since_descendant_thread_id = params[:since_descendant_thread_id]&.to_i
descendants = cache_collection(
@status.descendants(
DESCENDANTS_LIMIT,
current_account,
@max_descendant_thread_id,
@since_descendant_thread_id,
DESCENDANTS_DEPTH_LIMIT
),
Status
)
@descendant_threads = []
if descendants.present?
statuses = [descendants.first]
starting_depth = 0
descendants.drop(1).each_with_index do |descendant, index|
if descendants[index].id == descendant.in_reply_to_id
statuses << descendant
else
@descendant_threads << create_descendant_thread(starting_depth, statuses)
# The thread is broken, assume it's a reply to the root status
starting_depth = 0
# ... unless we can find its ancestor in one of the already-processed threads
@descendant_threads.reverse_each do |descendant_thread|
statuses = descendant_thread[:statuses]
index = statuses.find_index do |thread_status|
thread_status.id == descendant.in_reply_to_id
end
if index.present?
starting_depth = descendant_thread[:starting_depth] + index + 1
break
end
end
statuses = [descendant]
end
end
@descendant_threads << create_descendant_thread(starting_depth, statuses)
end
@max_descendant_thread_id = @descendant_threads.pop[:statuses].first.id if descendants.size >= DESCENDANTS_LIMIT
end
end

View File

@ -8,6 +8,10 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
before_action :set_pack
before_action :set_cache_headers
content_security_policy do |p|
p.form_action(false)
end
include Localized
private
@ -35,6 +39,6 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
end
def set_cache_headers
response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
response.headers['Cache-Control'] = 'private, no-store'
end
end

View File

@ -19,7 +19,7 @@ class Settings::BaseController < ApplicationController
end
def set_cache_headers
response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
response.headers['Cache-Control'] = 'private, no-store'
end
def require_not_suspended!

View File

@ -20,6 +20,10 @@ class StatusesCleanupController < ApplicationController
# Do nothing
end
def require_functional!
redirect_to edit_user_registration_path unless current_user.functional_or_moved?
end
private
def set_pack

View File

@ -2,7 +2,6 @@
class StatusesController < ApplicationController
include WebAppControllerConcern
include StatusControllerConcern
include SignatureAuthentication
include Authorization
include AccountOwnedConcern

View File

@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:disable Metrics/ModuleLength, Style/WordArray
module LanguagesHelper
ISO_639_1 = {
@ -189,8 +190,14 @@ module LanguagesHelper
ISO_639_3 = {
ast: ['Asturian', 'Asturianu'].freeze,
ckb: ['Sorani (Kurdish)', 'سۆرانی'].freeze,
jbo: ['Lojban', 'la .lojban.'].freeze,
kab: ['Kabyle', 'Taqbaylit'].freeze,
kmr: ['Kurmanji (Kurdish)', 'Kurmancî'].freeze,
ldn: ['Láadan', 'Láadan'].freeze,
lfn: ['Lingua Franca Nova', 'lingua franca nova'].freeze,
sco: ['Scots', 'Scots'].freeze,
tok: ['Toki Pona', 'toki pona'].freeze,
zba: ['Balaibalan', 'باليبلن'].freeze,
zgh: ['Standard Moroccan Tamazight', 'ⵜⴰⵎⴰⵣⵉⵖⵜ'].freeze,
}.freeze
@ -259,3 +266,5 @@ module LanguagesHelper
locale_name.to_sym if locale_name.present? && I18n.available_locales.include?(locale_name.to_sym)
end
end
# rubocop:enable Metrics/ModuleLength, Style/WordArray

View File

@ -43,7 +43,7 @@ export const fetchFilters = () => (dispatch, getState) => {
export const createFilterStatus = (params, onSuccess, onFail) => (dispatch, getState) => {
dispatch(createFilterStatusRequest());
api(getState).post(`/api/v1/filters/${params.filter_id}/statuses`, params).then(response => {
api(getState).post(`/api/v2/filters/${params.filter_id}/statuses`, params).then(response => {
dispatch(createFilterStatusSuccess(response.data));
if (onSuccess) onSuccess();
}).catch(error => {

View File

@ -34,6 +34,11 @@ export const STATUS_FETCH_SOURCE_REQUEST = 'STATUS_FETCH_SOURCE_REQUEST';
export const STATUS_FETCH_SOURCE_SUCCESS = 'STATUS_FETCH_SOURCE_SUCCESS';
export const STATUS_FETCH_SOURCE_FAIL = 'STATUS_FETCH_SOURCE_FAIL';
export const STATUS_TRANSLATE_REQUEST = 'STATUS_TRANSLATE_REQUEST';
export const STATUS_TRANSLATE_SUCCESS = 'STATUS_TRANSLATE_SUCCESS';
export const STATUS_TRANSLATE_FAIL = 'STATUS_TRANSLATE_FAIL';
export const STATUS_TRANSLATE_UNDO = 'STATUS_TRANSLATE_UNDO';
export function fetchStatusRequest(id, skipLoading) {
return {
type: STATUS_FETCH_REQUEST,
@ -310,4 +315,36 @@ export function toggleStatusCollapse(id, isCollapsed) {
id,
isCollapsed,
};
}
};
export const translateStatus = id => (dispatch, getState) => {
dispatch(translateStatusRequest(id));
api(getState).post(`/api/v1/statuses/${id}/translate`).then(response => {
dispatch(translateStatusSuccess(id, response.data));
}).catch(error => {
dispatch(translateStatusFail(id, error));
});
};
export const translateStatusRequest = id => ({
type: STATUS_TRANSLATE_REQUEST,
id,
});
export const translateStatusSuccess = (id, translation) => ({
type: STATUS_TRANSLATE_SUCCESS,
id,
translation,
});
export const translateStatusFail = (id, error) => ({
type: STATUS_TRANSLATE_FAIL,
id,
error,
});
export const undoStatusTranslation = id => ({
type: STATUS_TRANSLATE_UNDO,
id,
});

View File

@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedNumber } from 'react-intl';
import ShortNumber from 'mastodon/components/short_number';
import TransitionMotion from 'react-motion/lib/TransitionMotion';
import spring from 'react-motion/lib/spring';
import { reduceMotion } from 'flavours/glitch/initial_state';
@ -51,7 +51,7 @@ export default class AnimatedNumber extends React.PureComponent {
const { direction } = this.state;
if (reduceMotion) {
return obfuscate ? obfuscatedCount(value) : <FormattedNumber value={value} />;
return obfuscate ? obfuscatedCount(value) : <ShortNumber value={value} />;
}
const styles = [{
@ -65,7 +65,7 @@ export default class AnimatedNumber extends React.PureComponent {
{items => (
<span className='animated-number'>
{items.map(({ key, data, style }) => (
<span key={key} style={{ position: (direction * style.y) > 0 ? 'absolute' : 'static', transform: `translateY(${style.y * 100}%)` }}>{obfuscate ? obfuscatedCount(data) : <FormattedNumber value={data} />}</span>
<span key={key} style={{ position: (direction * style.y) > 0 ? 'absolute' : 'static', transform: `translateY(${style.y * 100}%)` }}>{obfuscate ? obfuscatedCount(data) : <ShortNumber value={data} />}</span>
))}
</span>
)}

View File

@ -63,7 +63,7 @@ class ColumnHeader extends React.PureComponent {
}
handleTitleClick = () => {
this.props.onClick();
this.props.onClick?.();
}
handleMoveLeft = () => {
@ -157,7 +157,6 @@ class ColumnHeader extends React.PureComponent {
className={collapsibleButtonClassName}
title={formatMessage(collapsed ? messages.show : messages.hide)}
aria-label={formatMessage(collapsed ? messages.show : messages.hide)}
aria-pressed={collapsed ? 'false' : 'true'}
onClick={this.handleToggleClick}
>
<i className='icon-with-badge'>

View File

@ -18,7 +18,6 @@ export default class IconButton extends React.PureComponent {
onKeyPress: PropTypes.func,
size: PropTypes.number,
active: PropTypes.bool,
pressed: PropTypes.bool,
expanded: PropTypes.bool,
style: PropTypes.object,
activeStyle: PropTypes.object,
@ -111,7 +110,6 @@ export default class IconButton extends React.PureComponent {
icon,
inverted,
overlay,
pressed,
tabIndex,
title,
counter,
@ -156,7 +154,6 @@ export default class IconButton extends React.PureComponent {
return (
<button
aria-label={title}
aria-pressed={pressed}
aria-expanded={expanded}
title={title}
className={classes}

View File

@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
import { is } from 'immutable';
import IconButton from './icon_button';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { isIOS } from '../is_mobile';
import classNames from 'classnames';
import { autoPlayGif, displayMedia, useBlurhash } from 'flavours/glitch/initial_state';
import { debounce } from 'lodash';
@ -202,7 +201,7 @@ class Item extends React.PureComponent {
</a>
);
} else if (attachment.get('type') === 'gifv') {
const autoPlay = !isIOS() && this.getAutoPlay();
const autoPlay = this.getAutoPlay();
thumbnail = (
<div className={classNames('media-gallery__gifv', { autoplay: autoPlay })}>
@ -216,6 +215,7 @@ class Item extends React.PureComponent {
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}
autoPlay={autoPlay}
playsInline
loop
muted
/>

View File

@ -83,6 +83,7 @@ class Status extends ImmutablePureComponent {
onEmbed: PropTypes.func,
onHeightChange: PropTypes.func,
onToggleHidden: PropTypes.func,
onTranslate: PropTypes.func,
onInteractionModal: PropTypes.func,
muted: PropTypes.bool,
hidden: PropTypes.bool,
@ -472,6 +473,10 @@ class Status extends ImmutablePureComponent {
this.node = c;
}
handleTranslate = () => {
this.props.onTranslate(this.props.status);
}
renderLoadingMediaGallery () {
return <div className='media-gallery' style={{ height: '110px' }} />;
}
@ -687,7 +692,7 @@ class Status extends ImmutablePureComponent {
if (!status.get('sensitive') && !(status.get('spoiler_text').length > 0) && settings.getIn(['collapsed', 'backgrounds', 'preview_images'])) {
background = attachments.getIn([0, 'preview_url']);
}
} else if (status.get('card') && settings.get('inline_preview_cards')) {
} else if (status.get('card') && settings.get('inline_preview_cards') && !this.props.muted) {
media.push(
<Card
onOpenMedia={this.handleOpenMedia}
@ -788,6 +793,7 @@ class Status extends ImmutablePureComponent {
mediaIcons={contentMediaIcons}
expanded={isExpanded}
onExpandedToggle={this.handleExpandedToggle}
onTranslate={this.handleTranslate}
parseClick={parseClick}
disabled={!router}
tagLinks={settings.get('tag_misleading_links')}

View File

@ -42,6 +42,7 @@ const messages = defineMessages({
hide: { id: 'status.hide', defaultMessage: 'Hide toot' },
edited: { id: 'status.edited', defaultMessage: 'Edited {date}' },
filter: { id: 'status.filter', defaultMessage: 'Filter this post' },
openOriginalPage: { id: 'account.open_original_page', defaultMessage: 'Open original page' },
});
export default @injectIntl
@ -182,22 +183,8 @@ class StatusActionBar extends ImmutablePureComponent {
}
handleCopy = () => {
const url = this.props.status.get('url');
const textarea = document.createElement('textarea');
textarea.textContent = url;
textarea.style.position = 'fixed';
document.body.appendChild(textarea);
try {
textarea.select();
document.execCommand('copy');
} catch (e) {
} finally {
document.body.removeChild(textarea);
}
const url = this.props.status.get('url');
navigator.clipboard.writeText(url);
}
handleHideClick = () => {
@ -216,6 +203,7 @@ class StatusActionBar extends ImmutablePureComponent {
const publicStatus = ['public', 'unlisted'].includes(status.get('visibility'));
const pinnableStatus = ['public', 'unlisted', 'private'].includes(status.get('visibility'));
const writtenByMe = status.getIn(['account', 'id']) === me;
const isRemote = status.getIn(['account', 'username']) !== status.getIn(['account', 'acct']);
let menu = [];
let reblogIcon = 'retweet';
@ -225,6 +213,9 @@ class StatusActionBar extends ImmutablePureComponent {
menu.push({ text: intl.formatMessage(messages.open), action: this.handleOpen });
if (publicStatus) {
if (isRemote) {
menu.push({ text: intl.formatMessage(messages.openOriginalPage), href: status.get('url') });
}
menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy });
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
}
@ -315,10 +306,10 @@ class StatusActionBar extends ImmutablePureComponent {
counter={showReplyCount ? status.get('replies_count') : undefined}
obfuscateCount
/>
<IconButton className={classNames('status__action-bar-button', { reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} pressed={status.get('reblogged')} title={reblogTitle} icon={reblogIcon} onClick={this.handleReblogClick} counter={withCounters ? status.get('reblogs_count') : undefined} />
<IconButton className='status__action-bar-button star-icon' animate active={status.get('favourited')} pressed={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} counter={withCounters ? status.get('favourites_count') : undefined} />
<IconButton className={classNames('status__action-bar-button', { reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} title={reblogTitle} icon={reblogIcon} onClick={this.handleReblogClick} counter={withCounters ? status.get('reblogs_count') : undefined} />
<IconButton className='status__action-bar-button star-icon' animate active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} counter={withCounters ? status.get('favourites_count') : undefined} />
{shareButton}
<IconButton className='status__action-bar-button bookmark-icon' disabled={anonymousAccess} active={status.get('bookmarked')} pressed={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' onClick={this.handleBookmarkClick} />
<IconButton className='status__action-bar-button bookmark-icon' disabled={anonymousAccess} active={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' onClick={this.handleBookmarkClick} />
{filterButton}

View File

@ -1,11 +1,11 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { FormattedMessage, injectIntl } from 'react-intl';
import Permalink from './permalink';
import classnames from 'classnames';
import Icon from 'flavours/glitch/components/icon';
import { autoPlayGif } from 'flavours/glitch/initial_state';
import { autoPlayGif, languages as preloadedLanguages, translationEnabled } from 'flavours/glitch/initial_state';
import { decode as decodeIDNA } from 'flavours/glitch/utils/idna';
const textMatchesTarget = (text, origin, host) => {
@ -62,13 +62,56 @@ const isLinkMisleading = (link) => {
return !(textMatchesTarget(text, origin, host) || textMatchesTarget(text.toLowerCase(), origin, host));
};
export default class StatusContent extends React.PureComponent {
class TranslateButton extends React.PureComponent {
static propTypes = {
translation: ImmutablePropTypes.map,
onClick: PropTypes.func,
};
render () {
const { translation, onClick } = this.props;
if (translation) {
const language = preloadedLanguages.find(lang => lang[0] === translation.get('detected_source_language'));
const languageName = language ? language[2] : translation.get('detected_source_language');
const provider = translation.get('provider');
return (
<div className='translate-button'>
<div className='translate-button__meta'>
<FormattedMessage id='status.translated_from_with' defaultMessage='Translated from {lang} using {provider}' values={{ lang: languageName, provider }} />
</div>
<button className='link-button' onClick={onClick}>
<FormattedMessage id='status.show_original' defaultMessage='Show original' />
</button>
</div>
);
}
return (
<button className='status__content__read-more-button' onClick={onClick}>
<FormattedMessage id='status.translate' defaultMessage='Translate' />
</button>
);
}
}
export default @injectIntl
class StatusContent extends React.PureComponent {
static contextTypes = {
identity: PropTypes.object,
};
static propTypes = {
status: ImmutablePropTypes.map.isRequired,
expanded: PropTypes.bool,
collapsed: PropTypes.bool,
onExpandedToggle: PropTypes.func,
onTranslate: PropTypes.func,
media: PropTypes.node,
extraMedia: PropTypes.node,
mediaIcons: PropTypes.arrayOf(PropTypes.string),
@ -77,6 +120,7 @@ export default class StatusContent extends React.PureComponent {
onUpdate: PropTypes.func,
tagLinks: PropTypes.bool,
rewriteMentions: PropTypes.string,
intl: PropTypes.object,
};
static defaultProps = {
@ -249,6 +293,10 @@ export default class StatusContent extends React.PureComponent {
}
}
handleTranslate = () => {
this.props.onTranslate();
}
setContentsRef = (c) => {
this.contentsNode = c;
}
@ -263,18 +311,24 @@ export default class StatusContent extends React.PureComponent {
disabled,
tagLinks,
rewriteMentions,
intl,
} = this.props;
const hidden = this.props.onExpandedToggle ? !this.props.expanded : this.state.hidden;
const renderTranslate = translationEnabled && this.context.identity.signedIn && this.props.onTranslate && ['public', 'unlisted'].includes(status.get('visibility')) && status.get('contentHtml').length > 0 && status.get('language') !== null && intl.locale !== status.get('language');
const content = { __html: status.get('contentHtml') };
const content = { __html: status.get('translation') ? status.getIn(['translation', 'content']) : status.get('contentHtml') };
const spoilerContent = { __html: status.get('spoilerHtml') };
const lang = status.get('language');
const lang = status.get('translation') ? intl.locale : status.get('language');
const classNames = classnames('status__content', {
'status__content--with-action': parseClick && !disabled,
'status__content--with-spoiler': status.get('spoiler_text').length > 0,
});
const translateButton = renderTranslate && (
<TranslateButton onClick={this.handleTranslate} translation={status.get('translation')} />
);
if (status.get('spoiler_text').length > 0) {
let mentionsPlaceholder = '';
@ -332,7 +386,7 @@ export default class StatusContent extends React.PureComponent {
>
<span dangerouslySetInnerHTML={spoilerContent} className='translate' lang={lang} />
{' '}
<button tabIndex='0' className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>
<button type='button' className='status__content__spoiler-link' onClick={this.handleSpoilerClick} aria-expanded={!hidden}>
{toggleText}
</button>
</p>
@ -350,11 +404,11 @@ export default class StatusContent extends React.PureComponent {
onMouseLeave={this.handleMouseLeave}
lang={lang}
/>
{!hidden && translateButton}
{media}
</div>
{extraMedia}
</div>
);
} else if (parseClick) {
@ -375,6 +429,7 @@ export default class StatusContent extends React.PureComponent {
onMouseLeave={this.handleMouseLeave}
lang={lang}
/>
{translateButton}
{media}
{extraMedia}
</div>
@ -395,6 +450,7 @@ export default class StatusContent extends React.PureComponent {
onMouseLeave={this.handleMouseLeave}
lang={lang}
/>
{translateButton}
{media}
{extraMedia}
</div>

View File

@ -23,7 +23,9 @@ import {
deleteStatus,
hideStatus,
revealStatus,
editStatus
editStatus,
translateStatus,
undoStatusTranslation,
} from 'flavours/glitch/actions/statuses';
import {
initAddFilter,
@ -187,6 +189,14 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({
dispatch(editStatus(status.get('id'), history));
},
onTranslate (status) {
if (status.get('translation')) {
dispatch(undoStatusTranslation(status.get('id')));
} else {
dispatch(translateStatus(status.get('id')));
}
},
onDirect (account, router) {
dispatch(directCompose(account, router));
},

View File

@ -1,62 +0,0 @@
import React, { Fragment } from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import PropTypes from 'prop-types';
import configureStore from 'flavours/glitch/store/configureStore';
import { hydrateStore } from 'flavours/glitch/actions/store';
import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from 'mastodon/locales';
import PublicTimeline from 'flavours/glitch/features/standalone/public_timeline';
import HashtagTimeline from 'flavours/glitch/features/standalone/hashtag_timeline';
import ModalContainer from 'flavours/glitch/features/ui/containers/modal_container';
import initialState from 'flavours/glitch/initial_state';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
const store = configureStore();
if (initialState) {
store.dispatch(hydrateStore(initialState));
}
export default class TimelineContainer extends React.PureComponent {
static propTypes = {
locale: PropTypes.string.isRequired,
hashtag: PropTypes.string,
local: PropTypes.bool,
};
static defaultProps = {
local: !initialState.settings.known_fediverse,
};
render () {
const { locale, hashtag, local } = this.props;
let timeline;
if (hashtag) {
timeline = <HashtagTimeline hashtag={hashtag} local={local} />;
} else {
timeline = <PublicTimeline local={local} />;
}
return (
<IntlProvider locale={locale} messages={messages}>
<Provider store={store}>
<Fragment>
{timeline}
{ReactDOM.createPortal(
<ModalContainer />,
document.getElementById('modal-container'),
)}
</Fragment>
</Provider>
</IntlProvider>
);
}
}

View File

@ -183,25 +183,18 @@ class About extends React.PureComponent {
<>
<p><FormattedMessage id='about.domain_blocks.preamble' defaultMessage='Mastodon generally allows you to view content from and interact with users from any other server in the fediverse. These are the exceptions that have been made on this particular server.' /></p>
<table className='about__domain-blocks'>
<thead>
<tr>
<th><FormattedMessage id='about.domain_blocks.domain' defaultMessage='Domain' /></th>
<th><FormattedMessage id='about.domain_blocks.severity' defaultMessage='Severity' /></th>
<th><FormattedMessage id='about.domain_blocks.comment' defaultMessage='Reason' /></th>
</tr>
</thead>
<div className='about__domain-blocks'>
{domainBlocks.get('items').map(block => (
<div className='about__domain-blocks__domain' key={block.get('domain')}>
<div className='about__domain-blocks__domain__header'>
<h6><span title={`SHA-256: ${block.get('digest')}`}>{block.get('domain')}</span></h6>
<span className='about__domain-blocks__domain__type' title={intl.formatMessage(severityMessages[block.get('severity')].explanation)}>{intl.formatMessage(severityMessages[block.get('severity')].title)}</span>
</div>
<tbody>
{domainBlocks.get('items').map(block => (
<tr key={block.get('domain')}>
<td><span title={`SHA-256: ${block.get('digest')}`}>{block.get('domain')}</span></td>
<td><span title={intl.formatMessage(severityMessages[block.get('severity')].explanation)}>{intl.formatMessage(severityMessages[block.get('severity')].title)}</span></td>
<td>{block.get('comment')}</td>
</tr>
))}
</tbody>
</table>
<p>{(block.get('comment') || '').length > 0 ? block.get('comment') : <FormattedMessage id='about.domain_blocks.no_reason_available' defaultMessage='Reason not available' />}</p>
</div>
))}
</div>
</>
) : (
<p><FormattedMessage id='about.not_available' defaultMessage='This information has not been made available on this server.' /></p>

View File

@ -53,6 +53,7 @@ const messages = defineMessages({
admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },
add_account_note: { id: 'account.add_account_note', defaultMessage: 'Add note for @{name}' },
languages: { id: 'account.languages', defaultMessage: 'Change subscribed languages' },
openOriginalPage: { id: 'account.open_original_page', defaultMessage: 'Open original page' },
});
const titleFromAccount = account => {
@ -97,6 +98,7 @@ class Header extends ImmutablePureComponent {
onEditAccountNote: PropTypes.func.isRequired,
onChangeLanguages: PropTypes.func.isRequired,
onInteractionModal: PropTypes.func.isRequired,
onOpenAvatar: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
domain: PropTypes.string.isRequired,
hidden: PropTypes.bool,
@ -132,6 +134,24 @@ class Header extends ImmutablePureComponent {
}
}
handleAvatarClick = e => {
if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {
e.preventDefault();
this.props.onOpenAvatar();
}
}
handleShare = () => {
const { account } = this.props;
navigator.share({
text: `${titleFromAccount(account)}\n${account.get('note_plain')}`,
url: account.get('url'),
}).catch((e) => {
if (e.name !== 'AbortError') console.error(e);
});
}
render () {
const { account, hidden, intl, domain } = this.props;
const { signedIn } = this.context.identity;
@ -142,7 +162,9 @@ class Header extends ImmutablePureComponent {
const accountNote = account.getIn(['relationship', 'note']);
const suspended = account.get('suspended');
const suspended = account.get('suspended');
const isRemote = account.get('acct') !== account.get('username');
const remoteDomain = isRemote ? account.get('acct').split('@')[1] : null;
let info = [];
let actionBtn = '';
@ -199,6 +221,11 @@ class Header extends ImmutablePureComponent {
menu.push(null);
}
if (isRemote) {
menu.push({ text: intl.formatMessage(messages.openOriginalPage), href: account.get('url') });
menu.push(null);
}
if ('share' in navigator && !suspended) {
menu.push({ text: intl.formatMessage(messages.share, { name: account.get('username') }), action: this.handleShare });
menu.push(null);
@ -253,15 +280,13 @@ class Header extends ImmutablePureComponent {
menu.push({ text: intl.formatMessage(messages.report, { name: account.get('username') }), action: this.props.onReport });
}
if (signedIn && account.get('acct') !== account.get('username')) {
const domain = account.get('acct').split('@')[1];
if (signedIn && isRemote) {
menu.push(null);
if (account.getIn(['relationship', 'domain_blocking'])) {
menu.push({ text: intl.formatMessage(messages.unblockDomain, { domain }), action: this.props.onUnblockDomain });
menu.push({ text: intl.formatMessage(messages.unblockDomain, { domain: remoteDomain }), action: this.props.onUnblockDomain });
} else {
menu.push({ text: intl.formatMessage(messages.blockDomain, { domain }), action: this.props.onBlockDomain });
menu.push({ text: intl.formatMessage(messages.blockDomain, { domain: remoteDomain }), action: this.props.onBlockDomain });
}
}
@ -299,12 +324,10 @@ class Header extends ImmutablePureComponent {
<div className='account__header__bar'>
<div className='account__header__tabs'>
<a className='avatar' href={account.get('url')} rel='noopener noreferrer' target='_blank'>
<a className='avatar' href={account.get('avatar')} rel='noopener noreferrer' target='_blank' onClick={this.handleAvatarClick}>
<Avatar account={suspended || hidden ? undefined : account} size={90} />
</a>
<div className='spacer' />
{!suspended && (
<div className='account__header__tabs__buttons'>
{!hidden && (

View File

@ -2,7 +2,6 @@ import Blurhash from 'flavours/glitch/components/blurhash';
import classNames from 'classnames';
import Icon from 'flavours/glitch/components/icon';
import { autoPlayGif, displayMedia, useBlurhash } from 'flavours/glitch/initial_state';
import { isIOS } from 'flavours/glitch/is_mobile';
import PropTypes from 'prop-types';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
@ -109,7 +108,8 @@ export default class MediaItem extends ImmutablePureComponent {
src={attachment.get('url')}
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}
autoPlay={!isIOS() && autoPlayGif}
autoPlay={autoPlayGif}
playsInline
loop
muted
/>

View File

@ -25,6 +25,7 @@ export default class Header extends ImmutablePureComponent {
onAddToList: PropTypes.func.isRequired,
onChangeLanguages: PropTypes.func.isRequired,
onInteractionModal: PropTypes.func.isRequired,
onOpenAvatar: PropTypes.func.isRequired,
hideTabs: PropTypes.bool,
domain: PropTypes.string.isRequired,
hidden: PropTypes.bool,
@ -102,6 +103,10 @@ export default class Header extends ImmutablePureComponent {
this.props.onInteractionModal(this.props.account);
}
handleOpenAvatar = () => {
this.props.onOpenAvatar(this.props.account);
}
render () {
const { account, hidden, hideTabs } = this.props;
@ -130,6 +135,7 @@ export default class Header extends ImmutablePureComponent {
onEditAccountNote={this.handleEditAccountNote}
onChangeLanguages={this.handleChangeLanguages}
onInteractionModal={this.handleInteractionModal}
onOpenAvatar={this.handleOpenAvatar}
domain={this.props.domain}
hidden={hidden}
/>

View File

@ -161,6 +161,13 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
}));
},
onOpenAvatar (account) {
dispatch(openModal('IMAGE', {
src: account.get('avatar'),
alt: account.get('acct'),
}));
},
});
export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Header));

View File

@ -25,7 +25,13 @@ const emptyList = ImmutableList();
const mapStateToProps = (state, { params: { acct, id, tagged }, withReplies = false }) => {
const accountId = id || state.getIn(['accounts_map', normalizeForLookup(acct)]);
if (!accountId) {
if (accountId === null) {
return {
isLoading: false,
isAccount: false,
statusIds: emptyList,
};
} else if (!accountId) {
return {
isLoading: true,
statusIds: emptyList,

View File

@ -0,0 +1,66 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
import { defineMessages, injectIntl } from 'react-intl';
import { preferencesLink, profileLink } from 'flavours/glitch/utils/backend_links';
const messages = defineMessages({
edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit profile' },
pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned posts' },
preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },
follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },
favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' },
lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },
blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' },
domain_blocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Hidden domains' },
mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },
filters: { id: 'navigation_bar.filters', defaultMessage: 'Muted words' },
logout: { id: 'navigation_bar.logout', defaultMessage: 'Logout' },
bookmarks: { id: 'navigation_bar.bookmarks', defaultMessage: 'Bookmarks' },
});
export default @injectIntl
class ActionBar extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
onLogout: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
};
handleLogout = () => {
this.props.onLogout();
}
render () {
const { intl } = this.props;
let menu = [];
menu.push({ text: intl.formatMessage(messages.edit_profile), href: profileLink });
menu.push({ text: intl.formatMessage(messages.preferences), href: preferencesLink });
menu.push({ text: intl.formatMessage(messages.pins), to: '/pinned' });
menu.push(null);
menu.push({ text: intl.formatMessage(messages.follow_requests), to: '/follow_requests' });
menu.push({ text: intl.formatMessage(messages.favourites), to: '/favourites' });
menu.push({ text: intl.formatMessage(messages.bookmarks), to: '/bookmarks' });
menu.push({ text: intl.formatMessage(messages.lists), to: '/lists' });
menu.push(null);
menu.push({ text: intl.formatMessage(messages.mutes), to: '/mutes' });
menu.push({ text: intl.formatMessage(messages.blocks), to: '/blocks' });
menu.push({ text: intl.formatMessage(messages.domain_blocks), to: '/domain_blocks' });
menu.push({ text: intl.formatMessage(messages.filters), href: '/filters' });
menu.push(null);
menu.push({ text: intl.formatMessage(messages.logout), action: this.handleLogout });
return (
<div className='compose__action-bar'>
<div className='compose__action-bar-dropdown'>
<DropdownMenuContainer items={menu} icon='ellipsis-v' size={18} direction='right' />
</div>
</div>
);
}
}

View File

@ -356,10 +356,8 @@ class ComposeForm extends ImmutablePureComponent {
<OptionsContainer
advancedOptions={advancedOptions}
disabled={isSubmitting}
onChangeVisibility={onChangeVisibility}
onToggleSpoiler={spoilersAlwaysOn ? null : onChangeSpoilerness}
onUpload={onPaste}
privacy={privacy}
isEditing={isEditing}
sensitive={sensitive || (spoilersAlwaysOn && spoilerText && spoilerText.length > 0)}
spoiler={spoilersAlwaysOn ? (spoilerText && spoilerText.length > 0) : spoiler}

View File

@ -9,13 +9,13 @@ import IconButton from 'flavours/glitch/components/icon_button';
import DropdownMenu from './dropdown_menu';
// Utils.
import { isUserTouching } from 'flavours/glitch/is_mobile';
import { assignHandlers } from 'flavours/glitch/utils/react_helpers';
// The component.
export default class ComposerOptionsDropdown extends React.PureComponent {
static propTypes = {
isUserTouching: PropTypes.func,
disabled: PropTypes.bool,
icon: PropTypes.string,
items: PropTypes.arrayOf(PropTypes.shape({
@ -49,7 +49,7 @@ export default class ComposerOptionsDropdown extends React.PureComponent {
const { onModalOpen } = this.props;
const { open } = this.state;
if (isUserTouching()) {
if (this.props.isUserTouching && this.props.isUserTouching()) {
if (this.state.open) {
this.props.onModalClose();
} else {

View File

@ -51,6 +51,15 @@ class LanguageDropdownMenu extends React.PureComponent {
document.addEventListener('click', this.handleDocumentClick, false);
document.addEventListener('touchend', this.handleDocumentClick, listenerOptions);
this.setState({ mounted: true });
// Because of https://github.com/react-bootstrap/react-bootstrap/issues/2614 we need
// to wait for a frame before focusing
requestAnimationFrame(() => {
if (this.node) {
const element = this.node.querySelector('input[type="search"]');
if (element) element.focus();
}
});
}
componentWillUnmount () {
@ -226,7 +235,7 @@ class LanguageDropdownMenu extends React.PureComponent {
// react-overlays
<div className={`language-dropdown__dropdown ${placement}`} style={{ ...style, opacity: opacity, transform: mounted ? `scale(${scaleX}, ${scaleY})` : null }} ref={this.setRef}>
<div className='emoji-mart-search'>
<input type='search' value={searchValue} onChange={this.handleSearchChange} onKeyDown={this.handleSearchKeyDown} placeholder={intl.formatMessage(messages.search)} autoFocus />
<input type='search' value={searchValue} onChange={this.handleSearchChange} onKeyDown={this.handleSearchKeyDown} placeholder={intl.formatMessage(messages.search)} />
<button className='emoji-mart-search-icon' disabled={!isSearching} aria-label={intl.formatMessage(messages.clear)} onClick={this.handleClear}>{!isSearching ? loupeIcon : deleteIcon}</button>
</div>

View File

@ -1,5 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ActionBar from './action_bar';
import Avatar from 'flavours/glitch/components/avatar';
import Permalink from 'flavours/glitch/components/permalink';
import { FormattedMessage } from 'react-intl';
@ -10,11 +12,12 @@ export default class NavigationBar extends ImmutablePureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
onLogout: PropTypes.func.isRequired,
};
render () {
return (
<div className='drawer--account'>
<div className='navigation-bar'>
<Permalink className='avatar' href={this.props.account.get('url')} to={`/@${this.props.account.get('acct')}`}>
<span style={{ display: 'none' }}>{this.props.account.get('acct')}</span>
<Avatar account={this.props.account} size={48} />
@ -28,11 +31,16 @@ export default class NavigationBar extends ImmutablePureComponent {
{ profileLink !== undefined && (
<a
className='edit'
href={ profileLink }
href={profileLink}
><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a>
)}
</div>
<div className='navigation-bar__actions'>
<ActionBar account={this.props.account} onLogout={this.props.onLogout} />
</div>
</div>
);
};
}
}

View File

@ -10,8 +10,8 @@ import { connect } from 'react-redux';
// Components.
import IconButton from 'flavours/glitch/components/icon_button';
import TextIconButton from './text_icon_button';
import Dropdown from './dropdown';
import PrivacyDropdown from './privacy_dropdown';
import DropdownContainer from '../containers/dropdown_container';
import PrivacyDropdownContainer from '../containers/privacy_dropdown_container';
import LanguageDropdown from '../containers/language_dropdown_container';
import ImmutablePureComponent from 'react-immutable-pure-component';
@ -103,7 +103,7 @@ class ToggleOption extends ImmutablePureComponent {
<React.Fragment>
<Toggle checked={checked} onChange={this.handleChange} />
<div className='content'>
<div className='privacy-dropdown__option__content'>
<strong>{text}</strong>
{meta}
</div>
@ -126,15 +126,11 @@ class ComposerOptions extends ImmutablePureComponent {
hasPoll: PropTypes.bool,
intl: PropTypes.object.isRequired,
onChangeAdvancedOption: PropTypes.func,
onChangeVisibility: PropTypes.func,
onChangeContentType: PropTypes.func,
onTogglePoll: PropTypes.func,
onDoodleOpen: PropTypes.func,
onModalClose: PropTypes.func,
onModalOpen: PropTypes.func,
onToggleSpoiler: PropTypes.func,
onUpload: PropTypes.func,
privacy: PropTypes.string,
contentType: PropTypes.string,
resetFileKey: PropTypes.number,
spoiler: PropTypes.bool,
@ -195,12 +191,8 @@ class ComposerOptions extends ImmutablePureComponent {
hasPoll,
onChangeAdvancedOption,
onChangeContentType,
onChangeVisibility,
onTogglePoll,
onModalClose,
onModalOpen,
onToggleSpoiler,
privacy,
resetFileKey,
spoiler,
showContentTypeChoice,
@ -239,7 +231,7 @@ class ComposerOptions extends ImmutablePureComponent {
multiple
style={{ display: 'none' }}
/>
<Dropdown
<DropdownContainer
disabled={disabled || !allowMedia}
icon='paperclip'
items={[
@ -255,8 +247,6 @@ class ComposerOptions extends ImmutablePureComponent {
},
]}
onChange={this.handleClickAttach}
onModalClose={onModalClose}
onModalOpen={onModalOpen}
title={formatMessage(messages.attach)}
/>
{!!pollLimits && (
@ -275,15 +265,9 @@ class ComposerOptions extends ImmutablePureComponent {
/>
)}
<hr />
<PrivacyDropdown
disabled={disabled || isEditing}
onChange={onChangeVisibility}
onModalClose={onModalClose}
onModalOpen={onModalOpen}
value={privacy}
/>
<PrivacyDropdownContainer disabled={disabled || isEditing} />
{showContentTypeChoice && (
<Dropdown
<DropdownContainer
disabled={disabled}
icon={(contentTypeItems[contentType.split('/')[1]] || {}).icon}
items={[
@ -292,8 +276,6 @@ class ComposerOptions extends ImmutablePureComponent {
contentTypeItems.markdown,
]}
onChange={onChangeContentType}
onModalClose={onModalClose}
onModalOpen={onModalOpen}
title={formatMessage(messages.content_type)}
value={contentType}
/>
@ -308,7 +290,7 @@ class ComposerOptions extends ImmutablePureComponent {
/>
)}
<LanguageDropdown />
<Dropdown
<DropdownContainer
disabled={disabled || isEditing}
icon='ellipsis-h'
items={advancedOptions ? [
@ -325,8 +307,6 @@ class ComposerOptions extends ImmutablePureComponent {
] : null}
onChange={onChangeAdvancedOption}
renderItemContents={this.renderToggleItemContents}
onModalClose={onModalClose}
onModalOpen={onModalOpen}
title={formatMessage(messages.advanced_options_icon_title)}
closeOnChange={false}
/>

View File

@ -32,7 +32,7 @@ class PrivacyDropdown extends React.PureComponent {
};
render () {
const { value, onChange, onModalOpen, onModalClose, disabled, noDirect, container, intl: { formatMessage } } = this.props;
const { value, onChange, onModalOpen, onModalClose, disabled, noDirect, container, isUserTouching, intl: { formatMessage } } = this.props;
// We predefine our privacy items so that we can easily pick the
// dropdown icon later.
@ -75,6 +75,7 @@ class PrivacyDropdown extends React.PureComponent {
icon={(privacyItems[value] || {}).icon}
items={items}
onChange={onChange}
isUserTouching={isUserTouching}
onModalClose={onModalClose}
onModalOpen={onModalOpen}
title={formatMessage(messages.change_privacy)}

View File

@ -18,7 +18,6 @@ export default class Upload extends ImmutablePureComponent {
media: ImmutablePropTypes.map.isRequired,
onUndo: PropTypes.func.isRequired,
onOpenFocalPoint: PropTypes.func.isRequired,
isEditingStatus: PropTypes.bool.isRequired,
};
handleUndoClick = e => {
@ -32,7 +31,7 @@ export default class Upload extends ImmutablePureComponent {
}
render () {
const { intl, media, isEditingStatus } = this.props;
const { media } = this.props;
const focusX = media.getIn(['meta', 'focus', 'x']);
const focusY = media.getIn(['meta', 'focus', 'y']);
const x = ((focusX / 2) + .5) * 100;
@ -45,10 +44,10 @@ export default class Upload extends ImmutablePureComponent {
<div className='compose-form__upload-thumbnail' style={{ transform: `scale(${scale})`, backgroundImage: `url(${media.get('preview_url')})`, backgroundPosition: `${x}% ${y}%` }}>
<div className='compose-form__upload__actions'>
<button className='icon-button' onClick={this.handleUndoClick}><Icon id='times' /> <FormattedMessage id='upload_form.undo' defaultMessage='Delete' /></button>
{!isEditingStatus && (<button className='icon-button' onClick={this.handleFocalPointClick}><Icon id='pencil' /> <FormattedMessage id='upload_form.edit' defaultMessage='Edit' /></button>)}
{!!media.get('unattached') && (<button className='icon-button' onClick={this.handleFocalPointClick}><Icon id='pencil' /> <FormattedMessage id='upload_form.edit' defaultMessage='Edit' /></button>)}
</div>
{(media.get('description') || '').length === 0 && (
{(media.get('description') || '').length === 0 && !!media.get('unattached') && (
<div className='compose-form__upload__warning'>
<button className='icon-button' onClick={this.handleFocalPointClick}><Icon id='info-circle' /> <FormattedMessage id='upload_form.description_missing' defaultMessage='No description added' /></button>
</div>

View File

@ -0,0 +1,12 @@
import { connect } from 'react-redux';
import { isUserTouching } from 'flavours/glitch/is_mobile';
import { openModal, closeModal } from 'flavours/glitch/actions/modal';
import Dropdown from '../components/dropdown';
const mapDispatchToProps = dispatch => ({
isUserTouching,
onModalOpen: props => dispatch(openModal('ACTIONS', props)),
onModalClose: () => dispatch(closeModal()),
});
export default connect(null, mapDispatchToProps)(Dropdown);

View File

@ -1,11 +1,30 @@
import { connect } from 'react-redux';
import { defineMessages, injectIntl } from 'react-intl';
import NavigationBar from '../components/navigation_bar';
import { logOut } from 'flavours/glitch/utils/log_out';
import { openModal } from 'flavours/glitch/actions/modal';
import { me } from 'flavours/glitch/initial_state';
const messages = defineMessages({
logoutMessage: { id: 'confirmations.logout.message', defaultMessage: 'Are you sure you want to log out?' },
logoutConfirm: { id: 'confirmations.logout.confirm', defaultMessage: 'Log out' },
});
const mapStateToProps = state => {
return {
account: state.getIn(['accounts', me]),
};
};
export default connect(mapStateToProps)(NavigationBar);
const mapDispatchToProps = (dispatch, { intl }) => ({
onLogout () {
dispatch(openModal('CONFIRM', {
message: intl.formatMessage(messages.logoutMessage),
confirm: intl.formatMessage(messages.logoutConfirm),
closeWhenConfirm: false,
onConfirm: () => logOut(),
}));
},
});
export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(NavigationBar));

View File

@ -6,7 +6,7 @@ import {
addPoll,
removePoll,
} from 'flavours/glitch/actions/compose';
import { closeModal, openModal } from 'flavours/glitch/actions/modal';
import { openModal } from 'flavours/glitch/actions/modal';
function mapStateToProps (state) {
const spoilersAlwaysOn = state.getIn(['local_settings', 'always_show_spoilers_field']);
@ -48,14 +48,6 @@ const mapDispatchToProps = (dispatch) => ({
onDoodleOpen() {
dispatch(openModal('DOODLE', { noEsc: true }));
},
onModalClose() {
dispatch(closeModal());
},
onModalOpen(props) {
dispatch(openModal('ACTIONS', props));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(Options);

View File

@ -0,0 +1,23 @@
import { connect } from 'react-redux';
import PrivacyDropdown from '../components/privacy_dropdown';
import { changeComposeVisibility } from 'flavours/glitch/actions/compose';
import { openModal, closeModal } from 'flavours/glitch/actions/modal';
import { isUserTouching } from 'flavours/glitch/is_mobile';
const mapStateToProps = state => ({
value: state.getIn(['compose', 'privacy']),
});
const mapDispatchToProps = dispatch => ({
onChange (value) {
dispatch(changeComposeVisibility(value));
},
isUserTouching,
onModalOpen: props => dispatch(openModal('ACTIONS', props)),
onModalClose: () => dispatch(closeModal()),
});
export default connect(mapStateToProps, mapDispatchToProps)(PrivacyDropdown);

View File

@ -5,7 +5,6 @@ import { submitCompose } from 'flavours/glitch/actions/compose';
const mapStateToProps = (state, { id }) => ({
media: state.getIn(['compose', 'media_attachments']).find(item => item.get('id') === id),
isEditingStatus: state.getIn(['compose', 'id']) !== null,
});
const mapDispatchToProps = dispatch => ({

View File

@ -19,71 +19,99 @@ const emojiFilename = (filename) => {
return borderedEmoji.includes(filename) ? (filename + '_border') : filename;
};
const emojify = (str, customEmojis = {}) => {
const tagCharsWithoutEmojis = '<&';
const tagCharsWithEmojis = Object.keys(customEmojis).length ? '<&:' : '<&';
let rtn = '', tagChars = tagCharsWithEmojis, invisible = 0;
const emojifyTextNode = (node, customEmojis) => {
let str = node.textContent;
const fragment = new DocumentFragment();
for (;;) {
let match, i = 0, tag;
while (i < str.length && (tag = tagChars.indexOf(str[i])) === -1 && (invisible || useSystemEmojiFont || !(match = trie.search(str.slice(i))))) {
i += str.codePointAt(i) < 65536 ? 1 : 2;
let match, i = 0;
if (customEmojis === null) {
while (i < str.length && (useSystemEmojiFont || !(match = trie.search(str.slice(i))))) {
i += str.codePointAt(i) < 65536 ? 1 : 2;
}
} else {
while (i < str.length && str[i] !== ':' && (useSystemEmojiFont || !(match = trie.search(str.slice(i))))) {
i += str.codePointAt(i) < 65536 ? 1 : 2;
}
}
let rend, replacement = '';
let rend, replacement = null;
if (i === str.length) {
break;
} else if (str[i] === ':') {
if (!(() => {
rend = str.indexOf(':', i + 1) + 1;
if (!rend) return false; // no pair of ':'
const lt = str.indexOf('<', i + 1);
if (!(lt === -1 || lt >= rend)) return false; // tag appeared before closing ':'
const shortname = str.slice(i, rend);
// now got a replacee as ':shortname:'
// if you want additional emoji handler, add statements below which set replacement and return true.
if (shortname in customEmojis) {
const filename = autoPlayGif ? customEmojis[shortname].url : customEmojis[shortname].static_url;
replacement = `<img draggable="false" class="emojione custom-emoji" alt="${shortname}" title="${shortname}" src="${filename}" data-original="${customEmojis[shortname].url}" data-static="${customEmojis[shortname].static_url}" />`;
replacement = document.createElement('img');
replacement.setAttribute('draggable', false);
replacement.setAttribute('class', 'emojione custom-emoji');
replacement.setAttribute('alt', shortname);
replacement.setAttribute('title', shortname);
replacement.setAttribute('src', filename);
replacement.setAttribute('data-original', customEmojis[shortname].url);
replacement.setAttribute('data-static', customEmojis[shortname].static_url);
return true;
}
return false;
})()) rend = ++i;
} else if (tag >= 0) { // <, &
rend = str.indexOf('>;'[tag], i + 1) + 1;
if (!rend) {
break;
}
if (tag === 0) {
if (invisible) {
if (str[i + 1] === '/') { // closing tag
if (!--invisible) {
tagChars = tagCharsWithEmojis;
}
} else if (str[rend - 2] !== '/') { // opening tag
invisible++;
}
} else {
if (str.startsWith('<span class="invisible">', i)) {
// avoid emojifying on invisible text
invisible = 1;
tagChars = tagCharsWithoutEmojis;
}
}
}
i = rend;
} else if (!useSystemEmojiFont) { // matched to unicode emoji
const { filename, shortCode } = unicodeMapping[match];
const title = shortCode ? `:${shortCode}:` : '';
replacement = `<img draggable="false" class="emojione" alt="${match}" title="${title}" src="${assetHost}/emoji/${emojiFilename(filename)}.svg" />`;
replacement = document.createElement('img');
replacement.setAttribute('draggable', false);
replacement.setAttribute('class', 'emojione');
replacement.setAttribute('alt', match);
replacement.setAttribute('title', title);
replacement.setAttribute('src', `${assetHost}/emoji/${emojiFilename(filename)}.svg`);
rend = i + match.length;
// If the matched character was followed by VS15 (for selecting text presentation), skip it.
if (str.codePointAt(rend) === 65038) {
rend += 1;
}
}
rtn += str.slice(0, i) + replacement;
fragment.append(document.createTextNode(str.slice(0, i)));
if (replacement) {
fragment.append(replacement);
}
str = str.slice(rend);
}
return rtn + str;
fragment.append(document.createTextNode(str));
node.parentElement.replaceChild(fragment, node);
};
const emojifyNode = (node, customEmojis) => {
for (const child of node.childNodes) {
switch(child.nodeType) {
case Node.TEXT_NODE:
emojifyTextNode(child, customEmojis);
break;
case Node.ELEMENT_NODE:
if (!child.classList.contains('invisible'))
emojifyNode(child, customEmojis);
break;
}
}
};
const emojify = (str, customEmojis = {}) => {
const wrapper = document.createElement('div');
wrapper.innerHTML = str;
if (!Object.keys(customEmojis).length)
customEmojis = null;
emojifyNode(wrapper, customEmojis);
return wrapper.innerHTML;
};
export default emojify;

View File

@ -24,6 +24,16 @@ const mapStateToProps = state => ({
isSearching: state.getIn(['search', 'submitted']) || !showTrends,
});
// Fix strange bug on Safari where <span> (rendered by FormattedMessage) disappears
// after clicking around Explore top bar (issue #20885).
// Removing width=100% from <a> also fixes it, as well as replacing <span> with <div>
// We're choosing to wrap span with div to keep the changes local only to this tool bar.
const WrapFormattedMessage = ({ children, ...props }) => <div><FormattedMessage {...props}>{children}</FormattedMessage></div>;
WrapFormattedMessage.propTypes = {
children: PropTypes.any,
};
export default @connect(mapStateToProps)
@injectIntl
class Explore extends React.PureComponent {
@ -47,7 +57,7 @@ class Explore extends React.PureComponent {
this.column = c;
}
render () {
render() {
const { intl, multiColumn, isSearching } = this.props;
const { signedIn } = this.context.identity;
@ -70,10 +80,10 @@ class Explore extends React.PureComponent {
) : (
<React.Fragment>
<div className='account__section-headline'>
<NavLink exact to='/explore'><FormattedMessage id='explore.trending_statuses' defaultMessage='Posts' /></NavLink>
<NavLink exact to='/explore/tags'><FormattedMessage id='explore.trending_tags' defaultMessage='Hashtags' /></NavLink>
<NavLink exact to='/explore/links'><FormattedMessage id='explore.trending_links' defaultMessage='News' /></NavLink>
{signedIn && <NavLink exact to='/explore/suggestions'><FormattedMessage id='explore.suggested_follows' defaultMessage='For you' /></NavLink>}
<NavLink exact to='/explore'><WrapFormattedMessage id='explore.trending_statuses' defaultMessage='Posts' /></NavLink>
<NavLink exact to='/explore/tags'><WrapFormattedMessage id='explore.trending_tags' defaultMessage='Hashtags' /></NavLink>
<NavLink exact to='/explore/links'><WrapFormattedMessage id='explore.trending_links' defaultMessage='News' /></NavLink>
{signedIn && <NavLink exact to='/explore/suggestions'><WrapFormattedMessage id='explore.suggested_follows' defaultMessage='For you' /></NavLink>}
</div>
<Switch>

View File

@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { ImmutableHashtag as Hashtag } from 'flavours/glitch/components/hashtag';
import { FormattedMessage } from 'react-intl';
import { Link } from 'react-router-dom';
export default class Trends extends ImmutablePureComponent {
@ -36,7 +37,11 @@ export default class Trends extends ImmutablePureComponent {
return (
<div className='getting-started__trends'>
<h4><FormattedMessage id='trends.trending_now' defaultMessage='Trending now' /></h4>
<h4>
<Link to={'/explore/tags'}>
<FormattedMessage id='trends.trending_now' defaultMessage='Trending now' />
</Link>
</h4>
{trends.take(3).map(hashtag => <Hashtag key={hashtag.get('name')} hashtag={hashtag} />)}
</div>

View File

@ -194,7 +194,7 @@ class HashtagTimeline extends React.PureComponent {
const following = tag.get('following');
followButton = (
<button className={classNames('column-header__button')} onClick={this.handleFollow} disabled={!signedIn} title={intl.formatMessage(following ? messages.unfollowHashtag : messages.followHashtag)} aria-label={intl.formatMessage(following ? messages.unfollowHashtag : messages.followHashtag)} aria-pressed={following ? 'true' : 'false'}>
<button className={classNames('column-header__button')} onClick={this.handleFollow} disabled={!signedIn} title={intl.formatMessage(following ? messages.unfollowHashtag : messages.followHashtag)} aria-label={intl.formatMessage(following ? messages.unfollowHashtag : messages.followHashtag)}>
<Icon id={following ? 'user-times' : 'user-plus'} fixedWidth className='column-header__icon' />
</button>
);

View File

@ -131,7 +131,6 @@ class HomeTimeline extends React.PureComponent {
className={classNames('column-header__button', { 'active': showAnnouncements })}
title={intl.formatMessage(showAnnouncements ? messages.hide_announcements : messages.show_announcements)}
aria-label={intl.formatMessage(showAnnouncements ? messages.hide_announcements : messages.show_announcements)}
aria-pressed={showAnnouncements ? 'true' : 'false'}
onClick={this.handleToggleAnnouncementsClick}
>
<IconWithBadge id='bullhorn' count={unreadAnnouncements} />

View File

@ -150,7 +150,7 @@ class InteractionModal extends React.PureComponent {
<div className='interaction-modal__choices__choice'>
<h3><FormattedMessage id='interaction_modal.on_another_server' defaultMessage='On a different server' /></h3>
<p><FormattedMessage id='interaction_modal.other_server_instructions' defaultMessage='Simply copy and paste this URL into the search bar of your favourite app or the web interface where you are signed in.' /></p>
<p><FormattedMessage id='interaction_modal.other_server_instructions' defaultMessage='Copy and paste this URL into the search field of your favourite Mastodon app or the web interface of your Mastodon server.' /></p>
<Copypaste value={url} />
</div>
</div>

View File

@ -50,6 +50,8 @@ export default class LocalSettingsPage extends React.PureComponent {
<a
href={href}
className={finalClassName}
title={title}
aria-label={title}
>
{iconElem} <span>{title}</span>
</a>
@ -60,6 +62,8 @@ export default class LocalSettingsPage extends React.PureComponent {
role='button'
tabIndex='0'
className={finalClassName}
title={title}
aria-label={title}
>
{iconElem} <span>{title}</span>
</a>

View File

@ -22,7 +22,7 @@ export default class ColumnSettings extends React.PureComponent {
onRequestNotificationPermission: PropTypes.func,
alertsEnabled: PropTypes.bool,
browserSupport: PropTypes.bool,
browserPermission: PropTypes.bool,
browserPermission: PropTypes.string,
};
onPushChange = (path, checked) => {

View File

@ -207,8 +207,8 @@ class Footer extends ImmutablePureComponent {
return (
<div className='picture-in-picture__footer'>
{replyButton}
<IconButton className={classNames('status__action-bar-button', { reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} pressed={status.get('reblogged')} title={reblogTitle} icon='retweet' onClick={this.handleReblogClick} counter={status.get('reblogs_count')} />
<IconButton className='status__action-bar-button star-icon' animate active={status.get('favourited')} pressed={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} counter={status.get('favourites_count')} />
<IconButton className={classNames('status__action-bar-button', { reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} title={reblogTitle} icon='retweet' onClick={this.handleReblogClick} counter={status.get('reblogs_count')} />
<IconButton className='status__action-bar-button star-icon' animate active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} counter={status.get('favourites_count')} />
{withOpenButton && <IconButton className='status__action-bar-button' title={intl.formatMessage(messages.open)} icon='external-link' onClick={this.handleOpenClick} href={status.get('url')} />}
</div>
);

View File

@ -35,6 +35,7 @@ const messages = defineMessages({
admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },
admin_status: { id: 'status.admin_status', defaultMessage: 'Open this status in the moderation interface' },
copy: { id: 'status.copy', defaultMessage: 'Copy link to status' },
openOriginalPage: { id: 'account.open_original_page', defaultMessage: 'Open original page' },
});
export default @injectIntl
@ -132,22 +133,8 @@ class ActionBar extends React.PureComponent {
}
handleCopy = () => {
const url = this.props.status.get('url');
const textarea = document.createElement('textarea');
textarea.textContent = url;
textarea.style.position = 'fixed';
document.body.appendChild(textarea);
try {
textarea.select();
document.execCommand('copy');
} catch (e) {
} finally {
document.body.removeChild(textarea);
}
const url = this.props.status.get('url');
navigator.clipboard.writeText(url);
}
render () {
@ -158,10 +145,15 @@ class ActionBar extends React.PureComponent {
const pinnableStatus = ['public', 'unlisted', 'private'].includes(status.get('visibility'));
const mutingConversation = status.get('muted');
const writtenByMe = status.getIn(['account', 'id']) === me;
const isRemote = status.getIn(['account', 'username']) !== status.getIn(['account', 'acct']);
let menu = [];
if (publicStatus) {
if (isRemote) {
menu.push({ text: intl.formatMessage(messages.openOriginalPage), href: status.get('url') });
}
menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy });
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
menu.push(null);

View File

@ -34,6 +34,7 @@ class DetailedStatus extends ImmutablePureComponent {
onOpenMedia: PropTypes.func.isRequired,
onOpenVideo: PropTypes.func.isRequired,
onToggleHidden: PropTypes.func,
onTranslate: PropTypes.func.isRequired,
expanded: PropTypes.bool,
measureHeight: PropTypes.bool,
onHeightChange: PropTypes.func,
@ -112,6 +113,11 @@ class DetailedStatus extends ImmutablePureComponent {
window.open(href, 'mastodon-intent', 'width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes');
}
handleTranslate = () => {
const { onTranslate, status } = this.props;
onTranslate(status);
}
render () {
const status = (this.props.status && this.props.status.get('reblog')) ? this.props.status.get('reblog') : this.props.status;
const { expanded, onToggleHidden, settings, usingPiP, intl } = this.props;
@ -305,6 +311,7 @@ class DetailedStatus extends ImmutablePureComponent {
expanded={expanded}
collapsed={false}
onExpandedToggle={onToggleHidden}
onTranslate={this.handleTranslate}
parseClick={this.parseClick}
onUpdate={this.handleChildUpdate}
tagLinks={settings.get('tag_misleading_links')}

View File

@ -33,7 +33,9 @@ import {
deleteStatus,
editStatus,
hideStatus,
revealStatus
revealStatus,
translateStatus,
undoStatusTranslation,
} from 'flavours/glitch/actions/statuses';
import { initMuteModal } from 'flavours/glitch/actions/mutes';
import { initBlockModal } from 'flavours/glitch/actions/blocks';
@ -437,6 +439,16 @@ class Status extends ImmutablePureComponent {
this.setState({ isExpanded: !isExpanded, threadExpanded: !isExpanded });
}
handleTranslate = status => {
const { dispatch } = this.props;
if (status.get('translation')) {
dispatch(undoStatusTranslation(status.get('id')));
} else {
dispatch(translateStatus(status.get('id')));
}
}
handleBlockClick = (status) => {
const { dispatch } = this.props;
const account = status.get('account');
@ -648,7 +660,7 @@ class Status extends ImmutablePureComponent {
showBackButton
multiColumn={multiColumn}
extraButton={(
<button className='column-header__button' title={intl.formatMessage(!isExpanded ? messages.revealAll : messages.hideAll)} aria-label={intl.formatMessage(!isExpanded ? messages.revealAll : messages.hideAll)} onClick={this.handleToggleAll} aria-pressed={!isExpanded ? 'false' : 'true'}><Icon id={!isExpanded ? 'eye-slash' : 'eye'} /></button>
<button className='column-header__button' title={intl.formatMessage(!isExpanded ? messages.revealAll : messages.hideAll)} aria-label={intl.formatMessage(!isExpanded ? messages.revealAll : messages.hideAll)} onClick={this.handleToggleAll}><Icon id={!isExpanded ? 'eye-slash' : 'eye'} /></button>
)}
/>
@ -666,6 +678,7 @@ class Status extends ImmutablePureComponent {
onOpenMedia={this.handleOpenMedia}
expanded={isExpanded}
onToggleHidden={this.handleToggleHidden}
onTranslate={this.handleTranslate}
domain={domain}
showMedia={this.state.showMedia}
onToggleMediaVisibility={this.handleToggleMediaVisibility}

View File

@ -58,11 +58,11 @@ class FavouriteModal extends ImmutablePureComponent {
const { status, intl } = this.props;
return (
<div className='modal-root__modal favourite-modal'>
<div className='favourite-modal__container'>
<div className='modal-root__modal boost-modal'>
<div className='boost-modal__container'>
<div className={classNames('status', `status-${status.get('visibility')}`, 'light')}>
<div className='favourite-modal__status-header'>
<div className='favourite-modal__status-time'>
<div className='boost-modal__status-header'>
<div className='boost-modal__status-time'>
<a href={status.get('url')} className='status__relative-time' target='_blank' rel='noopener noreferrer'>
<VisibilityIcon visibility={status.get('visibility')} />
<RelativeTimestamp timestamp={status.get('created_at')} />
@ -90,7 +90,7 @@ class FavouriteModal extends ImmutablePureComponent {
</div>
</div>
<div className='favourite-modal__action-bar'>
<div className='boost-modal__action-bar'>
<div><FormattedMessage id='favourite_modal.combo' defaultMessage='You can press {combo} to skip this next time' values={{ combo: <span>Shift + <Icon id='star' /></span> }} /></div>
<Button text={intl.formatMessage(messages.favourite)} onClick={this.handleFavourite} ref={this.setRef} />
</div>

View File

@ -36,7 +36,7 @@ class Header extends React.PureComponent {
if (signedIn) {
content = (
<>
{location.pathname !== '/publish' && <Link to='/publish' className='button'><FormattedMessage id='compose_form.publish' defaultMessage='Publish' /></Link>}
{location.pathname !== '/publish' && <Link to='/publish' className='button'><FormattedMessage id='compose_form.publish_form' defaultMessage='Publish' /></Link>}
<Account />
</>
);

View File

@ -0,0 +1,59 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { defineMessages, injectIntl } from 'react-intl';
import IconButton from 'flavours/glitch/components/icon_button';
import ImageLoader from './image_loader';
const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
});
export default @injectIntl
class ImageModal extends React.PureComponent {
static propTypes = {
src: PropTypes.string.isRequired,
alt: PropTypes.string.isRequired,
onClose: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
};
state = {
navigationHidden: false,
};
toggleNavigation = () => {
this.setState(prevState => ({
navigationHidden: !prevState.navigationHidden,
}));
};
render () {
const { intl, src, alt, onClose } = this.props;
const { navigationHidden } = this.state;
const navigationClassName = classNames('media-modal__navigation', {
'media-modal__navigation--hidden': navigationHidden,
});
return (
<div className='modal-root__modal media-modal'>
<div className='media-modal__closer' role='presentation' onClick={onClose} >
<ImageLoader
src={src}
width={400}
height={400}
alt={alt}
onClick={this.toggleNavigation}
/>
</div>
<div className={navigationClassName}>
<IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={40} />
</div>
</div>
);
}
}

View File

@ -15,6 +15,7 @@ import DoodleModal from './doodle_modal';
import ConfirmationModal from './confirmation_modal';
import FocalPointModal from './focal_point_modal';
import DeprecatedSettingsModal from './deprecated_settings_modal';
import ImageModal from './image_modal';
import {
OnboardingModal,
MuteModal,
@ -38,6 +39,7 @@ const MODAL_COMPONENTS = {
'ONBOARDING': OnboardingModal,
'VIDEO': () => Promise.resolve({ default: VideoModal }),
'AUDIO': () => Promise.resolve({ default: AudioModal }),
'IMAGE': () => Promise.resolve({ default: ImageModal }),
'BOOST': () => Promise.resolve({ default: BoostModal }),
'FAVOURITE': () => Promise.resolve({ default: FavouriteModal }),
'DOODLE': () => Promise.resolve({ default: DoodleModal }),

View File

@ -303,7 +303,7 @@ class UI extends React.Component {
this.dragTargets.push(e.target);
}
if (e.dataTransfer && e.dataTransfer.types.includes('Files') && this.props.canUploadMore) {
if (e.dataTransfer && e.dataTransfer.types.includes('Files') && this.props.canUploadMore && this.context.identity.signedIn) {
this.setState({ draggingOver: true });
}
}
@ -330,7 +330,7 @@ class UI extends React.Component {
this.setState({ draggingOver: false });
this.dragTargets = [];
if (e.dataTransfer && e.dataTransfer.files.length >= 1 && this.props.canUploadMore) {
if (e.dataTransfer && e.dataTransfer.files.length >= 1 && this.props.canUploadMore && this.context.identity.signedIn) {
this.props.dispatch(uploadCompose(e.dataTransfer.files));
}
}

View File

@ -79,6 +79,7 @@
* @property {boolean} use_blurhash
* @property {boolean=} use_pending_items
* @property {string} version
* @property {boolean} translation_enabled
* @property {object} local_settings
*/
@ -137,6 +138,7 @@ export const unfollowModal = getMeta('unfollow_modal');
export const useBlurhash = getMeta('use_blurhash');
export const usePendingItems = getMeta('use_pending_items');
export const version = getMeta('version');
export const translationEnabled = getMeta('translation_enabled');
export const languages = initialState?.languages;
// Glitch-soc-specific settings

View File

@ -2,6 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { setupBrowserNotifications } from 'flavours/glitch/actions/notifications';
import Mastodon, { store } from 'flavours/glitch/containers/mastodon';
import { me } from 'flavours/glitch/initial_state';
import ready from 'flavours/glitch/ready';
const perf = require('flavours/glitch/performance');
@ -19,23 +20,19 @@ function main() {
ReactDOM.render(<Mastodon {...props} />, mountNode);
store.dispatch(setupBrowserNotifications());
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
const [{ Workbox }, { me }] = await Promise.all([
import('workbox-window'),
import('flavours/glitch/initial_state'),
]);
if (process.env.NODE_ENV === 'production' && me && 'serviceWorker' in navigator) {
const { Workbox } = await import('workbox-window');
const wb = new Workbox('/sw.js');
/** @type {ServiceWorkerRegistration} */
let registration;
try {
await wb.register();
registration = await wb.register();
} catch (err) {
console.error(err);
return;
}
if (me) {
if (registration) {
const registerPushNotifications = await import('flavours/glitch/actions/push_notifications');
store.dispatch(registerPushNotifications.register());

View File

@ -21,3 +21,12 @@ es:
skins:
glitch:
default: Predeterminado
ja:
flavours:
glitch:
description: GlitchSocインスタンスのデフォルトフレーバーです。
name: Glitch Edition
skins:
glitch:
default: デフォルト

View File

@ -1,4 +1,5 @@
import { ACCOUNT_IMPORT, ACCOUNTS_IMPORT } from '../actions/importer';
import { ACCOUNT_LOOKUP_FAIL } from '../actions/accounts';
import { Map as ImmutableMap } from 'immutable';
export const normalizeForLookup = str => str.toLowerCase();
@ -7,6 +8,8 @@ const initialState = ImmutableMap();
export default function accountsMap(state = initialState, action) {
switch(action.type) {
case ACCOUNT_LOOKUP_FAIL:
return action.error?.response?.status === 404 ? state.set(normalizeForLookup(action.acct), null) : state;
case ACCOUNT_IMPORT:
return state.set(normalizeForLookup(action.account.acct), action.account.id);
case ACCOUNTS_IMPORT:

View File

@ -222,7 +222,7 @@ function appendMedia(state, media, file) {
if (media.get('type') === 'image') {
media = media.set('file', file);
}
map.update('media_attachments', list => list.push(media));
map.update('media_attachments', list => list.push(media.set('unattached', true)));
map.set('is_uploading', false);
map.set('is_processing', false);
map.set('resetFileKey', Math.floor((Math.random() * 0x10000)));
@ -547,7 +547,7 @@ export default function compose(state = initialState, action) {
.setIn(['media_modal', 'dirty'], false)
.update('media_attachments', list => list.map(item => {
if (item.get('id') === action.media.id) {
return fromJS(action.media);
return fromJS(action.media).set('unattached', true);
}
return item;
@ -563,7 +563,7 @@ export default function compose(state = initialState, action) {
map.set('content_type', action.content_type || 'text/plain');
map.set('in_reply_to', action.status.get('in_reply_to_id'));
map.set('privacy', action.status.get('visibility'));
map.set('media_attachments', action.status.get('media_attachments'));
map.set('media_attachments', action.status.get('media_attachments').map((media) => media.set('unattached', true)));
map.set('focusDate', new Date());
map.set('caretPosition', null);
map.set('idempotencyKey', uuid());
@ -573,10 +573,15 @@ export default function compose(state = initialState, action) {
'advanced_options',
map => map.merge(new ImmutableMap({ do_not_federate }))
);
map.set('id', null);
if (action.status.get('spoiler_text').length > 0) {
map.set('spoiler', true);
map.set('spoiler_text', action.status.get('spoiler_text'));
if (map.get('media_attachments').size >= 1) {
map.set('sensitive', true);
}
} else {
map.set('spoiler', false);
map.set('spoiler_text', '');

View File

@ -13,6 +13,8 @@ import {
STATUS_REVEAL,
STATUS_HIDE,
STATUS_COLLAPSE,
STATUS_TRANSLATE_SUCCESS,
STATUS_TRANSLATE_UNDO,
STATUS_FETCH_REQUEST,
STATUS_FETCH_FAIL,
} from 'flavours/glitch/actions/statuses';
@ -85,6 +87,10 @@ export default function statuses(state = initialState, action) {
return state.setIn([action.id, 'collapsed'], action.isCollapsed);
case TIMELINE_DELETE:
return deleteStatus(state, action.id, action.references);
case STATUS_TRANSLATE_SUCCESS:
return state.setIn([action.id, 'translation'], fromJS(action.translation));
case STATUS_TRANSLATE_UNDO:
return state.deleteIn([action.id, 'translation']);
default:
return state;
}

View File

@ -204,7 +204,9 @@
}
.account-role,
.simple_form .recommended {
.simple_form .recommended,
.simple_form .not_recommended,
.simple_form .glitch_only {
display: inline-block;
padding: 4px 6px;
cursor: default;
@ -229,6 +231,18 @@
}
}
.simple_form .not_recommended {
color: lighten($error-red, 12%);
background-color: rgba(lighten($error-red, 12%), 0.1);
border-color: rgba(lighten($error-red, 12%), 0.5);
}
.simple_form .glitch_only {
color: lighten($warning-red, 12%);
background-color: rgba(lighten($warning-red, 12%), 0.1);
border-color: rgba(lighten($warning-red, 12%), 0.5);
}
.account__header__fields {
max-width: 100vw;
padding: 0;

View File

@ -247,28 +247,45 @@
&__domain-blocks {
margin-top: 30px;
width: 100%;
border-collapse: collapse;
break-inside: auto;
background: darken($ui-base-color, 4%);
border: 1px solid lighten($ui-base-color, 4%);
border-radius: 4px;
th {
text-align: left;
font-weight: 500;
&__domain {
border-bottom: 1px solid lighten($ui-base-color, 4%);
padding: 10px;
font-size: 15px;
color: $darker-text-color;
}
thead tr,
tbody tr {
border-bottom: 1px solid lighten($ui-base-color, 8%);
}
&:nth-child(2n) {
background: darken($ui-base-color, 2%);
}
tbody tr:last-child {
border-bottom: 0;
}
&:last-child {
border-bottom: 0;
}
th,
td {
padding: 8px;
&__header {
display: flex;
gap: 10px;
justify-content: space-between;
font-weight: 500;
margin-bottom: 4px;
}
h6 {
color: $secondary-text-color;
font-size: inherit;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}

View File

@ -535,8 +535,11 @@
&__tabs {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 7px 10px;
margin-top: -55px;
gap: 8px;
overflow: hidden;
&__buttons {
display: flex;
@ -545,6 +548,15 @@
padding-top: 55px;
overflow: hidden;
.button {
flex-shrink: 1;
white-space: nowrap;
@media screen and (max-width: $no-gap-breakpoint) {
min-width: 0;
}
}
.icon-button {
border: 1px solid lighten($ui-base-color, 12%);
border-radius: 4px;

View File

@ -558,6 +558,7 @@ $ui-header-height: 55px;
border-radius: 4px;
margin-bottom: 10px;
align-items: stretch;
gap: 2px;
}
.pillbar-button {
@ -565,7 +566,6 @@ $ui-header-height: 55px;
color: #fafafa;
padding: 2px;
margin: 0;
margin-left: 2px;
font-size: inherit;
flex: auto;
background-color: $ui-base-color;
@ -578,43 +578,20 @@ $ui-header-height: 55px;
}
&:not([disabled]) {
&:hover {
&:hover,
&:focus {
background-color: darken($ui-base-color, 10%);
}
&:focus {
background-color: darken($ui-base-color, 15%);
}
&:active {
background-color: darken($ui-base-color, 20%);
}
&.active {
background-color: $ui-highlight-color;
box-shadow: inset 0 5px darken($ui-highlight-color, 20%);
&:hover {
background-color: lighten($ui-highlight-color, 10%);
box-shadow: inset 0 5px darken($ui-highlight-color, 10%);
}
background-color: darken($ui-highlight-color, 2%);
&:hover,
&:focus {
background-color: lighten($ui-highlight-color, 15%);
box-shadow: inset 0 5px darken($ui-highlight-color, 5%);
}
&:active {
background-color: lighten($ui-highlight-color, 20%);
box-shadow: inset 0 5px $ui-highlight-color;
background-color: $ui-highlight-color;
}
}
}
/* TODO: check RTL? */
&:first-child {
margin-left: 0;
}
}
.limited-account-hint {

Some files were not shown because too many files have changed in this diff Show More