Add simple_timeline_menu setting
This commit is contained in:
parent
e4e9a9fcae
commit
c0af1b0aaf
8 changed files with 37 additions and 18 deletions
|
@ -13,7 +13,7 @@ import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/
|
|||
|
||||
import DropdownMenuContainer from '../containers/dropdown_menu_container';
|
||||
import EmojiPickerDropdown from '../features/compose/containers/emoji_picker_dropdown_container';
|
||||
import { enableEmojiReaction , bookmarkCategoryNeeded, me } from '../initial_state';
|
||||
import { enableEmojiReaction , bookmarkCategoryNeeded, simpleTimelineMenu, me } from '../initial_state';
|
||||
|
||||
import { IconButton } from './icon_button';
|
||||
|
||||
|
@ -289,24 +289,28 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
|
||||
let menu = [];
|
||||
|
||||
menu.push({ text: intl.formatMessage(messages.open), action: this.handleOpen });
|
||||
if (!simpleTimelineMenu) {
|
||||
menu.push({ text: intl.formatMessage(messages.open), action: this.handleOpen });
|
||||
|
||||
if (publicStatus && isRemote) {
|
||||
menu.push({ text: intl.formatMessage(messages.openOriginalPage), href: status.get('url') });
|
||||
}
|
||||
|
||||
menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy });
|
||||
|
||||
if (publicStatus && 'share' in navigator) {
|
||||
menu.push({ text: intl.formatMessage(messages.share), action: this.handleShareClick });
|
||||
}
|
||||
|
||||
if (anonymousStatus && (signedIn || !isRemote)) {
|
||||
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
|
||||
if (publicStatus && isRemote) {
|
||||
menu.push({ text: intl.formatMessage(messages.openOriginalPage), href: status.get('url') });
|
||||
}
|
||||
|
||||
menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy });
|
||||
|
||||
if (publicStatus && 'share' in navigator) {
|
||||
menu.push({ text: intl.formatMessage(messages.share), action: this.handleShareClick });
|
||||
}
|
||||
|
||||
if (anonymousStatus && (signedIn || !isRemote)) {
|
||||
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
|
||||
}
|
||||
}
|
||||
|
||||
if (signedIn) {
|
||||
menu.push(null);
|
||||
if (!simpleTimelineMenu) {
|
||||
menu.push(null);
|
||||
}
|
||||
|
||||
menu.push({ text: intl.formatMessage(status.get('reblogged') ? messages.cancelReblog : messages.reblog), action: this.handleReblogForceModalClick });
|
||||
|
||||
|
@ -333,9 +337,11 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick, dangerous: true });
|
||||
menu.push({ text: intl.formatMessage(messages.redraft), action: this.handleRedraftClick, dangerous: true });
|
||||
} else {
|
||||
menu.push({ text: intl.formatMessage(messages.mention, { name: account.get('username') }), action: this.handleMentionClick });
|
||||
menu.push({ text: intl.formatMessage(messages.direct, { name: account.get('username') }), action: this.handleDirectClick });
|
||||
menu.push(null);
|
||||
if (!simpleTimelineMenu) {
|
||||
menu.push({ text: intl.formatMessage(messages.mention, { name: account.get('username') }), action: this.handleMentionClick });
|
||||
menu.push({ text: intl.formatMessage(messages.direct, { name: account.get('username') }), action: this.handleDirectClick });
|
||||
menu.push(null);
|
||||
}
|
||||
|
||||
if (relationship && relationship.get('muting')) {
|
||||
menu.push({ text: intl.formatMessage(messages.unmute, { name: account.get('username') }), action: this.handleMuteClick });
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
* @property {boolean} search_enabled
|
||||
* @property {boolean} trends_enabled
|
||||
* @property {boolean} show_emoji_reaction_on_timeline
|
||||
* @property {string} simple_timeline_menu
|
||||
* @property {boolean} single_user_mode
|
||||
* @property {string} source_url
|
||||
* @property {string} streaming_api_base_url
|
||||
|
@ -147,6 +148,7 @@ export const searchEnabled = getMeta('search_enabled');
|
|||
export const trendsEnabled = getMeta('trends_enabled');
|
||||
export const showEmojiReactionOnTimeline = getMeta('show_emoji_reaction_on_timeline');
|
||||
export const showTrends = getMeta('show_trends');
|
||||
export const simpleTimelineMenu = getMeta('simple_timeline_menu');
|
||||
export const singleUserMode = getMeta('single_user_mode');
|
||||
export const source_url = getMeta('source_url');
|
||||
export const timelinePreview = getMeta('timeline_preview');
|
||||
|
|
|
@ -51,6 +51,10 @@ module HasUserSettings
|
|||
settings['web.show_emoji_reaction_on_timeline']
|
||||
end
|
||||
|
||||
def setting_simple_timeline_menu
|
||||
settings['web.simple_timeline_menu']
|
||||
end
|
||||
|
||||
def setting_default_sensitive
|
||||
settings['default_sensitive']
|
||||
end
|
||||
|
|
|
@ -64,6 +64,7 @@ class UserSettings
|
|||
setting :display_media, default: 'default', in: %w(default show_all hide_all)
|
||||
setting :display_media_expand, default: true
|
||||
setting :auto_play, default: true
|
||||
setting :simple_timeline_menu, default: false
|
||||
end
|
||||
|
||||
namespace :notification_emails do
|
||||
|
|
|
@ -60,6 +60,7 @@ class InitialStateSerializer < ActiveModel::Serializer
|
|||
store[:use_pending_items] = object.current_account.user.setting_use_pending_items
|
||||
store[:show_trends] = Setting.trends && object.current_account.user.setting_trends
|
||||
store[:bookmark_category_needed] = object.current_account.user.setting_bookmark_category_needed
|
||||
store[:simple_timeline_menu] = object.current_account.user.setting_simple_timeline_menu
|
||||
else
|
||||
store[:auto_play_gif] = Setting.auto_play_gif
|
||||
store[:display_media] = Setting.display_media
|
||||
|
|
|
@ -46,6 +46,9 @@
|
|||
.fields-group
|
||||
= ff.input :'web.bookmark_category_needed', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_bookmark_category_needed'), hint: I18n.t('simple_form.hints.defaults.setting_bookmark_category_needed')
|
||||
|
||||
.fields-group
|
||||
= ff.input :'web.simple_timeline_menu', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_simple_timeline_menu')
|
||||
|
||||
%h4= t 'appearance.discovery'
|
||||
|
||||
.fields-group
|
||||
|
|
|
@ -270,6 +270,7 @@ en:
|
|||
setting_send_without_domain_blocks: Send your post to all server with administrator set as rejecting-post-server for protect you [DEPRECATED]
|
||||
setting_show_application: Disclose application used to send posts
|
||||
setting_show_emoji_reaction_on_timeline: Show all stamps on timeline
|
||||
setting_simple_timeline_menu: Reduce post menu on timeline
|
||||
setting_stay_privacy: Not change privacy after post
|
||||
setting_stop_emoji_reaction_streaming: Disable stamp streamings
|
||||
setting_system_font_ui: Use system's default font
|
||||
|
|
|
@ -285,6 +285,7 @@ ja:
|
|||
setting_send_without_domain_blocks: 管理人の設定した配送停止設定を拒否する (非推奨)
|
||||
setting_show_application: 送信したアプリを開示する
|
||||
setting_show_emoji_reaction_on_timeline: タイムライン上に他の人のつけたスタンプを表示する
|
||||
setting_simple_timeline_menu: タイムライン上でメニューの項目を減らす
|
||||
setting_stay_privacy: 投稿時に公開範囲を保存する
|
||||
setting_stop_emoji_reaction_streaming: スタンプのストリーミングを停止する
|
||||
setting_system_font_ui: システムのデフォルトフォントを使う
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue