Skip to content

Commit 77493ac

Browse files
committed
Squashed commit of the following:
commit 3369c47 Author: hiyuki2578 <tomoka319@gmail.com> Date: Wed Oct 30 12:36:54 2019 +0900 Squashed commit of the following: 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/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/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)
1 parent 662807a commit 77493ac

13 files changed

Lines changed: 278 additions & 167 deletions

File tree

.github/stale.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
daysUntilStale: 120
2+
daysUntilClose: 7
3+
exemptLabels:
4+
- security
5+
staleLabel: wontfix
6+
markComment: >
7+
This issue has been automatically marked as stale because it has not had
8+
recent activity. It will be closed if no further activity occurs. Thank you
9+
for your contributions.
10+
only: pulls

Gemfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source 'https://rubygems.org'
44
ruby '>= 2.4.0', '< 2.7.0'
55

6-
gem 'pkg-config', '~> 1.3'
6+
gem 'pkg-config', '~> 1.4'
77

88
gem 'puma', '~> 4.2'
99
gem 'rails', '~> 5.2.3'
@@ -106,7 +106,7 @@ group :development, :test do
106106
gem 'i18n-tasks', '~> 0.9', require: false
107107
gem 'pry-byebug', '~> 3.7'
108108
gem 'pry-rails', '~> 0.3'
109-
gem 'rspec-rails', '~> 3.8'
109+
gem 'rspec-rails', '~> 3.9'
110110
end
111111

112112
group :production, :test do
@@ -116,7 +116,7 @@ end
116116
group :test do
117117
gem 'capybara', '~> 3.29'
118118
gem 'climate_control', '~> 0.2'
119-
gem 'faker', '~> 2.5'
119+
gem 'faker', '~> 2.6'
120120
gem 'microformats', '~> 4.1'
121121
gem 'rails-controller-testing', '~> 1.0'
122122
gem 'rspec-sidekiq', '~> 3.0'
@@ -126,7 +126,7 @@ group :test do
126126
end
127127

128128
group :development do
129-
gem 'active_record_query_trace', '~> 1.6'
129+
gem 'active_record_query_trace', '~> 1.7'
130130
gem 'annotate', '~> 2.7'
131131
gem 'better_errors', '~> 2.5'
132132
gem 'binding_of_caller', '~> 0.7'

