From c946ba3faeddd181d23a75342a487fbcf992f027 Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 20 Sep 2018 22:53:30 +0200 Subject: Add rel=me to moved accounts' link (#8742) --- app/views/accounts/_moved.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/accounts/_moved.html.haml b/app/views/accounts/_moved.html.haml index f99328dbd..7a777bfea 100644 --- a/app/views/accounts/_moved.html.haml +++ b/app/views/accounts/_moved.html.haml @@ -6,7 +6,7 @@ = t('accounts.moved_html', name: content_tag(:bdi, content_tag(:strong, display_name(account, custom_emojify: true), class: :emojify)), new_profile_link: link_to(content_tag(:strong, safe_join(['@', content_tag(:span, moved_to_account.acct)])), TagManager.instance.url_for(moved_to_account), class: 'mention')) .moved-account-widget__card - = link_to TagManager.instance.url_for(moved_to_account), class: 'detailed-status__display-name p-author h-card', target: '_blank', rel: 'noopener' do + = link_to TagManager.instance.url_for(moved_to_account), class: 'detailed-status__display-name p-author h-card', target: '_blank', rel: 'me noopener' do .detailed-status__display-avatar .account__avatar-overlay .account__avatar-overlay-base{ style: "background-image: url('#{moved_to_account.avatar.url(:original)}')" } -- cgit From c39183cc628ea9556db53af5059656d6b63609ba Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 23 Sep 2018 20:42:13 +0200 Subject: Refactor active_nav_class for use with multiple paths (#8757) --- app/helpers/application_helper.rb | 4 ++-- app/views/accounts/_header.html.haml | 2 +- spec/helpers/application_helper_spec.rb | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 758f864d7..f8e2c0e11 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -7,8 +7,8 @@ module ApplicationHelper follow ).freeze - def active_nav_class(path) - current_page?(path) ? 'active' : '' + def active_nav_class(*paths) + paths.any? { |path| current_page?(path) } ? 'active' : '' end def active_link_to(label, path, **options) diff --git a/app/views/accounts/_header.html.haml b/app/views/accounts/_header.html.haml index 3da270d27..9ceae007d 100644 --- a/app/views/accounts/_header.html.haml +++ b/app/views/accounts/_header.html.haml @@ -16,7 +16,7 @@ = fa_icon('lock') if account.locked? .public-account-header__tabs__tabs .details-counters - .counter{ class: active_nav_class(short_account_url(account)) + active_nav_class(short_account_with_replies_url(account)) + active_nav_class(short_account_media_url(account)) } + .counter{ class: active_nav_class(short_account_url(account), short_account_with_replies_url(account), short_account_media_url(account)) } = link_to short_account_url(account), class: 'u-url u-uid', title: number_with_delimiter(account.statuses_count) do %span.counter-number= number_to_human account.statuses_count, strip_insignificant_zeros: true %span.counter-label= t('accounts.posts', count: account.statuses_count) diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 3ccd96f44..61780b46b 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -9,6 +9,14 @@ describe ApplicationHelper do expect(result).to eq "active" end + it 'returns active when on a current page' do + allow(helper).to receive(:current_page?).with('/foo').and_return(false) + allow(helper).to receive(:current_page?).with('/test').and_return(true) + + result = helper.active_nav_class('/foo', '/test') + expect(result).to eq "active" + end + it 'returns empty string when not on current page' do allow(helper).to receive(:current_page?).and_return(false) -- cgit From 1889526e23ce41a37395fdcf89bd415bb2f7546f Mon Sep 17 00:00:00 2001 From: Matt Sweetman Date: Mon, 24 Sep 2018 04:44:01 +0100 Subject: Add user preference to always expand toots marked with content warnings (#8762) --- app/controllers/settings/preferences_controller.rb | 1 + app/javascript/mastodon/actions/importer/normalizer.js | 3 ++- app/javascript/mastodon/initial_state.js | 1 + app/lib/user_settings_decorator.rb | 5 +++++ app/models/user.rb | 2 +- app/serializers/initial_state_serializer.rb | 1 + app/views/settings/preferences/show.html.haml | 1 + app/views/stream_entries/_detailed_status.html.haml | 4 ++-- app/views/stream_entries/_simple_status.html.haml | 4 ++-- config/locales/simple_form.en.yml | 1 + config/settings.yml | 1 + 11 files changed, 18 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index b475c722d..ab74ad9f2 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -41,6 +41,7 @@ class Settings::PreferencesController < ApplicationController :setting_delete_modal, :setting_auto_play_gif, :setting_display_sensitive_media, + :setting_expand_spoilers, :setting_reduce_motion, :setting_system_font_ui, :setting_noindex, diff --git a/app/javascript/mastodon/actions/importer/normalizer.js b/app/javascript/mastodon/actions/importer/normalizer.js index 10a39e050..a2af3222e 100644 --- a/app/javascript/mastodon/actions/importer/normalizer.js +++ b/app/javascript/mastodon/actions/importer/normalizer.js @@ -1,6 +1,7 @@ import escapeTextContentForBrowser from 'escape-html'; import emojify from '../../features/emoji/emoji'; import { unescapeHTML } from '../../utils/html'; +import { expandSpoilers } from '../../initial_state'; const domParser = new DOMParser(); @@ -57,7 +58,7 @@ export function normalizeStatus(status, normalOldStatus) { normalStatus.search_index = domParser.parseFromString(searchContent, 'text/html').documentElement.textContent; normalStatus.contentHtml = emojify(normalStatus.content, emojiMap); normalStatus.spoilerHtml = emojify(escapeTextContentForBrowser(spoilerText), emojiMap); - normalStatus.hidden = spoilerText.length > 0 || normalStatus.sensitive; + normalStatus.hidden = expandSpoilers ? false : spoilerText.length > 0 || normalStatus.sensitive; } return normalStatus; diff --git a/app/javascript/mastodon/initial_state.js b/app/javascript/mastodon/initial_state.js index 6ffb4cbfb..e615de09c 100644 --- a/app/javascript/mastodon/initial_state.js +++ b/app/javascript/mastodon/initial_state.js @@ -6,6 +6,7 @@ const getMeta = (prop) => initialState && initialState.meta && initialState.meta export const reduceMotion = getMeta('reduce_motion'); export const autoPlayGif = getMeta('auto_play_gif'); export const displaySensitiveMedia = getMeta('display_sensitive_media'); +export const expandSpoilers = getMeta('expand_spoilers'); export const unfollowModal = getMeta('unfollow_modal'); export const boostModal = getMeta('boost_modal'); export const deleteModal = getMeta('delete_modal'); diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 833959397..7239dc194 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -25,6 +25,7 @@ class UserSettingsDecorator user.settings['delete_modal'] = delete_modal_preference if change?('setting_delete_modal') user.settings['auto_play_gif'] = auto_play_gif_preference if change?('setting_auto_play_gif') user.settings['display_sensitive_media'] = display_sensitive_media_preference if change?('setting_display_sensitive_media') + user.settings['expand_spoilers'] = expand_spoilers_preference if change?('setting_expand_spoilers') user.settings['reduce_motion'] = reduce_motion_preference if change?('setting_reduce_motion') user.settings['system_font_ui'] = system_font_ui_preference if change?('setting_system_font_ui') user.settings['noindex'] = noindex_preference if change?('setting_noindex') @@ -72,6 +73,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_display_sensitive_media' end + def expand_spoilers_preference + boolean_cast_setting 'setting_expand_spoilers' + end + def reduce_motion_preference boolean_cast_setting 'setting_reduce_motion' end diff --git a/app/models/user.rb b/app/models/user.rb index d83df28c2..541b5a638 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -96,7 +96,7 @@ class User < ApplicationRecord delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :delete_modal, :reduce_motion, :system_font_ui, :noindex, :theme, :display_sensitive_media, :hide_network, - :default_language, to: :settings, prefix: :setting, allow_nil: false + :expand_spoilers, :default_language, to: :settings, prefix: :setting, allow_nil: false attr_reader :invite_code diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb index 78b96298c..35b869e38 100644 --- a/app/serializers/initial_state_serializer.rb +++ b/app/serializers/initial_state_serializer.rb @@ -25,6 +25,7 @@ class InitialStateSerializer < ActiveModel::Serializer store[:delete_modal] = object.current_account.user.setting_delete_modal store[:auto_play_gif] = object.current_account.user.setting_auto_play_gif store[:display_sensitive_media] = object.current_account.user.setting_display_sensitive_media + store[:expand_spoilers] = object.current_account.user.setting_expand_spoilers store[:reduce_motion] = object.current_account.user.setting_reduce_motion end diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index c79ecf6d5..a7b1a52fc 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -48,6 +48,7 @@ .fields-group = f.input :setting_auto_play_gif, as: :boolean, wrapper: :with_label = f.input :setting_display_sensitive_media, as: :boolean, wrapper: :with_label + = f.input :setting_expand_spoilers, as: :boolean, wrapper: :with_label = f.input :setting_reduce_motion, as: :boolean, wrapper: :with_label = f.input :setting_system_font_ui, as: :boolean, wrapper: :with_label diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml index d0d9cc5fc..77346dba7 100644 --- a/app/views/stream_entries/_detailed_status.html.haml +++ b/app/views/stream_entries/_detailed_status.html.haml @@ -16,10 +16,10 @@ .status__content.emojify< - if status.spoiler_text? - %p{ style: 'margin-bottom: 0' }< + %p{ :style => ('margin-bottom: 0' unless current_account&.user&.setting_expand_spoilers) }< %span.p-summary> #{Formatter.instance.format_spoiler(status, autoplay: autoplay)}  %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more') - .e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay) + .e-content{ lang: status.language, style: "display: #{!current_account&.user&.setting_expand_spoilers && status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay) - if !status.media_attachments.empty? - if status.media_attachments.first.video? diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml index fc2cacf30..206cf0aec 100644 --- a/app/views/stream_entries/_simple_status.html.haml +++ b/app/views/stream_entries/_simple_status.html.haml @@ -19,10 +19,10 @@ = fa_icon('lock') if status.account.locked? .status__content.emojify< - if status.spoiler_text? - %p{ style: 'margin-bottom: 0' }< + %p{ :style => ('margin-bottom: 0' unless current_account&.user&.setting_expand_spoilers) }< %span.p-summary> #{Formatter.instance.format_spoiler(status, autoplay: autoplay)}  %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more') - .e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay) + .e-content{ lang: status.language, style: "display: #{!current_account&.user&.setting_expand_spoilers && status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay) - unless status.media_attachments.empty? - if status.media_attachments.first.video? diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index c2e572997..5b1a07a4a 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -73,6 +73,7 @@ en: setting_default_sensitive: Always mark media as sensitive setting_delete_modal: Show confirmation dialog before deleting a toot setting_display_sensitive_media: Always show media marked as sensitive + setting_expand_spoilers: Always expand toots marked with content warnings setting_hide_network: Hide your network setting_noindex: Opt-out of search engine indexing setting_reduce_motion: Reduce motion in animations diff --git a/config/settings.yml b/config/settings.yml index 78a801406..e2214b4b7 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -27,6 +27,7 @@ defaults: &defaults delete_modal: true auto_play_gif: false display_sensitive_media: false + expand_spoilers: false preview_sensitive_media: false reduce_motion: false system_font_ui: false -- cgit From f7a6f9489da9b2a1820366654df47b8a52f5c5bc Mon Sep 17 00:00:00 2001 From: ふぁぼ原 Date: Tue, 25 Sep 2018 12:09:35 +0900 Subject: Add a new preference to always hide all media (#8569) --- app/controllers/settings/preferences_controller.rb | 2 +- .../mastodon/components/media_gallery.js | 4 +-- .../account_gallery/components/media_item.js | 4 +-- app/javascript/mastodon/features/video/index.js | 15 ++++++--- app/javascript/mastodon/initial_state.js | 2 +- app/lib/user_settings_decorator.rb | 36 +++++++++++----------- app/models/user.rb | 10 +++++- app/serializers/initial_state_serializer.rb | 16 +++++----- app/views/settings/preferences/show.html.haml | 2 +- .../stream_entries/_detailed_status.html.haml | 4 +-- app/views/stream_entries/_simple_status.html.haml | 4 +-- config/locales/simple_form.en.yml | 8 ++++- config/locales/simple_form.ja.yml | 8 ++++- config/settings.yml | 2 +- 14 files changed, 72 insertions(+), 45 deletions(-) (limited to 'app/views') diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index ab74ad9f2..b83900f07 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -40,7 +40,7 @@ class Settings::PreferencesController < ApplicationController :setting_boost_modal, :setting_delete_modal, :setting_auto_play_gif, - :setting_display_sensitive_media, + :setting_display_media, :setting_expand_spoilers, :setting_reduce_motion, :setting_system_font_ui, diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js index a1785196f..ed0e4ff1b 100644 --- a/app/javascript/mastodon/components/media_gallery.js +++ b/app/javascript/mastodon/components/media_gallery.js @@ -6,7 +6,7 @@ import IconButton from './icon_button'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { isIOS } from '../is_mobile'; import classNames from 'classnames'; -import { autoPlayGif, displaySensitiveMedia } from '../initial_state'; +import { autoPlayGif, displayMedia } from '../initial_state'; const messages = defineMessages({ toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: 'Toggle visibility' }, @@ -197,7 +197,7 @@ class MediaGallery extends React.PureComponent { }; state = { - visible: !this.props.sensitive || displaySensitiveMedia, + visible: displayMedia !== 'hide_all' && !this.props.sensitive || displayMedia === 'show_all', }; componentWillReceiveProps (nextProps) { diff --git a/app/javascript/mastodon/features/account_gallery/components/media_item.js b/app/javascript/mastodon/features/account_gallery/components/media_item.js index f7a802dc7..7c330c430 100644 --- a/app/javascript/mastodon/features/account_gallery/components/media_item.js +++ b/app/javascript/mastodon/features/account_gallery/components/media_item.js @@ -2,7 +2,7 @@ import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Permalink from '../../../components/permalink'; -import { displaySensitiveMedia } from '../../../initial_state'; +import { displayMedia } from '../../../initial_state'; export default class MediaItem extends ImmutablePureComponent { @@ -11,7 +11,7 @@ export default class MediaItem extends ImmutablePureComponent { }; state = { - visible: !this.props.media.getIn(['status', 'sensitive']) || displaySensitiveMedia, + visible: displayMedia !== 'hide_all' && !this.props.media.getIn(['status', 'sensitive']) || displayMedia === 'show_all', }; handleClick = () => { diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js index d17253957..67f7580b9 100644 --- a/app/javascript/mastodon/features/video/index.js +++ b/app/javascript/mastodon/features/video/index.js @@ -5,7 +5,7 @@ import { fromJS } from 'immutable'; import { throttle } from 'lodash'; import classNames from 'classnames'; import { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen'; -import { displaySensitiveMedia } from '../../initial_state'; +import { displayMedia } from '../../initial_state'; const messages = defineMessages({ play: { id: 'video.play', defaultMessage: 'Play' }, @@ -111,7 +111,7 @@ class Video extends React.PureComponent { fullscreen: false, hovered: false, muted: false, - revealed: !this.props.sensitive || displaySensitiveMedia, + revealed: displayMedia !== 'hide_all' && !this.props.sensitive || displayMedia === 'show_all', }; setPlayerRef = c => { @@ -272,7 +272,7 @@ class Video extends React.PureComponent { } render () { - const { preview, src, inline, startTime, onOpenVideo, onCloseVideo, intl, alt, detailed } = this.props; + const { preview, src, inline, startTime, onOpenVideo, onCloseVideo, intl, alt, detailed, sensitive } = this.props; const { containerWidth, currentTime, duration, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state; const progress = (currentTime / duration) * 100; const playerStyle = {}; @@ -296,6 +296,13 @@ class Video extends React.PureComponent { preload = 'none'; } + let warning; + if (sensitive) { + warning = ; + } else { + warning = ; + } + return (
diff --git a/app/javascript/mastodon/initial_state.js b/app/javascript/mastodon/initial_state.js index e615de09c..262c93195 100644 --- a/app/javascript/mastodon/initial_state.js +++ b/app/javascript/mastodon/initial_state.js @@ -5,7 +5,7 @@ const getMeta = (prop) => initialState && initialState.meta && initialState.meta export const reduceMotion = getMeta('reduce_motion'); export const autoPlayGif = getMeta('auto_play_gif'); -export const displaySensitiveMedia = getMeta('display_sensitive_media'); +export const displayMedia = getMeta('display_media'); export const expandSpoilers = getMeta('expand_spoilers'); export const unfollowModal = getMeta('unfollow_modal'); export const boostModal = getMeta('boost_modal'); diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 7239dc194..40973c707 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -15,22 +15,22 @@ class UserSettingsDecorator private def process_update - user.settings['notification_emails'] = merged_notification_emails if change?('notification_emails') - user.settings['interactions'] = merged_interactions if change?('interactions') - user.settings['default_privacy'] = default_privacy_preference if change?('setting_default_privacy') - user.settings['default_sensitive'] = default_sensitive_preference if change?('setting_default_sensitive') - user.settings['default_language'] = default_language_preference if change?('setting_default_language') - user.settings['unfollow_modal'] = unfollow_modal_preference if change?('setting_unfollow_modal') - user.settings['boost_modal'] = boost_modal_preference if change?('setting_boost_modal') - user.settings['delete_modal'] = delete_modal_preference if change?('setting_delete_modal') - user.settings['auto_play_gif'] = auto_play_gif_preference if change?('setting_auto_play_gif') - user.settings['display_sensitive_media'] = display_sensitive_media_preference if change?('setting_display_sensitive_media') - user.settings['expand_spoilers'] = expand_spoilers_preference if change?('setting_expand_spoilers') - user.settings['reduce_motion'] = reduce_motion_preference if change?('setting_reduce_motion') - user.settings['system_font_ui'] = system_font_ui_preference if change?('setting_system_font_ui') - user.settings['noindex'] = noindex_preference if change?('setting_noindex') - user.settings['theme'] = theme_preference if change?('setting_theme') - user.settings['hide_network'] = hide_network_preference if change?('setting_hide_network') + user.settings['notification_emails'] = merged_notification_emails if change?('notification_emails') + user.settings['interactions'] = merged_interactions if change?('interactions') + user.settings['default_privacy'] = default_privacy_preference if change?('setting_default_privacy') + user.settings['default_sensitive'] = default_sensitive_preference if change?('setting_default_sensitive') + user.settings['default_language'] = default_language_preference if change?('setting_default_language') + user.settings['unfollow_modal'] = unfollow_modal_preference if change?('setting_unfollow_modal') + user.settings['boost_modal'] = boost_modal_preference if change?('setting_boost_modal') + user.settings['delete_modal'] = delete_modal_preference if change?('setting_delete_modal') + user.settings['auto_play_gif'] = auto_play_gif_preference if change?('setting_auto_play_gif') + user.settings['display_media'] = display_media_preference if change?('setting_display_media') + user.settings['expand_spoilers'] = expand_spoilers_preference if change?('setting_expand_spoilers') + user.settings['reduce_motion'] = reduce_motion_preference if change?('setting_reduce_motion') + user.settings['system_font_ui'] = system_font_ui_preference if change?('setting_system_font_ui') + user.settings['noindex'] = noindex_preference if change?('setting_noindex') + user.settings['theme'] = theme_preference if change?('setting_theme') + user.settings['hide_network'] = hide_network_preference if change?('setting_hide_network') end def merged_notification_emails @@ -69,8 +69,8 @@ class UserSettingsDecorator boolean_cast_setting 'setting_auto_play_gif' end - def display_sensitive_media_preference - boolean_cast_setting 'setting_display_sensitive_media' + def display_media_preference + settings['setting_display_media'] end def expand_spoilers_preference diff --git a/app/models/user.rb b/app/models/user.rb index 541b5a638..69fa0688a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -95,7 +95,7 @@ class User < ApplicationRecord has_many :session_activations, dependent: :destroy delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :delete_modal, - :reduce_motion, :system_font_ui, :noindex, :theme, :display_sensitive_media, :hide_network, + :reduce_motion, :system_font_ui, :noindex, :theme, :display_media, :hide_network, :expand_spoilers, :default_language, to: :settings, prefix: :setting, allow_nil: false attr_reader :invite_code @@ -316,6 +316,14 @@ class User < ApplicationRecord super end + def show_all_media? + setting_display_media == 'show_all' + end + + def hide_all_media? + setting_display_media == 'hide_all' + end + protected def send_devise_notification(notification, *args) diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb index 35b869e38..cdc470831 100644 --- a/app/serializers/initial_state_serializer.rb +++ b/app/serializers/initial_state_serializer.rb @@ -19,14 +19,14 @@ class InitialStateSerializer < ActiveModel::Serializer } if object.current_account - store[:me] = object.current_account.id.to_s - store[:unfollow_modal] = object.current_account.user.setting_unfollow_modal - store[:boost_modal] = object.current_account.user.setting_boost_modal - store[:delete_modal] = object.current_account.user.setting_delete_modal - store[:auto_play_gif] = object.current_account.user.setting_auto_play_gif - store[:display_sensitive_media] = object.current_account.user.setting_display_sensitive_media - store[:expand_spoilers] = object.current_account.user.setting_expand_spoilers - store[:reduce_motion] = object.current_account.user.setting_reduce_motion + store[:me] = object.current_account.id.to_s + store[:unfollow_modal] = object.current_account.user.setting_unfollow_modal + store[:boost_modal] = object.current_account.user.setting_boost_modal + store[:delete_modal] = object.current_account.user.setting_delete_modal + store[:auto_play_gif] = object.current_account.user.setting_auto_play_gif + store[:display_media] = object.current_account.user.setting_display_media + store[:expand_spoilers] = object.current_account.user.setting_expand_spoilers + store[:reduce_motion] = object.current_account.user.setting_reduce_motion end store diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index a7b1a52fc..608a290e7 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -47,7 +47,7 @@ .fields-group = f.input :setting_auto_play_gif, as: :boolean, wrapper: :with_label - = f.input :setting_display_sensitive_media, as: :boolean, wrapper: :with_label + = f.input :setting_display_media, collection: ['default', 'show_all', 'hide_all'], wrapper: :with_label, include_blank: false, label_method: lambda { |item| safe_join([t("simple_form.labels.defaults.setting_display_media_#{item}"), content_tag(:span, t("simple_form.hints.defaults.setting_display_media_#{item}"), class: 'hint')]) }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' = f.input :setting_expand_spoilers, as: :boolean, wrapper: :with_label = f.input :setting_reduce_motion, as: :boolean, wrapper: :with_label = f.input :setting_system_font_ui, as: :boolean, wrapper: :with_label diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml index 77346dba7..6cedfb337 100644 --- a/app/views/stream_entries/_detailed_status.html.haml +++ b/app/views/stream_entries/_detailed_status.html.haml @@ -24,9 +24,9 @@ - if !status.media_attachments.empty? - if status.media_attachments.first.video? - video = status.media_attachments.first - = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 670, height: 380, detailed: true, inline: true, alt: video.description + = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), 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 - else - = react_component :media_gallery, height: 380, sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_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 } + = 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 } - elsif status.preview_cards.first = react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_cards.first, serializer: REST::PreviewCardSerializer).as_json diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml index 206cf0aec..7401f82c2 100644 --- a/app/views/stream_entries/_simple_status.html.haml +++ b/app/views/stream_entries/_simple_status.html.haml @@ -27,9 +27,9 @@ - unless status.media_attachments.empty? - if status.media_attachments.first.video? - video = status.media_attachments.first - = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 610, height: 343, inline: true, alt: video.description + = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, width: 610, height: 343, inline: true, alt: video.description - else - = react_component :media_gallery, height: 343, sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_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 } + = 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 } .status__action-bar .status__action-bar__counter diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 5b1a07a4a..e3d84dd07 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -25,6 +25,9 @@ en: phrase: Will be matched regardless of casing in text or content warning of a toot scopes: Which APIs the application will be allowed to access. If you select a top-level scope, you don't need to select individual ones. setting_default_language: The language of your toots can be detected automatically, but it's not always accurate + setting_display_media_default: Hide media marked as sensitive + setting_display_media_hide_all: Always hide all media + setting_display_media_show_all: Always show media marked as sensitive setting_hide_network: Who you follow and who follows you will not be shown on your profile setting_noindex: Affects your public profile and status pages setting_theme: Affects how Mastodon looks when you're logged in from any device. @@ -72,7 +75,10 @@ en: setting_default_privacy: Post privacy setting_default_sensitive: Always mark media as sensitive setting_delete_modal: Show confirmation dialog before deleting a toot - setting_display_sensitive_media: Always show media marked as sensitive + setting_display_media: Media display + setting_display_media_default: Default + setting_display_media_hide_all: Hide all + setting_display_media_show_all: Show all setting_expand_spoilers: Always expand toots marked with content warnings setting_hide_network: Hide your network setting_noindex: Opt-out of search engine indexing diff --git a/config/locales/simple_form.ja.yml b/config/locales/simple_form.ja.yml index d96394d7a..3d9c50759 100644 --- a/config/locales/simple_form.ja.yml +++ b/config/locales/simple_form.ja.yml @@ -19,6 +19,9 @@ ja: phrase: トゥートの大文字小文字や閲覧注意に関係なく一致 scopes: アプリの API に許可するアクセス権を選択してください。最上位のスコープを選択する場合、個々のスコープを選択する必要はありません。 setting_default_language: トゥートの言語は自動的に検出されますが、必ずしも正確とは限りません + setting_display_media_default: 閲覧注意としてマークされたメディアは隠す + setting_display_media_hide_all: 全てのメディアを常に隠す + setting_display_media_show_all: 閲覧注意としてマークされたメディアも常に表示する setting_hide_network: フォローとフォロワーの情報がプロフィールページで見られないようにします setting_noindex: 公開プロフィールおよび各投稿ページに影響します setting_theme: ログインしている全てのデバイスで適用されるデザインです。 @@ -65,7 +68,10 @@ ja: setting_default_privacy: 投稿の公開範囲 setting_default_sensitive: メディアを常に閲覧注意としてマークする setting_delete_modal: トゥートを削除する前に確認ダイアログを表示する - setting_display_sensitive_media: 閲覧注意としてマークされたメディアも常に表示する + setting_display_media: メディアの表示 + setting_display_media_default: 標準 + setting_display_media_hide_all: 非表示 + setting_display_media_show_all: 表示 setting_hide_network: 繋がりを隠す setting_noindex: 検索エンジンによるインデックスを拒否する setting_reduce_motion: アニメーションの動きを減らす diff --git a/config/settings.yml b/config/settings.yml index e2214b4b7..2bc9fe289 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -26,7 +26,7 @@ defaults: &defaults boost_modal: false delete_modal: true auto_play_gif: false - display_sensitive_media: false + display_media: 'default' expand_spoilers: false preview_sensitive_media: false reduce_motion: false -- cgit From 17af4d27da484fc35ecd4b4dce2443d24aa35d23 Mon Sep 17 00:00:00 2001 From: mayaeh Date: Tue, 25 Sep 2018 22:52:12 +0900 Subject: Update the icon name changed by the Font Awesome 5. (#8776) --- app/javascript/mastodon/features/compose/index.js | 2 +- app/views/layouts/modal.html.haml | 2 +- config/navigation.rb | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'app/views') diff --git a/app/javascript/mastodon/features/compose/index.js b/app/javascript/mastodon/features/compose/index.js index cf1714b71..6f1b9b71d 100644 --- a/app/javascript/mastodon/features/compose/index.js +++ b/app/javascript/mastodon/features/compose/index.js @@ -90,7 +90,7 @@ class Compose extends React.PureComponent { )} - + ); } diff --git a/app/views/layouts/modal.html.haml b/app/views/layouts/modal.html.haml index 2ef49e413..fc8b00e0d 100644 --- a/app/views/layouts/modal.html.haml +++ b/app/views/layouts/modal.html.haml @@ -9,7 +9,7 @@ = t 'users.signed_in_as' %span.username @#{current_account.local_username_and_domain} = link_to destroy_user_session_path(continue: true), method: :delete, class: 'logout-link icon-button' do - = fa_icon 'sign-out' + = fa_icon 'sign-out-alt' .container-alt= yield .modal-layout__mastodon diff --git a/config/navigation.rb b/config/navigation.rb index 99d227f11..d50bf423c 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -6,12 +6,12 @@ SimpleNavigation::Configuration.run do |navigation| primary.item :settings, safe_join([fa_icon('cog fw'), t('settings.settings')]), settings_profile_url do |settings| settings.item :profile, safe_join([fa_icon('user fw'), t('settings.edit_profile')]), settings_profile_url, highlights_on: %r{/settings/profile|/settings/migration} - settings.item :preferences, safe_join([fa_icon('sliders fw'), t('settings.preferences')]), settings_preferences_url + settings.item :preferences, safe_join([fa_icon('sliders-h fw'), t('settings.preferences')]), settings_preferences_url settings.item :notifications, safe_join([fa_icon('bell fw'), t('settings.notifications')]), settings_notifications_url settings.item :password, safe_join([fa_icon('lock fw'), t('auth.security')]), edit_user_registration_url, highlights_on: %r{/auth/edit|/settings/delete} settings.item :two_factor_authentication, safe_join([fa_icon('mobile fw'), t('settings.two_factor_authentication')]), settings_two_factor_authentication_url, highlights_on: %r{/settings/two_factor_authentication} - settings.item :import, safe_join([fa_icon('cloud-upload fw'), t('settings.import')]), settings_import_url - settings.item :export, safe_join([fa_icon('cloud-download fw'), t('settings.export')]), settings_export_url + settings.item :import, safe_join([fa_icon('cloud-upload-alt fw'), t('settings.import')]), settings_import_url + settings.item :export, safe_join([fa_icon('cloud-download-alt fw'), t('settings.export')]), settings_export_url settings.item :authorized_apps, safe_join([fa_icon('list fw'), t('settings.authorized_apps')]), oauth_authorized_applications_url settings.item :follower_domains, safe_join([fa_icon('users fw'), t('settings.followers')]), settings_follower_domains_url end @@ -34,15 +34,15 @@ SimpleNavigation::Configuration.run do |navigation| end primary.item :admin, safe_join([fa_icon('cogs fw'), t('admin.title')]), admin_dashboard_url, if: proc { current_user.staff? } do |admin| - admin.item :dashboard, safe_join([fa_icon('tachometer fw'), t('admin.dashboard.title')]), admin_dashboard_url + admin.item :dashboard, safe_join([fa_icon('tachometer-alt fw'), t('admin.dashboard.title')]), admin_dashboard_url admin.item :settings, safe_join([fa_icon('cogs fw'), t('admin.settings.title')]), edit_admin_settings_url, if: -> { current_user.admin? } - admin.item :custom_emojis, safe_join([fa_icon('smile-o fw'), t('admin.custom_emojis.title')]), admin_custom_emojis_url, highlights_on: %r{/admin/custom_emojis} - admin.item :relays, safe_join([fa_icon('exchange fw'), t('admin.relays.title')]), admin_relays_url, if: -> { current_user.admin? }, highlights_on: %r{/admin/relays} - admin.item :subscriptions, safe_join([fa_icon('paper-plane-o fw'), t('admin.subscriptions.title')]), admin_subscriptions_url, if: -> { current_user.admin? } - admin.item :sidekiq, safe_join([fa_icon('diamond fw'), 'Sidekiq']), sidekiq_url, link_html: { target: 'sidekiq' }, if: -> { current_user.admin? } + admin.item :custom_emojis, safe_join([fa_icon('smile fw'), t('admin.custom_emojis.title')]), admin_custom_emojis_url, highlights_on: %r{/admin/custom_emojis} + admin.item :relays, safe_join([fa_icon('exchange-alt fw'), t('admin.relays.title')]), admin_relays_url, if: -> { current_user.admin? }, highlights_on: %r{/admin/relays} + admin.item :subscriptions, safe_join([fa_icon('paper-plane fw'), t('admin.subscriptions.title')]), admin_subscriptions_url, if: -> { current_user.admin? } + admin.item :sidekiq, safe_join([fa_icon('gem fw'), 'Sidekiq']), sidekiq_url, link_html: { target: 'sidekiq' }, if: -> { current_user.admin? } admin.item :pghero, safe_join([fa_icon('database fw'), 'PgHero']), pghero_url, link_html: { target: 'pghero' }, if: -> { current_user.admin? } end - primary.item :logout, safe_join([fa_icon('sign-out fw'), t('auth.logout')]), destroy_user_session_url, link_html: { 'data-method' => 'delete' } + primary.item :logout, safe_join([fa_icon('sign-out-alt fw'), t('auth.logout')]), destroy_user_session_url, link_html: { 'data-method' => 'delete' } end end -- cgit From c6d43115c2c7633223bbbbbf3d53d02e147d0afc Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Thu, 27 Sep 2018 02:48:14 +0900 Subject: Fix broken report detail (regression from #8569) (#8795) --- app/views/admin/reports/_status.html.haml | 4 ++-- config/locales/simple_form.ar.yml | 1 - config/locales/simple_form.ca.yml | 1 - config/locales/simple_form.co.yml | 1 - config/locales/simple_form.cs.yml | 1 - config/locales/simple_form.cy.yml | 1 - config/locales/simple_form.da.yml | 1 - config/locales/simple_form.de.yml | 1 - config/locales/simple_form.el.yml | 1 - config/locales/simple_form.eo.yml | 1 - config/locales/simple_form.es.yml | 1 - config/locales/simple_form.eu.yml | 1 - config/locales/simple_form.fa.yml | 1 - config/locales/simple_form.fi.yml | 1 - config/locales/simple_form.fr.yml | 1 - config/locales/simple_form.gl.yml | 1 - config/locales/simple_form.it.yml | 1 - config/locales/simple_form.ka.yml | 1 - config/locales/simple_form.ko.yml | 1 - config/locales/simple_form.nl.yml | 1 - config/locales/simple_form.oc.yml | 1 - config/locales/simple_form.pl.yml | 1 - config/locales/simple_form.pt-BR.yml | 1 - config/locales/simple_form.ro.yml | 1 - config/locales/simple_form.ru.yml | 1 - config/locales/simple_form.sk.yml | 1 - config/locales/simple_form.sr.yml | 1 - config/locales/simple_form.sv.yml | 1 - config/locales/simple_form.zh-CN.yml | 1 - config/locales/simple_form.zh-HK.yml | 1 - config/locales/simple_form.zh-TW.yml | 1 - 31 files changed, 2 insertions(+), 32 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/reports/_status.html.haml b/app/views/admin/reports/_status.html.haml index 4d557b071..b3c145120 100644 --- a/app/views/admin/reports/_status.html.haml +++ b/app/views/admin/reports/_status.html.haml @@ -14,9 +14,9 @@ - unless status.proper.media_attachments.empty? - if status.proper.media_attachments.first.video? - video = status.proper.media_attachments.first - = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.proper.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 610, height: 343, inline: true, alt: video.description + = 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 - else - = react_component :media_gallery, height: 343, sensitive: status.proper.sensitive? && !current_account&.user&.setting_display_sensitive_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: !current_account&.user&.show_all_media? && status.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 } .detailed-status__meta = link_to TagManager.instance.url_for(status), class: 'detailed-status__datetime', target: stream_link_target, rel: 'noopener' do diff --git a/config/locales/simple_form.ar.yml b/config/locales/simple_form.ar.yml index 3e0c671cb..783e545e1 100644 --- a/config/locales/simple_form.ar.yml +++ b/config/locales/simple_form.ar.yml @@ -64,7 +64,6 @@ ar: setting_default_privacy: خصوصية المنشور setting_default_sensitive: إعتبر الوسائط دائما كمحتوى حساس setting_delete_modal: إظهار مربع حوار للتأكيد قبل حذف أي تبويق - setting_display_sensitive_media: دائمًا إظهار الوسائط الحساسة setting_hide_network: إخفِ شبكتك setting_noindex: عدم السماح لمحركات البحث بفهرسة ملفك الشخصي setting_reduce_motion: تخفيض عدد الصور في الوسائط المتحركة diff --git a/config/locales/simple_form.ca.yml b/config/locales/simple_form.ca.yml index d45b84971..53cf6db8e 100644 --- a/config/locales/simple_form.ca.yml +++ b/config/locales/simple_form.ca.yml @@ -65,7 +65,6 @@ ca: setting_default_privacy: Privacitat de les publicacions setting_default_sensitive: Marca sempre els elements multimèdia com a sensibles setting_delete_modal: Mostra la finestra de confirmació abans de suprimir un toot - setting_display_sensitive_media: Mostra sempre els elements multimèdia marcats com a sensibles setting_hide_network: Amaga la teva xarxa setting_noindex: Desactivació de la indexació del motor de cerca setting_reduce_motion: Redueix el moviment en animacions diff --git a/config/locales/simple_form.co.yml b/config/locales/simple_form.co.yml index ad4258dab..6f1630e6a 100644 --- a/config/locales/simple_form.co.yml +++ b/config/locales/simple_form.co.yml @@ -69,7 +69,6 @@ co: setting_default_privacy: Cunfidenzialità di i statuti setting_default_sensitive: Sempre cunsiderà media cum’è sensibili setting_delete_modal: Mustrà une cunfirmazione per toglie un statutu - setting_display_sensitive_media: Sempre mustrà media marcati cum’è sensibili setting_hide_network: Piattà a vostra rete setting_noindex: Dumandà à i motori di ricerca internet d’un pudè micca esse truvatu·a cusì setting_reduce_motion: Fà chì l’animazione vanu più pianu diff --git a/config/locales/simple_form.cs.yml b/config/locales/simple_form.cs.yml index 6625e2638..dbff52644 100644 --- a/config/locales/simple_form.cs.yml +++ b/config/locales/simple_form.cs.yml @@ -69,7 +69,6 @@ cs: setting_default_privacy: Soukromí příspěvků setting_default_sensitive: Vždy označovat média jako citlivá setting_delete_modal: Zobrazovat před smazáním tootu potvrzovací okno - setting_display_sensitive_media: Vždy zobrazovat média označená jako citlivá setting_hide_network: Skrýt svou síť setting_noindex: Neindexovat svůj profil vyhledávači setting_reduce_motion: Redukovat pohyb v animacích diff --git a/config/locales/simple_form.cy.yml b/config/locales/simple_form.cy.yml index fdd2bb786..5a301f775 100644 --- a/config/locales/simple_form.cy.yml +++ b/config/locales/simple_form.cy.yml @@ -65,7 +65,6 @@ cy: setting_default_privacy: Cyfrinachedd cyhoeddi setting_default_sensitive: Marciwch cyfryngau fel ei fod yn sensitif bob tro setting_delete_modal: Dangoswch ddeialog cadarnhau cyn dileu tŵt - setting_display_sensitive_media: Dangoswch cyfryngau wedi eu marcio fel sensetif bob tro setting_hide_network: Cuddiwch eich rhwydwaith setting_reduce_motion: '' setting_system_font_ui: Defnyddiwch ffont rhagosodedig y system diff --git a/config/locales/simple_form.da.yml b/config/locales/simple_form.da.yml index dfa440aae..7550122fc 100644 --- a/config/locales/simple_form.da.yml +++ b/config/locales/simple_form.da.yml @@ -69,7 +69,6 @@ da: setting_default_privacy: Privatliv setting_default_sensitive: Marker altid medier som værende følsomt setting_delete_modal: Vis bekræftelses dialog før du sletter et trut - setting_display_sensitive_media: Vis altid multimedier markeret som værende følsomt setting_hide_network: Skjul dit netværk setting_noindex: Frameld dig søgemaskiners indeksering setting_reduce_motion: Reducer animationers bevægelse diff --git a/config/locales/simple_form.de.yml b/config/locales/simple_form.de.yml index 69e707c4c..e13eece79 100644 --- a/config/locales/simple_form.de.yml +++ b/config/locales/simple_form.de.yml @@ -69,7 +69,6 @@ de: setting_default_privacy: Beitragssichtbarkeit setting_default_sensitive: Medien immer als heikel markieren setting_delete_modal: Bestätigungsdialog anzeigen, bevor ein Beitrag gelöscht wird - setting_display_sensitive_media: Medien, die als heikel markiert sind, immer anzeigen setting_hide_network: Blende dein Netzwerk aus setting_noindex: Suchmaschinen-Indexierung verhindern setting_reduce_motion: Bewegung in Animationen verringern diff --git a/config/locales/simple_form.el.yml b/config/locales/simple_form.el.yml index 95869c786..96a7547e4 100644 --- a/config/locales/simple_form.el.yml +++ b/config/locales/simple_form.el.yml @@ -69,7 +69,6 @@ el: setting_default_privacy: Ιδιωτικότητα δημοσιεύσεων setting_default_sensitive: Σημείωνε πάντα τα πολυμέσα ως ευαίσθητου περιεχομένου setting_delete_modal: Εμφάνιση ερώτησης επιβεβαίωσης πριν διαγράψεις ένα τουτ - setting_display_sensitive_media: Εμφάνιση πάντα των πολυμέσων σημειωμένων ως ευαίσθητων setting_hide_network: Κρύψε τις διασυνδέσεις σου setting_noindex: Επέλεξε να μην συμμετέχεις στα αποτελέσματα μηχανών αναζήτησης setting_reduce_motion: Μείωση κίνησης κινουμένων στοιχείων diff --git a/config/locales/simple_form.eo.yml b/config/locales/simple_form.eo.yml index 9b6e7cd9e..36f26035f 100644 --- a/config/locales/simple_form.eo.yml +++ b/config/locales/simple_form.eo.yml @@ -68,7 +68,6 @@ eo: setting_default_privacy: Mesaĝa videbleco setting_default_sensitive: Ĉiam marki aŭdovidaĵojn tiklaj setting_delete_modal: Montri fenestron por konfirmi antaŭ ol forigi mesaĝon - setting_display_sensitive_media: Ĉiam montri aŭdovidaĵojn markitajn tiklaj setting_hide_network: Kaŝi viajn sekvantojn kaj sekvatojn setting_noindex: Ellistiĝi de retserĉila indeksado setting_reduce_motion: Malrapidigi animaciojn diff --git a/config/locales/simple_form.es.yml b/config/locales/simple_form.es.yml index 0a39e01b8..8c528144e 100644 --- a/config/locales/simple_form.es.yml +++ b/config/locales/simple_form.es.yml @@ -69,7 +69,6 @@ es: setting_default_privacy: Privacidad de publicaciones setting_default_sensitive: Marcar siempre imágenes como sensibles setting_delete_modal: Mostrar diálogo de confirmación antes de borrar un toot - setting_display_sensitive_media: Mostrar siempre material marcado como sensible setting_hide_network: Ocultar tu red setting_noindex: Excluirse del indexado de motores de búsqueda setting_reduce_motion: Reducir el movimiento de las animaciones diff --git a/config/locales/simple_form.eu.yml b/config/locales/simple_form.eu.yml index 1e3b2d4f0..7fa8319ae 100644 --- a/config/locales/simple_form.eu.yml +++ b/config/locales/simple_form.eu.yml @@ -69,7 +69,6 @@ eu: setting_default_privacy: Mezuen pribatutasuna setting_default_sensitive: Beti markatu edukiak hunkigarri gisa setting_delete_modal: Erakutsi baieztapen elkarrizketa-koadroa toot bat ezabatu aurretik - setting_display_sensitive_media: Beti erakutsi hunkigarri gisa markatutako edukia setting_hide_network: Ezkutatu zure sarea setting_noindex: Atera bilaketa motorraren indexaziotik setting_reduce_motion: Murriztu animazioen mugimenduak diff --git a/config/locales/simple_form.fa.yml b/config/locales/simple_form.fa.yml index 38f95e1b7..418b308b1 100644 --- a/config/locales/simple_form.fa.yml +++ b/config/locales/simple_form.fa.yml @@ -69,7 +69,6 @@ fa: setting_default_privacy: حریم خصوصی نوشته‌ها setting_default_sensitive: همیشه تصاویر را به عنوان حساس علامت بزن setting_delete_modal: نمایش پیغام تأیید پیش از پاک کردن یک نوشته - setting_display_sensitive_media: همیشه تصویرهای علامت‌زده‌شده به عنوان حساس را نمایش بده setting_hide_network: نهفتن شبکهٔ ارتباطی setting_noindex: درخواست از موتورهای جستجوگر برای ظاهر نشدن در نتایج جستجو setting_reduce_motion: کاستن از حرکت در پویانمایی‌ها diff --git a/config/locales/simple_form.fi.yml b/config/locales/simple_form.fi.yml index 190790ca5..e90bd2e0b 100644 --- a/config/locales/simple_form.fi.yml +++ b/config/locales/simple_form.fi.yml @@ -47,7 +47,6 @@ fi: setting_default_privacy: Julkaisun näkyvyys setting_default_sensitive: Merkitse media aina arkaluontoiseksi setting_delete_modal: Kysy vahvistusta ennen tuuttauksen poistamista - setting_display_sensitive_media: Näytä aina arkaluontoiseksi merkitty media setting_noindex: Jättäydy pois hakukoneindeksoinnista setting_reduce_motion: Vähennä animaatioiden liikettä setting_system_font_ui: Käytä järjestelmän oletusfonttia diff --git a/config/locales/simple_form.fr.yml b/config/locales/simple_form.fr.yml index 7495a9425..1e0c4d3e6 100644 --- a/config/locales/simple_form.fr.yml +++ b/config/locales/simple_form.fr.yml @@ -69,7 +69,6 @@ fr: setting_default_privacy: Confidentialité des statuts setting_default_sensitive: Toujours marquer les médias comme sensibles setting_delete_modal: Afficher une fenêtre de confirmation avant de supprimer un pouet - setting_display_sensitive_media: Toujours afficher les médias marqués comme sensibles setting_hide_network: Cacher votre réseau setting_noindex: Demander aux moteurs de recherche de ne pas indexer vos informations personnelles setting_reduce_motion: Réduire la vitesse des animations diff --git a/config/locales/simple_form.gl.yml b/config/locales/simple_form.gl.yml index 8df441c36..935545b0e 100644 --- a/config/locales/simple_form.gl.yml +++ b/config/locales/simple_form.gl.yml @@ -69,7 +69,6 @@ gl: setting_default_privacy: Intimidade da publicación setting_default_sensitive: Marcar sempre multimedia como sensible setting_delete_modal: Solicitar confirmación antes de eliminar unha mensaxe - setting_display_sensitive_media: Mostrar sempre os medios marcados como sensibles setting_hide_network: Agochar a súa rede setting_noindex: Pedir non aparecer nas buscas dos motores de busca setting_reduce_motion: Reducir o movemento nas animacións diff --git a/config/locales/simple_form.it.yml b/config/locales/simple_form.it.yml index 2eaf04a70..841e65faa 100644 --- a/config/locales/simple_form.it.yml +++ b/config/locales/simple_form.it.yml @@ -69,7 +69,6 @@ it: setting_default_privacy: Privacy dei post setting_default_sensitive: Segna sempre i media come sensibili setting_delete_modal: Mostra dialogo di conferma prima di eliminare un toot - setting_display_sensitive_media: Mostra sempre i media segnati come sensibili setting_hide_network: Nascondi la tua rete setting_noindex: Non indicizzare dai motori di ricerca setting_reduce_motion: Riduci movimento nelle animazioni diff --git a/config/locales/simple_form.ka.yml b/config/locales/simple_form.ka.yml index eb6d82bb2..b1b29a7ce 100644 --- a/config/locales/simple_form.ka.yml +++ b/config/locales/simple_form.ka.yml @@ -69,7 +69,6 @@ ka: setting_default_privacy: პოსტის კონფიდენციალურობა setting_default_sensitive: ყოველთვის მოინიშნოს მედია მგრძნობიარედ setting_delete_modal: ტუტის გაუქმებამდე გამოჩნდეს დადასტურების ფანჯარა - setting_display_sensitive_media: ყოველთვის გამოჩნდეს მგრძნობიარე მედია setting_hide_network: თქვენი ქსელის დამალვა setting_noindex: საძოები სისტემების ინდექსაციის შეჩერება setting_reduce_motion: მოძრაობის შემცირება ანიმაციებში diff --git a/config/locales/simple_form.ko.yml b/config/locales/simple_form.ko.yml index 97baf7856..232844df8 100644 --- a/config/locales/simple_form.ko.yml +++ b/config/locales/simple_form.ko.yml @@ -69,7 +69,6 @@ ko: setting_default_privacy: 툿 프라이버시 setting_default_sensitive: 미디어를 언제나 민감한 컨텐츠로 설정 setting_delete_modal: 툿 삭제 전 확인 창을 표시 - setting_display_sensitive_media: 열람주의로 설정 된 이미지도 항상 보여주기 setting_hide_network: 내 네트워크 숨기기 setting_noindex: 검색엔진의 인덱싱을 거절 setting_reduce_motion: 애니메이션 줄이기 diff --git a/config/locales/simple_form.nl.yml b/config/locales/simple_form.nl.yml index 33ab60161..32ad8d52c 100644 --- a/config/locales/simple_form.nl.yml +++ b/config/locales/simple_form.nl.yml @@ -69,7 +69,6 @@ nl: setting_default_privacy: Standaardzichtbaarheid van jouw toots setting_default_sensitive: Media altijd als gevoelig markeren setting_delete_modal: Vraag voor het verwijderen van een toot een bevestiging - setting_display_sensitive_media: Als gevoelig gemarkeerde media altijd tonen setting_hide_network: Jouw volgers en wie je volgt verbergen setting_noindex: Jouw toots niet door zoekmachines laten indexeren setting_reduce_motion: Langzamere animaties diff --git a/config/locales/simple_form.oc.yml b/config/locales/simple_form.oc.yml index 98ec01219..5363aa02a 100644 --- a/config/locales/simple_form.oc.yml +++ b/config/locales/simple_form.oc.yml @@ -69,7 +69,6 @@ oc: setting_default_privacy: Confidencialitat dels tuts setting_default_sensitive: Totjorn marcar los mèdias coma sensibles setting_delete_modal: Mostrar una fenèstra de confirmacion abans de suprimir un estatut - setting_display_sensitive_media: Totjorn mostrar los mèdias coma sensibles setting_hide_network: Amagar vòstre malhum setting_noindex: Èsser pas indexat pels motors de recèrca setting_reduce_motion: Reduire la velocitat de las animacions diff --git a/config/locales/simple_form.pl.yml b/config/locales/simple_form.pl.yml index ab720adf8..250e98c56 100644 --- a/config/locales/simple_form.pl.yml +++ b/config/locales/simple_form.pl.yml @@ -74,7 +74,6 @@ pl: setting_default_privacy: Widoczność wpisów setting_default_sensitive: Zawsze oznaczaj zawartość multimedialną jako wrażliwą setting_delete_modal: Pytaj o potwierdzenie przed usunięciem wpisu - setting_display_sensitive_media: Zawsze oznaczaj zawartość multimedialną jako wrażliwą setting_hide_network: Ukryj swoją sieć setting_noindex: Nie indeksuj mojego profilu w wyszukiwarkach internetowych setting_reduce_motion: Ogranicz ruch w animacjach diff --git a/config/locales/simple_form.pt-BR.yml b/config/locales/simple_form.pt-BR.yml index 013b26066..23272c41f 100644 --- a/config/locales/simple_form.pt-BR.yml +++ b/config/locales/simple_form.pt-BR.yml @@ -69,7 +69,6 @@ pt-BR: setting_default_privacy: Privacidade das postagens setting_default_sensitive: Sempre marcar mídia como sensível setting_delete_modal: Mostrar diálogo de confirmação antes de deletar uma postagem - setting_display_sensitive_media: Sempre exibir mídia marcada como sensível setting_hide_network: Esconder as suas redes setting_noindex: Não quero ser indexado por mecanismos de busca setting_reduce_motion: Reduz movimento em animações diff --git a/config/locales/simple_form.ro.yml b/config/locales/simple_form.ro.yml index 8cac6d606..fcccd1a10 100644 --- a/config/locales/simple_form.ro.yml +++ b/config/locales/simple_form.ro.yml @@ -63,7 +63,6 @@ ro: setting_default_privacy: Cine vede postările tale setting_default_sensitive: Întotdeauna marchează conținutul media ca sensibil setting_delete_modal: Arată dialogul de confirmare înainte de a șterge o postare - setting_display_sensitive_media: Întotdeauna arată conținutul media sensibil setting_hide_network: Ascunde rețeaua setting_noindex: Nu permite motoarelor de căutare să indexeze rețeaua ta setting_reduce_motion: Redu mișcarea în animații diff --git a/config/locales/simple_form.ru.yml b/config/locales/simple_form.ru.yml index d1066b054..daeb7300a 100644 --- a/config/locales/simple_form.ru.yml +++ b/config/locales/simple_form.ru.yml @@ -73,7 +73,6 @@ ru: setting_default_privacy: Видимость постов setting_default_sensitive: Всегда отмечать медиаконтент как чувствительный setting_delete_modal: Показывать диалог подтверждения перед удалением - setting_display_sensitive_media: Всегда показывать медиаконтент, отмеченный как чувствительный setting_hide_network: Скрыть свои связи setting_noindex: Отказаться от индексации в поисковых машинах setting_reduce_motion: Уменьшить движение в анимации diff --git a/config/locales/simple_form.sk.yml b/config/locales/simple_form.sk.yml index 28b97579e..0fd8f66b6 100644 --- a/config/locales/simple_form.sk.yml +++ b/config/locales/simple_form.sk.yml @@ -71,7 +71,6 @@ sk: setting_default_privacy: Súkromie príspevkov setting_default_sensitive: Označ všetky mediálne súbory ako chúlostivé setting_delete_modal: Zobrazuj potvrdzovacie okno pred vymazaním toot-u - setting_display_sensitive_media: Vždy zobrazuj médiá ktoré sú označené ako chúlostivé setting_hide_network: Ukri svoju sieť kontaktov setting_noindex: Nezaraďuj príspevky do indexu pre vyhľadávče setting_reduce_motion: Redukovať pohyb v animáciách diff --git a/config/locales/simple_form.sr.yml b/config/locales/simple_form.sr.yml index 3fac11eb8..333685ed5 100644 --- a/config/locales/simple_form.sr.yml +++ b/config/locales/simple_form.sr.yml @@ -73,7 +73,6 @@ sr: setting_default_privacy: Приватност објава setting_default_sensitive: Увек означи мултимедију као осетљиву setting_delete_modal: Прикажи дијалог за потврду пре брисања тута - setting_display_sensitive_media: Увек покажи означен садржај као осетљив setting_hide_network: Сакриј своју мрежу setting_noindex: Одјави се од индексирања search engine-а setting_reduce_motion: Смањи покрете у анимацијама diff --git a/config/locales/simple_form.sv.yml b/config/locales/simple_form.sv.yml index 7a10aa1e2..6f2e4b58f 100644 --- a/config/locales/simple_form.sv.yml +++ b/config/locales/simple_form.sv.yml @@ -59,7 +59,6 @@ sv: setting_default_privacy: Postintegritet setting_default_sensitive: Markera alltid media som känsligt setting_delete_modal: Visa bekräftelsedialog innan du raderar en toot - setting_display_sensitive_media: Visa alltid media märkt som känsligt setting_hide_network: Göm ditt nätverk setting_noindex: Uteslutning av sökmotorindexering setting_reduce_motion: Minska rörelser i animationer diff --git a/config/locales/simple_form.zh-CN.yml b/config/locales/simple_form.zh-CN.yml index b84f7107d..36b5a3f66 100644 --- a/config/locales/simple_form.zh-CN.yml +++ b/config/locales/simple_form.zh-CN.yml @@ -55,7 +55,6 @@ zh-CN: setting_default_privacy: 嘟文默认可见范围 setting_default_sensitive: 总是将我发送的媒体文件标记为敏感内容 setting_delete_modal: 在删除嘟文前询问我 - setting_display_sensitive_media: 总是显示标记为敏感的媒体文件 setting_hide_network: 隐藏你的社交网络 setting_noindex: 禁止搜索引擎建立索引 setting_reduce_motion: 降低过渡动画效果 diff --git a/config/locales/simple_form.zh-HK.yml b/config/locales/simple_form.zh-HK.yml index abe6b7e06..447b9ce7a 100644 --- a/config/locales/simple_form.zh-HK.yml +++ b/config/locales/simple_form.zh-HK.yml @@ -59,7 +59,6 @@ zh-HK: setting_default_privacy: 文章預設為 setting_default_sensitive: 預設我的內容為敏感內容 setting_delete_modal: 刪推前詢問我 - setting_display_sensitive_media: 預設我的媒體為敏感內容 setting_hide_network: 隱藏你的社交網絡 setting_noindex: 阻止搜尋引擎檢索 setting_reduce_motion: 減低動畫效果 diff --git a/config/locales/simple_form.zh-TW.yml b/config/locales/simple_form.zh-TW.yml index 7b3101239..7eae7e190 100644 --- a/config/locales/simple_form.zh-TW.yml +++ b/config/locales/simple_form.zh-TW.yml @@ -69,7 +69,6 @@ zh-TW: setting_default_privacy: 嘟文預設為 setting_default_sensitive: 總是將媒體標記為敏感內容 setting_delete_modal: 刪除嘟文前先詢問我 - setting_display_sensitive_media: 總是顯示標記為敏感內容的媒體 setting_hide_network: 隱藏你的社交網路 setting_noindex: 阻止搜尋引擎收錄 setting_reduce_motion: 減低動畫效果 -- cgit From 8bae14591bfb4fc9dd9d89d8082ac0123b03edaa Mon Sep 17 00:00:00 2001 From: Naoki Kosaka Date: Fri, 28 Sep 2018 00:08:56 +0900 Subject: Migrate to font-awesome 5.0. (#8799) --- app/helpers/application_helper.rb | 2 +- .../__tests__/__snapshots__/avatar-test.js.snap | 4 ++-- .../mastodon/components/attachment_list.js | 4 ++-- app/javascript/mastodon/components/bot_icon.js | 2 +- .../mastodon/components/column_back_button.js | 2 +- .../mastodon/components/column_back_button_slim.js | 2 +- .../mastodon/components/column_header.js | 14 +++++++------- app/javascript/mastodon/components/icon_button.js | 4 ++-- app/javascript/mastodon/components/load_gap.js | 2 +- app/javascript/mastodon/components/status.js | 4 ++-- .../mastodon/features/account/components/header.js | 4 ++-- .../account_timeline/components/moved_note.js | 2 +- .../features/compose/components/compose_form.js | 2 +- .../compose/components/privacy_dropdown.js | 2 +- .../mastodon/features/compose/components/search.js | 4 ++-- .../features/compose/components/search_results.js | 8 ++++---- .../mastodon/features/compose/components/upload.js | 4 ++-- .../features/compose/components/upload_progress.js | 2 +- app/javascript/mastodon/features/compose/index.js | 14 +++++++------- .../mastodon/features/getting_started/index.js | 2 +- .../features/list_editor/components/search.js | 4 ++-- .../mastodon/features/list_timeline/index.js | 4 ++-- .../components/clear_column_button.js | 2 +- .../notifications/components/notification.js | 6 +++--- .../mastodon/features/pinned_statuses/index.js | 2 +- .../mastodon/features/status/components/card.js | 4 ++-- .../features/status/components/detailed_status.js | 6 +++--- app/javascript/mastodon/features/status/index.js | 2 +- .../mastodon/features/ui/components/boost_modal.js | 2 +- .../features/ui/components/column_header.js | 2 +- .../mastodon/features/ui/components/column_link.js | 4 ++-- .../features/ui/components/columns_area.js | 2 +- .../mastodon/features/ui/components/media_modal.js | 4 ++-- .../features/ui/components/onboarding_modal.js | 4 ++-- .../mastodon/features/ui/components/tabs_bar.js | 12 ++++++------ app/javascript/mastodon/features/video/index.js | 12 ++++++------ app/javascript/styles/mastodon/about.scss | 2 +- app/javascript/styles/mastodon/accounts.scss | 4 ++-- app/javascript/styles/mastodon/admin.scss | 2 +- app/javascript/styles/mastodon/components.scss | 22 +++++++++++----------- app/javascript/styles/mastodon/forms.scss | 2 +- app/javascript/styles/mastodon/rtl.scss | 6 +++--- app/javascript/styles/mastodon/tables.scss | 2 +- app/javascript/styles/mastodon/widgets.scss | 2 +- app/views/about/_links.html.haml | 2 +- app/views/stream_entries/_status.html.haml | 2 +- spec/helpers/application_helper_spec.rb | 2 +- 47 files changed, 102 insertions(+), 102 deletions(-) (limited to 'app/views') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f8e2c0e11..49621f55f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -55,7 +55,7 @@ module ApplicationHelper def fa_icon(icon, attributes = {}) class_names = attributes[:class]&.split(' ') || [] - class_names << 'fa' + class_names << 'fas' class_names += icon.split(' ').map { |cl| "fa-#{cl}" } content_tag(:i, nil, attributes.merge(class: class_names.join(' '))) diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap index f6f6bfbf4..1ab59836a 100644 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap @@ -15,7 +15,7 @@ exports[` Autoplay renders a animated avatar 1`] = ` } >
`; @@ -35,7 +35,7 @@ exports[` Still renders a still avatar 1`] = ` } > `; diff --git a/app/javascript/mastodon/components/attachment_list.js b/app/javascript/mastodon/components/attachment_list.js index 8e5bb0e0b..14e6cfc65 100644 --- a/app/javascript/mastodon/components/attachment_list.js +++ b/app/javascript/mastodon/components/attachment_list.js @@ -24,7 +24,7 @@ export default class AttachmentList extends ImmutablePureComponent { return (
  • - {filename(displayUrl)} + {filename(displayUrl)}
  • ); })} @@ -36,7 +36,7 @@ export default class AttachmentList extends ImmutablePureComponent { return (
    - +
      diff --git a/app/javascript/mastodon/components/bot_icon.js b/app/javascript/mastodon/components/bot_icon.js index f4bd70282..4d824e762 100644 --- a/app/javascript/mastodon/components/bot_icon.js +++ b/app/javascript/mastodon/components/bot_icon.js @@ -13,7 +13,7 @@ export default class BotIcon extends ImmutablePureComponent { if (account.get('bot')) { return ( - + ); } diff --git a/app/javascript/mastodon/components/column_back_button.js b/app/javascript/mastodon/components/column_back_button.js index 8a60c4192..2560e31ee 100644 --- a/app/javascript/mastodon/components/column_back_button.js +++ b/app/javascript/mastodon/components/column_back_button.js @@ -19,7 +19,7 @@ export default class ColumnBackButton extends React.PureComponent { render () { return ( ); diff --git a/app/javascript/mastodon/components/column_back_button_slim.js b/app/javascript/mastodon/components/column_back_button_slim.js index 964c100be..a0d111aa7 100644 --- a/app/javascript/mastodon/components/column_back_button_slim.js +++ b/app/javascript/mastodon/components/column_back_button_slim.js @@ -8,7 +8,7 @@ export default class ColumnBackButtonSlim extends ColumnBackButton { return (
      - +
      diff --git a/app/javascript/mastodon/components/column_header.js b/app/javascript/mastodon/components/column_header.js index 613df1e79..420ce3eef 100644 --- a/app/javascript/mastodon/components/column_header.js +++ b/app/javascript/mastodon/components/column_header.js @@ -95,22 +95,22 @@ class ColumnHeader extends React.PureComponent { } if (multiColumn && pinned) { - pinButton = ; + pinButton = ; moveButtons = (
      - - + +
      ); } else if (multiColumn) { - pinButton = ; + pinButton = ; } if (!pinned && (multiColumn || showBackButton)) { backButton = ( ); @@ -126,7 +126,7 @@ class ColumnHeader extends React.PureComponent { } if (children || multiColumn) { - collapseButton = ; + collapseButton = ; } const hasTitle = icon && title; @@ -136,7 +136,7 @@ class ColumnHeader extends React.PureComponent {

      {hasTitle && ( )} diff --git a/app/javascript/mastodon/components/icon_button.js b/app/javascript/mastodon/components/icon_button.js index b96e48fd0..a303064ff 100644 --- a/app/javascript/mastodon/components/icon_button.js +++ b/app/javascript/mastodon/components/icon_button.js @@ -86,7 +86,7 @@ export default class IconButton extends React.PureComponent { style={style} tabIndex={tabIndex} > -