Merge branch 'master' into glitch-soc/master

Conflicts:
- `README.md`:
  We have different README files. Discarded upstream changes.
- `app/views/layouts/admin.html.haml`:
  Conflict due to glitch-soc theming system.
  Adapted upstream changes.
- `app/views/layouts/embedded.html.haml`:
  Conflict due to glitch-soc theming system.
  Adapted upstream changes.
- `yarn.lock`:
  No real conflict, glitch-specific dependency too close to
  an updated one. Adapted upstream change.
This commit is contained in:
Thibaut Girka 2020-01-20 15:00:22 +01:00
commit 45709d6987
17 changed files with 812 additions and 699 deletions

View File

@ -116,13 +116,6 @@ jobs:
environment: *ruby_environment environment: *ruby_environment
<<: *install_ruby_dependencies <<: *install_ruby_dependencies
install-ruby2.4:
<<: *defaults
docker:
- image: circleci/ruby:2.4-buster-node
environment: *ruby_environment
<<: *install_ruby_dependencies
build: build:
<<: *defaults <<: *defaults
steps: steps:
@ -187,17 +180,6 @@ jobs:
- image: circleci/redis:5-alpine - image: circleci/redis:5-alpine
<<: *test_steps <<: *test_steps
test-ruby2.4:
<<: *defaults
docker:
- image: circleci/ruby:2.4-buster-node
environment: *ruby_environment
- image: circleci/postgres:10.6-alpine
environment:
POSTGRES_USER: root
- image: circleci/redis:5-alpine
<<: *test_steps
test-webui: test-webui:
<<: *defaults <<: *defaults
docker: docker:
@ -232,10 +214,6 @@ workflows:
requires: requires:
- install - install
- install-ruby2.7 - install-ruby2.7
- install-ruby2.4:
requires:
- install
- install-ruby2.7
- build: - build:
requires: requires:
- install-ruby2.7 - install-ruby2.7
@ -254,10 +232,6 @@ workflows:
requires: requires:
- install-ruby2.5 - install-ruby2.5
- build - build
- test-ruby2.4:
requires:
- install-ruby2.4
- build
- test-webui: - test-webui:
requires: requires:
- install - install

View File

@ -69,7 +69,7 @@ gem 'nilsimsa', git: 'https://github.com/witgo/nilsimsa', ref: 'fd184883048b922b
gem 'nokogiri', '~> 1.10' gem 'nokogiri', '~> 1.10'
gem 'nsa', '~> 0.2' gem 'nsa', '~> 0.2'
gem 'oj', '~> 3.10' gem 'oj', '~> 3.10'
gem 'ox', '~> 2.11' gem 'ox', '~> 2.12'
gem 'parslet' gem 'parslet'
gem 'parallel', '~> 1.19' gem 'parallel', '~> 1.19'
gem 'posix-spawn', git: 'https://github.com/rtomayko/posix-spawn', ref: '58465d2e213991f8afb13b984854a49fcdcc980c' gem 'posix-spawn', git: 'https://github.com/rtomayko/posix-spawn', ref: '58465d2e213991f8afb13b984854a49fcdcc980c'
@ -100,7 +100,7 @@ gem 'tzinfo-data', '~> 1.2019'
gem 'webpacker', '~> 4.2' gem 'webpacker', '~> 4.2'
gem 'webpush' gem 'webpush'
gem 'json-ld', git: 'https://github.com/ruby-rdf/json-ld.git', ref: 'e742697a0906e74e8bb777ef98137bc3955d981d' gem 'json-ld'
gem 'json-ld-preloaded', '~> 3.0' gem 'json-ld-preloaded', '~> 3.0'
gem 'rdf-normalize', '~> 0.4' gem 'rdf-normalize', '~> 0.4'
@ -127,7 +127,7 @@ group :test do
gem 'rails-controller-testing', '~> 1.0' gem 'rails-controller-testing', '~> 1.0'
gem 'rspec-sidekiq', '~> 3.0' gem 'rspec-sidekiq', '~> 3.0'
gem 'simplecov', '~> 0.17', require: false gem 'simplecov', '~> 0.17', require: false
gem 'webmock', '~> 3.7' gem 'webmock', '~> 3.8'
gem 'parallel_tests', '~> 2.30' gem 'parallel_tests', '~> 2.30'
end end
@ -140,7 +140,7 @@ group :development do
gem 'letter_opener', '~> 1.7' gem 'letter_opener', '~> 1.7'
gem 'letter_opener_web', '~> 1.3' gem 'letter_opener_web', '~> 1.3'
gem 'memory_profiler' gem 'memory_profiler'
gem 'rubocop', '~> 0.78', require: false gem 'rubocop', '~> 0.79', require: false
gem 'rubocop-rails', '~> 2.4', require: false gem 'rubocop-rails', '~> 2.4', require: false
gem 'brakeman', '~> 4.7', require: false gem 'brakeman', '~> 4.7', require: false
gem 'bundler-audit', '~> 0.6', require: false gem 'bundler-audit', '~> 0.6', require: false
@ -150,7 +150,6 @@ group :development do
gem 'capistrano-rbenv', '~> 2.1' gem 'capistrano-rbenv', '~> 2.1'
gem 'capistrano-yarn', '~> 2.0' gem 'capistrano-yarn', '~> 2.0'
gem 'derailed_benchmarks'
gem 'stackprof' gem 'stackprof'
end end