Gemfile.lock

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ GEM
7272
activemodel (>= 4.1, < 6.1)
7373
case_transform (>= 0.2)
7474
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
75-
active_record_query_trace (1.6.2)
75+
active_record_query_trace (1.7)
7676
activejob (5.2.3)
7777
activesupport (= 5.2.3)
7878
globalid (>= 0.3.6)
@@ -235,13 +235,13 @@ GEM
235235
multi_json
236236
encryptor (3.0.0)
237237
equatable (0.6.1)
238-
erubi (1.8.0)
238+
erubi (1.9.0)
239239
et-orbi (1.1.6)
240240
tzinfo
241241
excon (0.62.0)
242242
fabrication (2.20.2)
243-
faker (2.5.0)
244-
i18n (~> 1.6.0)
243+
faker (2.6.0)
244+
i18n (>= 1.6, < 1.8)
245245
faraday (0.15.4)
246246
multipart-post (>= 1.2, < 3)
247247
fast_blank (1.0.0)
@@ -305,7 +305,7 @@ GEM
305305
httplog (1.3.2)
306306
rack (>= 1.0)
307307
rainbow (>= 2.0.0)
308-
i18n (1.6.0)
308+
i18n (1.7.0)
309309
concurrent-ruby (~> 1.0)
310310
i18n-tasks (0.9.29)
311311
activesupport (>= 4.0.2)
@@ -378,7 +378,7 @@ GEM
378378
mimemagic (0.3.3)
379379
mini_mime (1.0.2)
380380
mini_portile2 (2.4.0)
381-
minitest (5.12.0)
381+
minitest (5.12.2)
382382
msgpack (1.3.1)
383383
multi_json (1.13.1)
384384
multipart-post (2.1.1)
@@ -435,7 +435,7 @@ GEM
435435
pg (1.1.4)
436436
pghero (2.3.0)
437437
activerecord (>= 5)
438-
pkg-config (1.3.9)
438+
pkg-config (1.4.0)
439439
premailer (1.11.1)
440440
addressable
441441
css_parser (>= 1.6.0)
@@ -488,8 +488,8 @@ GEM
488488
rails-dom-testing (2.0.3)
489489
activesupport (>= 4.2.0)
490490
nokogiri (>= 1.6)
491-
rails-html-sanitizer (1.2.0)
492-
loofah (~> 2.2, >= 2.2.2)
491+
rails-html-sanitizer (1.3.0)
492+
loofah (~> 2.3)
493493
rails-i18n (5.1.3)
494494
i18n (>= 0.7, < 2)
495495
railties (>= 5.0, < 6)
@@ -537,26 +537,26 @@ GEM
537537
rpam2 (4.0.2)
538538
rqrcode (0.10.1)
539539
chunky_png (~> 1.0)
540-
rspec-core (3.8.0)
541-
rspec-support (~> 3.8.0)
542-
rspec-expectations (3.8.2)
540+
rspec-core (3.9.0)
541+
rspec-support (~> 3.9.0)
542+
rspec-expectations (3.9.0)
543543
diff-lcs (>= 1.2.0, < 2.0)
544-
rspec-support (~> 3.8.0)
545-
rspec-mocks (3.8.0)
544+
rspec-support (~> 3.9.0)
545+
rspec-mocks (3.9.0)
546546
diff-lcs (>= 1.2.0, < 2.0)
547-
rspec-support (~> 3.8.0)
548-
rspec-rails (3.8.2)
547+
rspec-support (~> 3.9.0)
548+
rspec-rails (3.9.0)
549549
actionpack (>= 3.0)
550550
activesupport (>= 3.0)
551551
railties (>= 3.0)
552-
rspec-core (~> 3.8.0)
553-
rspec-expectations (~> 3.8.0)
554-
rspec-mocks (~> 3.8.0)
555-
rspec-support (~> 3.8.0)
552+
rspec-core (~> 3.9.0)
553+
rspec-expectations (~> 3.9.0)
554+
rspec-mocks (~> 3.9.0)
555+
rspec-support (~> 3.9.0)
556556
rspec-sidekiq (3.0.3)
557557
rspec-core (~> 3.0, >= 3.0.0)
558558
sidekiq (>= 2.4.0)
559-
rspec-support (3.8.0)
559+
rspec-support (3.9.0)
560560
rubocop (0.75.1)
561561
jaro_winkler (~> 1.5.1)
562562
parallel (~> 1.10)
@@ -619,7 +619,7 @@ GEM
619619
stoplight (2.1.3)
620620
streamio-ffmpeg (3.0.2)
621621
multi_json (~> 1.8)
622-
strong_migrations (0.4.1)
622+
strong_migrations (0.4.2)
623623
activerecord (>= 5)
624624
temple (0.8.1)
625625
terminal-table (1.8.0)
@@ -678,7 +678,7 @@ PLATFORMS
678678

679679
DEPENDENCIES
680680
active_model_serializers (~> 0.10)
681-
active_record_query_trace (~> 1.6)
681+
active_record_query_trace (~> 1.7)
682682
addressable (~> 2.7)
683683
annotate (~> 2.7)
684684
aws-sdk-s3 (~> 1.48)
@@ -709,7 +709,7 @@ DEPENDENCIES
709709
doorkeeper (~> 5.2)
710710
dotenv-rails (~> 2.7)
711711
fabrication (~> 2.20)
712-
faker (~> 2.5)
712+
faker (~> 2.6)
713713
fast_blank (~> 1.0)
714714
fastimage
715715
fog-core (<= 2.1.0)
@@ -756,7 +756,7 @@ DEPENDENCIES
756756
parslet
757757
pg (~> 1.1)
758758
pghero (~> 2.3)
759-
pkg-config (~> 1.3)
759+
pkg-config (~> 1.4)
760760
posix-spawn!
761761
premailer-rails
762762
private_address_check (~> 0.5)
@@ -775,7 +775,7 @@ DEPENDENCIES
775775
redis-namespace (~> 1.5)
776776
redis-rails (~> 5.0)
777777
rqrcode (~> 0.10)
778-
rspec-rails (~> 3.8)
778+
rspec-rails (~> 3.9)
779779
rspec-sidekiq (~> 3.0)
780780
rubocop (~> 0.75)
781781
rubocop-rails (~> 2.3)

