From 2516acfc007e88553594c34c7e35c6114011e09b Mon Sep 17 00:00:00 2001 From: KMY Date: Tue, 12 Sep 2023 18:35:00 +0900 Subject: [PATCH] Change add my stamp only view --- app/javascript/mastodon/components/status.jsx | 4 +-- .../components/status_emoji_reactions_bar.jsx | 32 +++++++++++-------- config/locales/simple_form.en.yml | 2 +- config/locales/simple_form.ja.yml | 2 +- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx index 274ff80f350625..257e90d1c17dd1 100644 --- a/app/javascript/mastodon/components/status.jsx +++ b/app/javascript/mastodon/components/status.jsx @@ -577,8 +577,8 @@ class Status extends ImmutablePureComponent { let emojiReactionsBar = null; if (!this.props.withoutEmojiReactions && status.get('emoji_reactions')) { const emojiReactions = status.get('emoji_reactions'); - if (emojiReactions.size > 0 && enableEmojiReaction && showEmojiReactionOnTimeline) { - emojiReactionsBar = ; + if (emojiReactions.size > 0 && enableEmojiReaction) { + emojiReactionsBar = ; } } diff --git a/app/javascript/mastodon/components/status_emoji_reactions_bar.jsx b/app/javascript/mastodon/components/status_emoji_reactions_bar.jsx index 7cc088dda8b4c6..5592c04f4ca098 100644 --- a/app/javascript/mastodon/components/status_emoji_reactions_bar.jsx +++ b/app/javascript/mastodon/components/status_emoji_reactions_bar.jsx @@ -60,6 +60,7 @@ class StatusEmojiReactionsBar extends PureComponent { status: ImmutablePropTypes.map, onEmojiReact: PropTypes.func, onUnEmojiReact: PropTypes.func, + myReactionOnly: PropTypes.bool, }; onEmojiReact = (name) => { @@ -73,20 +74,23 @@ class StatusEmojiReactionsBar extends PureComponent { }; render () { - const { emojiReactions } = this.props; - - const emojiButtons = Array.from(emojiReactions).filter(emoji => emoji.get('count') !== 0).map((emoji, index) => ( - )); + const { emojiReactions, myReactionOnly } = this.props; + + const emojiButtons = Array.from(emojiReactions) + .filter(emoji => emoji.get('count') !== 0) + .filter(emoji => !myReactionOnly || emoji.get('me')) + .map((emoji, index) => ( + )); return (
diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 0be556c4511d44..175f234c0d45e7 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -267,7 +267,7 @@ en: 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_show_application: Disclose application used to send posts - setting_show_emoji_reaction_on_timeline: Show stamps on timeline + setting_show_emoji_reaction_on_timeline: Show all stamps 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 diff --git a/config/locales/simple_form.ja.yml b/config/locales/simple_form.ja.yml index c5f9ad84c9a179..6f7a16efd70c5d 100644 --- a/config/locales/simple_form.ja.yml +++ b/config/locales/simple_form.ja.yml @@ -278,7 +278,7 @@ ja: setting_reject_unlisted_subscription: Misskey系サーバーに「未収載」投稿を「フォロワーのみ」に変換して配送する setting_send_without_domain_blocks: 管理人の設定した配送停止設定を拒否する (非推奨) setting_show_application: 送信したアプリを開示する - setting_show_emoji_reaction_on_timeline: タイムライン上にスタンプを表示する + setting_show_emoji_reaction_on_timeline: タイムライン上に他の人のつけたスタンプを表示する setting_stay_privacy: 投稿時に公開範囲を保存する setting_stop_emoji_reaction_streaming: スタンプのストリーミングを停止する setting_system_font_ui: システムのデフォルトフォントを使う