make number of visible reactions a vanilla setting
Reactions will be backported to the vanilla flavour, which requires all related settings to be accessible from the vanilla settings page rather than the glitch specific settings modal.
This commit is contained in:
parent
7908581d43
commit
92384b1563
12 changed files with 11 additions and 25 deletions
|
|
@ -17,7 +17,7 @@ import NotificationOverlayContainer from 'flavours/glitch/features/notifications
|
|||
import classNames from 'classnames';
|
||||
import { autoUnfoldCW } from 'flavours/glitch/utils/content_warning';
|
||||
import PollContainer from 'flavours/glitch/containers/poll_container';
|
||||
import { displayMedia } from 'flavours/glitch/initial_state';
|
||||
import { displayMedia, visibleReactions } from 'flavours/glitch/initial_state';
|
||||
import PictureInPicturePlaceholder from 'flavours/glitch/components/picture_in_picture_placeholder';
|
||||
|
||||
// We use the component (and not the container) since we do not want
|
||||
|
|
@ -830,7 +830,7 @@ class Status extends ImmutablePureComponent {
|
|||
<StatusReactions
|
||||
statusId={status.get('id')}
|
||||
reactions={status.get('reactions')}
|
||||
numVisible={settings.get('num_visible_reactions')}
|
||||
numVisible={visibleReactions}
|
||||
addReaction={this.props.onReactionAdd}
|
||||
removeReaction={this.props.onReactionRemove}
|
||||
emojiMap={this.props.emojiMap}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ const messages = defineMessages({
|
|||
rewrite_mentions_username: { id: 'settings.rewrite_mentions_username', defaultMessage: 'Rewrite with username' },
|
||||
pop_in_left: { id: 'settings.pop_in_left', defaultMessage: 'Left' },
|
||||
pop_in_right: { id: 'settings.pop_in_right', defaultMessage: 'Right' },
|
||||
visible_reactions_count: { id: 'settings.visible_reactions_count', defaultMessage: 'Number of visible reactions' },
|
||||
enter_amount_prompt: { id: 'settings.enter_amount_prompt', defaultMessage: 'Enter an amount' },
|
||||
});
|
||||
|
||||
|
|
@ -93,16 +92,6 @@ class LocalSettingsPage extends React.PureComponent {
|
|||
>
|
||||
<FormattedMessage id='settings.rewrite_mentions' defaultMessage='Rewrite mentions in displayed statuses' />
|
||||
</LocalSettingsPageItem>
|
||||
<LocalSettingsPageItem
|
||||
settings={settings}
|
||||
item={['num_visible_reactions']}
|
||||
id='mastodon-settings--num_visible_reactions'
|
||||
onChange={onChange}
|
||||
placeholder={intl.formatMessage(messages.enter_amount_prompt)}
|
||||
number
|
||||
>
|
||||
<FormattedMessage id='settings.num_visible_reactions' defaultMessage='Number of visible reaction badges:' />
|
||||
</LocalSettingsPageItem>
|
||||
<section>
|
||||
<h2><FormattedMessage id='settings.notifications_opts' defaultMessage='Notifications options' /></h2>
|
||||
<LocalSettingsPageItem
|
||||
|
|
|
|||
|
|
@ -131,8 +131,10 @@ export const expandSpoilers = getMeta('expand_spoilers');
|
|||
export const forceSingleColumn = !getMeta('advanced_layout');
|
||||
export const limitedFederationMode = getMeta('limited_federation_mode');
|
||||
export const mascot = getMeta('mascot');
|
||||
export const maxReactions = (initialState && initialState.max_reactions) || 1;
|
||||
export const me = getMeta('me');
|
||||
export const movedToAccountId = getMeta('moved_to_account_id');
|
||||
export const visibleReactions = getMeta('visible_reactions');
|
||||
export const owner = getMeta('owner');
|
||||
export const profile_directory = getMeta('profile_directory');
|
||||
export const reduceMotion = getMeta('reduce_motion');
|
||||
|
|
@ -159,7 +161,4 @@ export const pollLimits = (initialState && initialState.poll_limits);
|
|||
export const defaultContentType = getMeta('default_content_type');
|
||||
export const useSystemEmojiFont = getMeta('system_emoji_font');
|
||||
|
||||
// nyastodon-specific settings
|
||||
export const maxReactions = (initialState && initialState.max_reactions) || 8;
|
||||
|
||||
export default initialState;
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@ const messages = {
|
|||
|
||||
'tooltips.reactions': 'Reaktionen',
|
||||
|
||||
'settings.enter_amount_prompt': 'Gib eine Zahl ein',
|
||||
'settings.num_visible_reactions': 'Anzahl sichtbarer Reaktionen',
|
||||
|
||||
'status.react': 'Reagieren',
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ const messages = {
|
|||
'settings.collapsed_statuses': 'Collapsed toots',
|
||||
'settings.enable_collapsed': 'Enable collapsed toots',
|
||||
'settings.enable_collapsed_hint': 'Collapsed posts have parts of their contents hidden to take up less screen space. This is distinct from the Content Warning feature',
|
||||
'settings.enter_amount_prompt': 'Enter an amount',
|
||||
'settings.general': 'General',
|
||||
'settings.compose_box_opts': 'Compose box',
|
||||
'settings.side_arm': 'Secondary toot button:',
|
||||
|
|
@ -105,7 +104,6 @@ const messages = {
|
|||
'settings.media_letterbox': 'Letterbox media',
|
||||
'settings.media_letterbox_hint': 'Scale down and letterbox media to fill the image containers instead of stretching and cropping them',
|
||||
'settings.media_fullwidth': 'Full-width media previews',
|
||||
'settings.num_visible_reactions': 'Number of visible reactions',
|
||||
'settings.inline_preview_cards': 'Inline preview cards for external links',
|
||||
'settings.media_reveal_behind_cw': 'Reveal sensitive media behind a CW by default',
|
||||
'settings.pop_in_player': 'Enable pop-in player',
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@ const messages = {
|
|||
|
||||
'tooltips.reactions': 'Réactions',
|
||||
|
||||
'settings.enter_amount_prompt': 'Entrez un montant',
|
||||
'settings.num_visible_reactions': 'Nombre de réactions visibles',
|
||||
|
||||
'status.react': 'Réagir',
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ const initialState = ImmutableMap({
|
|||
show_content_type_choice: false,
|
||||
tag_misleading_links: true,
|
||||
rewrite_mentions: 'no',
|
||||
num_visible_reactions: 6,
|
||||
content_warnings : ImmutableMap({
|
||||
filter : null,
|
||||
media_outside: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue