Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 291106e
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Tue Oct 29 19:40:52 2019 +0900

    Bump rspec-rails from 3.8.2 to 3.9.0 (mastodon#12241)

    Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 3.8.2 to 3.9.0.
    - [Release notes](https://github.com/rspec/rspec-rails/releases)
    - [Changelog](https://github.com/rspec/rspec-rails/blob/master/Changelog.md)
    - [Commits](rspec/rspec-rails@v3.8.2...v3.9.0)

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

commit 52c9044
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Tue Oct 29 11:12:05 2019 +0900

    Bump dotenv from 8.0.0 to 8.2.0 (mastodon#12235)

    Bumps [dotenv](https://github.com/motdotla/dotenv) from 8.0.0 to 8.2.0.
    - [Release notes](https://github.com/motdotla/dotenv/releases)
    - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
    - [Commits](motdotla/dotenv@v8.0.0...v8.2.0)

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

commit 008d15d
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Tue Oct 29 10:59:12 2019 +0900

    Bump terser-webpack-plugin from 1.4.1 to 2.2.1 (mastodon#12233)

    Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 1.4.1 to 2.2.1.
    - [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
    - [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
    - [Commits](webpack-contrib/terser-webpack-plugin@v1.4.1...v2.2.1)

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

commit e551274
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Tue Oct 29 10:55:56 2019 +0900

    Bump strong_migrations from 0.4.1 to 0.4.2 (mastodon#12242)

    Bumps [strong_migrations](https://github.com/ankane/strong_migrations) from 0.4.1 to 0.4.2.
    - [Release notes](https://github.com/ankane/strong_migrations/releases)
    - [Changelog](https://github.com/ankane/strong_migrations/blob/master/CHANGELOG.md)
    - [Commits](ankane/strong_migrations@v0.4.1...v0.4.2)

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

commit 0caa707
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Tue Oct 29 10:55:07 2019 +0900

    Bump active_record_query_trace from 1.6.2 to 1.7 (mastodon#12243)

    Bumps [active_record_query_trace](https://github.com/brunofacca/active-record-query-trace) from 1.6.2 to 1.7.
    - [Release notes](https://github.com/brunofacca/active-record-query-trace/releases)
    - [Changelog](https://github.com/brunofacca/active-record-query-trace/blob/master/HISTORY.md)
    - [Commits](brunofacca/active-record-query-trace@v1.6.2...v1.7)

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

commit 254ddfc
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Mon Oct 28 20:48:08 2019 +0900

    Bump pkg-config from 1.3.9 to 1.4.0 (mastodon#12239)

    Bumps [pkg-config](https://github.com/ruby-gnome/pkg-config) from 1.3.9 to 1.4.0.
    - [Release notes](https://github.com/ruby-gnome/pkg-config/releases)
    - [Changelog](https://github.com/ruby-gnome/pkg-config/blob/master/NEWS)
    - [Commits](ruby-gnome/pkg-config@1.3.9...1.4.0)

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

commit 4ecfd43
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Mon Oct 28 20:47:14 2019 +0900

    Bump faker from 2.5.0 to 2.6.0 (mastodon#12244)

    Bumps [faker](https://github.com/faker-ruby/faker) from 2.5.0 to 2.6.0.
    - [Release notes](https://github.com/faker-ruby/faker/releases)
    - [Changelog](https://github.com/faker-ruby/faker/blob/master/CHANGELOG.md)
    - [Commits](faker-ruby/faker@v2.5.0...v2.6.0)

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

commit da67b1f
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Mon Oct 28 20:46:31 2019 +0900

    Bump webpack-bundle-analyzer from 3.5.2 to 3.6.0 (mastodon#12237)

    Bumps [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) from 3.5.2 to 3.6.0.
    - [Release notes](https://github.com/webpack-contrib/webpack-bundle-analyzer/releases)
    - [Changelog](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md)
    - [Commits](webpack-contrib/webpack-bundle-analyzer@v3.5.2...v3.6.0)

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

commit 3565fc1
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Mon Oct 28 20:42:47 2019 +0900

    Bump eslint-plugin-react from 7.14.3 to 7.16.0 (mastodon#12234)

    Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.14.3 to 7.16.0.
    - [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
    - [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
    - [Commits](jsx-eslint/eslint-plugin-react@v7.14.3...v7.16.0)

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

commit 91b02af
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Mon Oct 28 20:37:40 2019 +0900

    Bump sass from 1.23.0 to 1.23.1 (mastodon#12238)

    Bumps [sass](https://github.com/sass/dart-sass) from 1.23.0 to 1.23.1.
    - [Release notes](https://github.com/sass/dart-sass/releases)
    - [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
    - [Commits](sass/dart-sass@1.23.0...1.23.1)

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

commit 7be994e
Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Date:   Mon Oct 28 20:04:24 2019 +0900

    Bump @babel/plugin-proposal-decorators from 7.4.4 to 7.6.0 (mastodon#12232)

    Bumps [@babel/plugin-proposal-decorators](https://github.com/babel/babel) from 7.4.4 to 7.6.0.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
    - [Commits](babel/babel@v7.4.4...v7.6.0)

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

commit a4301b5
Author: Yamagishi Kazutoshi <ykzts@desire.sh>
Date:   Sun Oct 27 20:46:35 2019 +0900

    Fix notification message for own poll (mastodon#12219)

commit 5b46467
Author: Takeshi Umeda <noel.yoshiba@gmail.com>
Date:   Sun Oct 27 20:45:55 2019 +0900

    Fix an issue where polls with 'expires_at' not set expired (mastodon#12222)

commit 7512f3a
Author: Yamagishi Kazutoshi <ykzts@desire.sh>
Date:   Sun Oct 27 20:45:33 2019 +0900

    Change message of public timeline for local only (mastodon#12224)

commit 4988ebb
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Sat Oct 26 12:45:52 2019 +0200

    Change stale bot to only touch pull requests over 120 days old (mastodon#12217)

commit 9b36f62
Author: Nima Boscarino <nima.boscarino@gmail.com>
Date:   Fri Oct 25 02:48:20 2019 -0700

    Add download button to audio and video players (mastodon#12179)

    * Add download button for audio player

    * Add download button for video player

    * fix padding for download button in Audio component

commit 91945aa
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Fri Oct 25 11:47:40 2019 +0200

    Create stale.yml (mastodon#12207)
  • Loading branch information
hiyuki2578 committed Oct 30, 2019
1 parent 48f75b8 commit 3369c47
Show file tree
Hide file tree
Showing 13 changed files with 278 additions and 167 deletions.
10 changes: 10 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
daysUntilStale: 120
daysUntilClose: 7
exemptLabels:
- security
staleLabel: wontfix
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
only: pulls
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
source 'https://rubygems.org'
ruby '>= 2.4.0', '< 2.7.0'

gem 'pkg-config', '~> 1.3'
gem 'pkg-config', '~> 1.4'

gem 'puma', '~> 4.2'
gem 'rails', '~> 5.2.3'
Expand Down Expand Up @@ -106,7 +106,7 @@ group :development, :test do
gem 'i18n-tasks', '~> 0.9', require: false
gem 'pry-byebug', '~> 3.7'
gem 'pry-rails', '~> 0.3'
gem 'rspec-rails', '~> 3.8'
gem 'rspec-rails', '~> 3.9'
end

group :production, :test do
Expand All @@ -116,7 +116,7 @@ end
group :test do
gem 'capybara', '~> 3.29'
gem 'climate_control', '~> 0.2'
gem 'faker', '~> 2.5'
gem 'faker', '~> 2.6'
gem 'microformats', '~> 4.1'
gem 'rails-controller-testing', '~> 1.0'
gem 'rspec-sidekiq', '~> 3.0'
Expand All @@ -126,7 +126,7 @@ group :test do
end

group :development do
gem 'active_record_query_trace', '~> 1.6'
gem 'active_record_query_trace', '~> 1.7'
gem 'annotate', '~> 2.7'
gem 'better_errors', '~> 2.5'
gem 'binding_of_caller', '~> 0.7'
Expand Down
52 changes: 26 additions & 26 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ GEM
activemodel (>= 4.1, < 6.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
active_record_query_trace (1.6.2)
active_record_query_trace (1.7)
activejob (5.2.3)
activesupport (= 5.2.3)
globalid (>= 0.3.6)
Expand Down Expand Up @@ -235,13 +235,13 @@ GEM
multi_json
encryptor (3.0.0)
equatable (0.6.1)
erubi (1.8.0)
erubi (1.9.0)
et-orbi (1.1.6)
tzinfo
excon (0.62.0)
fabrication (2.20.2)
faker (2.5.0)
i18n (~> 1.6.0)
faker (2.6.0)
i18n (>= 1.6, < 1.8)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
fast_blank (1.0.0)
Expand Down Expand Up @@ -305,7 +305,7 @@ GEM
httplog (1.3.2)
rack (>= 1.0)
rainbow (>= 2.0.0)
i18n (1.6.0)
i18n (1.7.0)
concurrent-ruby (~> 1.0)
i18n-tasks (0.9.29)
activesupport (>= 4.0.2)
Expand Down Expand Up @@ -378,7 +378,7 @@ GEM
mimemagic (0.3.3)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.12.0)
minitest (5.12.2)
msgpack (1.3.1)
multi_json (1.13.1)
multipart-post (2.1.1)
Expand Down Expand Up @@ -435,7 +435,7 @@ GEM
pg (1.1.4)
pghero (2.3.0)
activerecord (>= 5)
pkg-config (1.3.9)
pkg-config (1.4.0)
premailer (1.11.1)
addressable
css_parser (>= 1.6.0)
Expand Down Expand Up @@ -488,8 +488,8 @@ GEM
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.2.0)
loofah (~> 2.2, >= 2.2.2)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails-i18n (5.1.3)
i18n (>= 0.7, < 2)
railties (>= 5.0, < 6)
Expand Down Expand Up @@ -537,26 +537,26 @@ GEM
rpam2 (4.0.2)
rqrcode (0.10.1)
chunky_png (~> 1.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.2)
rspec-core (3.9.0)
rspec-support (~> 3.9.0)
rspec-expectations (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-rails (3.8.2)
rspec-support (~> 3.9.0)
rspec-rails (3.9.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-support (~> 3.9.0)
rspec-sidekiq (3.0.3)
rspec-core (~> 3.0, >= 3.0.0)
sidekiq (>= 2.4.0)
rspec-support (3.8.0)
rspec-support (3.9.0)
rubocop (0.75.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
Expand Down Expand Up @@ -619,7 +619,7 @@ GEM
stoplight (2.1.3)
streamio-ffmpeg (3.0.2)
multi_json (~> 1.8)
strong_migrations (0.4.1)
strong_migrations (0.4.2)
activerecord (>= 5)
temple (0.8.1)
terminal-table (1.8.0)
Expand Down Expand Up @@ -678,7 +678,7 @@ PLATFORMS

DEPENDENCIES
active_model_serializers (~> 0.10)
active_record_query_trace (~> 1.6)
active_record_query_trace (~> 1.7)
addressable (~> 2.7)
annotate (~> 2.7)
aws-sdk-s3 (~> 1.48)
Expand Down Expand Up @@ -709,7 +709,7 @@ DEPENDENCIES
doorkeeper (~> 5.2)
dotenv-rails (~> 2.7)
fabrication (~> 2.20)
faker (~> 2.5)
faker (~> 2.6)
fast_blank (~> 1.0)
fastimage
fog-core (<= 2.1.0)
Expand Down Expand Up @@ -756,7 +756,7 @@ DEPENDENCIES
parslet
pg (~> 1.1)
pghero (~> 2.3)
pkg-config (~> 1.3)
pkg-config (~> 1.4)
posix-spawn!
premailer-rails
private_address_check (~> 0.5)
Expand All @@ -775,7 +775,7 @@ DEPENDENCIES
redis-namespace (~> 1.5)
redis-rails (~> 5.0)
rqrcode (~> 0.10)
rspec-rails (~> 3.8)
rspec-rails (~> 3.9)
rspec-sidekiq (~> 3.0)
rubocop (~> 0.75)
rubocop-rails (~> 2.3)
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/mastodon/components/poll.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class Poll extends ImmutablePureComponent {

static getDerivedStateFromProps (props, state) {
const { poll, intl } = props;
const expired = poll.get('expired') || (new Date(poll.get('expires_at'))).getTime() < intl.now();
const expires_at = poll.get('expires_at');
const expired = poll.get('expired') || expires_at !== null && (new Date(expires_at)).getTime() < intl.now();
return (expired === state.expired) ? null : { expired };
}

Expand Down
9 changes: 9 additions & 0 deletions app/javascript/mastodon/features/audio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const messages = defineMessages({
pause: { id: 'video.pause', defaultMessage: 'Pause' },
mute: { id: 'video.mute', defaultMessage: 'Mute sound' },
unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },
download: { id: 'video.download', defaultMessage: 'Download file' },
});

export default @injectIntl
Expand Down Expand Up @@ -218,6 +219,14 @@ class Audio extends React.PureComponent {
<span className='video-player__time-total'>{formatTime(this.state.duration || Math.floor(this.props.duration))}</span>
</span>
</div>

<div className='video-player__buttons right'>
<button type='button' aria-label={intl.formatMessage(messages.download)}>
<a className='video-player__download__icon' href={this.props.src} download>
<Icon id={'download'} fixedWidth />
</a>
</button>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import StatusContainer from '../../../containers/status_container';
import AccountContainer from '../../../containers/account_container';
import { injectIntl, FormattedMessage } from 'react-intl';
import Permalink from '../../../components/permalink';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { injectIntl, FormattedMessage, defineMessages } from 'react-intl';
import { HotKeys } from 'react-hotkeys';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { me } from 'mastodon/initial_state';
import StatusContainer from 'mastodon/containers/status_container';
import AccountContainer from 'mastodon/containers/account_container';
import Icon from 'mastodon/components/icon';
import Permalink from 'mastodon/components/permalink';

const messages = defineMessages({
favourite: { id: 'notification.favourite', defaultMessage: '{name} favourited your status' },
follow: { id: 'notification.follow', defaultMessage: '{name} followed you' },
ownPoll: { id: 'notification.own_poll', defaultMessage: 'Your poll has ended' },
poll: { id: 'notification.poll', defaultMessage: 'A poll you have voted in has ended' },
reblog: { id: 'notification.reblog', defaultMessage: '{name} boosted your status' },
});

const notificationForScreenReader = (intl, message, timestamp) => {
const output = [message];
Expand Down Expand Up @@ -107,7 +116,7 @@ class Notification extends ImmutablePureComponent {

return (
<HotKeys handlers={this.getHandlers()}>
<div className='notification notification-follow focusable' tabIndex='0' aria-label={notificationForScreenReader(intl, intl.formatMessage({ id: 'notification.follow', defaultMessage: '{name} followed you' }, { name: account.get('acct') }), notification.get('created_at'))}>
<div className='notification notification-follow focusable' tabIndex='0' aria-label={notificationForScreenReader(intl, intl.formatMessage(messages.follow, { name: account.get('acct') }), notification.get('created_at'))}>
<div className='notification__message'>
<div className='notification__favourite-icon-wrapper'>
<Icon id='user-plus' fixedWidth />
Expand Down Expand Up @@ -146,7 +155,7 @@ class Notification extends ImmutablePureComponent {

return (
<HotKeys handlers={this.getHandlers()}>
<div className='notification notification-favourite focusable' tabIndex='0' aria-label={notificationForScreenReader(intl, intl.formatMessage({ id: 'notification.favourite', defaultMessage: '{name} favourited your status' }, { name: notification.getIn(['account', 'acct']) }), notification.get('created_at'))}>
<div className='notification notification-favourite focusable' tabIndex='0' aria-label={notificationForScreenReader(intl, intl.formatMessage(messages.favourite, { name: notification.getIn(['account', 'acct']) }), notification.get('created_at'))}>
<div className='notification__message'>
<div className='notification__favourite-icon-wrapper'>
<Icon id='star' className='star-icon' fixedWidth />
Expand Down Expand Up @@ -178,7 +187,7 @@ class Notification extends ImmutablePureComponent {

return (
<HotKeys handlers={this.getHandlers()}>
<div className='notification notification-reblog focusable' tabIndex='0' aria-label={notificationForScreenReader(intl, intl.formatMessage({ id: 'notification.reblog', defaultMessage: '{name} boosted your status' }, { name: notification.getIn(['account', 'acct']) }), notification.get('created_at'))}>
<div className='notification notification-reblog focusable' tabIndex='0' aria-label={notificationForScreenReader(intl, intl.formatMessage(messages.reblog, { name: notification.getIn(['account', 'acct']) }), notification.get('created_at'))}>
<div className='notification__message'>
<div className='notification__favourite-icon-wrapper'>
<Icon id='retweet' fixedWidth />
Expand All @@ -205,25 +214,31 @@ class Notification extends ImmutablePureComponent {
);
}

renderPoll (notification) {
renderPoll (notification, account) {
const { intl } = this.props;
const ownPoll = me === account.get('id');
const message = ownPoll ? intl.formatMessage(messages.ownPoll) : intl.formatMessage(messages.poll);

return (
<HotKeys handlers={this.getHandlers()}>
<div className='notification notification-poll focusable' tabIndex='0' aria-label={notificationForScreenReader(intl, intl.formatMessage({ id: 'notification.poll', defaultMessage: 'A poll you have voted in has ended' }), notification.get('created_at'))}>
<div className='notification notification-poll focusable' tabIndex='0' aria-label={notificationForScreenReader(intl, message, notification.get('created_at'))}>
<div className='notification__message'>
<div className='notification__favourite-icon-wrapper'>
<Icon id='tasks' fixedWidth />
</div>

<span title={notification.get('created_at')}>
<FormattedMessage id='notification.poll' defaultMessage='A poll you have voted in has ended' />
{ownPoll ? (
<FormattedMessage id='notification.ownPoll' defaultMessage='Your poll has ended' />
) : (
<FormattedMessage id='notification.poll' defaultMessage='A poll you have voted in has ended' />
)}
</span>
</div>

<StatusContainer
id={notification.get('status')}
account={notification.get('account')}
account={account}
muted
withDismiss
hidden={this.props.hidden}
Expand Down Expand Up @@ -253,7 +268,7 @@ class Notification extends ImmutablePureComponent {
case 'reblog':
return this.renderReblog(notification, link);
case 'poll':
return this.renderPoll(notification);
return this.renderPoll(notification, account);
}

return null;
Expand Down
7 changes: 7 additions & 0 deletions app/javascript/mastodon/features/video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const messages = defineMessages({
close: { id: 'video.close', defaultMessage: 'Close video' },
fullscreen: { id: 'video.fullscreen', defaultMessage: 'Full screen' },
exit_fullscreen: { id: 'video.exit_fullscreen', defaultMessage: 'Exit full screen' },
download: { id: 'video.download', defaultMessage: 'Download file' },
});

export const formatTime = secondsNum => {
Expand Down Expand Up @@ -494,7 +495,13 @@ class Video extends React.PureComponent {
{(!onCloseVideo && !editable) && <button type='button' aria-label={intl.formatMessage(messages.hide)} onClick={this.toggleReveal}><Icon id='eye-slash' fixedWidth /></button>}
{(!fullscreen && onOpenVideo) && <button type='button' aria-label={intl.formatMessage(messages.expand)} onClick={this.handleOpenVideo}><Icon id='expand' fixedWidth /></button>}
{onCloseVideo && <button type='button' aria-label={intl.formatMessage(messages.close)} onClick={this.handleCloseVideo}><Icon id='compress' fixedWidth /></button>}
<button type='button' aria-label={intl.formatMessage(messages.download)}>
<a className='video-player__download__icon' href={this.props.src} download>
<Icon id={'download'} fixedWidth />
</a>
</button>
<button type='button' aria-label={intl.formatMessage(fullscreen ? messages.exit_fullscreen : messages.fullscreen)} onClick={this.toggleFullscreen}><Icon id={fullscreen ? 'compress' : 'arrows-alt'} fixedWidth /></button>

</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions app/javascript/mastodon/locales/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,10 @@
{
"defaultMessage": "Unmute sound",
"id": "video.unmute"
},
{
"defaultMessage": "Download file",
"id": "video.download"
}
],
"path": "app/javascript/mastodon/features/audio/index.json"
Expand Down
4 changes: 4 additions & 0 deletions app/javascript/styles/mastodon/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5330,6 +5330,10 @@ a.status-card.compact:hover {
display: flex;
justify-content: space-between;
padding-bottom: 10px;

.video-player__download__icon {
color: inherit;
}
}

&__buttons {
Expand Down
6 changes: 5 additions & 1 deletion app/views/public_timelines/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

.page-header
%h1= t('about.see_whats_happening')
%p= t('about.browse_public_posts')

- if Setting.show_known_fediverse_at_about_page
%p= t('about.browse_public_posts')
- else
%p= t('about.browse_local_posts')

#mastodon-timeline{ data: { props: Oj.dump(default_props) }}
#modal-container
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ en:
apps: Mobile apps
apps_platforms: Use Mastodon from iOS, Android and other platforms
browse_directory: Browse a profile directory and filter by interests
browse_local_posts: Browse a live stream of public posts from this server
browse_public_posts: Browse a live stream of public posts on Mastodon
contact: Contact
contact_missing: Not set
Expand Down
Loading

0 comments on commit 3369c47

Please sign in to comment.