View File

@ -13,19 +13,6 @@ GIT
specs: specs:
posix-spawn (0.3.13) posix-spawn (0.3.13)
GIT
remote: https://github.com/ruby-rdf/json-ld.git
revision: e742697a0906e74e8bb777ef98137bc3955d981d
ref: e742697a0906e74e8bb777ef98137bc3955d981d
specs:
json-ld (3.0.2)
htmlentities (~> 4.3)
json-canonicalization (~> 0.1)
link_header (~> 0.0, >= 0.0.8)
multi_json (~> 1.13)
rack (>= 1.6, < 3.0)
rdf (~> 3.0, >= 3.0.8)
GIT GIT
remote: https://github.com/tmm1/http_parser.rb remote: https://github.com/tmm1/http_parser.rb
revision: 54b17ba8c7d8d20a16dfc65d1775241833219cf2 revision: 54b17ba8c7d8d20a16dfc65d1775241833219cf2
@ -93,7 +80,7 @@ GEM
tzinfo (~> 1.1) tzinfo (~> 1.1)
addressable (2.7.0) addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.3.4) airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0) sshkit (>= 1.6.1, != 1.7.0)
annotate (3.0.3) annotate (3.0.3)
activerecord (>= 3.2, < 7.0) activerecord (>= 3.2, < 7.0)
@ -121,7 +108,6 @@ GEM
aws-sigv4 (1.1.0) aws-sigv4 (1.1.0)
aws-eventstream (~> 1.0, >= 1.0.2) aws-eventstream (~> 1.0, >= 1.0.2)
bcrypt (3.1.12) bcrypt (3.1.12)
benchmark-ips (2.7.2)
better_errors (2.5.1) better_errors (2.5.1)
coderay (>= 1.0.0) coderay (>= 1.0.0)
erubi (>= 1.0.0) erubi (>= 1.0.0)
@ -133,7 +119,7 @@ GEM
bootsnap (1.4.5) bootsnap (1.4.5)
msgpack (~> 1.0) msgpack (~> 1.0)
brakeman (4.7.2) brakeman (4.7.2)
browser (2.7.1) browser (3.0.3)
builder (3.2.4) builder (3.2.4)
bullet (6.1.0) bullet (6.1.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
@ -153,7 +139,7 @@ GEM
capistrano-rails (1.4.0) capistrano-rails (1.4.0)
capistrano (~> 3.1) capistrano (~> 3.1)
capistrano-bundler (~> 1.1) capistrano-bundler (~> 1.1)
capistrano-rbenv (2.1.4) capistrano-rbenv (2.1.6)
capistrano (~> 3.1) capistrano (~> 3.1)
sshkit (~> 1.3) sshkit (~> 1.3)
capistrano-yarn (2.0.2) capistrano-yarn (2.0.2)
@ -184,19 +170,10 @@ GEM
connection_pool (2.2.2) connection_pool (2.2.2)
crack (0.4.3) crack (0.4.3)
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
crass (1.0.5) crass (1.0.6)
css_parser (1.7.1) css_parser (1.7.1)
addressable addressable
debug_inspector (0.0.3) debug_inspector (0.0.3)
derailed_benchmarks (1.4.3)
benchmark-ips (~> 2)
get_process_mem (~> 0)
heapy (~> 0)
memory_profiler (~> 0)
rack (>= 1)
rake (> 10, < 14)
ruby-statistics (>= 2.1)
thor (~> 0.19)
devise (4.7.1) devise (4.7.1)
bcrypt (~> 3.0) bcrypt (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
@ -241,8 +218,8 @@ GEM
tzinfo tzinfo
excon (0.71.0) excon (0.71.0)
fabrication (2.21.0) fabrication (2.21.0)
faker (2.10.0) faker (2.10.1)
i18n (>= 1.6, < 1.8) i18n (>= 1.6, < 2)
faraday (1.0.0) faraday (1.0.0)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
fast_blank (1.0.0) fast_blank (1.0.0)
@ -270,8 +247,6 @@ GEM
fuubar (2.5.0) fuubar (2.5.0)
rspec-core (~> 3.0) rspec-core (~> 3.0)
ruby-progressbar (~> 1.4) ruby-progressbar (~> 1.4)
get_process_mem (0.2.5)
ffi (~> 1.0)
globalid (0.4.2) globalid (0.4.2)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
goldfinger (2.1.1) goldfinger (2.1.1)
@ -292,8 +267,7 @@ GEM
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
hashdiff (1.0.0) hashdiff (1.0.0)
hashie (3.6.0) hashie (3.6.0)
heapy (0.1.4) highline (2.0.3)
highline (2.0.1)
hiredis (0.6.3) hiredis (0.6.3)
hkdf (0.3.0) hkdf (0.3.0)
html2text (0.2.1) html2text (0.2.1)
@ -313,9 +287,9 @@ GEM
httplog (1.3.3) httplog (1.3.3)
rack (>= 1.0) rack (>= 1.0)
rainbow (>= 2.0.0) rainbow (>= 2.0.0)
i18n (1.7.0) i18n (1.8.2)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
i18n-tasks (0.9.29) i18n-tasks (0.9.30)
activesupport (>= 4.0.2) activesupport (>= 4.0.2)
ast (>= 2.1.0) ast (>= 2.1.0)
erubi erubi
@ -331,7 +305,14 @@ GEM
jaro_winkler (1.5.4) jaro_winkler (1.5.4)
jmespath (1.4.0) jmespath (1.4.0)
json (2.3.0) json (2.3.0)
json-canonicalization (0.1.0) json-canonicalization (0.2.0)
json-ld (3.1.0)
htmlentities (~> 4.3)
json-canonicalization (~> 0.1)
link_header (~> 0.0, >= 0.0.8)
multi_json (~> 1.14)
rack (~> 2.0)
rdf (~> 3.1)
json-ld-preloaded (3.0.6) json-ld-preloaded (3.0.6)
json-ld (~> 3.0) json-ld (~> 3.0)
multi_json (~> 1.12) multi_json (~> 1.12)
@ -386,7 +367,7 @@ GEM
mimemagic (0.3.3) mimemagic (0.3.3)
mini_mime (1.0.2) mini_mime (1.0.2)
mini_portile2 (2.4.0) mini_portile2 (2.4.0)
minitest (5.13.0) minitest (5.14.0)
msgpack (1.3.1) msgpack (1.3.1)
multi_json (1.14.1) multi_json (1.14.1)
multipart-post (2.1.1) multipart-post (2.1.1)
@ -405,7 +386,7 @@ GEM
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
sidekiq (>= 3.5) sidekiq (>= 3.5)
statsd-ruby (~> 1.4, >= 1.4.0) statsd-ruby (~> 1.4, >= 1.4.0)
oj (3.10.0) oj (3.10.1)
omniauth (1.9.0) omniauth (1.9.0)
hashie (>= 3.4.6, < 3.7.0) hashie (>= 3.4.6, < 3.7.0)
rack (>= 1.6.2, < 3) rack (>= 1.6.2, < 3)
@ -417,7 +398,7 @@ GEM
omniauth (~> 1.3, >= 1.3.2) omniauth (~> 1.3, >= 1.3.2)
ruby-saml (~> 1.7) ruby-saml (~> 1.7)
orm_adapter (0.5.0) orm_adapter (0.5.0)
ox (2.11.0) ox (2.12.1)
paperclip (6.0.0) paperclip (6.0.0)
activemodel (>= 4.2.0) activemodel (>= 4.2.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
@ -428,7 +409,7 @@ GEM
av (~> 0.9.0) av (~> 0.9.0)
paperclip (>= 2.5.2) paperclip (>= 2.5.2)
parallel (1.19.1) parallel (1.19.1)
parallel_tests (2.30.0) parallel_tests (2.30.1)
parallel parallel
parser (2.7.0.2) parser (2.7.0.2)
ast (~> 2.4.0) ast (~> 2.4.0)
@ -436,7 +417,7 @@ GEM
pastel (0.7.3) pastel (0.7.3)
equatable (~> 0.6) equatable (~> 0.6)
tty-color (~> 0.5) tty-color (~> 0.5)
pg (1.2.1) pg (1.2.2)
pghero (2.4.1) pghero (2.4.1)
activerecord (>= 5) activerecord (>= 5)
pkg-config (1.4.0) pkg-config (1.4.0)
@ -508,7 +489,7 @@ GEM
thor (>= 0.19.0, < 2.0) thor (>= 0.19.0, < 2.0)
rainbow (3.0.0) rainbow (3.0.0)
rake (13.0.1) rake (13.0.1)
rdf (3.1.0) rdf (3.1.1)
hamster (~> 3.0) hamster (~> 3.0)
link_header (~> 0.0, >= 0.0.8) link_header (~> 0.0, >= 0.0.8)
rdf-normalize (0.4.0) rdf-normalize (0.4.0)
@ -565,10 +546,10 @@ GEM
rspec-core (~> 3.0, >= 3.0.0) rspec-core (~> 3.0, >= 3.0.0)
sidekiq (>= 2.4.0) sidekiq (>= 2.4.0)
rspec-support (3.9.0) rspec-support (3.9.0)
rubocop (0.78.0) rubocop (0.79.0)
jaro_winkler (~> 1.5.1) jaro_winkler (~> 1.5.1)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 2.6) parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7) unicode-display_width (>= 1.4.0, < 1.7)
@ -578,7 +559,6 @@ GEM
ruby-progressbar (1.10.1) ruby-progressbar (1.10.1)
ruby-saml (1.9.0) ruby-saml (1.9.0)
nokogiri (>= 1.5.10) nokogiri (>= 1.5.10)
ruby-statistics (2.1.1)
rufus-scheduler (3.5.2) rufus-scheduler (3.5.2)
fugit (~> 1.1, >= 1.1.5) fugit (~> 1.1, >= 1.1.5)
safe_yaml (1.0.5) safe_yaml (1.0.5)
@ -660,11 +640,11 @@ GEM
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.7.6) unf_ext (0.0.7.6)
unicode-display_width (1.6.0) unicode-display_width (1.6.1)
uniform_notifier (1.13.0) uniform_notifier (1.13.0)
warden (1.2.8) warden (1.2.8)
rack (>= 2.0.6) rack (>= 2.0.6)
webmock (3.7.6) webmock (3.8.0)
addressable (>= 2.3.6) addressable (>= 2.3.6)
crack (>= 0.3.2) crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0) hashdiff (>= 0.4.0, < 2.0.0)
@ -710,7 +690,6 @@ DEPENDENCIES
climate_control (~> 0.2) climate_control (~> 0.2)
concurrent-ruby concurrent-ruby
connection_pool connection_pool
derailed_benchmarks
devise (~> 4.7) devise (~> 4.7)
devise-two-factor (~> 3.1) devise-two-factor (~> 3.1)
devise_pam_authenticatable2 (~> 9.2) devise_pam_authenticatable2 (~> 9.2)
@ -738,7 +717,7 @@ DEPENDENCIES
i18n-tasks (~> 0.9) i18n-tasks (~> 0.9)
idn-ruby idn-ruby
iso-639 iso-639
json-ld! json-ld
json-ld-preloaded (~> 3.0) json-ld-preloaded (~> 3.0)
kaminari (~> 1.1) kaminari (~> 1.1)
letter_opener (~> 1.7) letter_opener (~> 1.7)
@ -758,7 +737,7 @@ DEPENDENCIES
omniauth (~> 1.9) omniauth (~> 1.9)
omniauth-cas (~> 1.1) omniauth-cas (~> 1.1)
omniauth-saml (~> 1.10) omniauth-saml (~> 1.10)
ox (~> 2.11) ox (~> 2.12)
paperclip (~> 6.0) paperclip (~> 6.0)
paperclip-av-transcoder (~> 0.6) paperclip-av-transcoder (~> 0.6)
parallel (~> 1.19) parallel (~> 1.19)
@ -788,7 +767,7 @@ DEPENDENCIES
rqrcode (~> 1.1) rqrcode (~> 1.1)
rspec-rails (~> 3.9) rspec-rails (~> 3.9)
rspec-sidekiq (~> 3.0) rspec-sidekiq (~> 3.0)
rubocop (~> 0.78) rubocop (~> 0.79)
rubocop-rails (~> 2.4) rubocop-rails (~> 2.4)
ruby-progressbar (~> 1.10) ruby-progressbar (~> 1.10)
sanitize (~> 5.1) sanitize (~> 5.1)
@ -811,6 +790,6 @@ DEPENDENCIES
tty-prompt (~> 0.20) tty-prompt (~> 0.20)
twitter-text (~> 1.14) twitter-text (~> 1.14)
tzinfo-data (~> 1.2019) tzinfo-data (~> 1.2019)
webmock (~> 3.7) webmock (~> 3.8)
webpacker (~> 4.2) webpacker (~> 4.2)
webpush webpush