app/javascript/mastodon/components/poll.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ class Poll extends ImmutablePureComponent {
3939

4040
static getDerivedStateFromProps (props, state) {
4141
const { poll, intl } = props;
42-
const expired = poll.get('expired') || (new Date(poll.get('expires_at'))).getTime() < intl.now();
42+
const expires_at = poll.get('expires_at');
43+
const expired = poll.get('expired') || expires_at !== null && (new Date(expires_at)).getTime() < intl.now();
4344
return (expired === state.expired) ? null : { expired };
4445
}
4546

app/javascript/mastodon/features/audio/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const messages = defineMessages({
1212
pause: { id: 'video.pause', defaultMessage: 'Pause' },
1313
mute: { id: 'video.mute', defaultMessage: 'Mute sound' },
1414
unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },
15+
download: { id: 'video.download', defaultMessage: 'Download file' },
1516
});
1617

1718
export default @injectIntl
@@ -218,6 +219,14 @@ class Audio extends React.PureComponent {
218219
<span className='video-player__time-total'>{formatTime(this.state.duration || Math.floor(this.props.duration))}</span>
219220
</span>
220221
</div>
222+
223+
<div className='video-player__buttons right'>
224+
<button type='button' aria-label={intl.formatMessage(messages.download)}>
225+
<a className='video-player__download__icon' href={this.props.src} download>
226+
<Icon id={'download'} fixedWidth />
227+
</a>
228+
</button>
229+
</div>
221230
</div>
222231
</div>
223232
</div>

app/javascript/mastodon/features/notifications/components/notification.js

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
import React from 'react';
2-
import PropTypes from 'prop-types';
32
import ImmutablePropTypes from 'react-immutable-proptypes';
4-
import StatusContainer from '../../../containers/status_container';
5-
import AccountContainer from '../../../containers/account_container';
6-
import { injectIntl, FormattedMessage } from 'react-intl';
7-
import Permalink from '../../../components/permalink';
8-
import ImmutablePureComponent from 'react-immutable-pure-component';
3+
import { injectIntl, FormattedMessage, defineMessages } from 'react-intl';
94
import { HotKeys } from 'react-hotkeys';
5+
import PropTypes from 'prop-types';
6+
import ImmutablePureComponent from 'react-immutable-pure-component';
7+
import { me } from 'mastodon/initial_state';
8+
import StatusContainer from 'mastodon/containers/status_container';
9+
import AccountContainer from 'mastodon/containers/account_container';
1010
import Icon from 'mastodon/components/icon';
11+
import Permalink from 'mastodon/components/permalink';
12+
13+
const messages = defineMessages({
14+
favourite: { id: 'notification.favourite', defaultMessage: '{name} favourited your status' },
15+
follow: { id: 'notification.follow', defaultMessage: '{name} followed you' },
16+
ownPoll: { id: 'notification.own_poll', defaultMessage: 'Your poll has ended' },
17+
poll: { id: 'notification.poll', defaultMessage: 'A poll you have voted in has ended' },
18+
reblog: { id: 'notification.reblog', defaultMessage: '{name} boosted your status' },
19+
});
1120

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

108117
return (
109118
<HotKeys handlers={this.getHandlers()}>
110-
<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'))}>
119+
<div className='notification notification-follow focusable' tabIndex='0' aria-label={notificationForScreenReader(intl, intl.formatMessage(messages.follow, { name: account.get('acct') }), notification.get('created_at'))}>
111120
<div className='notification__message'>
112121
<div className='notification__favourite-icon-wrapper'>
113122
<Icon id='user-plus' fixedWidth />
@@ -146,7 +155,7 @@ class Notification extends ImmutablePureComponent {
146155

147156
return (
148157
<HotKeys handlers={this.getHandlers()}>
149-
<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'))}>
158+
<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'))}>
150159
<div className='notification__message'>
151160
<div className='notification__favourite-icon-wrapper'>
152161
<Icon id='star' className='star-icon' fixedWidth />
@@ -178,7 +187,7 @@ class Notification extends ImmutablePureComponent {
178187

179188
return (
180189
<HotKeys handlers={this.getHandlers()}>
181-
<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'))}>
190+
<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'))}>
182191
<div className='notification__message'>
183192
<div className='notification__favourite-icon-wrapper'>
184193
<Icon id='retweet' fixedWidth />
@@ -205,25 +214,31 @@ class Notification extends ImmutablePureComponent {
205214
);
206215
}
207216

208-
renderPoll (notification) {
217+
renderPoll (notification, account) {
209218
const { intl } = this.props;
219+
const ownPoll = me === account.get('id');
220+
const message = ownPoll ? intl.formatMessage(messages.ownPoll) : intl.formatMessage(messages.poll);
210221

211222
return (
212223
<HotKeys handlers={this.getHandlers()}>
213-
<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'))}>
224+
<div className='notification notification-poll focusable' tabIndex='0' aria-label={notificationForScreenReader(intl, message, notification.get('created_at'))}>
214225
<div className='notification__message'>
215226
<div className='notification__favourite-icon-wrapper'>
216227
<Icon id='tasks' fixedWidth />
217228
</div>
218229

219230
<span title={notification.get('created_at')}>
220-
<FormattedMessage id='notification.poll' defaultMessage='A poll you have voted in has ended' />
231+
{ownPoll ? (
232+
<FormattedMessage id='notification.ownPoll' defaultMessage='Your poll has ended' />
233+
) : (
234+
<FormattedMessage id='notification.poll' defaultMessage='A poll you have voted in has ended' />
235+
)}
221236
</span>
222237
</div>
223238

224239
<StatusContainer
225240
id={notification.get('status')}
226-
account={notification.get('account')}
241+
account={account}
227242
muted
228243
withDismiss
229244
hidden={this.props.hidden}
@@ -253,7 +268,7 @@ class Notification extends ImmutablePureComponent {
253268
case 'reblog':
254269
return this.renderReblog(notification, link);
255270
case 'poll':
256-
return this.renderPoll(notification);
271+
return this.renderPoll(notification, account);
257272
}
258273

259274
return null;

app/javascript/mastodon/features/video/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const messages = defineMessages({
1919
close: { id: 'video.close', defaultMessage: 'Close video' },
2020
fullscreen: { id: 'video.fullscreen', defaultMessage: 'Full screen' },
2121
exit_fullscreen: { id: 'video.exit_fullscreen', defaultMessage: 'Exit full screen' },
22+
download: { id: 'video.download', defaultMessage: 'Download file' },
2223
});
2324

2425
export const formatTime = secondsNum => {
@@ -494,7 +495,13 @@ class Video extends React.PureComponent {
494495
{(!onCloseVideo && !editable) && <button type='button' aria-label={intl.formatMessage(messages.hide)} onClick={this.toggleReveal}><Icon id='eye-slash' fixedWidth /></button>}
495496
{(!fullscreen && onOpenVideo) && <button type='button' aria-label={intl.formatMessage(messages.expand)} onClick={this.handleOpenVideo}><Icon id='expand' fixedWidth /></button>}
496497
{onCloseVideo && <button type='button' aria-label={intl.formatMessage(messages.close)} onClick={this.handleCloseVideo}><Icon id='compress' fixedWidth /></button>}
498+
<button type='button' aria-label={intl.formatMessage(messages.download)}>
499+
<a className='video-player__download__icon' href={this.props.src} download>
500+
<Icon id={'download'} fixedWidth />
501+
</a>
502+
</button>
497503
<button type='button' aria-label={intl.formatMessage(fullscreen ? messages.exit_fullscreen : messages.fullscreen)} onClick={this.toggleFullscreen}><Icon id={fullscreen ? 'compress' : 'arrows-alt'} fixedWidth /></button>
504+
498505
</div>
499506
</div>
500507
</div>

app/javascript/mastodon/locales/defaultMessages.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,10 @@
780780
{
781781
"defaultMessage": "Unmute sound",
782782
"id": "video.unmute"
783+
},
784+
{
785+
"defaultMessage": "Download file",
786+
"id": "video.download"
783787
}
784788
],
785789
"path": "app/javascript/mastodon/features/audio/index.json"

app/javascript/styles/mastodon/components.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5330,6 +5330,10 @@ a.status-card.compact:hover {
53305330
display: flex;
53315331
justify-content: space-between;
53325332
padding-bottom: 10px;
5333+
5334+
.video-player__download__icon {
5335+
color: inherit;
5336+
}
53335337
}
53345338

53355339
&__buttons {

app/views/public_timelines/show.html.haml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88
.page-header
99
%h1= t('about.see_whats_happening')
10-
%p= t('about.browse_public_posts')
10+
11+
- if Setting.show_known_fediverse_at_about_page
12+
%p= t('about.browse_public_posts')
13+
- else
14+
%p= t('about.browse_local_posts')
1115

1216
#mastodon-timeline{ data: { props: Oj.dump(default_props) }}
1317
#modal-container

0 commit comments

Comments
 (0)