Compare commits
1 Commits
main
...
fix-replic
Author | SHA1 | Date |
---|---|---|
Eugen Rochko | d581b263db |
|
@ -325,8 +325,8 @@ module.exports = {
|
||||||
|
|
||||||
extends: [
|
extends: [
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'plugin:@typescript-eslint/strict-type-checked',
|
'plugin:@typescript-eslint/recommended',
|
||||||
'plugin:@typescript-eslint/stylistic-type-checked',
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
||||||
'plugin:react/recommended',
|
'plugin:react/recommended',
|
||||||
'plugin:react-hooks/recommended',
|
'plugin:react-hooks/recommended',
|
||||||
'plugin:jsx-a11y/recommended',
|
'plugin:jsx-a11y/recommended',
|
||||||
|
@ -338,7 +338,7 @@ module.exports = {
|
||||||
],
|
],
|
||||||
|
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: true,
|
project: './tsconfig.json',
|
||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -348,7 +348,6 @@ module.exports = {
|
||||||
'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
|
'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
|
||||||
'@typescript-eslint/consistent-type-exports': 'error',
|
'@typescript-eslint/consistent-type-exports': 'error',
|
||||||
'@typescript-eslint/consistent-type-imports': 'error',
|
'@typescript-eslint/consistent-type-imports': 'error',
|
||||||
"@typescript-eslint/prefer-nullish-coalescing": ['error', {ignorePrimitives: {boolean: true}}],
|
|
||||||
|
|
||||||
'jsdoc/require-jsdoc': 'off',
|
'jsdoc/require-jsdoc': 'off',
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
// Ignore major version bumps for these node packages
|
// Ignore major version bumps for these node packages
|
||||||
matchManagers: ['npm'],
|
matchManagers: ['npm'],
|
||||||
matchPackageNames: [
|
matchPackageNames: [
|
||||||
|
'@rails/ujs', // Needs to match the major Rails version
|
||||||
'tesseract.js', // Requires code changes
|
'tesseract.js', // Requires code changes
|
||||||
'react-hotkeys', // Requires code changes
|
'react-hotkeys', // Requires code changes
|
||||||
|
|
||||||
|
@ -50,6 +51,12 @@
|
||||||
'sidekiq', // Requires manual upgrade
|
'sidekiq', // Requires manual upgrade
|
||||||
'sidekiq-unique-jobs', // Requires manual upgrades and sync with Sidekiq version
|
'sidekiq-unique-jobs', // Requires manual upgrades and sync with Sidekiq version
|
||||||
'redis', // Requires manual upgrade and sync with Sidekiq version
|
'redis', // Requires manual upgrade and sync with Sidekiq version
|
||||||
|
'fog-openstack', // TODO: was ignored in https://github.com/mastodon/mastodon/pull/13964
|
||||||
|
|
||||||
|
// Needs major Rails version bump
|
||||||
|
'rack',
|
||||||
|
'rails',
|
||||||
|
'rails-i18n',
|
||||||
],
|
],
|
||||||
matchUpdateTypes: ['major'],
|
matchUpdateTypes: ['major'],
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# This configuration was generated by
|
# This configuration was generated by
|
||||||
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp`
|
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp`
|
||||||
# using RuboCop version 1.54.1.
|
# using RuboCop version 1.52.1.
|
||||||
# The point is for the user to remove these configuration records
|
# The point is for the user to remove these configuration records
|
||||||
# one by one as the offenses are removed from the code base.
|
# one by one as the offenses are removed from the code base.
|
||||||
# Note that changes in the inspected code, or installation of new
|
# Note that changes in the inspected code, or installation of new
|
||||||
|
@ -28,6 +28,7 @@ Layout/ArgumentAlignment:
|
||||||
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
||||||
Layout/HashAlignment:
|
Layout/HashAlignment:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
- 'config/boot.rb'
|
||||||
- 'config/environments/production.rb'
|
- 'config/environments/production.rb'
|
||||||
- 'config/initializers/rack_attack.rb'
|
- 'config/initializers/rack_attack.rb'
|
||||||
- 'config/routes.rb'
|
- 'config/routes.rb'
|
||||||
|
@ -251,6 +252,7 @@ RSpec/HookArgument:
|
||||||
- 'spec/serializers/activitypub/note_serializer_spec.rb'
|
- 'spec/serializers/activitypub/note_serializer_spec.rb'
|
||||||
- 'spec/serializers/activitypub/update_poll_serializer_spec.rb'
|
- 'spec/serializers/activitypub/update_poll_serializer_spec.rb'
|
||||||
- 'spec/services/import_service_spec.rb'
|
- 'spec/services/import_service_spec.rb'
|
||||||
|
- 'spec/spec_helper.rb'
|
||||||
|
|
||||||
# Configuration parameters: AssignmentOnly.
|
# Configuration parameters: AssignmentOnly.
|
||||||
RSpec/InstanceVariable:
|
RSpec/InstanceVariable:
|
||||||
|
|
4
Gemfile
4
Gemfile
|
@ -4,7 +4,7 @@ source 'https://rubygems.org'
|
||||||
ruby '>= 3.0.0'
|
ruby '>= 3.0.0'
|
||||||
|
|
||||||
gem 'puma', '~> 6.3'
|
gem 'puma', '~> 6.3'
|
||||||
gem 'rails', '~> 7.0'
|
gem 'rails', '~> 6.1.7'
|
||||||
gem 'sprockets', '~> 3.7.2'
|
gem 'sprockets', '~> 3.7.2'
|
||||||
gem 'thor', '~> 1.2'
|
gem 'thor', '~> 1.2'
|
||||||
gem 'rack', '~> 2.2.7'
|
gem 'rack', '~> 2.2.7'
|
||||||
|
@ -66,7 +66,7 @@ gem 'pundit', '~> 2.3'
|
||||||
gem 'premailer-rails'
|
gem 'premailer-rails'
|
||||||
gem 'rack-attack', '~> 6.6'
|
gem 'rack-attack', '~> 6.6'
|
||||||
gem 'rack-cors', '~> 2.0', require: 'rack/cors'
|
gem 'rack-cors', '~> 2.0', require: 'rack/cors'
|
||||||
gem 'rails-i18n', '~> 7.0'
|
gem 'rails-i18n', '~> 6.0'
|
||||||
gem 'rails-settings-cached', '~> 0.6', git: 'https://github.com/mastodon/rails-settings-cached.git', branch: 'v0.6.6-aliases-true'
|
gem 'rails-settings-cached', '~> 0.6', git: 'https://github.com/mastodon/rails-settings-cached.git', branch: 'v0.6.6-aliases-true'
|
||||||
gem 'redcarpet', '~> 3.6'
|
gem 'redcarpet', '~> 3.6'
|
||||||
gem 'redis', '~> 4.5', require: ['redis', 'redis/connection/hiredis']
|
gem 'redis', '~> 4.5', require: ['redis', 'redis/connection/hiredis']
|
||||||
|
|
136
Gemfile.lock
136
Gemfile.lock
|
@ -18,47 +18,40 @@ GIT
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (7.0.6)
|
actioncable (6.1.7.4)
|
||||||
actionpack (= 7.0.6)
|
actionpack (= 6.1.7.4)
|
||||||
activesupport (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailbox (7.0.6)
|
actionmailbox (6.1.7.4)
|
||||||
actionpack (= 7.0.6)
|
actionpack (= 6.1.7.4)
|
||||||
activejob (= 7.0.6)
|
activejob (= 6.1.7.4)
|
||||||
activerecord (= 7.0.6)
|
activerecord (= 6.1.7.4)
|
||||||
activestorage (= 7.0.6)
|
activestorage (= 6.1.7.4)
|
||||||
activesupport (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
mail (>= 2.7.1)
|
mail (>= 2.7.1)
|
||||||
net-imap
|
actionmailer (6.1.7.4)
|
||||||
net-pop
|
actionpack (= 6.1.7.4)
|
||||||
net-smtp
|
actionview (= 6.1.7.4)
|
||||||
actionmailer (7.0.6)
|
activejob (= 6.1.7.4)
|
||||||
actionpack (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
actionview (= 7.0.6)
|
|
||||||
activejob (= 7.0.6)
|
|
||||||
activesupport (= 7.0.6)
|
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
net-imap
|
|
||||||
net-pop
|
|
||||||
net-smtp
|
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (7.0.6)
|
actionpack (6.1.7.4)
|
||||||
actionview (= 7.0.6)
|
actionview (= 6.1.7.4)
|
||||||
activesupport (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
rack (~> 2.0, >= 2.2.4)
|
rack (~> 2.0, >= 2.0.9)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actiontext (7.0.6)
|
actiontext (6.1.7.4)
|
||||||
actionpack (= 7.0.6)
|
actionpack (= 6.1.7.4)
|
||||||
activerecord (= 7.0.6)
|
activerecord (= 6.1.7.4)
|
||||||
activestorage (= 7.0.6)
|
activestorage (= 6.1.7.4)
|
||||||
activesupport (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
globalid (>= 0.6.0)
|
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (7.0.6)
|
actionview (6.1.7.4)
|
||||||
activesupport (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
|
@ -68,26 +61,27 @@ GEM
|
||||||
activemodel (>= 4.1, < 7.1)
|
activemodel (>= 4.1, < 7.1)
|
||||||
case_transform (>= 0.2)
|
case_transform (>= 0.2)
|
||||||
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
|
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
|
||||||
activejob (7.0.6)
|
activejob (6.1.7.4)
|
||||||
activesupport (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (7.0.6)
|
activemodel (6.1.7.4)
|
||||||
activesupport (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
activerecord (7.0.6)
|
activerecord (6.1.7.4)
|
||||||
activemodel (= 7.0.6)
|
activemodel (= 6.1.7.4)
|
||||||
activesupport (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
activestorage (7.0.6)
|
activestorage (6.1.7.4)
|
||||||
actionpack (= 7.0.6)
|
actionpack (= 6.1.7.4)
|
||||||
activejob (= 7.0.6)
|
activejob (= 6.1.7.4)
|
||||||
activerecord (= 7.0.6)
|
activerecord (= 6.1.7.4)
|
||||||
activesupport (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
marcel (~> 1.0)
|
marcel (~> 1.0)
|
||||||
mini_mime (>= 1.1.0)
|
mini_mime (>= 1.1.0)
|
||||||
activesupport (7.0.6)
|
activesupport (6.1.7.4)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
|
zeitwerk (~> 2.3)
|
||||||
addressable (2.8.4)
|
addressable (2.8.4)
|
||||||
public_suffix (>= 2.0.2, < 6.0)
|
public_suffix (>= 2.0.2, < 6.0)
|
||||||
aes_key_wrap (1.1.0)
|
aes_key_wrap (1.1.0)
|
||||||
|
@ -173,7 +167,7 @@ GEM
|
||||||
activesupport
|
activesupport
|
||||||
cbor (0.5.9.6)
|
cbor (0.5.9.6)
|
||||||
charlock_holmes (0.7.7)
|
charlock_holmes (0.7.7)
|
||||||
chewy (7.3.3)
|
chewy (7.3.2)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 5.2)
|
||||||
elasticsearch (>= 7.12.0, < 7.14.0)
|
elasticsearch (>= 7.12.0, < 7.14.0)
|
||||||
elasticsearch-dsl
|
elasticsearch-dsl
|
||||||
|
@ -379,7 +373,6 @@ GEM
|
||||||
marcel (~> 1.0.1)
|
marcel (~> 1.0.1)
|
||||||
mime-types
|
mime-types
|
||||||
terrapin (~> 0.6.0)
|
terrapin (~> 0.6.0)
|
||||||
language_server-protocol (3.17.0.3)
|
|
||||||
launchy (2.5.2)
|
launchy (2.5.2)
|
||||||
addressable (~> 2.8)
|
addressable (~> 2.8)
|
||||||
letter_opener (1.8.1)
|
letter_opener (1.8.1)
|
||||||
|
@ -515,20 +508,21 @@ GEM
|
||||||
rack
|
rack
|
||||||
rack-test (2.1.0)
|
rack-test (2.1.0)
|
||||||
rack (>= 1.3)
|
rack (>= 1.3)
|
||||||
rails (7.0.6)
|
rails (6.1.7.4)
|
||||||
actioncable (= 7.0.6)
|
actioncable (= 6.1.7.4)
|
||||||
actionmailbox (= 7.0.6)
|
actionmailbox (= 6.1.7.4)
|
||||||
actionmailer (= 7.0.6)
|
actionmailer (= 6.1.7.4)
|
||||||
actionpack (= 7.0.6)
|
actionpack (= 6.1.7.4)
|
||||||
actiontext (= 7.0.6)
|
actiontext (= 6.1.7.4)
|
||||||
actionview (= 7.0.6)
|
actionview (= 6.1.7.4)
|
||||||
activejob (= 7.0.6)
|
activejob (= 6.1.7.4)
|
||||||
activemodel (= 7.0.6)
|
activemodel (= 6.1.7.4)
|
||||||
activerecord (= 7.0.6)
|
activerecord (= 6.1.7.4)
|
||||||
activestorage (= 7.0.6)
|
activestorage (= 6.1.7.4)
|
||||||
activesupport (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
bundler (>= 1.15.0)
|
bundler (>= 1.15.0)
|
||||||
railties (= 7.0.6)
|
railties (= 6.1.7.4)
|
||||||
|
sprockets-rails (>= 2.0.0)
|
||||||
rails-controller-testing (1.0.5)
|
rails-controller-testing (1.0.5)
|
||||||
actionpack (>= 5.0.1.rc1)
|
actionpack (>= 5.0.1.rc1)
|
||||||
actionview (>= 5.0.1.rc1)
|
actionview (>= 5.0.1.rc1)
|
||||||
|
@ -539,16 +533,15 @@ GEM
|
||||||
rails-html-sanitizer (1.6.0)
|
rails-html-sanitizer (1.6.0)
|
||||||
loofah (~> 2.21)
|
loofah (~> 2.21)
|
||||||
nokogiri (~> 1.14)
|
nokogiri (~> 1.14)
|
||||||
rails-i18n (7.0.7)
|
rails-i18n (6.0.0)
|
||||||
i18n (>= 0.7, < 2)
|
i18n (>= 0.7, < 2)
|
||||||
railties (>= 6.0.0, < 8)
|
railties (>= 6.0.0, < 7)
|
||||||
railties (7.0.6)
|
railties (6.1.7.4)
|
||||||
actionpack (= 7.0.6)
|
actionpack (= 6.1.7.4)
|
||||||
activesupport (= 7.0.6)
|
activesupport (= 6.1.7.4)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 12.2)
|
rake (>= 12.2)
|
||||||
thor (~> 1.0)
|
thor (~> 1.0)
|
||||||
zeitwerk (~> 2.5)
|
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
rake (13.0.6)
|
rake (13.0.6)
|
||||||
rdf (3.2.11)
|
rdf (3.2.11)
|
||||||
|
@ -596,9 +589,8 @@ GEM
|
||||||
sidekiq (>= 2.4.0)
|
sidekiq (>= 2.4.0)
|
||||||
rspec-support (3.12.0)
|
rspec-support (3.12.0)
|
||||||
rspec_chunked (0.6)
|
rspec_chunked (0.6)
|
||||||
rubocop (1.54.1)
|
rubocop (1.52.1)
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
language_server-protocol (>= 3.17.0)
|
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.2.2.3)
|
parser (>= 3.2.2.3)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
|
@ -616,7 +608,7 @@ GEM
|
||||||
rubocop-performance (1.18.0)
|
rubocop-performance (1.18.0)
|
||||||
rubocop (>= 1.7.0, < 2.0)
|
rubocop (>= 1.7.0, < 2.0)
|
||||||
rubocop-ast (>= 0.4.0)
|
rubocop-ast (>= 0.4.0)
|
||||||
rubocop-rails (2.20.2)
|
rubocop-rails (2.19.1)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rubocop (>= 1.33.0, < 2.0)
|
rubocop (>= 1.33.0, < 2.0)
|
||||||
|
@ -696,7 +688,7 @@ GEM
|
||||||
climate_control (>= 0.0.3, < 1.0)
|
climate_control (>= 0.0.3, < 1.0)
|
||||||
thor (1.2.2)
|
thor (1.2.2)
|
||||||
tilt (2.2.0)
|
tilt (2.2.0)
|
||||||
timeout (0.4.0)
|
timeout (0.3.2)
|
||||||
tpm-key_attestation (0.12.0)
|
tpm-key_attestation (0.12.0)
|
||||||
bindata (~> 2.4)
|
bindata (~> 2.4)
|
||||||
openssl (> 2.0)
|
openssl (> 2.0)
|
||||||
|
@ -847,9 +839,9 @@ DEPENDENCIES
|
||||||
rack-attack (~> 6.6)
|
rack-attack (~> 6.6)
|
||||||
rack-cors (~> 2.0)
|
rack-cors (~> 2.0)
|
||||||
rack-test (~> 2.1)
|
rack-test (~> 2.1)
|
||||||
rails (~> 7.0)
|
rails (~> 6.1.7)
|
||||||
rails-controller-testing (~> 1.0)
|
rails-controller-testing (~> 1.0)
|
||||||
rails-i18n (~> 7.0)
|
rails-i18n (~> 6.0)
|
||||||
rails-settings-cached (~> 0.6)!
|
rails-settings-cached (~> 0.6)!
|
||||||
rdf-normalize (~> 0.5)
|
rdf-normalize (~> 0.5)
|
||||||
redcarpet (~> 3.6)
|
redcarpet (~> 3.6)
|
||||||
|
|
|
@ -1,20 +1,17 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Api::Web::EmbedsController < Api::Web::BaseController
|
class Api::Web::EmbedsController < Api::Web::BaseController
|
||||||
include Authorization
|
before_action :require_user!
|
||||||
|
|
||||||
before_action :set_status
|
def create
|
||||||
|
status = StatusFinder.new(params[:url]).status
|
||||||
|
|
||||||
def show
|
return not_found if status.hidden?
|
||||||
return not_found if @status.hidden?
|
|
||||||
|
|
||||||
if @status.local?
|
render json: status, serializer: OEmbedSerializer, width: 400
|
||||||
render json: @status, serializer: OEmbedSerializer, width: 400
|
rescue ActiveRecord::RecordNotFound
|
||||||
else
|
oembed = FetchOEmbedService.new.call(params[:url])
|
||||||
return not_found unless user_signed_in?
|
|
||||||
|
|
||||||
url = ActivityPub::TagManager.instance.url_for(@status)
|
|
||||||
oembed = FetchOEmbedService.new.call(url)
|
|
||||||
return not_found if oembed.nil?
|
return not_found if oembed.nil?
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -26,11 +23,3 @@ class Api::Web::EmbedsController < Api::Web::BaseController
|
||||||
render json: oembed
|
render json: oembed
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_status
|
|
||||||
@status = Status.find(params[:id])
|
|
||||||
authorize @status, :show?
|
|
||||||
rescue Mastodon::NotPermittedError
|
|
||||||
not_found
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ module AccountsHelper
|
||||||
def account_action_button(account)
|
def account_action_button(account)
|
||||||
return if account.memorial? || account.moved?
|
return if account.memorial? || account.moved?
|
||||||
|
|
||||||
link_to ActivityPub::TagManager.instance.url_for(account), class: 'button logo-button', target: '_new' do
|
link_to ActivityPub::TagManager.instance.url_for(account), class: 'button', target: '_new' do
|
||||||
safe_join([logo_as_symbol, t('accounts.follow')])
|
safe_join([logo_as_symbol, t('accounts.follow')])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
module DatabaseHelper
|
module DatabaseHelper
|
||||||
def with_read_replica(&block)
|
def with_read_replica(&block)
|
||||||
ApplicationRecord.connected_to(role: :read, prevent_writes: true, &block)
|
ApplicationRecord.connected_to(role: :reading, prevent_writes: true, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def with_primary(&block)
|
def with_primary(&block)
|
||||||
ApplicationRecord.connected_to(role: :primary, &block)
|
ApplicationRecord.connected_to(role: :writing, &block)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
module DomainControlHelper
|
module DomainControlHelper
|
||||||
def domain_not_allowed?(uri_or_domain)
|
def domain_not_allowed?(uri_or_domain)
|
||||||
return false if uri_or_domain.blank?
|
return if uri_or_domain.blank?
|
||||||
|
|
||||||
domain = if uri_or_domain.include?('://')
|
domain = if uri_or_domain.include?('://')
|
||||||
Addressable::URI.parse(uri_or_domain).host
|
Addressable::URI.parse(uri_or_domain).host
|
||||||
|
|
|
@ -86,9 +86,10 @@ const DIGIT_CHARACTERS = [
|
||||||
|
|
||||||
export const decode83 = (str: string) => {
|
export const decode83 = (str: string) => {
|
||||||
let value = 0;
|
let value = 0;
|
||||||
let digit;
|
let c, digit;
|
||||||
|
|
||||||
for (const c of str) {
|
for (let i = 0; i < str.length; i++) {
|
||||||
|
c = str[i];
|
||||||
digit = DIGIT_CHARACTERS.indexOf(c);
|
digit = DIGIT_CHARACTERS.indexOf(c);
|
||||||
value = value * 83 + digit;
|
value = value * 83 + digit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ export const AnimatedNumber: React.FC<Props> = ({ value, obfuscate }) => {
|
||||||
const willEnter = useCallback(() => ({ y: -1 * direction }), [direction]);
|
const willEnter = useCallback(() => ({ y: -1 * direction }), [direction]);
|
||||||
const willLeave = useCallback(
|
const willLeave = useCallback(
|
||||||
() => ({ y: spring(1 * direction, { damping: 35, stiffness: 400 }) }),
|
() => ({ y: spring(1 * direction, { damping: 35, stiffness: 400 }) }),
|
||||||
[direction],
|
[direction]
|
||||||
);
|
);
|
||||||
|
|
||||||
if (reduceMotion) {
|
if (reduceMotion) {
|
||||||
|
|
|
@ -6,11 +6,11 @@ interface Props {
|
||||||
tag: {
|
tag: {
|
||||||
name: string;
|
name: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
history?: {
|
history?: Array<{
|
||||||
uses: number;
|
uses: number;
|
||||||
accounts: string;
|
accounts: string;
|
||||||
day: string;
|
day: string;
|
||||||
}[];
|
}>;
|
||||||
following?: boolean;
|
following?: boolean;
|
||||||
type: 'hashtag';
|
type: 'hashtag';
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,7 @@ import type { Account } from '../../types/resources';
|
||||||
import { autoPlayGif } from '../initial_state';
|
import { autoPlayGif } from '../initial_state';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
account: Account | undefined; // FIXME: remove `undefined` once we know for sure its always there
|
account: Account;
|
||||||
size: number;
|
size: number;
|
||||||
style?: React.CSSProperties;
|
style?: React.CSSProperties;
|
||||||
inline?: boolean;
|
inline?: boolean;
|
||||||
|
|
|
@ -3,8 +3,8 @@ import type { Account } from '../../types/resources';
|
||||||
import { autoPlayGif } from '../initial_state';
|
import { autoPlayGif } from '../initial_state';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
account: Account | undefined; // FIXME: remove `undefined` once we know for sure its always there
|
account: Account;
|
||||||
friend: Account | undefined; // FIXME: remove `undefined` once we know for sure its always there
|
friend: Account;
|
||||||
size?: number;
|
size?: number;
|
||||||
baseSize?: number;
|
baseSize?: number;
|
||||||
overlaySize?: number;
|
overlaySize?: number;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
export const StatusesCounter = (
|
export const StatusesCounter = (
|
||||||
displayNumber: React.ReactNode,
|
displayNumber: React.ReactNode,
|
||||||
pluralReady: number,
|
pluralReady: number
|
||||||
) => (
|
) => (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='account.statuses_counter'
|
id='account.statuses_counter'
|
||||||
|
@ -18,7 +18,7 @@ export const StatusesCounter = (
|
||||||
|
|
||||||
export const FollowingCounter = (
|
export const FollowingCounter = (
|
||||||
displayNumber: React.ReactNode,
|
displayNumber: React.ReactNode,
|
||||||
pluralReady: number,
|
pluralReady: number
|
||||||
) => (
|
) => (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='account.following_counter'
|
id='account.following_counter'
|
||||||
|
@ -32,7 +32,7 @@ export const FollowingCounter = (
|
||||||
|
|
||||||
export const FollowersCounter = (
|
export const FollowersCounter = (
|
||||||
displayNumber: React.ReactNode,
|
displayNumber: React.ReactNode,
|
||||||
pluralReady: number,
|
pluralReady: number
|
||||||
) => (
|
) => (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='account.followers_counter'
|
id='account.followers_counter'
|
||||||
|
|
|
@ -78,7 +78,7 @@ export class DisplayName extends React.PureComponent<Props> {
|
||||||
} else if (account) {
|
} else if (account) {
|
||||||
let acct = account.get('acct');
|
let acct = account.get('acct');
|
||||||
|
|
||||||
if (!acct.includes('@') && localDomain) {
|
if (acct.indexOf('@') === -1 && localDomain) {
|
||||||
acct = `${acct}@${localDomain}`;
|
acct = `${acct}@${localDomain}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ export const GIFV: React.FC<Props> = ({
|
||||||
onClick();
|
onClick();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[onClick],
|
[onClick]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -108,7 +108,7 @@ export const timeAgoString = (
|
||||||
now: number,
|
now: number,
|
||||||
year: number,
|
year: number,
|
||||||
timeGiven: boolean,
|
timeGiven: boolean,
|
||||||
short?: boolean,
|
short?: boolean
|
||||||
) => {
|
) => {
|
||||||
const delta = now - date.getTime();
|
const delta = now - date.getTime();
|
||||||
|
|
||||||
|
@ -118,28 +118,28 @@ export const timeAgoString = (
|
||||||
relativeTime = intl.formatMessage(messages.today);
|
relativeTime = intl.formatMessage(messages.today);
|
||||||
} else if (delta < 10 * SECOND) {
|
} else if (delta < 10 * SECOND) {
|
||||||
relativeTime = intl.formatMessage(
|
relativeTime = intl.formatMessage(
|
||||||
short ? messages.just_now : messages.just_now_full,
|
short ? messages.just_now : messages.just_now_full
|
||||||
);
|
);
|
||||||
} else if (delta < 7 * DAY) {
|
} else if (delta < 7 * DAY) {
|
||||||
if (delta < MINUTE) {
|
if (delta < MINUTE) {
|
||||||
relativeTime = intl.formatMessage(
|
relativeTime = intl.formatMessage(
|
||||||
short ? messages.seconds : messages.seconds_full,
|
short ? messages.seconds : messages.seconds_full,
|
||||||
{ number: Math.floor(delta / SECOND) },
|
{ number: Math.floor(delta / SECOND) }
|
||||||
);
|
);
|
||||||
} else if (delta < HOUR) {
|
} else if (delta < HOUR) {
|
||||||
relativeTime = intl.formatMessage(
|
relativeTime = intl.formatMessage(
|
||||||
short ? messages.minutes : messages.minutes_full,
|
short ? messages.minutes : messages.minutes_full,
|
||||||
{ number: Math.floor(delta / MINUTE) },
|
{ number: Math.floor(delta / MINUTE) }
|
||||||
);
|
);
|
||||||
} else if (delta < DAY) {
|
} else if (delta < DAY) {
|
||||||
relativeTime = intl.formatMessage(
|
relativeTime = intl.formatMessage(
|
||||||
short ? messages.hours : messages.hours_full,
|
short ? messages.hours : messages.hours_full,
|
||||||
{ number: Math.floor(delta / HOUR) },
|
{ number: Math.floor(delta / HOUR) }
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
relativeTime = intl.formatMessage(
|
relativeTime = intl.formatMessage(
|
||||||
short ? messages.days : messages.days_full,
|
short ? messages.days : messages.days_full,
|
||||||
{ number: Math.floor(delta / DAY) },
|
{ number: Math.floor(delta / DAY) }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else if (date.getFullYear() === year) {
|
} else if (date.getFullYear() === year) {
|
||||||
|
@ -158,7 +158,7 @@ const timeRemainingString = (
|
||||||
intl: IntlShape,
|
intl: IntlShape,
|
||||||
date: Date,
|
date: Date,
|
||||||
now: number,
|
now: number,
|
||||||
timeGiven = true,
|
timeGiven = true
|
||||||
) => {
|
) => {
|
||||||
const delta = date.getTime() - now;
|
const delta = date.getTime() - now;
|
||||||
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
import type { PropsWithChildren } from 'react';
|
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
import type { History } from 'history';
|
|
||||||
import { createBrowserHistory } from 'history';
|
|
||||||
import { Router as OriginalRouter } from 'react-router';
|
|
||||||
|
|
||||||
import { layoutFromWindow } from 'mastodon/is_mobile';
|
|
||||||
|
|
||||||
const browserHistory = createBrowserHistory();
|
|
||||||
const originalPush = browserHistory.push.bind(browserHistory);
|
|
||||||
|
|
||||||
browserHistory.push = (path: string, state: History.LocationState) => {
|
|
||||||
if (layoutFromWindow() === 'multi-column' && !path.startsWith('/deck')) {
|
|
||||||
originalPush(`/deck${path}`, state);
|
|
||||||
} else {
|
|
||||||
originalPush(path, state);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const Router: React.FC<PropsWithChildren> = ({ children }) => {
|
|
||||||
return <OriginalRouter history={browserHistory}>{children}</OriginalRouter>;
|
|
||||||
};
|
|
|
@ -6,7 +6,7 @@ import { toShortNumber, pluralReady, DECIMAL_UNITS } from '../utils/numbers';
|
||||||
|
|
||||||
type ShortNumberRenderer = (
|
type ShortNumberRenderer = (
|
||||||
displayNumber: JSX.Element,
|
displayNumber: JSX.Element,
|
||||||
pluralReady: number,
|
pluralReady: number
|
||||||
) => JSX.Element;
|
) => JSX.Element;
|
||||||
|
|
||||||
interface ShortNumberProps {
|
interface ShortNumberProps {
|
||||||
|
@ -25,16 +25,16 @@ export const ShortNumberRenderer: React.FC<ShortNumberProps> = ({
|
||||||
|
|
||||||
if (children && renderer) {
|
if (children && renderer) {
|
||||||
console.warn(
|
console.warn(
|
||||||
'Both renderer prop and renderer as a child provided. This is a mistake and you really should fix that. Only renderer passed as a child will be used.',
|
'Both renderer prop and renderer as a child provided. This is a mistake and you really should fix that. Only renderer passed as a child will be used.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const customRenderer = children ?? renderer ?? null;
|
const customRenderer = children || renderer || null;
|
||||||
|
|
||||||
const displayNumber = <ShortNumberCounter value={shortNumber} />;
|
const displayNumber = <ShortNumberCounter value={shortNumber} />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
customRenderer?.(displayNumber, pluralReady(value, division)) ??
|
customRenderer?.(displayNumber, pluralReady(value, division)) ||
|
||||||
displayNumber
|
displayNumber
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -258,7 +258,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
||||||
menu.push({ text: intl.formatMessage(messages.share), action: this.handleShareClick });
|
menu.push({ text: intl.formatMessage(messages.share), action: this.handleShareClick });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (publicStatus && (signedIn || !isRemote)) {
|
if (publicStatus) {
|
||||||
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
|
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
|
|
||||||
import { Helmet } from 'react-helmet';
|
import { Helmet } from 'react-helmet';
|
||||||
import { Route } from 'react-router-dom';
|
import { BrowserRouter, Route } from 'react-router-dom';
|
||||||
|
|
||||||
import { Provider as ReduxProvider } from 'react-redux';
|
import { Provider as ReduxProvider } from 'react-redux';
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ import { fetchCustomEmojis } from 'mastodon/actions/custom_emojis';
|
||||||
import { hydrateStore } from 'mastodon/actions/store';
|
import { hydrateStore } from 'mastodon/actions/store';
|
||||||
import { connectUserStream } from 'mastodon/actions/streaming';
|
import { connectUserStream } from 'mastodon/actions/streaming';
|
||||||
import ErrorBoundary from 'mastodon/components/error_boundary';
|
import ErrorBoundary from 'mastodon/components/error_boundary';
|
||||||
import { Router } from 'mastodon/components/router';
|
|
||||||
import UI from 'mastodon/features/ui';
|
import UI from 'mastodon/features/ui';
|
||||||
import initialState, { title as siteTitle } from 'mastodon/initial_state';
|
import initialState, { title as siteTitle } from 'mastodon/initial_state';
|
||||||
import { IntlProvider } from 'mastodon/locales';
|
import { IntlProvider } from 'mastodon/locales';
|
||||||
|
@ -76,11 +75,11 @@ export default class Mastodon extends PureComponent {
|
||||||
<IntlProvider>
|
<IntlProvider>
|
||||||
<ReduxProvider store={store}>
|
<ReduxProvider store={store}>
|
||||||
<ErrorBoundary>
|
<ErrorBoundary>
|
||||||
<Router>
|
<BrowserRouter>
|
||||||
<ScrollContext shouldUpdateScroll={this.shouldUpdateScroll}>
|
<ScrollContext shouldUpdateScroll={this.shouldUpdateScroll}>
|
||||||
<Route path='/' component={UI} />
|
<Route path='/' component={UI} />
|
||||||
</ScrollContext>
|
</ScrollContext>
|
||||||
</Router>
|
</BrowserRouter>
|
||||||
|
|
||||||
<Helmet defaultTitle={title} titleTemplate={`%s - ${title}`} />
|
<Helmet defaultTitle={title} titleTemplate={`%s - ${title}`} />
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
|
|
|
@ -139,7 +139,7 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({
|
||||||
dispatch(openModal({
|
dispatch(openModal({
|
||||||
modalType: 'EMBED',
|
modalType: 'EMBED',
|
||||||
modalProps: {
|
modalProps: {
|
||||||
id: status.get('id'),
|
url: status.get('url'),
|
||||||
onError: error => dispatch(showAlertForError(error)),
|
onError: error => dispatch(showAlertForError(error)),
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -25,13 +25,12 @@ export type SearchData = [
|
||||||
BaseEmoji['native'],
|
BaseEmoji['native'],
|
||||||
Emoji['short_names'],
|
Emoji['short_names'],
|
||||||
Search,
|
Search,
|
||||||
Emoji['unified'],
|
Emoji['unified']
|
||||||
];
|
];
|
||||||
|
|
||||||
export type ShortCodesToEmojiData = Record<
|
export interface ShortCodesToEmojiData {
|
||||||
ShortCodesToEmojiDataKey,
|
[key: ShortCodesToEmojiDataKey]: [FilenameData, SearchData];
|
||||||
[FilenameData, SearchData]
|
}
|
||||||
>;
|
|
||||||
export type EmojisWithoutShortCodes = FilenameData[];
|
export type EmojisWithoutShortCodes = FilenameData[];
|
||||||
|
|
||||||
export type EmojiCompressed = [
|
export type EmojiCompressed = [
|
||||||
|
@ -39,7 +38,7 @@ export type EmojiCompressed = [
|
||||||
Skins,
|
Skins,
|
||||||
Category[],
|
Category[],
|
||||||
Data['aliases'],
|
Data['aliases'],
|
||||||
EmojisWithoutShortCodes,
|
EmojisWithoutShortCodes
|
||||||
];
|
];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -9,7 +9,7 @@ import emojiCompressed from './emoji_compressed';
|
||||||
import { unicodeToUnifiedName } from './unicode_to_unified_name';
|
import { unicodeToUnifiedName } from './unicode_to_unified_name';
|
||||||
|
|
||||||
type Emojis = {
|
type Emojis = {
|
||||||
[key in NonNullable<keyof ShortCodesToEmojiData>]: {
|
[key in keyof ShortCodesToEmojiData]: {
|
||||||
native: BaseEmoji['native'];
|
native: BaseEmoji['native'];
|
||||||
search: Search;
|
search: Search;
|
||||||
short_names: Emoji['short_names'];
|
short_names: Emoji['short_names'];
|
||||||
|
|
|
@ -142,7 +142,7 @@ class GettingStarted extends ImmutablePureComponent {
|
||||||
|
|
||||||
{!multiColumn && <div className='flex-spacer' />}
|
{!multiColumn && <div className='flex-spacer' />}
|
||||||
|
|
||||||
<LinkFooter multiColumn />
|
<LinkFooter />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{(multiColumn && showTrends) && <TrendsContainer />}
|
{(multiColumn && showTrends) && <TrendsContainer />}
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import { PureComponent } from 'react';
|
||||||
|
|
||||||
|
import { injectIntl, FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
|
|
||||||
|
import SettingToggle from '../../notifications/components/setting_toggle';
|
||||||
|
|
||||||
|
class ColumnSettings extends PureComponent {
|
||||||
|
|
||||||
|
static propTypes = {
|
||||||
|
settings: ImmutablePropTypes.map.isRequired,
|
||||||
|
onChange: PropTypes.func.isRequired,
|
||||||
|
intl: PropTypes.object.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
render () {
|
||||||
|
const { settings, onChange } = this.props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<span className='column-settings__section'><FormattedMessage id='home.column_settings.basic' defaultMessage='Basic' /></span>
|
||||||
|
|
||||||
|
<div className='column-settings__row'>
|
||||||
|
<SettingToggle prefix='home_timeline' settings={settings} settingPath={['shows', 'reblog']} onChange={onChange} label={<FormattedMessage id='home.column_settings.show_reblogs' defaultMessage='Show boosts' />} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='column-settings__row'>
|
||||||
|
<SettingToggle prefix='home_timeline' settings={settings} settingPath={['shows', 'reply']} onChange={onChange} label={<FormattedMessage id='home.column_settings.show_replies' defaultMessage='Show replies' />} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export default injectIntl(ColumnSettings);
|
|
@ -1,66 +0,0 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-call,
|
|
||||||
@typescript-eslint/no-unsafe-return,
|
|
||||||
@typescript-eslint/no-unsafe-assignment,
|
|
||||||
@typescript-eslint/no-unsafe-member-access
|
|
||||||
-- the settings store is not yet typed */
|
|
||||||
import { useCallback } from 'react';
|
|
||||||
|
|
||||||
import { FormattedMessage } from 'react-intl';
|
|
||||||
|
|
||||||
import { useAppSelector, useAppDispatch } from 'mastodon/store';
|
|
||||||
|
|
||||||
import { changeSetting } from '../../../actions/settings';
|
|
||||||
import SettingToggle from '../../notifications/components/setting_toggle';
|
|
||||||
|
|
||||||
export const ColumnSettings: React.FC = () => {
|
|
||||||
const settings = useAppSelector((state) => state.settings.get('home'));
|
|
||||||
|
|
||||||
const dispatch = useAppDispatch();
|
|
||||||
const onChange = useCallback(
|
|
||||||
(key: string, checked: boolean) => {
|
|
||||||
dispatch(changeSetting(['home', ...key], checked));
|
|
||||||
},
|
|
||||||
[dispatch],
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<span className='column-settings__section'>
|
|
||||||
<FormattedMessage
|
|
||||||
id='home.column_settings.basic'
|
|
||||||
defaultMessage='Basic'
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<div className='column-settings__row'>
|
|
||||||
<SettingToggle
|
|
||||||
prefix='home_timeline'
|
|
||||||
settings={settings}
|
|
||||||
settingPath={['shows', 'reblog']}
|
|
||||||
onChange={onChange}
|
|
||||||
label={
|
|
||||||
<FormattedMessage
|
|
||||||
id='home.column_settings.show_reblogs'
|
|
||||||
defaultMessage='Show boosts'
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className='column-settings__row'>
|
|
||||||
<SettingToggle
|
|
||||||
prefix='home_timeline'
|
|
||||||
settings={settings}
|
|
||||||
settingPath={['shows', 'reply']}
|
|
||||||
onChange={onChange}
|
|
||||||
label={
|
|
||||||
<FormattedMessage
|
|
||||||
id='home.column_settings.show_replies'
|
|
||||||
defaultMessage='Show replies'
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
|
import background from 'mastodon/../images/friends-cropped.png';
|
||||||
|
import { DismissableBanner } from 'mastodon/components/dismissable_banner';
|
||||||
|
|
||||||
|
|
||||||
|
export const ExplorePrompt = () => (
|
||||||
|
<DismissableBanner id='home.explore_prompt'>
|
||||||
|
<img src={background} alt='' className='dismissable-banner__background-image' />
|
||||||
|
|
||||||
|
<h1><FormattedMessage id='home.explore_prompt.title' defaultMessage='This is your home base within Mastodon.' /></h1>
|
||||||
|
<p><FormattedMessage id='home.explore_prompt.body' defaultMessage="Your home feed will have a mix of posts from the hashtags you've chosen to follow, the people you've chosen to follow, and the posts they boost. It's looking pretty quiet right now, so how about:" /></p>
|
||||||
|
|
||||||
|
<div className='dismissable-banner__message__actions__wrapper'>
|
||||||
|
<div className='dismissable-banner__message__actions'>
|
||||||
|
<Link to='/explore' className='button'><FormattedMessage id='home.actions.go_to_explore' defaultMessage="See what's trending" /></Link>
|
||||||
|
<Link to='/explore/suggestions' className='button button-tertiary'><FormattedMessage id='home.actions.go_to_suggestions' defaultMessage='Find people to follow' /></Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</DismissableBanner>
|
||||||
|
);
|
|
@ -1,46 +0,0 @@
|
||||||
import { FormattedMessage } from 'react-intl';
|
|
||||||
|
|
||||||
import { Link } from 'react-router-dom';
|
|
||||||
|
|
||||||
import background from 'mastodon/../images/friends-cropped.png';
|
|
||||||
import { DismissableBanner } from 'mastodon/components/dismissable_banner';
|
|
||||||
|
|
||||||
export const ExplorePrompt = () => (
|
|
||||||
<DismissableBanner id='home.explore_prompt'>
|
|
||||||
<img
|
|
||||||
src={background}
|
|
||||||
alt=''
|
|
||||||
className='dismissable-banner__background-image'
|
|
||||||
/>
|
|
||||||
|
|
||||||
<h1>
|
|
||||||
<FormattedMessage
|
|
||||||
id='home.explore_prompt.title'
|
|
||||||
defaultMessage='This is your home base within Mastodon.'
|
|
||||||
/>
|
|
||||||
</h1>
|
|
||||||
<p>
|
|
||||||
<FormattedMessage
|
|
||||||
id='home.explore_prompt.body'
|
|
||||||
defaultMessage="Your home feed will have a mix of posts from the hashtags you've chosen to follow, the people you've chosen to follow, and the posts they boost. It's looking pretty quiet right now, so how about:"
|
|
||||||
/>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div className='dismissable-banner__message__wrapper'>
|
|
||||||
<div className='dismissable-banner__message__actions'>
|
|
||||||
<Link to='/explore' className='button'>
|
|
||||||
<FormattedMessage
|
|
||||||
id='home.actions.go_to_explore'
|
|
||||||
defaultMessage="See what's trending"
|
|
||||||
/>
|
|
||||||
</Link>
|
|
||||||
<Link to='/explore/suggestions' className='button button-tertiary'>
|
|
||||||
<FormattedMessage
|
|
||||||
id='home.actions.go_to_suggestions'
|
|
||||||
defaultMessage='Find people to follow'
|
|
||||||
/>
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</DismissableBanner>
|
|
||||||
);
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
import { changeSetting, saveSettings } from '../../../actions/settings';
|
||||||
|
import ColumnSettings from '../components/column_settings';
|
||||||
|
|
||||||
|
const mapStateToProps = state => ({
|
||||||
|
settings: state.getIn(['settings', 'home']),
|
||||||
|
});
|
||||||
|
|
||||||
|
const mapDispatchToProps = dispatch => ({
|
||||||
|
|
||||||
|
onChange (key, checked) {
|
||||||
|
dispatch(changeSetting(['home', ...key], checked));
|
||||||
|
},
|
||||||
|
|
||||||
|
onSave () {
|
||||||
|
dispatch(saveSettings());
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);
|
|
@ -22,8 +22,8 @@ import Column from '../../components/column';
|
||||||
import ColumnHeader from '../../components/column_header';
|
import ColumnHeader from '../../components/column_header';
|
||||||
import StatusListContainer from '../ui/containers/status_list_container';
|
import StatusListContainer from '../ui/containers/status_list_container';
|
||||||
|
|
||||||
import { ColumnSettings } from './components/column_settings';
|
|
||||||
import { ExplorePrompt } from './components/explore_prompt';
|
import { ExplorePrompt } from './components/explore_prompt';
|
||||||
|
import ColumnSettingsContainer from './containers/column_settings_container';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
title: { id: 'column.home', defaultMessage: 'Home' },
|
title: { id: 'column.home', defaultMessage: 'Home' },
|
||||||
|
@ -191,7 +191,7 @@ class HomeTimeline extends PureComponent {
|
||||||
extraButton={announcementsButton}
|
extraButton={announcementsButton}
|
||||||
appendContent={hasAnnouncements && showAnnouncements && <AnnouncementsContainer />}
|
appendContent={hasAnnouncements && showAnnouncements && <AnnouncementsContainer />}
|
||||||
>
|
>
|
||||||
<ColumnSettings />
|
<ColumnSettingsContainer />
|
||||||
</ColumnHeader>
|
</ColumnHeader>
|
||||||
|
|
||||||
{signedIn ? (
|
{signedIn ? (
|
||||||
|
|
|
@ -205,7 +205,7 @@ class ActionBar extends PureComponent {
|
||||||
menu.push({ text: intl.formatMessage(messages.share), action: this.handleShare });
|
menu.push({ text: intl.formatMessage(messages.share), action: this.handleShare });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (publicStatus && (signedIn || !isRemote)) {
|
if (publicStatus) {
|
||||||
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
|
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
||||||
dispatch(openModal({
|
dispatch(openModal({
|
||||||
modalType: 'EMBED',
|
modalType: 'EMBED',
|
||||||
modalProps: {
|
modalProps: {
|
||||||
id: status.get('id'),
|
url: status.get('url'),
|
||||||
onError: error => dispatch(showAlertForError(error)),
|
onError: error => dispatch(showAlertForError(error)),
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -449,7 +449,7 @@ class Status extends ImmutablePureComponent {
|
||||||
handleEmbed = (status) => {
|
handleEmbed = (status) => {
|
||||||
this.props.dispatch(openModal({
|
this.props.dispatch(openModal({
|
||||||
modalType: 'EMBED',
|
modalType: 'EMBED',
|
||||||
modalProps: { id: status.get('id') },
|
modalProps: { url: status.get('url') },
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ const messages = defineMessages({
|
||||||
class EmbedModal extends ImmutablePureComponent {
|
class EmbedModal extends ImmutablePureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
id: PropTypes.string.isRequired,
|
url: PropTypes.string.isRequired,
|
||||||
onClose: PropTypes.func.isRequired,
|
onClose: PropTypes.func.isRequired,
|
||||||
onError: PropTypes.func.isRequired,
|
onError: PropTypes.func.isRequired,
|
||||||
intl: PropTypes.object.isRequired,
|
intl: PropTypes.object.isRequired,
|
||||||
|
@ -26,11 +26,11 @@ class EmbedModal extends ImmutablePureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
const { id } = this.props;
|
const { url } = this.props;
|
||||||
|
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
|
|
||||||
api().get(`/api/web/embeds/${id}`).then(res => {
|
api().post('/api/web/embed', { url }).then(res => {
|
||||||
this.setState({ loading: false, oembed: res.data });
|
this.setState({ loading: false, oembed: res.data });
|
||||||
|
|
||||||
const iframeDocument = this.iframe.contentWindow.document;
|
const iframeDocument = this.iframe.contentWindow.document;
|
||||||
|
|
|
@ -38,7 +38,6 @@ class LinkFooter extends PureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
multiColumn: PropTypes.bool,
|
|
||||||
onLogout: PropTypes.func.isRequired,
|
onLogout: PropTypes.func.isRequired,
|
||||||
intl: PropTypes.object.isRequired,
|
intl: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
@ -54,7 +53,6 @@ class LinkFooter extends PureComponent {
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { signedIn, permissions } = this.context.identity;
|
const { signedIn, permissions } = this.context.identity;
|
||||||
const { multiColumn } = this.props;
|
|
||||||
|
|
||||||
const canInvite = signedIn && ((permissions & PERMISSION_INVITE_USERS) === PERMISSION_INVITE_USERS);
|
const canInvite = signedIn && ((permissions & PERMISSION_INVITE_USERS) === PERMISSION_INVITE_USERS);
|
||||||
const canProfileDirectory = profileDirectory;
|
const canProfileDirectory = profileDirectory;
|
||||||
|
@ -66,7 +64,7 @@ class LinkFooter extends PureComponent {
|
||||||
<p>
|
<p>
|
||||||
<strong>{domain}</strong>:
|
<strong>{domain}</strong>:
|
||||||
{' '}
|
{' '}
|
||||||
<Link to='/about' target={multiColumn ? '_blank' : undefined}><FormattedMessage id='footer.about' defaultMessage='About' /></Link>
|
<Link to='/about'><FormattedMessage id='footer.about' defaultMessage='About' /></Link>
|
||||||
{statusPageUrl && (
|
{statusPageUrl && (
|
||||||
<>
|
<>
|
||||||
{DividingCircle}
|
{DividingCircle}
|
||||||
|
@ -86,7 +84,7 @@ class LinkFooter extends PureComponent {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{DividingCircle}
|
{DividingCircle}
|
||||||
<Link to='/privacy-policy' target={multiColumn ? '_blank' : undefined}><FormattedMessage id='footer.privacy_policy' defaultMessage='Privacy policy' /></Link>
|
<Link to='/privacy-policy'><FormattedMessage id='footer.privacy_policy' defaultMessage='Privacy policy' /></Link>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -8,7 +8,6 @@ import { Link } from 'react-router-dom';
|
||||||
import { WordmarkLogo } from 'mastodon/components/logo';
|
import { WordmarkLogo } from 'mastodon/components/logo';
|
||||||
import NavigationPortal from 'mastodon/components/navigation_portal';
|
import NavigationPortal from 'mastodon/components/navigation_portal';
|
||||||
import { timelinePreview, trendsEnabled } from 'mastodon/initial_state';
|
import { timelinePreview, trendsEnabled } from 'mastodon/initial_state';
|
||||||
import { transientSingleColumn } from 'mastodon/is_mobile';
|
|
||||||
|
|
||||||
import ColumnLink from './column_link';
|
import ColumnLink from './column_link';
|
||||||
import DisabledAccountBanner from './disabled_account_banner';
|
import DisabledAccountBanner from './disabled_account_banner';
|
||||||
|
@ -30,7 +29,6 @@ const messages = defineMessages({
|
||||||
followsAndFollowers: { id: 'navigation_bar.follows_and_followers', defaultMessage: 'Follows and followers' },
|
followsAndFollowers: { id: 'navigation_bar.follows_and_followers', defaultMessage: 'Follows and followers' },
|
||||||
about: { id: 'navigation_bar.about', defaultMessage: 'About' },
|
about: { id: 'navigation_bar.about', defaultMessage: 'About' },
|
||||||
search: { id: 'navigation_bar.search', defaultMessage: 'Search' },
|
search: { id: 'navigation_bar.search', defaultMessage: 'Search' },
|
||||||
advancedInterface: { id: 'navigation_bar.advanced_interface', defaultMessage: 'Open in advanced web interface' },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
class NavigationPanel extends Component {
|
class NavigationPanel extends Component {
|
||||||
|
@ -56,12 +54,6 @@ class NavigationPanel extends Component {
|
||||||
<div className='navigation-panel'>
|
<div className='navigation-panel'>
|
||||||
<div className='navigation-panel__logo'>
|
<div className='navigation-panel__logo'>
|
||||||
<Link to='/' className='column-link column-link--logo'><WordmarkLogo /></Link>
|
<Link to='/' className='column-link column-link--logo'><WordmarkLogo /></Link>
|
||||||
|
|
||||||
{transientSingleColumn && (
|
|
||||||
<a href={`/deck${location.pathname}`} className='button button--block'>
|
|
||||||
{intl.formatMessage(messages.advancedInterface)}
|
|
||||||
</a>
|
|
||||||
)}
|
|
||||||
<hr />
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -126,11 +126,11 @@ class SwitchingColumnsArea extends PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
location: PropTypes.object,
|
location: PropTypes.object,
|
||||||
singleColumn: PropTypes.bool,
|
mobile: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
UNSAFE_componentWillMount () {
|
UNSAFE_componentWillMount () {
|
||||||
if (this.props.singleColumn) {
|
if (this.props.mobile) {
|
||||||
document.body.classList.toggle('layout-single-column', true);
|
document.body.classList.toggle('layout-single-column', true);
|
||||||
document.body.classList.toggle('layout-multiple-columns', false);
|
document.body.classList.toggle('layout-multiple-columns', false);
|
||||||
} else {
|
} else {
|
||||||
|
@ -144,9 +144,9 @@ class SwitchingColumnsArea extends PureComponent {
|
||||||
this.node.handleChildrenContentChange();
|
this.node.handleChildrenContentChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prevProps.singleColumn !== this.props.singleColumn) {
|
if (prevProps.mobile !== this.props.mobile) {
|
||||||
document.body.classList.toggle('layout-single-column', this.props.singleColumn);
|
document.body.classList.toggle('layout-single-column', this.props.mobile);
|
||||||
document.body.classList.toggle('layout-multiple-columns', !this.props.singleColumn);
|
document.body.classList.toggle('layout-multiple-columns', !this.props.mobile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,17 +157,16 @@ class SwitchingColumnsArea extends PureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { children, singleColumn } = this.props;
|
const { children, mobile } = this.props;
|
||||||
const { signedIn } = this.context.identity;
|
const { signedIn } = this.context.identity;
|
||||||
const pathName = this.props.location.pathname;
|
|
||||||
|
|
||||||
let redirect;
|
let redirect;
|
||||||
|
|
||||||
if (signedIn) {
|
if (signedIn) {
|
||||||
if (singleColumn) {
|
if (mobile) {
|
||||||
redirect = <Redirect from='/' to='/home' exact />;
|
redirect = <Redirect from='/' to='/home' exact />;
|
||||||
} else {
|
} else {
|
||||||
redirect = <Redirect from='/' to='/deck/getting-started' exact />;
|
redirect = <Redirect from='/' to='/getting-started' exact />;
|
||||||
}
|
}
|
||||||
} else if (singleUserMode && owner && initialState?.accounts[owner]) {
|
} else if (singleUserMode && owner && initialState?.accounts[owner]) {
|
||||||
redirect = <Redirect from='/' to={`/@${initialState.accounts[owner].username}`} exact />;
|
redirect = <Redirect from='/' to={`/@${initialState.accounts[owner].username}`} exact />;
|
||||||
|
@ -178,13 +177,10 @@ class SwitchingColumnsArea extends PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ColumnsAreaContainer ref={this.setRef} singleColumn={singleColumn}>
|
<ColumnsAreaContainer ref={this.setRef} singleColumn={mobile}>
|
||||||
<WrappedSwitch>
|
<WrappedSwitch>
|
||||||
{redirect}
|
{redirect}
|
||||||
|
|
||||||
{singleColumn ? <Redirect from='/deck' to='/home' exact /> : null}
|
|
||||||
{singleColumn && pathName.startsWith('/deck/') ? <Redirect from={pathName} to={pathName.slice(5)} /> : null}
|
|
||||||
|
|
||||||
<WrappedRoute path='/getting-started' component={GettingStarted} content={children} />
|
<WrappedRoute path='/getting-started' component={GettingStarted} content={children} />
|
||||||
<WrappedRoute path='/keyboard-shortcuts' component={KeyboardShortcuts} content={children} />
|
<WrappedRoute path='/keyboard-shortcuts' component={KeyboardShortcuts} content={children} />
|
||||||
<WrappedRoute path='/about' component={About} content={children} />
|
<WrappedRoute path='/about' component={About} content={children} />
|
||||||
|
@ -577,7 +573,7 @@ class UI extends PureComponent {
|
||||||
<div className={classNames('ui', { 'is-composing': isComposing })} ref={this.setRef} style={{ pointerEvents: dropdownMenuIsOpen ? 'none' : null }}>
|
<div className={classNames('ui', { 'is-composing': isComposing })} ref={this.setRef} style={{ pointerEvents: dropdownMenuIsOpen ? 'none' : null }}>
|
||||||
<Header />
|
<Header />
|
||||||
|
|
||||||
<SwitchingColumnsArea location={location} singleColumn={layout === 'mobile' || layout === 'single-column'}>
|
<SwitchingColumnsArea location={location} mobile={layout === 'mobile' || layout === 'single-column'}>
|
||||||
{children}
|
{children}
|
||||||
</SwitchingColumnsArea>
|
</SwitchingColumnsArea>
|
||||||
|
|
||||||
|
|
|
@ -11,21 +11,13 @@ import BundleContainer from '../containers/bundle_container';
|
||||||
|
|
||||||
// Small wrapper to pass multiColumn to the route components
|
// Small wrapper to pass multiColumn to the route components
|
||||||
export class WrappedSwitch extends PureComponent {
|
export class WrappedSwitch extends PureComponent {
|
||||||
static contextTypes = {
|
|
||||||
router: PropTypes.object,
|
|
||||||
};
|
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { multiColumn, children } = this.props;
|
const { multiColumn, children } = this.props;
|
||||||
const { location } = this.context.router.route;
|
|
||||||
|
|
||||||
const decklessLocation = multiColumn && location.pathname.startsWith('/deck')
|
|
||||||
? {...location, pathname: location.pathname.slice(5)}
|
|
||||||
: location;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Switch location={decklessLocation}>
|
<Switch>
|
||||||
{Children.map(children, child => child ? cloneElement(child, { multiColumn }) : null)}
|
{Children.map(children, child => cloneElement(child, { multiColumn }))}
|
||||||
</Switch>
|
</Switch>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,13 +94,6 @@ const element = document.getElementById('initial-state');
|
||||||
/** @type {InitialState | undefined} */
|
/** @type {InitialState | undefined} */
|
||||||
const initialState = element?.textContent && JSON.parse(element.textContent);
|
const initialState = element?.textContent && JSON.parse(element.textContent);
|
||||||
|
|
||||||
/** @type {string} */
|
|
||||||
const initialPath = document.querySelector("head meta[name=initialPath]")?.getAttribute("content") ?? '';
|
|
||||||
/** @type {boolean} */
|
|
||||||
export const hasMultiColumnPath = initialPath === '/'
|
|
||||||
|| initialPath === '/getting-started'
|
|
||||||
|| initialPath.startsWith('/deck');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @template {keyof InitialStateMeta} K
|
* @template {keyof InitialStateMeta} K
|
||||||
* @param {K} prop
|
* @param {K} prop
|
||||||
|
|
|
@ -1,21 +1,19 @@
|
||||||
import { supportsPassiveEvents } from 'detect-passive-events';
|
import { supportsPassiveEvents } from 'detect-passive-events';
|
||||||
|
|
||||||
import { forceSingleColumn, hasMultiColumnPath } from './initial_state';
|
import { forceSingleColumn } from './initial_state';
|
||||||
|
|
||||||
const LAYOUT_BREAKPOINT = 630;
|
const LAYOUT_BREAKPOINT = 630;
|
||||||
|
|
||||||
export const isMobile = (width: number) => width <= LAYOUT_BREAKPOINT;
|
export const isMobile = (width: number) => width <= LAYOUT_BREAKPOINT;
|
||||||
|
|
||||||
export const transientSingleColumn = !forceSingleColumn && !hasMultiColumnPath;
|
|
||||||
|
|
||||||
export type LayoutType = 'mobile' | 'single-column' | 'multi-column';
|
export type LayoutType = 'mobile' | 'single-column' | 'multi-column';
|
||||||
export const layoutFromWindow = (): LayoutType => {
|
export const layoutFromWindow = (): LayoutType => {
|
||||||
if (isMobile(window.innerWidth)) {
|
if (isMobile(window.innerWidth)) {
|
||||||
return 'mobile';
|
return 'mobile';
|
||||||
} else if (!forceSingleColumn && !transientSingleColumn) {
|
} else if (forceSingleColumn) {
|
||||||
return 'multi-column';
|
|
||||||
} else {
|
|
||||||
return 'single-column';
|
return 'single-column';
|
||||||
|
} else {
|
||||||
|
return 'multi-column';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -385,7 +385,6 @@
|
||||||
"mute_modal.hide_notifications": "Hide notifications from this user?",
|
"mute_modal.hide_notifications": "Hide notifications from this user?",
|
||||||
"mute_modal.indefinite": "Indefinite",
|
"mute_modal.indefinite": "Indefinite",
|
||||||
"navigation_bar.about": "About",
|
"navigation_bar.about": "About",
|
||||||
"navigation_bar.advanced_interface": "Open in advanced web interface",
|
|
||||||
"navigation_bar.blocks": "Blocked users",
|
"navigation_bar.blocks": "Blocked users",
|
||||||
"navigation_bar.bookmarks": "Bookmarks",
|
"navigation_bar.bookmarks": "Bookmarks",
|
||||||
"navigation_bar.community_timeline": "Local timeline",
|
"navigation_bar.community_timeline": "Local timeline",
|
||||||
|
|
|
@ -368,7 +368,6 @@
|
||||||
"mute_modal.hide_notifications": "Masquer les notifications de cette personne ?",
|
"mute_modal.hide_notifications": "Masquer les notifications de cette personne ?",
|
||||||
"mute_modal.indefinite": "Indéfinie",
|
"mute_modal.indefinite": "Indéfinie",
|
||||||
"navigation_bar.about": "À propos",
|
"navigation_bar.about": "À propos",
|
||||||
"navigation_bar.advanced_interface": "Ouvrir dans l’interface avancée",
|
|
||||||
"navigation_bar.blocks": "Comptes bloqués",
|
"navigation_bar.blocks": "Comptes bloqués",
|
||||||
"navigation_bar.bookmarks": "Marque-pages",
|
"navigation_bar.bookmarks": "Marque-pages",
|
||||||
"navigation_bar.community_timeline": "Fil public local",
|
"navigation_bar.community_timeline": "Fil public local",
|
||||||
|
|
|
@ -3,19 +3,15 @@ export interface LocaleData {
|
||||||
messages: Record<string, string>;
|
messages: Record<string, string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
let loadedLocale: LocaleData | undefined;
|
let loadedLocale: LocaleData;
|
||||||
|
|
||||||
export function setLocale(locale: LocaleData) {
|
export function setLocale(locale: LocaleData) {
|
||||||
loadedLocale = locale;
|
loadedLocale = locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getLocale(): LocaleData {
|
export function getLocale() {
|
||||||
if (!loadedLocale) {
|
if (!loadedLocale && process.env.NODE_ENV === 'development') {
|
||||||
if (process.env.NODE_ENV === 'development') {
|
|
||||||
throw new Error('getLocale() called before any locale has been set');
|
throw new Error('getLocale() called before any locale has been set');
|
||||||
} else {
|
|
||||||
return { locale: 'unknown', messages: {} };
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return loadedLocale;
|
return loadedLocale;
|
||||||
|
|
|
@ -6,7 +6,6 @@ import { isLocaleLoaded, setLocale } from './global_locale';
|
||||||
const localeLoadingSemaphore = new Semaphore(1);
|
const localeLoadingSemaphore = new Semaphore(1);
|
||||||
|
|
||||||
export async function loadLocale() {
|
export async function loadLocale() {
|
||||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- we want to match empty strings
|
|
||||||
const locale = document.querySelector<HTMLElement>('html')?.lang || 'en';
|
const locale = document.querySelector<HTMLElement>('html')?.lang || 'en';
|
||||||
|
|
||||||
// We use a Semaphore here so only one thing can try to load the locales at
|
// We use a Semaphore here so only one thing can try to load the locales at
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'core-js/features/symbol';
|
||||||
import 'core-js/features/promise/finally';
|
import 'core-js/features/promise/finally';
|
||||||
import { decode as decodeBase64 } from '../utils/base64';
|
import { decode as decodeBase64 } from '../utils/base64';
|
||||||
|
|
||||||
if (!Object.hasOwn(HTMLCanvasElement.prototype, 'toBlob')) {
|
if (!HTMLCanvasElement.prototype.toBlob) {
|
||||||
const BASE64_MARKER = ';base64,';
|
const BASE64_MARKER = ';base64,';
|
||||||
|
|
||||||
Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
|
Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
|
||||||
|
@ -12,12 +12,12 @@ if (!Object.hasOwn(HTMLCanvasElement.prototype, 'toBlob')) {
|
||||||
this: HTMLCanvasElement,
|
this: HTMLCanvasElement,
|
||||||
callback: BlobCallback,
|
callback: BlobCallback,
|
||||||
type = 'image/png',
|
type = 'image/png',
|
||||||
quality: unknown,
|
quality: unknown
|
||||||
) {
|
) {
|
||||||
const dataURL: string = this.toDataURL(type, quality);
|
const dataURL: string = this.toDataURL(type, quality);
|
||||||
let data;
|
let data;
|
||||||
|
|
||||||
if (dataURL.includes(BASE64_MARKER)) {
|
if (dataURL.indexOf(BASE64_MARKER) >= 0) {
|
||||||
const [, base64] = dataURL.split(BASE64_MARKER);
|
const [, base64] = dataURL.split(BASE64_MARKER);
|
||||||
data = decodeBase64(base64);
|
data = decodeBase64(base64);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -24,7 +24,6 @@ export function loadPolyfills() {
|
||||||
// Latest version of Firefox and Safari do not have IntersectionObserver.
|
// Latest version of Firefox and Safari do not have IntersectionObserver.
|
||||||
// Edge does not have requestIdleCallback.
|
// Edge does not have requestIdleCallback.
|
||||||
// This avoids shipping them all the polyfills.
|
// This avoids shipping them all the polyfills.
|
||||||
/* eslint-disable @typescript-eslint/no-unnecessary-condition -- those properties might not exist in old browsers, even if they are always here in types */
|
|
||||||
const needsExtraPolyfills = !(
|
const needsExtraPolyfills = !(
|
||||||
window.AbortController &&
|
window.AbortController &&
|
||||||
window.IntersectionObserver &&
|
window.IntersectionObserver &&
|
||||||
|
@ -32,7 +31,6 @@ export function loadPolyfills() {
|
||||||
'isIntersecting' in IntersectionObserverEntry.prototype &&
|
'isIntersecting' in IntersectionObserverEntry.prototype &&
|
||||||
window.requestIdleCallback
|
window.requestIdleCallback
|
||||||
);
|
);
|
||||||
/* eslint-enable @typescript-eslint/no-unnecessary-condition */
|
|
||||||
|
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
loadIntlPolyfills(),
|
loadIntlPolyfills(),
|
||||||
|
|
|
@ -80,7 +80,6 @@ async function loadIntlPluralRulesPolyfills(locale: string) {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
export async function loadIntlPolyfills() {
|
export async function loadIntlPolyfills() {
|
||||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- we want to match empty strings
|
|
||||||
const locale = document.querySelector('html')?.lang || 'en';
|
const locale = document.querySelector('html')?.lang || 'en';
|
||||||
|
|
||||||
// order is important here
|
// order is important here
|
||||||
|
|
|
@ -99,7 +99,7 @@ const initialRootState = Object.fromEntries(
|
||||||
reducer(undefined, {
|
reducer(undefined, {
|
||||||
// empty action
|
// empty action
|
||||||
}),
|
}),
|
||||||
]),
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
const RootStateRecord = ImmutableRecord(initialRootState, 'RootState');
|
const RootStateRecord = ImmutableRecord(initialRootState, 'RootState');
|
||||||
|
|
|
@ -35,7 +35,7 @@ interface PopModalOption {
|
||||||
}
|
}
|
||||||
const popModal = (
|
const popModal = (
|
||||||
state: State,
|
state: State,
|
||||||
{ modalType, ignoreFocus }: PopModalOption,
|
{ modalType, ignoreFocus }: PopModalOption
|
||||||
): State => {
|
): State => {
|
||||||
if (
|
if (
|
||||||
modalType === undefined ||
|
modalType === undefined ||
|
||||||
|
@ -52,12 +52,12 @@ const popModal = (
|
||||||
const pushModal = (
|
const pushModal = (
|
||||||
state: State,
|
state: State,
|
||||||
modalType: ModalType,
|
modalType: ModalType,
|
||||||
modalProps: ModalProps,
|
modalProps: ModalProps
|
||||||
): State => {
|
): State => {
|
||||||
return state.withMutations((record) => {
|
return state.withMutations((record) => {
|
||||||
record.set('ignoreFocus', false);
|
record.set('ignoreFocus', false);
|
||||||
record.update('stack', (stack) =>
|
record.update('stack', (stack) =>
|
||||||
stack.unshift(Modal({ modalType, modalProps })),
|
stack.unshift(Modal({ modalType, modalProps }))
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -68,14 +68,14 @@ export function modalReducer(
|
||||||
modalType: ModalType;
|
modalType: ModalType;
|
||||||
ignoreFocus: boolean;
|
ignoreFocus: boolean;
|
||||||
modalProps: Record<string, unknown>;
|
modalProps: Record<string, unknown>;
|
||||||
}>,
|
}>
|
||||||
) {
|
) {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case openModal.type:
|
case openModal.type:
|
||||||
return pushModal(
|
return pushModal(
|
||||||
state,
|
state,
|
||||||
action.payload.modalType,
|
action.payload.modalType,
|
||||||
action.payload.modalProps,
|
action.payload.modalProps
|
||||||
);
|
);
|
||||||
case closeModal.type:
|
case closeModal.type:
|
||||||
return popModal(state, action.payload);
|
return popModal(state, action.payload);
|
||||||
|
@ -85,8 +85,8 @@ export function modalReducer(
|
||||||
return state.update('stack', (stack) =>
|
return state.update('stack', (stack) =>
|
||||||
stack.filterNot(
|
stack.filterNot(
|
||||||
// @ts-expect-error TIMELINE_DELETE action is not typed yet.
|
// @ts-expect-error TIMELINE_DELETE action is not typed yet.
|
||||||
(modal) => modal.get('modalProps').statusId === action.id,
|
(modal) => modal.get('modalProps').statusId === action.id
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
return state;
|
return state;
|
||||||
|
|
|
@ -3,12 +3,12 @@ const easingOutQuint = (
|
||||||
t: number,
|
t: number,
|
||||||
b: number,
|
b: number,
|
||||||
c: number,
|
c: number,
|
||||||
d: number,
|
d: number
|
||||||
) => c * ((t = t / d - 1) * t * t * t * t + 1) + b;
|
) => c * ((t = t / d - 1) * t * t * t * t + 1) + b;
|
||||||
const scroll = (
|
const scroll = (
|
||||||
node: Element,
|
node: Element,
|
||||||
key: 'scrollTop' | 'scrollLeft',
|
key: 'scrollTop' | 'scrollLeft',
|
||||||
target: number,
|
target: number
|
||||||
) => {
|
) => {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
const offset = node[key];
|
const offset = node[key];
|
||||||
|
@ -38,13 +38,11 @@ const scroll = (
|
||||||
const isScrollBehaviorSupported =
|
const isScrollBehaviorSupported =
|
||||||
'scrollBehavior' in document.documentElement.style;
|
'scrollBehavior' in document.documentElement.style;
|
||||||
|
|
||||||
export const scrollRight = (node: Element, position: number) => {
|
export const scrollRight = (node: Element, position: number) =>
|
||||||
if (isScrollBehaviorSupported)
|
isScrollBehaviorSupported
|
||||||
node.scrollTo({ left: position, behavior: 'smooth' });
|
? node.scrollTo({ left: position, behavior: 'smooth' })
|
||||||
else scroll(node, 'scrollLeft', position);
|
: scroll(node, 'scrollLeft', position);
|
||||||
};
|
export const scrollTop = (node: Element) =>
|
||||||
|
isScrollBehaviorSupported
|
||||||
export const scrollTop = (node: Element) => {
|
? node.scrollTo({ top: 0, behavior: 'smooth' })
|
||||||
if (isScrollBehaviorSupported) node.scrollTo({ top: 0, behavior: 'smooth' });
|
: scroll(node, 'scrollTop', 0);
|
||||||
else scroll(node, 'scrollTop', 0);
|
|
||||||
};
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ export const store = configureStore({
|
||||||
.concat(
|
.concat(
|
||||||
loadingBarMiddleware({
|
loadingBarMiddleware({
|
||||||
promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'],
|
promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'],
|
||||||
}),
|
})
|
||||||
)
|
)
|
||||||
.concat(errorsMiddleware)
|
.concat(errorsMiddleware)
|
||||||
.concat(soundsMiddleware()),
|
.concat(soundsMiddleware()),
|
||||||
|
|
|
@ -14,9 +14,9 @@ const defaultTypeSuffixes: Config['promiseTypeSuffixes'] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
export const loadingBarMiddleware = (
|
export const loadingBarMiddleware = (
|
||||||
config: Config = {},
|
config: Config = {}
|
||||||
): Middleware<Record<string, never>, RootState> => {
|
): Middleware<Record<string, never>, RootState> => {
|
||||||
const promiseTypeSuffixes = config.promiseTypeSuffixes ?? defaultTypeSuffixes;
|
const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypeSuffixes;
|
||||||
|
|
||||||
return ({ dispatch }) =>
|
return ({ dispatch }) =>
|
||||||
(next) =>
|
(next) =>
|
||||||
|
@ -32,7 +32,7 @@ export const loadingBarMiddleware = (
|
||||||
if (action.type.match(isPending)) {
|
if (action.type.match(isPending)) {
|
||||||
dispatch(showLoading());
|
dispatch(showLoading());
|
||||||
} else if (
|
} else if (
|
||||||
action.type.match(isFulfilled) ??
|
action.type.match(isFulfilled) ||
|
||||||
action.type.match(isRejected)
|
action.type.match(isRejected)
|
||||||
) {
|
) {
|
||||||
dispatch(hideLoading());
|
dispatch(hideLoading());
|
||||||
|
|
|
@ -38,7 +38,7 @@ export const soundsMiddleware = (): Middleware<
|
||||||
Record<string, never>,
|
Record<string, never>,
|
||||||
RootState
|
RootState
|
||||||
> => {
|
> => {
|
||||||
const soundCache: Record<string, HTMLAudioElement> = {};
|
const soundCache: { [key: string]: HTMLAudioElement } = {};
|
||||||
|
|
||||||
void ready(() => {
|
void ready(() => {
|
||||||
soundCache.boop = createAudio([
|
soundCache.boop = createAudio([
|
||||||
|
@ -56,9 +56,9 @@ export const soundsMiddleware = (): Middleware<
|
||||||
return () =>
|
return () =>
|
||||||
(next) =>
|
(next) =>
|
||||||
(action: AnyAction & { meta?: { sound?: string } }) => {
|
(action: AnyAction & { meta?: { sound?: string } }) => {
|
||||||
const sound = action.meta?.sound;
|
const sound = action?.meta?.sound;
|
||||||
|
|
||||||
if (sound && Object.hasOwn(soundCache, sound)) {
|
if (sound && soundCache[sound]) {
|
||||||
play(soundCache[sound]);
|
play(soundCache[sound]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ export const toServerSideType = (columnType: string) => {
|
||||||
case 'account':
|
case 'account':
|
||||||
return columnType;
|
return columnType;
|
||||||
default:
|
default:
|
||||||
if (columnType.includes('list:')) {
|
if (columnType.indexOf('list:') > -1) {
|
||||||
return 'home';
|
return 'home';
|
||||||
} else {
|
} else {
|
||||||
return 'public'; // community, account, hashtag
|
return 'public'; // community, account, hashtag
|
||||||
|
|
|
@ -6,7 +6,7 @@ const buildHashtagPatternRegex = () => {
|
||||||
try {
|
try {
|
||||||
return new RegExp(
|
return new RegExp(
|
||||||
`(?:^|[^\\/\\)\\w])#(([${WORD}_][${WORD}${HASHTAG_SEPARATORS}]*[${ALPHA}${HASHTAG_SEPARATORS}][${WORD}${HASHTAG_SEPARATORS}]*[${WORD}_])|([${WORD}_]*[${ALPHA}][${WORD}_]*))`,
|
`(?:^|[^\\/\\)\\w])#(([${WORD}_][${WORD}${HASHTAG_SEPARATORS}]*[${ALPHA}${HASHTAG_SEPARATORS}][${WORD}${HASHTAG_SEPARATORS}]*[${WORD}_])|([${WORD}_]*[${ALPHA}][${WORD}_]*))`,
|
||||||
'iu',
|
'iu'
|
||||||
);
|
);
|
||||||
} catch {
|
} catch {
|
||||||
return /(?:^|[^/)\w])#(\w*[a-zA-Z·]\w*)/i;
|
return /(?:^|[^/)\w])#(\w*[a-zA-Z·]\w*)/i;
|
||||||
|
@ -17,7 +17,7 @@ const buildHashtagRegex = () => {
|
||||||
try {
|
try {
|
||||||
return new RegExp(
|
return new RegExp(
|
||||||
`^(([${WORD}_][${WORD}${HASHTAG_SEPARATORS}]*[${ALPHA}${HASHTAG_SEPARATORS}][${WORD}${HASHTAG_SEPARATORS}]*[${WORD}_])|([${WORD}_]*[${ALPHA}][${WORD}_]*))$`,
|
`^(([${WORD}_][${WORD}${HASHTAG_SEPARATORS}]*[${ALPHA}${HASHTAG_SEPARATORS}][${WORD}${HASHTAG_SEPARATORS}]*[${WORD}_])|([${WORD}_]*[${ALPHA}][${WORD}_]*))$`,
|
||||||
'iu',
|
'iu'
|
||||||
);
|
);
|
||||||
} catch {
|
} catch {
|
||||||
return /^(\w*[a-zA-Z·]\w*)$/i;
|
return /^(\w*[a-zA-Z·]\w*)$/i;
|
||||||
|
|
|
@ -55,7 +55,7 @@ export function toShortNumber(sourceNumber: number): ShortNumber {
|
||||||
*/
|
*/
|
||||||
export function pluralReady(
|
export function pluralReady(
|
||||||
sourceNumber: number,
|
sourceNumber: number,
|
||||||
division: DecimalUnits | null,
|
division: DecimalUnits
|
||||||
): number {
|
): number {
|
||||||
if (division == null || division < DECIMAL_UNITS.HUNDRED) {
|
if (division == null || division < DECIMAL_UNITS.HUNDRED) {
|
||||||
return sourceNumber;
|
return sourceNumber;
|
||||||
|
|
|
@ -4,5 +4,6 @@ export function uuid(a?: string): string {
|
||||||
(a as unknown as number) ^
|
(a as unknown as number) ^
|
||||||
((Math.random() * 16) >> ((a as unknown as number) / 4))
|
((Math.random() * 16) >> ((a as unknown as number) / 4))
|
||||||
).toString(16)
|
).toString(16)
|
||||||
: ('' + 1e7 + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, uuid);
|
: // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||||
|
('' + 1e7 + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, uuid);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: mastodon-font-monospace;
|
font-family: mastodon-font-monospace;
|
||||||
src:
|
src: local('Roboto Mono'),
|
||||||
local('Roboto Mono'),
|
|
||||||
url('../fonts/roboto-mono/robotomono-regular-webfont.woff2') format('woff2'),
|
url('../fonts/roboto-mono/robotomono-regular-webfont.woff2') format('woff2'),
|
||||||
url('../fonts/roboto-mono/robotomono-regular-webfont.woff') format('woff'),
|
url('../fonts/roboto-mono/robotomono-regular-webfont.woff') format('woff'),
|
||||||
url('../fonts/roboto-mono/robotomono-regular-webfont.ttf')
|
url('../fonts/roboto-mono/robotomono-regular-webfont.ttf')
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: mastodon-font-sans-serif;
|
font-family: mastodon-font-sans-serif;
|
||||||
src:
|
src: local('Roboto Italic'),
|
||||||
local('Roboto Italic'),
|
|
||||||
url('../fonts/roboto/roboto-italic-webfont.woff2') format('woff2'),
|
url('../fonts/roboto/roboto-italic-webfont.woff2') format('woff2'),
|
||||||
url('../fonts/roboto/roboto-italic-webfont.woff') format('woff'),
|
url('../fonts/roboto/roboto-italic-webfont.woff') format('woff'),
|
||||||
url('../fonts/roboto/roboto-italic-webfont.ttf') format('truetype'),
|
url('../fonts/roboto/roboto-italic-webfont.ttf') format('truetype'),
|
||||||
|
@ -14,8 +13,7 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: mastodon-font-sans-serif;
|
font-family: mastodon-font-sans-serif;
|
||||||
src:
|
src: local('Roboto Bold'),
|
||||||
local('Roboto Bold'),
|
|
||||||
url('../fonts/roboto/roboto-bold-webfont.woff2') format('woff2'),
|
url('../fonts/roboto/roboto-bold-webfont.woff2') format('woff2'),
|
||||||
url('../fonts/roboto/roboto-bold-webfont.woff') format('woff'),
|
url('../fonts/roboto/roboto-bold-webfont.woff') format('woff'),
|
||||||
url('../fonts/roboto/roboto-bold-webfont.ttf') format('truetype'),
|
url('../fonts/roboto/roboto-bold-webfont.ttf') format('truetype'),
|
||||||
|
@ -28,8 +26,7 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: mastodon-font-sans-serif;
|
font-family: mastodon-font-sans-serif;
|
||||||
src:
|
src: local('Roboto Medium'),
|
||||||
local('Roboto Medium'),
|
|
||||||
url('../fonts/roboto/roboto-medium-webfont.woff2') format('woff2'),
|
url('../fonts/roboto/roboto-medium-webfont.woff2') format('woff2'),
|
||||||
url('../fonts/roboto/roboto-medium-webfont.woff') format('woff'),
|
url('../fonts/roboto/roboto-medium-webfont.woff') format('woff'),
|
||||||
url('../fonts/roboto/roboto-medium-webfont.ttf') format('truetype'),
|
url('../fonts/roboto/roboto-medium-webfont.ttf') format('truetype'),
|
||||||
|
@ -42,8 +39,7 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: mastodon-font-sans-serif;
|
font-family: mastodon-font-sans-serif;
|
||||||
src:
|
src: local('Roboto'),
|
||||||
local('Roboto'),
|
|
||||||
url('../fonts/roboto/roboto-regular-webfont.woff2') format('woff2'),
|
url('../fonts/roboto/roboto-regular-webfont.woff2') format('woff2'),
|
||||||
url('../fonts/roboto/roboto-regular-webfont.woff') format('woff'),
|
url('../fonts/roboto/roboto-regular-webfont.woff') format('woff'),
|
||||||
url('../fonts/roboto/roboto-regular-webfont.ttf') format('truetype'),
|
url('../fonts/roboto/roboto-regular-webfont.ttf') format('truetype'),
|
||||||
|
|
|
@ -31,19 +31,9 @@ body {
|
||||||
// Droid Sans => Older Androids (<4.0)
|
// Droid Sans => Older Androids (<4.0)
|
||||||
// Helvetica Neue => Older macOS <10.11
|
// Helvetica Neue => Older macOS <10.11
|
||||||
// $font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
|
// $font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
|
||||||
font-family:
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
|
||||||
system-ui,
|
Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||||
-apple-system,
|
$font-sans-serif, sans-serif;
|
||||||
BlinkMacSystemFont,
|
|
||||||
'Segoe UI',
|
|
||||||
Oxygen,
|
|
||||||
Ubuntu,
|
|
||||||
Cantarell,
|
|
||||||
'Fira Sans',
|
|
||||||
'Droid Sans',
|
|
||||||
'Helvetica Neue',
|
|
||||||
$font-sans-serif,
|
|
||||||
sans-serif;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.app-body {
|
&.app-body {
|
||||||
|
|
|
@ -747,9 +747,7 @@ body > [data-popper-placement] {
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-reduce-motion .spoiler-input {
|
.no-reduce-motion .spoiler-input {
|
||||||
transition:
|
transition: height 0.4s ease, opacity 0.4s ease;
|
||||||
height 0.4s ease,
|
|
||||||
opacity 0.4s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sign-in-banner {
|
.sign-in-banner {
|
||||||
|
@ -1423,7 +1421,6 @@ body > [data-popper-placement] {
|
||||||
.detailed-status__link {
|
.detailed-status__link {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.detailed-status__favorites,
|
.detailed-status__favorites,
|
||||||
|
@ -3957,9 +3954,7 @@ a.status-card.compact:hover {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
border-bottom: 1px solid lighten($ui-base-color, 8%);
|
border-bottom: 1px solid lighten($ui-base-color, 8%);
|
||||||
color: $darker-text-color;
|
color: $darker-text-color;
|
||||||
transition:
|
transition: max-height 150ms ease-in-out, opacity 300ms linear;
|
||||||
max-height 150ms ease-in-out,
|
|
||||||
opacity 300ms linear;
|
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -6940,8 +6935,7 @@ noscript {
|
||||||
.navigation-bar {
|
.navigation-bar {
|
||||||
& > a:first-child {
|
& > a:first-child {
|
||||||
will-change: margin-top, margin-inline-start, margin-inline-end, width;
|
will-change: margin-top, margin-inline-start, margin-inline-end, width;
|
||||||
transition:
|
transition: margin-top $duration $delay,
|
||||||
margin-top $duration $delay,
|
|
||||||
margin-inline-start $duration ($duration + $delay),
|
margin-inline-start $duration ($duration + $delay),
|
||||||
margin-inline-end $duration ($duration + $delay);
|
margin-inline-end $duration ($duration + $delay);
|
||||||
}
|
}
|
||||||
|
@ -6954,15 +6948,12 @@ noscript {
|
||||||
.navigation-bar__actions {
|
.navigation-bar__actions {
|
||||||
& > .icon-button.close {
|
& > .icon-button.close {
|
||||||
will-change: opacity transform;
|
will-change: opacity transform;
|
||||||
transition:
|
transition: opacity $duration * 0.5 $delay, transform $duration $delay;
|
||||||
opacity $duration * 0.5 $delay,
|
|
||||||
transform $duration $delay;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
& > .compose__action-bar .icon-button {
|
& > .compose__action-bar .icon-button {
|
||||||
will-change: opacity transform;
|
will-change: opacity transform;
|
||||||
transition:
|
transition: opacity $duration * 0.5 $delay + $duration * 0.5,
|
||||||
opacity $duration * 0.5 $delay + $duration * 0.5,
|
|
||||||
transform $duration $delay;
|
transform $duration $delay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9103,8 +9094,7 @@ noscript {
|
||||||
backdrop-filter: blur(8px);
|
backdrop-filter: blur(8px);
|
||||||
border: 1px solid rgba(lighten($classic-base-color, 4%), 0.85);
|
border: 1px solid rgba(lighten($classic-base-color, 4%), 0.85);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow:
|
box-shadow: 0 10px 15px -3px rgba($base-shadow-color, 0.25),
|
||||||
0 10px 15px -3px rgba($base-shadow-color, 0.25),
|
|
||||||
0 4px 6px -4px rgba($base-shadow-color, 0.25);
|
0 4px 6px -4px rgba($base-shadow-color, 0.25);
|
||||||
cursor: default;
|
cursor: default;
|
||||||
transition: 0.5s cubic-bezier(0.89, 0.01, 0.5, 1.1);
|
transition: 0.5s cubic-bezier(0.89, 0.01, 0.5, 1.1);
|
||||||
|
|
|
@ -77,18 +77,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.button.logo-button svg {
|
|
||||||
width: 20px;
|
|
||||||
height: auto;
|
|
||||||
vertical-align: middle;
|
|
||||||
margin-inline-end: 5px;
|
|
||||||
fill: $primary-text-color;
|
|
||||||
|
|
||||||
@media screen and (max-width: $no-gap-breakpoint) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.embed {
|
.embed {
|
||||||
.status__content[data-spoiler='folded'] {
|
.status__content[data-spoiler='folded'] {
|
||||||
.e-content {
|
.e-content {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'connection_pool'
|
require 'connection_pool'
|
||||||
require_relative 'shared_timed_stack'
|
require_relative './shared_timed_stack'
|
||||||
|
|
||||||
class ConnectionPool::SharedConnectionPool < ConnectionPool
|
class ConnectionPool::SharedConnectionPool < ConnectionPool
|
||||||
def initialize(options = {}, &block)
|
def initialize(options = {}, &block)
|
||||||
|
|
|
@ -37,7 +37,7 @@ class InlineRenderer
|
||||||
private
|
private
|
||||||
|
|
||||||
def preload_associations_for_status
|
def preload_associations_for_status
|
||||||
ActiveRecord::Associations::Preloader.new(records: @object, associations: {
|
ActiveRecord::Associations::Preloader.new.preload(@object, {
|
||||||
active_mentions: :account,
|
active_mentions: :account,
|
||||||
|
|
||||||
reblog: {
|
reblog: {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative 'connection_pool/shared_connection_pool'
|
require_relative './connection_pool/shared_connection_pool'
|
||||||
|
|
||||||
class RequestPool
|
class RequestPool
|
||||||
def self.current
|
def self.current
|
||||||
|
|
|
@ -16,7 +16,7 @@ class RSS::Channel < RSS::Element
|
||||||
end
|
end
|
||||||
|
|
||||||
def last_build_date(date)
|
def last_build_date(date)
|
||||||
append_element('lastBuildDate', date.to_fs(:rfc822))
|
append_element('lastBuildDate', date.to_formatted_s(:rfc822))
|
||||||
end
|
end
|
||||||
|
|
||||||
def image(url, title, link)
|
def image(url, title, link)
|
||||||
|
|
|
@ -20,7 +20,7 @@ class RSS::Item < RSS::Element
|
||||||
end
|
end
|
||||||
|
|
||||||
def pub_date(date)
|
def pub_date(date)
|
||||||
append_element('pubDate', date.to_fs(:rfc822))
|
append_element('pubDate', date.to_formatted_s(:rfc822))
|
||||||
end
|
end
|
||||||
|
|
||||||
def description(str)
|
def description(str)
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Announcement < ApplicationRecord
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ActiveRecord::Associations::Preloader.new(records: records, associations: :custom_emoji)
|
ActiveRecord::Associations::Preloader.new.preload(records, :custom_emoji)
|
||||||
records
|
records
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ class ApplicationRecord < ActiveRecord::Base
|
||||||
|
|
||||||
include Remotable
|
include Remotable
|
||||||
|
|
||||||
|
connects_to database: { writing: :primary, reading: :read }
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
def update_index(_type_name, *_args, &_block)
|
def update_index(_type_name, *_args, &_block)
|
||||||
super if Chewy.enabled?
|
super if Chewy.enabled?
|
||||||
|
|
|
@ -122,7 +122,7 @@ module AccountSearch
|
||||||
tsquery = generate_query_for_search(terms)
|
tsquery = generate_query_for_search(terms)
|
||||||
|
|
||||||
find_by_sql([BASIC_SEARCH_SQL, { limit: limit, offset: offset, tsquery: tsquery }]).tap do |records|
|
find_by_sql([BASIC_SEARCH_SQL, { limit: limit, offset: offset, tsquery: tsquery }]).tap do |records|
|
||||||
ActiveRecord::Associations::Preloader.new(records: records, associations: :account_stat)
|
ActiveRecord::Associations::Preloader.new.preload(records, :account_stat)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ module AccountSearch
|
||||||
sql_template = following ? ADVANCED_SEARCH_WITH_FOLLOWING : ADVANCED_SEARCH_WITHOUT_FOLLOWING
|
sql_template = following ? ADVANCED_SEARCH_WITH_FOLLOWING : ADVANCED_SEARCH_WITHOUT_FOLLOWING
|
||||||
|
|
||||||
find_by_sql([sql_template, { id: account.id, limit: limit, offset: offset, tsquery: tsquery }]).tap do |records|
|
find_by_sql([sql_template, { id: account.id, limit: limit, offset: offset, tsquery: tsquery }]).tap do |records|
|
||||||
ActiveRecord::Associations::Preloader.new(records: records, associations: :account_stat)
|
ActiveRecord::Associations::Preloader.new.preload(records, :account_stat)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -4,41 +4,41 @@ module StatusSafeReblogInsert
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
class_methods do
|
class_methods do
|
||||||
# This patch overwrites the built-in ActiveRecord `_insert_record` method to
|
# This is a hack to ensure that no reblogs of discarded statuses are created,
|
||||||
# ensure that no reblogs of discarded statuses are created, as this cannot be
|
# as this cannot be enforced through database constraints the same way we do
|
||||||
# enforced through DB constraints the same way as reblogs of deleted statuses
|
# for reblogs of deleted statuses.
|
||||||
#
|
#
|
||||||
# We redefine the internal method responsible for issuing the `INSERT`
|
# To achieve this, we redefine the internal method responsible for issuing
|
||||||
# statement and replace the `INSERT INTO ... VALUES ...` query with an `INSERT
|
# the "INSERT" statement and replace the "INSERT INTO ... VALUES ..." query
|
||||||
# INTO ... SELECT ...` query with a `WHERE deleted_at IS NULL` clause on the
|
# with an "INSERT INTO ... SELECT ..." query with a "WHERE deleted_at IS NULL"
|
||||||
# reblogged status to ensure consistency at the database level.
|
# clause on the reblogged status to ensure consistency at the database level.
|
||||||
#
|
#
|
||||||
# The code is kept similar to ActiveRecord::Persistence code and calls it
|
# Otherwise, the code is kept as close as possible to ActiveRecord::Persistence
|
||||||
# directly when we are not handling a reblog.
|
# code, and actually calls it if we are not handling a reblog.
|
||||||
def _insert_record(values)
|
def _insert_record(values)
|
||||||
return super unless values.is_a?(Hash) && values['reblog_of_id']&.value.present?
|
return super unless values.is_a?(Hash) && values['reblog_of_id'].present?
|
||||||
|
|
||||||
primary_key = self.primary_key
|
primary_key = self.primary_key
|
||||||
primary_key_value = nil
|
primary_key_value = nil
|
||||||
|
|
||||||
if prefetch_primary_key? && primary_key
|
if primary_key
|
||||||
values[primary_key] ||= begin
|
primary_key_value = values[primary_key]
|
||||||
|
|
||||||
|
if !primary_key_value && prefetch_primary_key?
|
||||||
primary_key_value = next_sequence_value
|
primary_key_value = next_sequence_value
|
||||||
_default_attributes[primary_key].with_cast_value(primary_key_value)
|
values[primary_key] = primary_key_value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# The following line departs from stock ActiveRecord
|
# The following line is where we differ from stock ActiveRecord implementation
|
||||||
# Original code was:
|
|
||||||
# im.insert(values.transform_keys { |name| arel_table[name] })
|
|
||||||
# Instead, we use a custom builder when a reblog is happening:
|
|
||||||
im = _compile_reblog_insert(values)
|
im = _compile_reblog_insert(values)
|
||||||
|
|
||||||
connection.insert(im, "#{self} Create", primary_key || false, primary_key_value).tap do |result|
|
|
||||||
# Since we are using SELECT instead of VALUES, a non-error `nil` return is possible.
|
# Since we are using SELECT instead of VALUES, a non-error `nil` return is possible.
|
||||||
# For our purposes, it's equivalent to a foreign key constraint violation
|
# For our purposes, it's equivalent to a foreign key constraint violation
|
||||||
raise ActiveRecord::InvalidForeignKey, "(reblog_of_id)=(#{values['reblog_of_id'].value}) is not present in table \"statuses\"" if result.nil?
|
result = connection.insert(im, "#{self} Create", primary_key || false, primary_key_value)
|
||||||
end
|
raise ActiveRecord::InvalidForeignKey, "(reblog_of_id)=(#{values['reblog_of_id']}) is not present in table \"statuses\"" if result.nil?
|
||||||
|
|
||||||
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _compile_reblog_insert(values)
|
def _compile_reblog_insert(values)
|
||||||
|
@ -54,9 +54,9 @@ module StatusSafeReblogInsert
|
||||||
|
|
||||||
binds = []
|
binds = []
|
||||||
reblog_bind = nil
|
reblog_bind = nil
|
||||||
values.each do |name, attribute|
|
values.each do |name, value|
|
||||||
attr = arel_table[name]
|
attr = arel_table[name]
|
||||||
bind = predicate_builder.build_bind_attribute(attr.name, attribute.value)
|
bind = predicate_builder.build_bind_attribute(attr.name, value)
|
||||||
|
|
||||||
im.columns << attr
|
im.columns << attr
|
||||||
binds << bind
|
binds << bind
|
||||||
|
|
|
@ -111,7 +111,7 @@ class Notification < ApplicationRecord
|
||||||
|
|
||||||
# Instead of using the usual `includes`, manually preload each type.
|
# Instead of using the usual `includes`, manually preload each type.
|
||||||
# If polymorphic associations are loaded with the usual `includes`, other types of associations will be loaded more.
|
# If polymorphic associations are loaded with the usual `includes`, other types of associations will be loaded more.
|
||||||
ActiveRecord::Associations::Preloader.new(records: grouped_notifications, associations: associations)
|
ActiveRecord::Associations::Preloader.new.preload(grouped_notifications, associations)
|
||||||
end
|
end
|
||||||
|
|
||||||
unique_target_statuses = notifications.filter_map(&:target_status).uniq
|
unique_target_statuses = notifications.filter_map(&:target_status).uniq
|
||||||
|
|
|
@ -103,9 +103,7 @@ class Status < ApplicationRecord
|
||||||
scope :not_domain_blocked_by_account, ->(account) { account.excluded_from_timeline_domains.blank? ? left_outer_joins(:account) : left_outer_joins(:account).where('accounts.domain IS NULL OR accounts.domain NOT IN (?)', account.excluded_from_timeline_domains) }
|
scope :not_domain_blocked_by_account, ->(account) { account.excluded_from_timeline_domains.blank? ? left_outer_joins(:account) : left_outer_joins(:account).where('accounts.domain IS NULL OR accounts.domain NOT IN (?)', account.excluded_from_timeline_domains) }
|
||||||
scope :tagged_with_all, lambda { |tag_ids|
|
scope :tagged_with_all, lambda { |tag_ids|
|
||||||
Array(tag_ids).map(&:to_i).reduce(self) do |result, id|
|
Array(tag_ids).map(&:to_i).reduce(self) do |result, id|
|
||||||
result.where(<<~SQL.squish, tag_id: id)
|
result.joins("INNER JOIN statuses_tags t#{id} ON t#{id}.status_id = statuses.id AND t#{id}.tag_id = #{id}")
|
||||||
EXISTS(SELECT 1 FROM statuses_tags WHERE statuses_tags.status_id = statuses.id AND statuses_tags.tag_id = :tag_id)
|
|
||||||
SQL
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
scope :tagged_with_none, lambda { |tag_ids|
|
scope :tagged_with_none, lambda { |tag_ids|
|
||||||
|
|
|
@ -83,10 +83,7 @@ class InitialStateSerializer < ActiveModel::Serializer
|
||||||
def accounts
|
def accounts
|
||||||
store = {}
|
store = {}
|
||||||
|
|
||||||
ActiveRecord::Associations::Preloader.new(
|
ActiveRecord::Associations::Preloader.new.preload([object.current_account, object.admin, object.owner, object.disabled_account, object.moved_to_account].compact, [:account_stat, :user, { moved_to_account: [:account_stat, :user] }])
|
||||||
records: [object.current_account, object.admin, object.owner, object.disabled_account, object.moved_to_account].compact,
|
|
||||||
associations: [:account_stat, :user, { moved_to_account: [:account_stat, :user] }]
|
|
||||||
)
|
|
||||||
|
|
||||||
store[object.current_account.id.to_s] = ActiveModelSerializers::SerializableResource.new(object.current_account, serializer: REST::AccountSerializer) if object.current_account
|
store[object.current_account.id.to_s] = ActiveModelSerializers::SerializableResource.new(object.current_account, serializer: REST::AccountSerializer) if object.current_account
|
||||||
store[object.admin.id.to_s] = ActiveModelSerializers::SerializableResource.new(object.admin, serializer: REST::AccountSerializer) if object.admin
|
store[object.admin.id.to_s] = ActiveModelSerializers::SerializableResource.new(object.admin, serializer: REST::AccountSerializer) if object.admin
|
||||||
|
|
|
@ -33,7 +33,7 @@ class Web::NotificationSerializer < ActiveModel::Serializer
|
||||||
end
|
end
|
||||||
|
|
||||||
def body
|
def body
|
||||||
str = strip_tags(object.target_status&.spoiler_text.presence || object.target_status&.text || object.from_account.note)
|
str = strip_tags(object.target_status&.spoiler_text&.presence || object.target_status&.text || object.from_account.note)
|
||||||
truncate(HTMLEntities.new.decode(str.to_str), length: 140, escape: false) # Do not encode entities, since this value will not be used in HTML
|
truncate(HTMLEntities.new.decode(str.to_str), length: 140, escape: false) # Do not encode entities, since this value will not be used in HTML
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -93,7 +93,7 @@ class AccountSearchService < BaseService
|
||||||
.objects
|
.objects
|
||||||
.compact
|
.compact
|
||||||
|
|
||||||
ActiveRecord::Associations::Preloader.new(records: records, associations: :account_stat)
|
ActiveRecord::Associations::Preloader.new.preload(records, :account_stat)
|
||||||
|
|
||||||
records
|
records
|
||||||
rescue Faraday::ConnectionFailed, Parslet::ParseFailed
|
rescue Faraday::ConnectionFailed, Parslet::ParseFailed
|
||||||
|
|
|
@ -8,10 +8,7 @@ class BatchedRemoveStatusService < BaseService
|
||||||
# @param [Hash] options
|
# @param [Hash] options
|
||||||
# @option [Boolean] :skip_side_effects Do not modify feeds and send updates to streaming API
|
# @option [Boolean] :skip_side_effects Do not modify feeds and send updates to streaming API
|
||||||
def call(statuses, **options)
|
def call(statuses, **options)
|
||||||
ActiveRecord::Associations::Preloader.new(
|
ActiveRecord::Associations::Preloader.new.preload(statuses, options[:skip_side_effects] ? :reblogs : [:account, :tags, reblogs: :account])
|
||||||
records: statuses,
|
|
||||||
associations: options[:skip_side_effects] ? :reblogs : [:account, :tags, reblogs: :account]
|
|
||||||
)
|
|
||||||
|
|
||||||
statuses_and_reblogs = statuses.flat_map { |status| [status] + status.reblogs }
|
statuses_and_reblogs = statuses.flat_map { |status| [status] + status.reblogs }
|
||||||
|
|
||||||
|
@ -20,10 +17,7 @@ class BatchedRemoveStatusService < BaseService
|
||||||
# rely on direct visibility statuses being relatively rare.
|
# rely on direct visibility statuses being relatively rare.
|
||||||
statuses_with_account_conversations = statuses.select(&:direct_visibility?)
|
statuses_with_account_conversations = statuses.select(&:direct_visibility?)
|
||||||
|
|
||||||
ActiveRecord::Associations::Preloader.new(
|
ActiveRecord::Associations::Preloader.new.preload(statuses_with_account_conversations, [mentions: :account])
|
||||||
records: statuses_with_account_conversations,
|
|
||||||
associations: [mentions: :account]
|
|
||||||
)
|
|
||||||
|
|
||||||
statuses_with_account_conversations.each(&:unlink_from_conversations!)
|
statuses_with_account_conversations.each(&:unlink_from_conversations!)
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
- Trends::PreviewCardProviderFilter::KEYS.each do |key|
|
- Trends::PreviewCardProviderFilter::KEYS.each do |key|
|
||||||
= hidden_field_tag key, params[key] if params[key].present?
|
= hidden_field_tag key, params[key] if params[key].present?
|
||||||
|
|
||||||
.batch-table
|
.batch-table.optional
|
||||||
.batch-table__toolbar
|
.batch-table__toolbar
|
||||||
%label.batch-table__toolbar__select.batch-checkbox-all
|
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||||
= check_box_tag :batch_checkbox_all, nil, false
|
= check_box_tag :batch_checkbox_all, nil, false
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
= preload_pack_asset 'features/compose.js', crossorigin: 'anonymous'
|
= preload_pack_asset 'features/compose.js', crossorigin: 'anonymous'
|
||||||
= preload_pack_asset 'features/home_timeline.js', crossorigin: 'anonymous'
|
= preload_pack_asset 'features/home_timeline.js', crossorigin: 'anonymous'
|
||||||
= preload_pack_asset 'features/notifications.js', crossorigin: 'anonymous'
|
= preload_pack_asset 'features/notifications.js', crossorigin: 'anonymous'
|
||||||
%meta{ name: 'initialPath', content: request.path }
|
|
||||||
|
|
||||||
%meta{ name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key }
|
%meta{ name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key }
|
||||||
|
|
||||||
|
|
|
@ -60,15 +60,7 @@ require_relative '../lib/mastodon/redis_config'
|
||||||
module Mastodon
|
module Mastodon
|
||||||
class Application < Rails::Application
|
class Application < Rails::Application
|
||||||
# Initialize configuration defaults for originally generated Rails version.
|
# Initialize configuration defaults for originally generated Rails version.
|
||||||
config.load_defaults 7.0
|
config.load_defaults 6.1
|
||||||
|
|
||||||
# TODO: Release a version which uses the 7.0 defaults as specified above,
|
|
||||||
# but preserves the 6.1 cache format as set below. In a subsequent change,
|
|
||||||
# remove this line setting to 6.1 cache format, and then release another version.
|
|
||||||
# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#new-activesupport-cache-serialization-format
|
|
||||||
# https://github.com/mastodon/mastodon/pull/24241#discussion_r1162890242
|
|
||||||
config.active_support.cache_format_version = 6.1
|
|
||||||
|
|
||||||
config.add_autoload_paths_to_load_path = false
|
config.add_autoload_paths_to_load_path = false
|
||||||
|
|
||||||
# Settings in config/environments/* take precedence over those specified here.
|
# Settings in config/environments/* take precedence over those specified here.
|
||||||
|
|
|
@ -1,5 +1,28 @@
|
||||||
{
|
{
|
||||||
"ignored_warnings": [
|
"ignored_warnings": [
|
||||||
|
{
|
||||||
|
"warning_type": "SQL Injection",
|
||||||
|
"warning_code": 0,
|
||||||
|
"fingerprint": "19df3740b8d02a9fe0eb52c939b4b87d3a2a591162a6adfa8d64e9c26aeebe6d",
|
||||||
|
"check_name": "SQL",
|
||||||
|
"message": "Possible SQL injection",
|
||||||
|
"file": "app/models/status.rb",
|
||||||
|
"line": 106,
|
||||||
|
"link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
|
||||||
|
"code": "result.joins(\"INNER JOIN statuses_tags t#{id} ON t#{id}.status_id = statuses.id AND t#{id}.tag_id = #{id}\")",
|
||||||
|
"render_path": null,
|
||||||
|
"location": {
|
||||||
|
"type": "method",
|
||||||
|
"class": "Status",
|
||||||
|
"method": null
|
||||||
|
},
|
||||||
|
"user_input": "id",
|
||||||
|
"confidence": "Weak",
|
||||||
|
"cwe_id": [
|
||||||
|
89
|
||||||
|
],
|
||||||
|
"note": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"warning_type": "Cross-Site Scripting",
|
"warning_type": "Cross-Site Scripting",
|
||||||
"warning_code": 2,
|
"warning_code": 2,
|
||||||
|
@ -183,6 +206,6 @@
|
||||||
"note": ""
|
"note": ""
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"updated": "2023-07-12 11:20:51 -0400",
|
"updated": "2023-07-11 16:08:58 +0200",
|
||||||
"brakeman_version": "6.0.0"
|
"brakeman_version": "6.0.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,23 +8,41 @@ default: &default
|
||||||
application_name: ''
|
application_name: ''
|
||||||
|
|
||||||
development:
|
development:
|
||||||
|
primary:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: <%= ENV['DB_NAME'] || 'mastodon_development' %>
|
database: <%= ENV['DB_NAME'] || 'mastodon_development' %>
|
||||||
username: <%= ENV['DB_USER'] %>
|
username: <%= ENV['DB_USER'] %>
|
||||||
password: <%= (ENV['DB_PASS'] || '').to_json %>
|
password: <%= (ENV['DB_PASS'] || '').to_json %>
|
||||||
host: <%= ENV['DB_HOST'] %>
|
host: <%= ENV['DB_HOST'] %>
|
||||||
port: <%= ENV['DB_PORT'] %>
|
port: <%= ENV['DB_PORT'] %>
|
||||||
|
read:
|
||||||
|
<<: *default
|
||||||
|
database: <%= ENV['DB_NAME'] || 'mastodon_development' %>
|
||||||
|
username: <%= ENV['DB_USER'] %>
|
||||||
|
password: <%= (ENV['DB_PASS'] || '').to_json %>
|
||||||
|
host: <%= ENV['DB_HOST'] %>
|
||||||
|
port: <%= ENV['DB_PORT'] %>
|
||||||
|
replica: true
|
||||||
|
|
||||||
# Warning: The database defined as "test" will be erased and
|
# Warning: The database defined as "test" will be erased and
|
||||||
# re-generated from your development database when you run "rake".
|
# re-generated from your development database when you run "rake".
|
||||||
# Do not set this db to the same as development or production.
|
# Do not set this db to the same as development or production.
|
||||||
test:
|
test:
|
||||||
|
primary:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: <%= ENV['DB_NAME'] || 'mastodon' %>_test<%= ENV['TEST_ENV_NUMBER'] %>
|
database: <%= ENV['DB_NAME'] || 'mastodon' %>_test<%= ENV['TEST_ENV_NUMBER'] %>
|
||||||
username: <%= ENV['DB_USER'] %>
|
username: <%= ENV['DB_USER'] %>
|
||||||
password: <%= (ENV['DB_PASS'] || '').to_json %>
|
password: <%= (ENV['DB_PASS'] || '').to_json %>
|
||||||
host: <%= ENV['DB_HOST'] %>
|
host: <%= ENV['DB_HOST'] %>
|
||||||
port: <%= ENV['DB_PORT'] %>
|
port: <%= ENV['DB_PORT'] %>
|
||||||
|
read:
|
||||||
|
<<: *default
|
||||||
|
database: <%= ENV['DB_NAME'] || 'mastodon' %>_test<%= ENV['TEST_ENV_NUMBER'] %>
|
||||||
|
username: <%= ENV['DB_USER'] %>
|
||||||
|
password: <%= (ENV['DB_PASS'] || '').to_json %>
|
||||||
|
host: <%= ENV['DB_HOST'] %>
|
||||||
|
port: <%= ENV['DB_PORT'] %>
|
||||||
|
replica: true
|
||||||
|
|
||||||
production:
|
production:
|
||||||
primary:
|
primary:
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'active_support/core_ext/integer/time'
|
|
||||||
|
|
||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# In the development environment your application's code is reloaded any time
|
# In the development environment your application's code is reloaded on
|
||||||
# it changes. This slows down response time but is perfect for development
|
# every request. This slows down response time but is perfect for development
|
||||||
# since you don't have to restart the web server when you make code changes.
|
# since you don't have to restart the web server when you make code changes.
|
||||||
config.cache_classes = false
|
config.cache_classes = false
|
||||||
|
|
||||||
|
@ -16,22 +14,13 @@ Rails.application.configure do
|
||||||
# Show full error reports.
|
# Show full error reports.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
|
|
||||||
# Enable server timing
|
|
||||||
config.server_timing = true
|
|
||||||
|
|
||||||
# Enable/disable caching. By default caching is disabled.
|
# Enable/disable caching. By default caching is disabled.
|
||||||
# Run rails dev:cache to toggle caching.
|
# Run rails dev:cache to toggle caching.
|
||||||
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
config.action_controller.enable_fragment_cache_logging = true
|
|
||||||
|
|
||||||
config.cache_store = :redis_cache_store, REDIS_CACHE_PARAMS
|
config.cache_store = :redis_cache_store, REDIS_CACHE_PARAMS
|
||||||
config.public_file_server.headers = {
|
|
||||||
'Cache-Control' => "public, max-age=#{2.days.to_i}",
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
config.cache_store = :null_store
|
config.cache_store = :null_store
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -54,19 +43,12 @@ Rails.application.configure do
|
||||||
# Print deprecation notices to the Rails logger.
|
# Print deprecation notices to the Rails logger.
|
||||||
config.active_support.deprecation = :log
|
config.active_support.deprecation = :log
|
||||||
|
|
||||||
# Raise exceptions for disallowed deprecations.
|
|
||||||
config.active_support.disallowed_deprecation = :raise
|
|
||||||
|
|
||||||
# Tell Active Support which deprecation messages to disallow.
|
|
||||||
config.active_support.disallowed_deprecation_warnings = []
|
|
||||||
|
|
||||||
# Raise an error on page load if there are pending migrations.
|
# Raise an error on page load if there are pending migrations.
|
||||||
config.active_record.migration_error = :page_load
|
config.active_record.migration_error = :page_load
|
||||||
|
|
||||||
# Highlight code that triggered database queries in logs.
|
|
||||||
config.active_record.verbose_query_logs = true
|
|
||||||
|
|
||||||
# Debug mode disables concatenation and preprocessing of assets.
|
# Debug mode disables concatenation and preprocessing of assets.
|
||||||
|
# This option may cause significant delays in view rendering with a large
|
||||||
|
# number of complex assets.
|
||||||
config.assets.debug = true
|
config.assets.debug = true
|
||||||
|
|
||||||
# Suppress logger output for asset requests.
|
# Suppress logger output for asset requests.
|
||||||
|
@ -77,14 +59,12 @@ Rails.application.configure do
|
||||||
# Raises helpful error messages.
|
# Raises helpful error messages.
|
||||||
config.assets.raise_runtime_errors = true
|
config.assets.raise_runtime_errors = true
|
||||||
|
|
||||||
# Raises error for missing translations.
|
# Raises error for missing translations
|
||||||
# config.i18n.raise_on_missing_translations = true
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
|
||||||
# Annotate rendered view with file names.
|
# Use an evented file watcher to asynchronously detect changes in source code,
|
||||||
# config.action_view.annotate_rendered_view_with_filenames = true
|
# routes, locales, etc. This feature depends on the listen gem.
|
||||||
|
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
||||||
# Uncomment if you wish to allow Action Cable access from any origin.
|
|
||||||
# config.action_cable.disable_request_forgery_protection = true
|
|
||||||
|
|
||||||
config.action_mailer.default_options = { from: 'notifications@localhost' }
|
config.action_mailer.default_options = { from: 'notifications@localhost' }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "active_support/core_ext/integer/time"
|
|
||||||
|
|
||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
|
@ -23,24 +21,20 @@ Rails.application.configure do
|
||||||
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
||||||
# config.require_master_key = true
|
# config.require_master_key = true
|
||||||
|
|
||||||
# Compress CSS using a preprocessor.
|
ActiveSupport::Logger.new(STDOUT).tap do |logger|
|
||||||
# config.assets.css_compressor = :sass
|
logger.formatter = config.log_formatter
|
||||||
|
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
||||||
|
end
|
||||||
|
|
||||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||||
config.assets.compile = false
|
config.assets.compile = false
|
||||||
|
|
||||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
|
||||||
# config.asset_host = "http://assets.example.com"
|
|
||||||
|
|
||||||
# Specifies the header that your server uses for sending files.
|
# Specifies the header that your server uses for sending files.
|
||||||
config.action_dispatch.x_sendfile_header = ENV['SENDFILE_HEADER'] if ENV['SENDFILE_HEADER'].present?
|
config.action_dispatch.x_sendfile_header = ENV['SENDFILE_HEADER'] if ENV['SENDFILE_HEADER'].present?
|
||||||
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
|
|
||||||
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
|
|
||||||
|
|
||||||
# Allow to specify public IP of reverse proxy if it's needed
|
# Allow to specify public IP of reverse proxy if it's needed
|
||||||
config.action_dispatch.trusted_proxies = ENV['TRUSTED_PROXY_IP'].split(/(?:\s*,\s*|\s+)/).map { |item| IPAddr.new(item) } if ENV['TRUSTED_PROXY_IP'].present?
|
config.action_dispatch.trusted_proxies = ENV['TRUSTED_PROXY_IP'].split(/(?:\s*,\s*|\s+)/).map { |item| IPAddr.new(item) } if ENV['TRUSTED_PROXY_IP'].present?
|
||||||
|
|
||||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
|
||||||
config.force_ssl = true
|
config.force_ssl = true
|
||||||
config.ssl_options = {
|
config.ssl_options = {
|
||||||
redirect: {
|
redirect: {
|
||||||
|
@ -48,8 +42,6 @@ Rails.application.configure do
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Include generic and useful information about system operation, but avoid logging too much
|
|
||||||
# information to avoid inadvertent exposure of personally identifiable information (PII).
|
|
||||||
# Use the lowest log level to ensure availability of diagnostic information
|
# Use the lowest log level to ensure availability of diagnostic information
|
||||||
# when problems arise.
|
# when problems arise.
|
||||||
config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info').to_sym
|
config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info').to_sym
|
||||||
|
@ -60,12 +52,6 @@ Rails.application.configure do
|
||||||
# Use a different cache store in production.
|
# Use a different cache store in production.
|
||||||
config.cache_store = :redis_cache_store, REDIS_CACHE_PARAMS
|
config.cache_store = :redis_cache_store, REDIS_CACHE_PARAMS
|
||||||
|
|
||||||
# Use a real queuing backend for Active Job (and separate queues per environment).
|
|
||||||
# config.active_job.queue_adapter = :resque
|
|
||||||
# config.active_job.queue_name_prefix = "mastodon_production"
|
|
||||||
|
|
||||||
config.action_mailer.perform_caching = false
|
|
||||||
|
|
||||||
# Ignore bad email addresses and do not raise email delivery errors.
|
# Ignore bad email addresses and do not raise email delivery errors.
|
||||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||||
# config.action_mailer.raise_delivery_errors = false
|
# config.action_mailer.raise_delivery_errors = false
|
||||||
|
@ -89,15 +75,6 @@ Rails.application.configure do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Use a different logger for distributed setups.
|
|
||||||
# require "syslog/logger"
|
|
||||||
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
|
|
||||||
|
|
||||||
ActiveSupport::Logger.new(STDOUT).tap do |logger|
|
|
||||||
logger.formatter = config.log_formatter
|
|
||||||
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
|
||||||
end
|
|
||||||
|
|
||||||
# Do not dump schema after migrations.
|
# Do not dump schema after migrations.
|
||||||
config.active_record.dump_schema_after_migration = false
|
config.active_record.dump_schema_after_migration = false
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,27 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'active_support/core_ext/integer/time'
|
Rails.application.configure do
|
||||||
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# The test environment is used exclusively to run your application's
|
# The test environment is used exclusively to run your application's
|
||||||
# test suite. You never need to work with it otherwise. Remember that
|
# test suite. You never need to work with it otherwise. Remember that
|
||||||
# your test database is "scratch space" for the test suite and is wiped
|
# your test database is "scratch space" for the test suite and is wiped
|
||||||
# and recreated between test runs. Don't rely on the data there!
|
# and recreated between test runs. Don't rely on the data there!
|
||||||
|
|
||||||
Rails.application.configure do
|
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
|
||||||
|
|
||||||
# Turn false under Spring and add config.action_view.cache_template_loading = true.
|
|
||||||
config.cache_classes = true
|
config.cache_classes = true
|
||||||
|
|
||||||
# Eager loading loads your whole application. When running a single test locally,
|
# Do not eager load code on boot. This avoids loading your whole application
|
||||||
# this probably isn't necessary. It's a good idea to do in a continuous integration
|
# just for the purpose of running a single test. If you are using a tool that
|
||||||
# system, or in some way before deploying your code.
|
# preloads Rails for running tests, you may have to set it to true.
|
||||||
config.eager_load = ENV['CI'].present?
|
config.eager_load = false
|
||||||
|
|
||||||
config.assets_digest = false
|
config.assets.digest = false
|
||||||
|
|
||||||
# Show full error reports and disable caching.
|
# Show full error reports and disable caching.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
|
# The default store, file_store is shared by processes parallelly executed
|
||||||
|
# and should not be used.
|
||||||
config.cache_store = :memory_store
|
config.cache_store = :memory_store
|
||||||
|
|
||||||
# Raise exceptions instead of rendering exception templates.
|
# Raise exceptions instead of rendering exception templates.
|
||||||
|
@ -30,7 +29,6 @@ Rails.application.configure do
|
||||||
|
|
||||||
# Disable request forgery protection in test environment.
|
# Disable request forgery protection in test environment.
|
||||||
config.action_controller.allow_forgery_protection = false
|
config.action_controller.allow_forgery_protection = false
|
||||||
|
|
||||||
config.action_mailer.perform_caching = false
|
config.action_mailer.perform_caching = false
|
||||||
|
|
||||||
config.action_mailer.default_options = { from: 'notifications@localhost' }
|
config.action_mailer.default_options = { from: 'notifications@localhost' }
|
||||||
|
@ -50,8 +48,8 @@ Rails.application.configure do
|
||||||
config.x.vapid_private_key = vapid_key.private_key
|
config.x.vapid_private_key = vapid_key.private_key
|
||||||
config.x.vapid_public_key = vapid_key.public_key
|
config.x.vapid_public_key = vapid_key.public_key
|
||||||
|
|
||||||
# Raise exceptions for disallowed deprecations.
|
# Raises error for missing translations
|
||||||
config.active_support.disallowed_deprecation = :raise
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
|
||||||
config.i18n.default_locale = :en
|
config.i18n.default_locale = :en
|
||||||
config.i18n.fallbacks = true
|
config.i18n.fallbacks = true
|
||||||
|
@ -61,15 +59,6 @@ Rails.application.configure do
|
||||||
# Ref: https://github.com/mastodon/mastodon/issues/23644
|
# Ref: https://github.com/mastodon/mastodon/issues/23644
|
||||||
10.times { |i| Status.allocate.instance_variable_set(:"@ivar_#{i}", nil) }
|
10.times { |i| Status.allocate.instance_variable_set(:"@ivar_#{i}", nil) }
|
||||||
end
|
end
|
||||||
|
|
||||||
# Tell Active Support which deprecation messages to disallow.
|
|
||||||
config.active_support.disallowed_deprecation_warnings = []
|
|
||||||
|
|
||||||
# Raises error for missing translations.
|
|
||||||
# config.i18n.raise_on_missing_translations = true
|
|
||||||
|
|
||||||
# Annotate rendered view with file names.
|
|
||||||
# config.action_view.annotate_rendered_view_with_filenames = true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Paperclip::Attachment.default_options[:path] = Rails.root.join('spec', 'test_files', ':class', ':id_partition', ':style.:extension')
|
Paperclip::Attachment.default_options[:path] = Rails.root.join('spec', 'test_files', ':class', ':id_partition', ':style.:extension')
|
||||||
|
|
|
@ -5,12 +5,11 @@
|
||||||
# Version of your assets, change this if you want to expire all your assets.
|
# Version of your assets, change this if you want to expire all your assets.
|
||||||
Rails.application.config.assets.version = '1.0'
|
Rails.application.config.assets.version = '1.0'
|
||||||
|
|
||||||
# Add additional assets to the asset load path.
|
# Add additional assets to the asset load path
|
||||||
# Rails.application.config.assets.paths << Emoji.images_path
|
# Rails.application.config.assets.paths << 'node_modules'
|
||||||
|
|
||||||
# Precompile additional assets.
|
# Precompile additional assets.
|
||||||
# application.js, application.css, and all non-JS/CSS in the app/assets
|
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||||
# folder are already added.
|
# Rails.application.config.assets.precompile += %w()
|
||||||
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
|
|
||||||
|
|
||||||
Rails.application.config.assets.initialize_on_precompile = true
|
Rails.application.config.assets.initialize_on_precompile = true
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
Rails.application.config.after_initialize do
|
|
||||||
Rails.application.config.action_dispatch.cookies_rotations.tap do |cookies|
|
|
||||||
authenticated_encrypted_cookie_salt = Rails.application.config.action_dispatch.authenticated_encrypted_cookie_salt
|
|
||||||
signed_cookie_salt = Rails.application.config.action_dispatch.signed_cookie_salt
|
|
||||||
|
|
||||||
secret_key_base = Rails.application.secret_key_base
|
|
||||||
|
|
||||||
key_generator = ActiveSupport::KeyGenerator.new(
|
|
||||||
secret_key_base, iterations: 1000, hash_digest_class: OpenSSL::Digest::SHA1
|
|
||||||
)
|
|
||||||
key_len = ActiveSupport::MessageEncryptor.key_len
|
|
||||||
|
|
||||||
old_encrypted_secret = key_generator.generate_key(authenticated_encrypted_cookie_salt, key_len)
|
|
||||||
old_signed_secret = key_generator.generate_key(signed_cookie_salt)
|
|
||||||
|
|
||||||
cookies.rotate :encrypted, old_encrypted_secret
|
|
||||||
cookies.rotate :signed, old_signed_secret
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -2,9 +2,5 @@
|
||||||
|
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Configure parameters to be filtered from the log file. Use this to limit dissemination of
|
# Configure sensitive parameters which will be filtered from the log file.
|
||||||
# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
|
Rails.application.config.filter_parameters += [:password, :private_key, :public_key, :otp_attempt]
|
||||||
# notations and behaviors.
|
|
||||||
Rails.application.config.filter_parameters += [
|
|
||||||
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
|
||||||
]
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
# TODO
|
|
||||||
# The Rails 7.0 framework default here is to set this true. However, we have a
|
|
||||||
# location in devise that redirects where we don't have an easy ability to
|
|
||||||
# override a method or set a config option, but where the redirect does not
|
|
||||||
# provide this option.
|
|
||||||
# https://github.com/heartcombo/devise/blob/v4.9.2/app/controllers/devise/confirmations_controller.rb#L28
|
|
||||||
# Once a solution is found, this line can be removed.
|
|
||||||
Rails.application.config.action_controller.raise_on_open_redirects = false
|
|
|
@ -30,7 +30,6 @@ Rails.application.routes.draw do
|
||||||
/mutes
|
/mutes
|
||||||
/followed_tags
|
/followed_tags
|
||||||
/statuses/(*any)
|
/statuses/(*any)
|
||||||
/deck/(*any)
|
|
||||||
).freeze
|
).freeze
|
||||||
|
|
||||||
root 'home#index'
|
root 'home#index'
|
||||||
|
|
|
@ -296,7 +296,7 @@ namespace :api, format: false do
|
||||||
|
|
||||||
namespace :web do
|
namespace :web do
|
||||||
resource :settings, only: [:update]
|
resource :settings, only: [:update]
|
||||||
resources :embeds, only: [:show]
|
resource :embed, only: [:create]
|
||||||
resources :push_subscriptions, only: [:create] do
|
resources :push_subscriptions, only: [:create] do
|
||||||
member do
|
member do
|
||||||
put :update
|
put :update
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[6.1].define(version: 2023_07_02_151753) do
|
ActiveRecord::Schema.define(version: 2023_07_02_151753) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
11
package.json
11
package.json
|
@ -44,7 +44,7 @@
|
||||||
"@formatjs/intl-pluralrules": "^5.2.2",
|
"@formatjs/intl-pluralrules": "^5.2.2",
|
||||||
"@gamestdio/websocket": "^0.3.2",
|
"@gamestdio/websocket": "^0.3.2",
|
||||||
"@github/webauthn-json": "^2.1.1",
|
"@github/webauthn-json": "^2.1.1",
|
||||||
"@rails/ujs": "^7.0.6",
|
"@rails/ujs": "^6.1.7",
|
||||||
"@reduxjs/toolkit": "^1.9.5",
|
"@reduxjs/toolkit": "^1.9.5",
|
||||||
"abortcontroller-polyfill": "^1.7.5",
|
"abortcontroller-polyfill": "^1.7.5",
|
||||||
"arrow-key-navigation": "^1.2.0",
|
"arrow-key-navigation": "^1.2.0",
|
||||||
|
@ -106,7 +106,6 @@
|
||||||
"react-overlays": "^5.2.1",
|
"react-overlays": "^5.2.1",
|
||||||
"react-redux": "^8.0.4",
|
"react-redux": "^8.0.4",
|
||||||
"react-redux-loading-bar": "^5.0.4",
|
"react-redux-loading-bar": "^5.0.4",
|
||||||
"react-router": "^4.3.1",
|
|
||||||
"react-router-dom": "^4.1.1",
|
"react-router-dom": "^4.1.1",
|
||||||
"react-router-scroll-4": "^1.0.0-beta.1",
|
"react-router-scroll-4": "^1.0.0-beta.1",
|
||||||
"react-select": "^5.7.3",
|
"react-select": "^5.7.3",
|
||||||
|
@ -182,8 +181,8 @@
|
||||||
"@types/uuid": "^9.0.0",
|
"@types/uuid": "^9.0.0",
|
||||||
"@types/webpack": "^4.41.33",
|
"@types/webpack": "^4.41.33",
|
||||||
"@types/yargs": "^17.0.24",
|
"@types/yargs": "^17.0.24",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
||||||
"@typescript-eslint/parser": "^6.0.0",
|
"@typescript-eslint/parser": "^5.59.8",
|
||||||
"babel-jest": "^29.5.0",
|
"babel-jest": "^29.5.0",
|
||||||
"eslint": "^8.41.0",
|
"eslint": "^8.41.0",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "^8.8.0",
|
||||||
|
@ -192,7 +191,7 @@
|
||||||
"eslint-plugin-import": "~2.27.5",
|
"eslint-plugin-import": "~2.27.5",
|
||||||
"eslint-plugin-jsdoc": "^46.1.0",
|
"eslint-plugin-jsdoc": "^46.1.0",
|
||||||
"eslint-plugin-jsx-a11y": "~6.7.1",
|
"eslint-plugin-jsx-a11y": "~6.7.1",
|
||||||
"eslint-plugin-prettier": "^5.0.0",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"eslint-plugin-promise": "~6.1.1",
|
"eslint-plugin-promise": "~6.1.1",
|
||||||
"eslint-plugin-react": "~7.32.2",
|
"eslint-plugin-react": "~7.32.2",
|
||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
|
@ -200,7 +199,7 @@
|
||||||
"jest": "^29.5.0",
|
"jest": "^29.5.0",
|
||||||
"jest-environment-jsdom": "^29.5.0",
|
"jest-environment-jsdom": "^29.5.0",
|
||||||
"lint-staged": "^13.2.2",
|
"lint-staged": "^13.2.2",
|
||||||
"prettier": "^3.0.0",
|
"prettier": "^2.8.8",
|
||||||
"react-test-renderer": "^18.2.0",
|
"react-test-renderer": "^18.2.0",
|
||||||
"stylelint": "^15.10.1",
|
"stylelint": "^15.10.1",
|
||||||
"stylelint-config-standard-scss": "^10.0.0",
|
"stylelint-config-standard-scss": "^10.0.0",
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
describe Api::Web::EmbedsController do
|
||||||
|
render_views
|
||||||
|
|
||||||
|
let(:user) { Fabricate(:user) }
|
||||||
|
|
||||||
|
before { sign_in user }
|
||||||
|
|
||||||
|
describe 'POST #create' do
|
||||||
|
subject(:body) { JSON.parse(response.body, symbolize_names: true) }
|
||||||
|
|
||||||
|
let(:response) { post :create, params: { url: url } }
|
||||||
|
|
||||||
|
context 'when successfully finds status' do
|
||||||
|
let(:status) { Fabricate(:status) }
|
||||||
|
let(:url) { "http://#{Rails.configuration.x.web_domain}/@#{status.account.username}/#{status.id}" }
|
||||||
|
|
||||||
|
it 'returns a right response' do
|
||||||
|
expect(response).to have_http_status 200
|
||||||
|
expect(body[:author_name]).to eq status.account.username
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when fails to find status' do
|
||||||
|
let(:url) { 'https://host.test/oembed.html' }
|
||||||
|
let(:service_instance) { instance_double(FetchOEmbedService) }
|
||||||
|
|
||||||
|
before do
|
||||||
|
allow(FetchOEmbedService).to receive(:new) { service_instance }
|
||||||
|
allow(service_instance).to receive(:call) { call_result }
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when successfully fetching oembed' do
|
||||||
|
let(:call_result) { { result: :ok } }
|
||||||
|
|
||||||
|
it 'returns a right response' do
|
||||||
|
expect(response).to have_http_status 200
|
||||||
|
expect(body[:result]).to eq 'ok'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when fails to fetch oembed' do
|
||||||
|
let(:call_result) { nil }
|
||||||
|
|
||||||
|
it 'returns a right response' do
|
||||||
|
expect(response).to have_http_status 404
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,161 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require 'rails_helper'
|
|
||||||
|
|
||||||
RSpec.describe '/api/web/embed' do
|
|
||||||
subject { get "/api/web/embeds/#{id}", headers: headers }
|
|
||||||
|
|
||||||
context 'when accessed anonymously' do
|
|
||||||
let(:headers) { {} }
|
|
||||||
|
|
||||||
context 'when the requested status is local' do
|
|
||||||
let(:id) { status.id }
|
|
||||||
|
|
||||||
context 'when the requested status is public' do
|
|
||||||
let(:status) { Fabricate(:status, visibility: :public) }
|
|
||||||
|
|
||||||
it 'returns JSON with an html attribute' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to have_http_status(200)
|
|
||||||
expect(body_as_json[:html]).to be_present
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when the requested status is private' do
|
|
||||||
let(:status) { Fabricate(:status, visibility: :private) }
|
|
||||||
|
|
||||||
it 'returns http not found' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to have_http_status(404)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when the requested status is remote' do
|
|
||||||
let(:remote_account) { Fabricate(:account, domain: 'example.com') }
|
|
||||||
let(:status) { Fabricate(:status, visibility: :public, account: remote_account, url: 'https://example.com/statuses/1') }
|
|
||||||
let(:id) { status.id }
|
|
||||||
|
|
||||||
it 'returns http not found' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to have_http_status(404)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when the requested status does not exist' do
|
|
||||||
let(:id) { -1 }
|
|
||||||
|
|
||||||
it 'returns http not found' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to have_http_status(404)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with an API token' do
|
|
||||||
let(:user) { Fabricate(:user) }
|
|
||||||
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') }
|
|
||||||
let(:headers) { { 'Authorization' => "Bearer #{token.token}" } }
|
|
||||||
|
|
||||||
context 'when the requested status is local' do
|
|
||||||
let(:id) { status.id }
|
|
||||||
|
|
||||||
context 'when the requested status is public' do
|
|
||||||
let(:status) { Fabricate(:status, visibility: :public) }
|
|
||||||
|
|
||||||
it 'returns JSON with an html attribute' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to have_http_status(200)
|
|
||||||
expect(body_as_json[:html]).to be_present
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when the requesting user is blocked' do
|
|
||||||
before do
|
|
||||||
status.account.block!(user.account)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'returns http not found' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to have_http_status(404)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when the requested status is private' do
|
|
||||||
let(:status) { Fabricate(:status, visibility: :private) }
|
|
||||||
|
|
||||||
before do
|
|
||||||
user.account.follow!(status.account)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'returns http not found' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to have_http_status(404)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when the requested status is remote' do
|
|
||||||
let(:remote_account) { Fabricate(:account, domain: 'example.com') }
|
|
||||||
let(:status) { Fabricate(:status, visibility: :public, account: remote_account, url: 'https://example.com/statuses/1') }
|
|
||||||
let(:id) { status.id }
|
|
||||||
|
|
||||||
let(:service_instance) { instance_double(FetchOEmbedService) }
|
|
||||||
|
|
||||||
before do
|
|
||||||
allow(FetchOEmbedService).to receive(:new) { service_instance }
|
|
||||||
allow(service_instance).to receive(:call) { call_result }
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when the requesting user is blocked' do
|
|
||||||
before do
|
|
||||||
status.account.block!(user.account)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'returns http not found' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to have_http_status(404)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when successfully fetching OEmbed' do
|
|
||||||
let(:call_result) { { html: 'ok' } }
|
|
||||||
|
|
||||||
it 'returns JSON with an html attribute' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to have_http_status(200)
|
|
||||||
expect(body_as_json[:html]).to be_present
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when failing to fetch OEmbed' do
|
|
||||||
let(:call_result) { nil }
|
|
||||||
|
|
||||||
it 'returns http not found' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to have_http_status(404)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when the requested status does not exist' do
|
|
||||||
let(:id) { -1 }
|
|
||||||
|
|
||||||
it 'returns http not found' do
|
|
||||||
subject
|
|
||||||
|
|
||||||
expect(response).to have_http_status(404)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
227
yarn.lock
227
yarn.lock
|
@ -1245,14 +1245,14 @@
|
||||||
esquery "^1.5.0"
|
esquery "^1.5.0"
|
||||||
jsdoc-type-pratt-parser "~4.0.0"
|
jsdoc-type-pratt-parser "~4.0.0"
|
||||||
|
|
||||||
"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.3.0":
|
"@eslint-community/eslint-utils@^4.2.0":
|
||||||
version "4.4.0"
|
version "4.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
|
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
|
||||||
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
|
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint-visitor-keys "^3.3.0"
|
eslint-visitor-keys "^3.3.0"
|
||||||
|
|
||||||
"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.5.0":
|
"@eslint-community/regexpp@^4.4.0":
|
||||||
version "4.5.1"
|
version "4.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.1.tgz#cdd35dce4fa1a89a4fd42b1599eb35b3af408884"
|
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.1.tgz#cdd35dce4fa1a89a4fd42b1599eb35b3af408884"
|
||||||
integrity sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==
|
integrity sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==
|
||||||
|
@ -1754,10 +1754,10 @@
|
||||||
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f"
|
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f"
|
||||||
integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==
|
integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==
|
||||||
|
|
||||||
"@rails/ujs@^7.0.6":
|
"@rails/ujs@^6.1.7":
|
||||||
version "7.0.6"
|
version "6.1.7"
|
||||||
resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-7.0.6.tgz#fd8937c92335f3da9495e07292511ad5f7547a6a"
|
resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.1.7.tgz#b09dc5b2105dd267e8374c47e4490240451dc7f6"
|
||||||
integrity sha512-s5v3AC6AywOIFMz0RIMW83Xc8FPIvKMkP3ZHFlM4ISNkhdUwP9HdhVtxxo6z3dIhe9vI0Our2A8kN/QpUV02Qg==
|
integrity sha512-0e7WQ4LE/+LEfW2zfAw9ppsB6A8RmxbdAUPAF++UT80epY+7emuQDkKXmaK0a9lp6An50RvzezI0cIQjp1A58w==
|
||||||
|
|
||||||
"@redis/bloom@1.2.0":
|
"@redis/bloom@1.2.0":
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
|
@ -2115,7 +2115,7 @@
|
||||||
"@types/tough-cookie" "*"
|
"@types/tough-cookie" "*"
|
||||||
parse5 "^7.0.0"
|
parse5 "^7.0.0"
|
||||||
|
|
||||||
"@types/json-schema@*", "@types/json-schema@^7.0.11", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8":
|
"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9":
|
||||||
version "7.0.12"
|
version "7.0.12"
|
||||||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb"
|
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb"
|
||||||
integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==
|
integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==
|
||||||
|
@ -2468,63 +2468,59 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/yargs-parser" "*"
|
"@types/yargs-parser" "*"
|
||||||
|
|
||||||
"@typescript-eslint/eslint-plugin@^6.0.0":
|
"@typescript-eslint/eslint-plugin@^5.59.8":
|
||||||
version "6.0.0"
|
version "5.59.11"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.0.0.tgz#19ff4f1cab8d6f8c2c1825150f7a840bc5d9bdc4"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.11.tgz#8d466aa21abea4c3f37129997b198d141f09e76f"
|
||||||
integrity sha512-xuv6ghKGoiq856Bww/yVYnXGsKa588kY3M0XK7uUW/3fJNNULKRfZfSBkMTSpqGG/8ZCXCadfh8G/z/B4aqS/A==
|
integrity sha512-XxuOfTkCUiOSyBWIvHlUraLw/JT/6Io1365RO6ZuI88STKMavJZPNMU0lFcUTeQXEhHiv64CbxYxBNoDVSmghg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@eslint-community/regexpp" "^4.5.0"
|
"@eslint-community/regexpp" "^4.4.0"
|
||||||
"@typescript-eslint/scope-manager" "6.0.0"
|
"@typescript-eslint/scope-manager" "5.59.11"
|
||||||
"@typescript-eslint/type-utils" "6.0.0"
|
"@typescript-eslint/type-utils" "5.59.11"
|
||||||
"@typescript-eslint/utils" "6.0.0"
|
"@typescript-eslint/utils" "5.59.11"
|
||||||
"@typescript-eslint/visitor-keys" "6.0.0"
|
|
||||||
debug "^4.3.4"
|
debug "^4.3.4"
|
||||||
grapheme-splitter "^1.0.4"
|
grapheme-splitter "^1.0.4"
|
||||||
graphemer "^1.4.0"
|
ignore "^5.2.0"
|
||||||
ignore "^5.2.4"
|
|
||||||
natural-compare "^1.4.0"
|
|
||||||
natural-compare-lite "^1.4.0"
|
natural-compare-lite "^1.4.0"
|
||||||
semver "^7.5.0"
|
semver "^7.3.7"
|
||||||
ts-api-utils "^1.0.1"
|
tsutils "^3.21.0"
|
||||||
|
|
||||||
"@typescript-eslint/parser@^6.0.0":
|
"@typescript-eslint/parser@^5.59.8":
|
||||||
version "6.0.0"
|
version "5.59.11"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.0.0.tgz#46b2600fd1f67e62fc00a28093a75f41bf7effc4"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.59.11.tgz#af7d4b7110e3068ce0b97550736de455e4250103"
|
||||||
integrity sha512-TNaufYSPrr1U8n+3xN+Yp9g31vQDJqhXzzPSHfQDLcaO4tU+mCfODPxCwf4H530zo7aUBE3QIdxCXamEnG04Tg==
|
integrity sha512-s9ZF3M+Nym6CAZEkJJeO2TFHHDsKAM3ecNkLuH4i4s8/RCPnF5JRip2GyviYkeEAcwGMJxkqG9h2dAsnA1nZpA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/scope-manager" "6.0.0"
|
"@typescript-eslint/scope-manager" "5.59.11"
|
||||||
"@typescript-eslint/types" "6.0.0"
|
"@typescript-eslint/types" "5.59.11"
|
||||||
"@typescript-eslint/typescript-estree" "6.0.0"
|
"@typescript-eslint/typescript-estree" "5.59.11"
|
||||||
"@typescript-eslint/visitor-keys" "6.0.0"
|
|
||||||
debug "^4.3.4"
|
debug "^4.3.4"
|
||||||
|
|
||||||
"@typescript-eslint/scope-manager@6.0.0":
|
"@typescript-eslint/scope-manager@5.59.11":
|
||||||
version "6.0.0"
|
version "5.59.11"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.0.0.tgz#8ede47a37cb2b7ed82d329000437abd1113b5e11"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.11.tgz#5d131a67a19189c42598af9fb2ea1165252001ce"
|
||||||
integrity sha512-o4q0KHlgCZTqjuaZ25nw5W57NeykZT9LiMEG4do/ovwvOcPnDO1BI5BQdCsUkjxFyrCL0cSzLjvIMfR9uo7cWg==
|
integrity sha512-dHFOsxoLFtrIcSj5h0QoBT/89hxQONwmn3FOQ0GOQcLOOXm+MIrS8zEAhs4tWl5MraxCY3ZJpaXQQdFMc2Tu+Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types" "6.0.0"
|
"@typescript-eslint/types" "5.59.11"
|
||||||
"@typescript-eslint/visitor-keys" "6.0.0"
|
"@typescript-eslint/visitor-keys" "5.59.11"
|
||||||
|
|
||||||
"@typescript-eslint/type-utils@6.0.0":
|
"@typescript-eslint/type-utils@5.59.11":
|
||||||
version "6.0.0"
|
version "5.59.11"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.0.0.tgz#0478d8a94f05e51da2877cc0500f1b3c27ac7e18"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.11.tgz#5eb67121808a84cb57d65a15f48f5bdda25f2346"
|
||||||
integrity sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==
|
integrity sha512-LZqVY8hMiVRF2a7/swmkStMYSoXMFlzL6sXV6U/2gL5cwnLWQgLEG8tjWPpaE4rMIdZ6VKWwcffPlo1jPfk43g==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/typescript-estree" "6.0.0"
|
"@typescript-eslint/typescript-estree" "5.59.11"
|
||||||
"@typescript-eslint/utils" "6.0.0"
|
"@typescript-eslint/utils" "5.59.11"
|
||||||
debug "^4.3.4"
|
debug "^4.3.4"
|
||||||
ts-api-utils "^1.0.1"
|
tsutils "^3.21.0"
|
||||||
|
|
||||||
"@typescript-eslint/types@5.59.0":
|
"@typescript-eslint/types@5.59.0":
|
||||||
version "5.59.0"
|
version "5.59.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.0.tgz#3fcdac7dbf923ec5251545acdd9f1d42d7c4fe32"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.0.tgz#3fcdac7dbf923ec5251545acdd9f1d42d7c4fe32"
|
||||||
integrity sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA==
|
integrity sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA==
|
||||||
|
|
||||||
"@typescript-eslint/types@6.0.0":
|
"@typescript-eslint/types@5.59.11":
|
||||||
version "6.0.0"
|
version "5.59.11"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.0.0.tgz#19795f515f8decbec749c448b0b5fc76d82445a1"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.11.tgz#1a9018fe3c565ba6969561f2a49f330cf1fe8db1"
|
||||||
integrity sha512-Zk9KDggyZM6tj0AJWYYKgF0yQyrcnievdhG0g5FqyU3Y2DRxJn4yWY21sJC0QKBckbsdKKjYDV2yVrrEvuTgxg==
|
integrity sha512-epoN6R6tkvBYSc+cllrz+c2sOFWkbisJZWkOE+y3xHtvYaOE6Wk6B8e114McRJwFRjGvYdJwLXQH5c9osME/AA==
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree@5.59.0":
|
"@typescript-eslint/typescript-estree@5.59.0":
|
||||||
version "5.59.0"
|
version "5.59.0"
|
||||||
|
@ -2539,32 +2535,32 @@
|
||||||
semver "^7.3.7"
|
semver "^7.3.7"
|
||||||
tsutils "^3.21.0"
|
tsutils "^3.21.0"
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree@6.0.0":
|
"@typescript-eslint/typescript-estree@5.59.11":
|
||||||
version "6.0.0"
|
version "5.59.11"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.0.0.tgz#1e09aab7320e404fb9f83027ea568ac24e372f81"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.11.tgz#b2caaa31725e17c33970c1197bcd54e3c5f42b9f"
|
||||||
integrity sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==
|
integrity sha512-YupOpot5hJO0maupJXixi6l5ETdrITxeo5eBOeuV7RSKgYdU3G5cxO49/9WRnJq9EMrB7AuTSLH/bqOsXi7wPA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types" "6.0.0"
|
"@typescript-eslint/types" "5.59.11"
|
||||||
"@typescript-eslint/visitor-keys" "6.0.0"
|
"@typescript-eslint/visitor-keys" "5.59.11"
|
||||||
debug "^4.3.4"
|
debug "^4.3.4"
|
||||||
globby "^11.1.0"
|
globby "^11.1.0"
|
||||||
is-glob "^4.0.3"
|
is-glob "^4.0.3"
|
||||||
semver "^7.5.0"
|
semver "^7.3.7"
|
||||||
ts-api-utils "^1.0.1"
|
tsutils "^3.21.0"
|
||||||
|
|
||||||
"@typescript-eslint/utils@6.0.0":
|
"@typescript-eslint/utils@5.59.11":
|
||||||
version "6.0.0"
|
version "5.59.11"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.0.0.tgz#27a16d0d8f2719274a39417b9782f7daa3802db0"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.11.tgz#9dbff49dc80bfdd9289f9f33548f2e8db3c59ba1"
|
||||||
integrity sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==
|
integrity sha512-didu2rHSOMUdJThLk4aZ1Or8IcO3HzCw/ZvEjTTIfjIrcdd5cvSIwwDy2AOlE7htSNp7QIZ10fLMyRCveesMLg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@eslint-community/eslint-utils" "^4.3.0"
|
"@eslint-community/eslint-utils" "^4.2.0"
|
||||||
"@types/json-schema" "^7.0.11"
|
"@types/json-schema" "^7.0.9"
|
||||||
"@types/semver" "^7.3.12"
|
"@types/semver" "^7.3.12"
|
||||||
"@typescript-eslint/scope-manager" "6.0.0"
|
"@typescript-eslint/scope-manager" "5.59.11"
|
||||||
"@typescript-eslint/types" "6.0.0"
|
"@typescript-eslint/types" "5.59.11"
|
||||||
"@typescript-eslint/typescript-estree" "6.0.0"
|
"@typescript-eslint/typescript-estree" "5.59.11"
|
||||||
eslint-scope "^5.1.1"
|
eslint-scope "^5.1.1"
|
||||||
semver "^7.5.0"
|
semver "^7.3.7"
|
||||||
|
|
||||||
"@typescript-eslint/visitor-keys@5.59.0":
|
"@typescript-eslint/visitor-keys@5.59.0":
|
||||||
version "5.59.0"
|
version "5.59.0"
|
||||||
|
@ -2574,13 +2570,13 @@
|
||||||
"@typescript-eslint/types" "5.59.0"
|
"@typescript-eslint/types" "5.59.0"
|
||||||
eslint-visitor-keys "^3.3.0"
|
eslint-visitor-keys "^3.3.0"
|
||||||
|
|
||||||
"@typescript-eslint/visitor-keys@6.0.0":
|
"@typescript-eslint/visitor-keys@5.59.11":
|
||||||
version "6.0.0"
|
version "5.59.11"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.0.0.tgz#0b49026049fbd096d2c00c5e784866bc69532a31"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.11.tgz#dca561ddad169dc27d62396d64f45b2d2c3ecc56"
|
||||||
integrity sha512-cvJ63l8c0yXdeT5POHpL0Q1cZoRcmRKFCtSjNGJxPkcP571EfZMcNbzWAc7oK3D1dRzm/V5EwtkANTZxqvuuUA==
|
integrity sha512-KGYniTGG3AMTuKF9QBD7EIrvufkB6O6uX3knP73xbKLMpH+QRPcgnCxjWXSHjMRuOxFLovljqQgQpR0c7GvjoA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types" "6.0.0"
|
"@typescript-eslint/types" "5.59.11"
|
||||||
eslint-visitor-keys "^3.4.1"
|
eslint-visitor-keys "^3.3.0"
|
||||||
|
|
||||||
"@webassemblyjs/ast@1.9.0":
|
"@webassemblyjs/ast@1.9.0":
|
||||||
version "1.9.0"
|
version "1.9.0"
|
||||||
|
@ -4137,9 +4133,9 @@ core-js@^2.5.0:
|
||||||
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
|
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
|
||||||
|
|
||||||
core-js@^3.30.2:
|
core-js@^3.30.2:
|
||||||
version "3.31.1"
|
version "3.31.0"
|
||||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.31.1.tgz#f2b0eea9be9da0def2c5fece71064a7e5d687653"
|
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.31.0.tgz#4471dd33e366c79d8c0977ed2d940821719db344"
|
||||||
integrity sha512-2sKLtfq1eFST7l7v62zaqXacPc7uG8ZAya8ogijLhTtaKNcpzpB4TMoTw2Si+8GYKRwFPMMtUT0263QFWFfqyQ==
|
integrity sha512-NIp2TQSGfR6ba5aalZD+ZQ1fSxGhDo/s1w0nx3RYzf2pnJxt7YynxFlFScP6eV7+GZsKO95NSjGxyJsU3DZgeQ==
|
||||||
|
|
||||||
core-util-is@~1.0.0:
|
core-util-is@~1.0.0:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
|
@ -5144,13 +5140,12 @@ eslint-plugin-jsx-a11y@~6.7.1:
|
||||||
object.fromentries "^2.0.6"
|
object.fromentries "^2.0.6"
|
||||||
semver "^6.3.0"
|
semver "^6.3.0"
|
||||||
|
|
||||||
eslint-plugin-prettier@^5.0.0:
|
eslint-plugin-prettier@^4.2.1:
|
||||||
version "5.0.0"
|
version "4.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz#6887780ed95f7708340ec79acfdf60c35b9be57a"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b"
|
||||||
integrity sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==
|
integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
prettier-linter-helpers "^1.0.0"
|
prettier-linter-helpers "^1.0.0"
|
||||||
synckit "^0.8.5"
|
|
||||||
|
|
||||||
eslint-plugin-promise@~6.1.1:
|
eslint-plugin-promise@~6.1.1:
|
||||||
version "6.1.1"
|
version "6.1.1"
|
||||||
|
@ -5898,15 +5893,15 @@ glob-parent@^6.0.2:
|
||||||
is-glob "^4.0.3"
|
is-glob "^4.0.3"
|
||||||
|
|
||||||
glob@^10.2.5, glob@^10.2.6:
|
glob@^10.2.5, glob@^10.2.6:
|
||||||
version "10.3.3"
|
version "10.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.3.tgz#8360a4ffdd6ed90df84aa8d52f21f452e86a123b"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.0.tgz#763d02a894f3cdfc521b10bbbbc8e0309e750cce"
|
||||||
integrity sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==
|
integrity sha512-AQ1/SB9HH0yCx1jXAT4vmCbTOPe5RQ+kCurjbel5xSCGhebumUv+GJZfa1rEqor3XIViqwSEmlkZCQD43RWrBg==
|
||||||
dependencies:
|
dependencies:
|
||||||
foreground-child "^3.1.0"
|
foreground-child "^3.1.0"
|
||||||
jackspeak "^2.0.3"
|
jackspeak "^2.0.3"
|
||||||
minimatch "^9.0.1"
|
minimatch "^9.0.1"
|
||||||
minipass "^5.0.0 || ^6.0.2 || ^7.0.0"
|
minipass "^5.0.0 || ^6.0.2"
|
||||||
path-scurry "^1.10.1"
|
path-scurry "^1.7.0"
|
||||||
|
|
||||||
glob@^7.0.3, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
|
glob@^7.0.3, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
|
||||||
version "7.2.3"
|
version "7.2.3"
|
||||||
|
@ -7835,10 +7830,10 @@ lru-cache@^6.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
yallist "^4.0.0"
|
yallist "^4.0.0"
|
||||||
|
|
||||||
"lru-cache@^9.1.1 || ^10.0.0":
|
lru-cache@^9.1.1:
|
||||||
version "10.0.0"
|
version "9.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.0.tgz#b9e2a6a72a129d81ab317202d93c7691df727e61"
|
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-9.1.2.tgz#255fdbc14b75589d6d0e73644ca167a8db506835"
|
||||||
integrity sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==
|
integrity sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==
|
||||||
|
|
||||||
lz-string@^1.5.0:
|
lz-string@^1.5.0:
|
||||||
version "1.5.0"
|
version "1.5.0"
|
||||||
|
@ -8099,9 +8094,9 @@ minimatch@^5.0.1:
|
||||||
brace-expansion "^2.0.1"
|
brace-expansion "^2.0.1"
|
||||||
|
|
||||||
minimatch@^9.0.1:
|
minimatch@^9.0.1:
|
||||||
version "9.0.3"
|
version "9.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825"
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.2.tgz#397e387fff22f6795844d00badc903a3d5de7057"
|
||||||
integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==
|
integrity sha512-PZOT9g5v2ojiTL7r1xF6plNHLtOeTpSlDI007As2NlA2aYBMfVom17yqa6QzhmDP8QOhn7LjHTg7DFCVSSa6yg==
|
||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^2.0.1"
|
brace-expansion "^2.0.1"
|
||||||
|
|
||||||
|
@ -8152,10 +8147,10 @@ minipass@^5.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d"
|
resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d"
|
||||||
integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==
|
integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==
|
||||||
|
|
||||||
"minipass@^5.0.0 || ^6.0.2 || ^7.0.0":
|
"minipass@^5.0.0 || ^6.0.2":
|
||||||
version "7.0.2"
|
version "6.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.2.tgz#58a82b7d81c7010da5bd4b2c0c85ac4b4ec5131e"
|
resolved "https://registry.yarnpkg.com/minipass/-/minipass-6.0.2.tgz#542844b6c4ce95b202c0995b0a471f1229de4c81"
|
||||||
integrity sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA==
|
integrity sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==
|
||||||
|
|
||||||
minizlib@^2.1.1:
|
minizlib@^2.1.1:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
|
@ -8770,13 +8765,13 @@ path-parse@^1.0.7:
|
||||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
|
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
|
||||||
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
|
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
|
||||||
|
|
||||||
path-scurry@^1.10.1:
|
path-scurry@^1.7.0:
|
||||||
version "1.10.1"
|
version "1.9.2"
|
||||||
resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.1.tgz#9ba6bf5aa8500fe9fd67df4f0d9483b2b0bfc698"
|
resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.9.2.tgz#90f9d296ac5e37e608028e28a447b11d385b3f63"
|
||||||
integrity sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==
|
integrity sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==
|
||||||
dependencies:
|
dependencies:
|
||||||
lru-cache "^9.1.1 || ^10.0.0"
|
lru-cache "^9.1.1"
|
||||||
minipass "^5.0.0 || ^6.0.2 || ^7.0.0"
|
minipass "^5.0.0 || ^6.0.2"
|
||||||
|
|
||||||
path-to-regexp@0.1.7:
|
path-to-regexp@0.1.7:
|
||||||
version "0.1.7"
|
version "0.1.7"
|
||||||
|
@ -9236,9 +9231,9 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0:
|
||||||
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
|
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
|
||||||
|
|
||||||
postcss@^8.2.15, postcss@^8.4.24:
|
postcss@^8.2.15, postcss@^8.4.24:
|
||||||
version "8.4.25"
|
version "8.4.24"
|
||||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.25.tgz#4a133f5e379eda7f61e906c3b1aaa9b81292726f"
|
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.24.tgz#f714dba9b2284be3cc07dbd2fc57ee4dc972d2df"
|
||||||
integrity sha512-7taJ/8t2av0Z+sQEvNzCkpDynl0tX3uJMCODi6nT3PfASC7dYCWV9aQ+uiCf+KBD4SEFcu+GvJdGdwzQ6OSjCw==
|
integrity sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==
|
||||||
dependencies:
|
dependencies:
|
||||||
nanoid "^3.3.6"
|
nanoid "^3.3.6"
|
||||||
picocolors "^1.0.0"
|
picocolors "^1.0.0"
|
||||||
|
@ -9310,10 +9305,10 @@ prettier-linter-helpers@^1.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
fast-diff "^1.1.2"
|
fast-diff "^1.1.2"
|
||||||
|
|
||||||
prettier@^3.0.0:
|
prettier@^2.8.8:
|
||||||
version "3.0.0"
|
version "2.8.8"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.0.tgz#e7b19f691245a21d618c68bc54dc06122f6105ae"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
|
||||||
integrity sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==
|
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
|
||||||
|
|
||||||
pretty-bytes@^5.3.0, pretty-bytes@^5.4.1:
|
pretty-bytes@^5.3.0, pretty-bytes@^5.4.1:
|
||||||
version "5.6.0"
|
version "5.6.0"
|
||||||
|
@ -9749,9 +9744,9 @@ react-test-renderer@^18.2.0:
|
||||||
scheduler "^0.23.0"
|
scheduler "^0.23.0"
|
||||||
|
|
||||||
react-textarea-autosize@*, react-textarea-autosize@^8.4.1:
|
react-textarea-autosize@*, react-textarea-autosize@^8.4.1:
|
||||||
version "8.5.2"
|
version "8.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.5.2.tgz#6421df2b5b50b9ca8c5e96fd31be688ea7fa2f9d"
|
resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.5.0.tgz#bb0f7faf9849850f1c20b6e7fac0309d4b92f87b"
|
||||||
integrity sha512-uOkyjkEl0ByEK21eCJMHDGBAAd/BoFQBawYK5XItjAmCTeSbjxghd8qnt7nzsLYzidjnoObu6M26xts0YGKsGg==
|
integrity sha512-cp488su3U9RygmHmGpJp0KEt0i/+57KCK33XVPH+50swVRBhIZYh0fGduz2YLKXwl9vSKBZ9HUXcg9PQXUXqIw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.20.13"
|
"@babel/runtime" "^7.20.13"
|
||||||
use-composed-ref "^1.3.0"
|
use-composed-ref "^1.3.0"
|
||||||
|
@ -10317,13 +10312,6 @@ semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
lru-cache "^6.0.0"
|
lru-cache "^6.0.0"
|
||||||
|
|
||||||
semver@^7.5.0:
|
|
||||||
version "7.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
|
|
||||||
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
|
|
||||||
dependencies:
|
|
||||||
lru-cache "^6.0.0"
|
|
||||||
|
|
||||||
send@0.18.0:
|
send@0.18.0:
|
||||||
version "0.18.0"
|
version "0.18.0"
|
||||||
resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be"
|
resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be"
|
||||||
|
@ -11415,11 +11403,6 @@ trim-newlines@^4.0.2:
|
||||||
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-4.1.1.tgz#28c88deb50ed10c7ba6dc2474421904a00139125"
|
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-4.1.1.tgz#28c88deb50ed10c7ba6dc2474421904a00139125"
|
||||||
integrity sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==
|
integrity sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==
|
||||||
|
|
||||||
ts-api-utils@^1.0.1:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.1.tgz#8144e811d44c749cd65b2da305a032510774452d"
|
|
||||||
integrity sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==
|
|
||||||
|
|
||||||
tsconfig-paths@^3.14.1:
|
tsconfig-paths@^3.14.1:
|
||||||
version "3.14.2"
|
version "3.14.2"
|
||||||
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088"
|
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088"
|
||||||
|
|
Loading…
Reference in New Issue