View File

@ -3,6 +3,8 @@
class Api::OEmbedController < Api::BaseController class Api::OEmbedController < Api::BaseController
respond_to :json respond_to :json
skip_before_action :require_authenticated_user!
def show def show
@status = status_finder.status @status = status_finder.status
render json: @status, serializer: OEmbedSerializer, width: maxwidth_or_default, height: maxheight_or_default render json: @status, serializer: OEmbedSerializer, width: maxwidth_or_default, height: maxheight_or_default

View File

@ -32,6 +32,7 @@ module SettingsHelper
hy: 'Հայերեն', hy: 'Հայերեն',
id: 'Bahasa Indonesia', id: 'Bahasa Indonesia',
io: 'Ido', io: 'Ido',
is: 'Íslenska',
it: 'Italiano', it: 'Italiano',
ja: '日本語', ja: '日本語',
ka: 'ქართული', ka: 'ქართული',

View File

@ -23,6 +23,7 @@ class Item extends React.PureComponent {
onClick: PropTypes.func.isRequired, onClick: PropTypes.func.isRequired,
displayWidth: PropTypes.number, displayWidth: PropTypes.number,
visible: PropTypes.bool.isRequired, visible: PropTypes.bool.isRequired,
autoplay: PropTypes.bool,
}; };
static defaultProps = { static defaultProps = {
@ -48,9 +49,13 @@ class Item extends React.PureComponent {
} }
} }
getAutoPlay() {
return this.props.autoplay || autoPlayGif;
}
hoverToPlay () { hoverToPlay () {
const { attachment } = this.props; const { attachment } = this.props;
return !autoPlayGif && attachment.get('type') === 'gifv'; return !this.getAutoPlay() && attachment.get('type') === 'gifv';
} }
handleClick = (e) => { handleClick = (e) => {
@ -201,7 +206,7 @@ class Item extends React.PureComponent {
</a> </a>
); );
} else if (attachment.get('type') === 'gifv') { } else if (attachment.get('type') === 'gifv') {
const autoPlay = !isIOS() && autoPlayGif; const autoPlay = !isIOS() && this.getAutoPlay();
thumbnail = ( thumbnail = (
<div className={classNames('media-gallery__gifv', { autoplay: autoPlay })}> <div className={classNames('media-gallery__gifv', { autoplay: autoPlay })}>
@ -248,6 +253,7 @@ class MediaGallery extends React.PureComponent {
defaultWidth: PropTypes.number, defaultWidth: PropTypes.number,
cacheWidth: PropTypes.func, cacheWidth: PropTypes.func,
visible: PropTypes.bool, visible: PropTypes.bool,
autoplay: PropTypes.bool,
onToggleVisibility: PropTypes.func, onToggleVisibility: PropTypes.func,
}; };
@ -297,7 +303,7 @@ class MediaGallery extends React.PureComponent {
} }
render () { render () {
const { media, intl, sensitive, height, defaultWidth, standalone } = this.props; const { media, intl, sensitive, height, defaultWidth, standalone, autoplay } = this.props;
const { visible } = this.state; const { visible } = this.state;
const width = this.state.width || defaultWidth; const width = this.state.width || defaultWidth;
@ -320,9 +326,9 @@ class MediaGallery extends React.PureComponent {
const uncached = media.every(attachment => attachment.get('type') === 'unknown'); const uncached = media.every(attachment => attachment.get('type') === 'unknown');
if (standalone && this.isFullSizeEligible()) { if (standalone && this.isFullSizeEligible()) {
children = <Item standalone onClick={this.handleClick} attachment={media.get(0)} displayWidth={width} visible={visible} />; children = <Item standalone autoplay={autoplay} onClick={this.handleClick} attachment={media.get(0)} displayWidth={width} visible={visible} />;
} else { } else {
children = media.take(4).map((attachment, i) => <Item key={attachment.get('id')} onClick={this.handleClick} attachment={attachment} index={i} size={size} displayWidth={width} visible={visible || uncached} />); children = media.take(4).map((attachment, i) => <Item key={attachment.get('id')} autoplay={autoplay} onClick={this.handleClick} attachment={attachment} index={i} size={size} displayWidth={width} visible={visible || uncached} />);
} }
if (uncached) { if (uncached) {

View File

@ -143,7 +143,7 @@ class SpamCheck
end end
def trusted? def trusted?
@account.trust_level > Account::TRUST_LEVELS[:untrusted] @account.trust_level > Account::TRUST_LEVELS[:untrusted] || (@account.local? && @account.user_staff?)
end end
def no_unsolicited_mentions? def no_unsolicited_mentions?

View File

@ -14,9 +14,12 @@
- unless status.proper.media_attachments.empty? - unless status.proper.media_attachments.empty?
- if status.proper.media_attachments.first.video? - if status.proper.media_attachments.first.video?
- video = status.proper.media_attachments.first - video = status.proper.media_attachments.first
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: !current_account&.user&.show_all_media? && status.proper.sensitive? || current_account&.user&.hide_all_media?, width: 610, height: 343, inline: true, alt: video.description = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: status.proper.sensitive?, visible: false, width: 610, height: 343, inline: true, alt: video.description
- elsif status.media_attachments.first.audio?
- audio = status.proper.media_attachments.first
= react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, duration: audio.file.meta.dig(:original, :duration)
- else - else
= react_component :media_gallery, height: 343, sensitive: !current_account&.user&.show_all_media? && status.proper.sensitive? || current_account&.user&.hide_all_media?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.proper.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } = react_component :media_gallery, height: 343, sensitive: status.proper.sensitive?, visible: false, media: status.proper.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }
.detailed-status__meta .detailed-status__meta
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'detailed-status__datetime', target: stream_link_target, rel: 'noopener noreferrer' do = link_to ActivityPub::TagManager.instance.url_for(status), class: 'detailed-status__datetime', target: stream_link_target, rel: 'noopener noreferrer' do

View File

@ -1,3 +1,6 @@
- content_for :header_tags do
= render_initial_state
- content_for :content do - content_for :content do
.admin-wrapper .admin-wrapper
.sidebar-wrapper .sidebar-wrapper

View File

@ -10,6 +10,7 @@
- if storage_host? - if storage_host?
%link{ rel: 'dns-prefetch', href: storage_host }/ %link{ rel: 'dns-prefetch', href: storage_host }/
= render_initial_state
= javascript_pack_tag "locales", integrity: true, crossorigin: 'anonymous' = javascript_pack_tag "locales", integrity: true, crossorigin: 'anonymous'
- if @theme - if @theme
- if @theme[:supported_locales].include? I18n.locale.to_s - if @theme[:supported_locales].include? I18n.locale.to_s
@ -21,3 +22,6 @@
%body.embed %body.embed
= yield = yield
%div{ style: 'display: none'}
= render file: Rails.root.join('app', 'javascript', 'images', 'logo_transparent.svg')

View File

@ -29,14 +29,14 @@
- if !status.media_attachments.empty? - if !status.media_attachments.empty?
- if status.media_attachments.first.video? - if status.media_attachments.first.video?
- video = status.media_attachments.first - video = status.media_attachments.first
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, width: 670, height: 380, detailed: true, inline: true, alt: video.description do = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: status.sensitive?, width: 670, height: 380, detailed: true, inline: true, alt: video.description do
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments } = render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
- elsif status.media_attachments.first.audio? - elsif status.media_attachments.first.audio?
- audio = status.media_attachments.first - audio = status.media_attachments.first
= react_component :audio, src: audio.file.url(:original), height: 130, alt: audio.description, preload: true, duration: audio.file.meta.dig(:original, :duration) do = react_component :audio, src: audio.file.url(:original), height: 130, alt: audio.description, preload: true, duration: audio.file.meta.dig(:original, :duration) do
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments } = render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
- else - else
= react_component :media_gallery, height: 380, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif || autoplay, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } do = react_component :media_gallery, height: 380, sensitive: status.sensitive?, standalone: true, autoplay: autoplay, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } do
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments } = render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
- elsif status.preview_card - elsif status.preview_card
= react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json = react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json

View File

@ -33,14 +33,14 @@
- if !status.media_attachments.empty? - if !status.media_attachments.empty?
- if status.media_attachments.first.video? - if status.media_attachments.first.video?
- video = status.media_attachments.first - video = status.media_attachments.first
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, width: 610, height: 343, inline: true, alt: video.description do = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: status.sensitive?, width: 610, height: 343, inline: true, alt: video.description do
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments } = render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
- elsif status.media_attachments.first.audio? - elsif status.media_attachments.first.audio?
- audio = status.media_attachments.first - audio = status.media_attachments.first
= react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, duration: audio.file.meta.dig(:original, :duration) do = react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, duration: audio.file.meta.dig(:original, :duration) do
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments } = render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
- else - else
= react_component :media_gallery, height: 343, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif || autoplay, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } do = react_component :media_gallery, height: 343, sensitive: status.sensitive?, autoplay: autoplay, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } do
= render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments } = render partial: 'statuses/attachment_list', locals: { attachments: status.media_attachments }
- elsif status.preview_card - elsif status.preview_card
= react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json = react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json

View File

@ -70,6 +70,7 @@ module Mastodon
:hy, :hy,
:id, :id,
:io, :io,
:is,
:it, :it,
:ja, :ja,
:ka, :ka,

View File

@ -38,6 +38,7 @@ en:
application: Application application: Application
callback_url: Callback URL callback_url: Callback URL
delete: Delete delete: Delete
empty: You have no applications.
name: Name name: Name
new: New application new: New application
scopes: Scopes scopes: Scopes

View File

@ -163,14 +163,14 @@ en:
text: Why do you want to join? text: Why do you want to join?
notification_emails: notification_emails:
digest: Send digest e-mails digest: Send digest e-mails
favourite: Send e-mail when someone favourites your status favourite: Someone favourited your status
follow: Send e-mail when someone follows you follow: Someone followed you
follow_request: Send e-mail when someone requests to follow you follow_request: Someone requested to follow you
mention: Send e-mail when someone mentions you mention: Someone mentioned you
pending_account: Send e-mail when a new account needs review pending_account: New account needs review
reblog: Send e-mail when someone boosts your status reblog: Someone boosted your status
report: Send e-mail when a new report is submitted report: New report is submitted
trending_tag: Send e-mail when an unreviewed hashtag is trending trending_tag: An unreviewed hashtag is trending
tag: tag:
listable: Allow this hashtag to appear in searches and on the profile directory listable: Allow this hashtag to appear in searches and on the profile directory
name: Hashtag name: Hashtag

View File

@ -61,20 +61,20 @@
"private": true, "private": true,
"dependencies": { "dependencies": {
"@babel/core": "^7.7.7", "@babel/core": "^7.7.7",
"@babel/plugin-proposal-class-properties": "^7.7.4", "@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-decorators": "^7.7.4", "@babel/plugin-proposal-decorators": "^7.8.0",
"@babel/plugin-transform-react-inline-elements": "^7.7.4", "@babel/plugin-transform-react-inline-elements": "^7.8.0",
"@babel/plugin-transform-runtime": "^7.7.6", "@babel/plugin-transform-runtime": "^7.7.6",
"@babel/preset-env": "^7.7.7", "@babel/preset-env": "^7.8.3",
"@babel/preset-react": "^7.7.4", "@babel/preset-react": "^7.8.3",
"@babel/runtime": "^7.7.7", "@babel/runtime": "^7.8.3",
"@gamestdio/websocket": "^0.3.2", "@gamestdio/websocket": "^0.3.2",
"@clusterws/cws": "^0.17.3", "@clusterws/cws": "^0.17.3",
"array-includes": "^3.1.1", "array-includes": "^3.1.1",
"atrament": "^0.2.3", "atrament": "^0.2.3",
"arrow-key-navigation": "^1.1.0", "arrow-key-navigation": "^1.1.0",
"autoprefixer": "^9.7.3", "autoprefixer": "^9.7.4",
"axios": "^0.19.0", "axios": "^0.19.1",
"babel-loader": "^8.0.6", "babel-loader": "^8.0.6",
"babel-plugin-lodash": "^3.3.4", "babel-plugin-lodash": "^3.3.4",
"babel-plugin-preval": "^4.0.0", "babel-plugin-preval": "^4.0.0",
@ -83,10 +83,10 @@
"babel-runtime": "^6.26.0", "babel-runtime": "^6.26.0",
"blurhash": "^1.1.3", "blurhash": "^1.1.3",
"classnames": "^2.2.5", "classnames": "^2.2.5",
"compression-webpack-plugin": "^3.0.1", "compression-webpack-plugin": "^3.1.0",
"copy-webpack-plugin": "^5.1.1", "copy-webpack-plugin": "^5.1.1",
"cross-env": "^6.0.3", "cross-env": "^6.0.3",
"css-loader": "^3.4.1", "css-loader": "^3.4.2",
"cssnano": "^4.1.10", "cssnano": "^4.1.10",
"detect-passive-events": "^1.0.2", "detect-passive-events": "^1.0.2",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
@ -142,7 +142,7 @@
"react-router-scroll-4": "^1.0.0-beta.1", "react-router-scroll-4": "^1.0.0-beta.1",
"react-select": "^3.0.8", "react-select": "^3.0.8",
"react-sparklines": "^1.7.0", "react-sparklines": "^1.7.0",
"react-swipeable-views": "^0.13.3", "react-swipeable-views": "^0.13.4",
"react-textarea-autosize": "^7.1.2", "react-textarea-autosize": "^7.1.2",
"react-toggle": "^4.1.1", "react-toggle": "^4.1.1",
"redis": "^2.7.1", "redis": "^2.7.1",
@ -154,15 +154,15 @@
"reselect": "^4.0.0", "reselect": "^4.0.0",
"rimraf": "^3.0.0", "rimraf": "^3.0.0",
"sass": "^1.24.2", "sass": "^1.24.2",
"sass-loader": "^8.0.0", "sass-loader": "^8.0.2",
"stringz": "^2.0.0", "stringz": "^2.0.0",
"substring-trie": "^1.0.2", "substring-trie": "^1.0.2",
"terser-webpack-plugin": "^2.3.1", "terser-webpack-plugin": "^2.3.2",
"tesseract.js": "^2.0.0-alpha.16", "tesseract.js": "^2.0.0-alpha.16",
"throng": "^4.0.0", "throng": "^4.0.0",
"tiny-queue": "^0.2.1", "tiny-queue": "^0.2.1",
"uuid": "^3.3.3", "uuid": "^3.3.3",
"wavesurfer.js": "^3.3.0", "wavesurfer.js": "^3.3.1",
"webpack": "^4.41.5", "webpack": "^4.41.5",
"webpack-assets-manifest": "^3.1.1", "webpack-assets-manifest": "^3.1.1",
"webpack-bundle-analyzer": "^3.6.0", "webpack-bundle-analyzer": "^3.6.0",
@ -176,7 +176,7 @@
"enzyme": "^3.11.0", "enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2", "enzyme-adapter-react-16": "^1.15.2",
"eslint": "^6.8.0", "eslint": "^6.8.0",
"eslint-plugin-import": "~2.19.1", "eslint-plugin-import": "~2.20.0",
"eslint-plugin-jsx-a11y": "~6.2.3", "eslint-plugin-jsx-a11y": "~6.2.3",
"eslint-plugin-promise": "~4.2.1", "eslint-plugin-promise": "~4.2.1",
"eslint-plugin-react": "~7.17.0", "eslint-plugin-react": "~7.17.0",

1302
yarn.lock

File diff suppressed because it is too large Load Diff