Add show stamp on timeline setting

This commit is contained in:
KMY 2023-09-12 18:26:16 +09:00
parent e759258b5b
commit 51f645fb99
8 changed files with 15 additions and 5 deletions

View file

@ -18,7 +18,7 @@ import Card from '../features/status/components/card';
// to use the progress bar to show download progress // to use the progress bar to show download progress
import Bundle from '../features/ui/components/bundle'; import Bundle from '../features/ui/components/bundle';
import { MediaGallery, Video, Audio } from '../features/ui/util/async-components'; import { MediaGallery, Video, Audio } from '../features/ui/util/async-components';
import { displayMedia, enableEmojiReaction } from '../initial_state'; import { displayMedia, enableEmojiReaction, showEmojiReactionOnTimeline } from '../initial_state';
import { Avatar } from './avatar'; import { Avatar } from './avatar';
import { AvatarOverlay } from './avatar_overlay'; import { AvatarOverlay } from './avatar_overlay';
@ -577,8 +577,7 @@ class Status extends ImmutablePureComponent {
let emojiReactionsBar = null; let emojiReactionsBar = null;
if (!this.props.withoutEmojiReactions && status.get('emoji_reactions')) { if (!this.props.withoutEmojiReactions && status.get('emoji_reactions')) {
const emojiReactions = status.get('emoji_reactions'); const emojiReactions = status.get('emoji_reactions');
const emojiReactionPolicy = status.getIn(['account', 'other_settings', 'emoji_reaction_policy']) || 'allow'; if (emojiReactions.size > 0 && enableEmojiReaction && showEmojiReactionOnTimeline) {
if (emojiReactions.size > 0 && enableEmojiReaction && emojiReactionPolicy !== 'block_and_hide') {
emojiReactionsBar = <StatusEmojiReactionsBar emojiReactions={emojiReactions} status={status} onEmojiReact={this.props.onEmojiReact} onUnEmojiReact={this.props.onUnEmojiReact} />; emojiReactionsBar = <StatusEmojiReactionsBar emojiReactions={emojiReactions} status={status} onEmojiReact={this.props.onEmojiReact} onUnEmojiReact={this.props.onUnEmojiReact} />;
} }
} }

View file

@ -76,6 +76,7 @@
* @property {string} repository * @property {string} repository
* @property {boolean} search_enabled * @property {boolean} search_enabled
* @property {boolean} trends_enabled * @property {boolean} trends_enabled
* @property {boolean} show_emoji_reaction_on_timeline
* @property {boolean} single_user_mode * @property {boolean} single_user_mode
* @property {string} source_url * @property {string} source_url
* @property {string} streaming_api_base_url * @property {string} streaming_api_base_url
@ -144,6 +145,7 @@ export const registrationsOpen = getMeta('registrations_open');
export const repository = getMeta('repository'); export const repository = getMeta('repository');
export const searchEnabled = getMeta('search_enabled'); export const searchEnabled = getMeta('search_enabled');
export const trendsEnabled = getMeta('trends_enabled'); export const trendsEnabled = getMeta('trends_enabled');
export const showEmojiReactionOnTimeline = getMeta('show_emoji_reaction_on_timeline');
export const showTrends = getMeta('show_trends'); export const showTrends = getMeta('show_trends');
export const singleUserMode = getMeta('single_user_mode'); export const singleUserMode = getMeta('single_user_mode');
export const source_url = getMeta('source_url'); export const source_url = getMeta('source_url');

View file

@ -47,6 +47,10 @@ module HasUserSettings
settings['web.enable_emoji_reaction'] settings['web.enable_emoji_reaction']
end end
def setting_show_emoji_reaction_on_timeline
settings['web.show_emoji_reaction_on_timeline']
end
def setting_default_sensitive def setting_default_sensitive
settings['default_sensitive'] settings['default_sensitive']
end end

View file

@ -56,6 +56,7 @@ class UserSettings
setting :enable_dtl_menu, default: false setting :enable_dtl_menu, default: false
setting :hide_recent_emojis, default: false setting :hide_recent_emojis, default: false
setting :enable_emoji_reaction, default: true setting :enable_emoji_reaction, default: true
setting :show_emoji_reaction_on_timeline, default: true
setting :reblog_modal, default: false setting :reblog_modal, default: false
setting :unfollow_modal, default: true setting :unfollow_modal, default: true
setting :reduce_motion, default: false setting :reduce_motion, default: false

View file

@ -49,6 +49,7 @@ class InitialStateSerializer < ActiveModel::Serializer
store[:display_media_expand] = object.current_account.user.setting_display_media_expand store[:display_media_expand] = object.current_account.user.setting_display_media_expand
store[:expand_spoilers] = object.current_account.user.setting_expand_spoilers store[:expand_spoilers] = object.current_account.user.setting_expand_spoilers
store[:enable_emoji_reaction] = object.current_account.user.setting_enable_emoji_reaction store[:enable_emoji_reaction] = object.current_account.user.setting_enable_emoji_reaction
store[:show_emoji_reaction_on_timeline] = object.current_account.user.setting_show_emoji_reaction_on_timeline
store[:enable_login_privacy] = object.current_account.user.setting_enable_login_privacy store[:enable_login_privacy] = object.current_account.user.setting_enable_login_privacy
store[:enable_dtl_menu] = object.current_account.user.setting_enable_dtl_menu store[:enable_dtl_menu] = object.current_account.user.setting_enable_dtl_menu
store[:hide_recent_emojis] = object.current_account.user.setting_hide_recent_emojis store[:hide_recent_emojis] = object.current_account.user.setting_hide_recent_emojis

View file

@ -40,6 +40,7 @@
.fields-group .fields-group
= ff.input :'web.hide_recent_emojis', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_hide_recent_emojis'), hint: false = ff.input :'web.hide_recent_emojis', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_hide_recent_emojis'), hint: false
= ff.input :'web.enable_emoji_reaction', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_enable_emoji_reaction'), hint: I18n.t('simple_form.hints.defaults.setting_enable_emoji_reaction') = ff.input :'web.enable_emoji_reaction', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_enable_emoji_reaction'), hint: I18n.t('simple_form.hints.defaults.setting_enable_emoji_reaction')
= ff.input :'web.show_emoji_reaction_on_timeline', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_emoji_reaction_on_timeline')
.fields-group .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') = 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')

View file

@ -242,7 +242,7 @@ en:
setting_dtl_force_subscribable: Ignore your dissubscribable setting when using the DTL tag setting_dtl_force_subscribable: Ignore your dissubscribable setting when using the DTL tag
setting_dtl_force_with_tag: Post with DTL tag setting_dtl_force_with_tag: Post with DTL tag
setting_emoji_reaction_streaming_notify_impl2: Enable stamp notification compat with Nyastodon, Catstodon, glitch-soc setting_emoji_reaction_streaming_notify_impl2: Enable stamp notification compat with Nyastodon, Catstodon, glitch-soc
setting_enable_emoji_reaction: Show emoji reaction on your display setting_enable_emoji_reaction: Use stamp function
setting_enable_login_privacy: Enable login visibility setting_enable_login_privacy: Enable login visibility
setting_emoji_reaction_policy: Stamp receive/display policy setting_emoji_reaction_policy: Stamp receive/display policy
setting_emoji_reaction_policy_items: setting_emoji_reaction_policy_items:
@ -267,6 +267,7 @@ en:
setting_reject_unlisted_subscription: Reject sending unlisted posts to Misskey, Calckey setting_reject_unlisted_subscription: Reject sending unlisted posts to Misskey, Calckey
setting_send_without_domain_blocks: Send your post to all server with administrator set as rejecting-post-server for protect you [DEPRECATED] 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_application: Disclose application used to send posts
setting_show_emoji_reaction_on_timeline: Show stamps on timeline
setting_stay_privacy: Not change privacy after post setting_stay_privacy: Not change privacy after post
setting_stop_emoji_reaction_streaming: Disable stamp streamings setting_stop_emoji_reaction_streaming: Disable stamp streamings
setting_system_font_ui: Use system's default font setting_system_font_ui: Use system's default font

View file

@ -262,7 +262,7 @@ ja:
mutuals_only: 相互のみ許可 mutuals_only: 相互のみ許可
outside_only: フォロー中、またはフォロワーのみに許可 outside_only: フォロー中、またはフォロワーのみに許可
setting_emoji_reaction_streaming_notify_impl2: Nyastodon, Catstodon, glitch-soc互換のスタンプ機能を有効にする setting_emoji_reaction_streaming_notify_impl2: Nyastodon, Catstodon, glitch-soc互換のスタンプ機能を有効にする
setting_enable_emoji_reaction: 自分の画面に絵文字リアクションを表示する setting_enable_emoji_reaction: スタンプ機能を使用する
setting_expand_spoilers: 閲覧注意としてマークされた投稿を常に展開する setting_expand_spoilers: 閲覧注意としてマークされた投稿を常に展開する
setting_hide_followers_count: フォロワー数を隠す setting_hide_followers_count: フォロワー数を隠す
setting_hide_following_count: フォロー数を隠す setting_hide_following_count: フォロー数を隠す
@ -278,6 +278,7 @@ ja:
setting_reject_unlisted_subscription: Misskey系サーバーに「未収載」投稿を「フォロワーのみ」に変換して配送する setting_reject_unlisted_subscription: Misskey系サーバーに「未収載」投稿を「フォロワーのみ」に変換して配送する
setting_send_without_domain_blocks: 管理人の設定した配送停止設定を拒否する (非推奨) setting_send_without_domain_blocks: 管理人の設定した配送停止設定を拒否する (非推奨)
setting_show_application: 送信したアプリを開示する setting_show_application: 送信したアプリを開示する
setting_show_emoji_reaction_on_timeline: タイムライン上にスタンプを表示する
setting_stay_privacy: 投稿時に公開範囲を保存する setting_stay_privacy: 投稿時に公開範囲を保存する
setting_stop_emoji_reaction_streaming: スタンプのストリーミングを停止する setting_stop_emoji_reaction_streaming: スタンプのストリーミングを停止する
setting_system_font_ui: システムのデフォルトフォントを使う setting_system_font_ui: システムのデフォルトフォントを使う