Change add my stamp only view

This commit is contained in:
KMY 2023-09-12 18:35:00 +09:00
parent 51f645fb99
commit 2516acfc00
4 changed files with 21 additions and 17 deletions

View file

@ -577,8 +577,8 @@ 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');
if (emojiReactions.size > 0 && enableEmojiReaction && showEmojiReactionOnTimeline) { if (emojiReactions.size > 0 && enableEmojiReaction) {
emojiReactionsBar = <StatusEmojiReactionsBar emojiReactions={emojiReactions} status={status} onEmojiReact={this.props.onEmojiReact} onUnEmojiReact={this.props.onUnEmojiReact} />; emojiReactionsBar = <StatusEmojiReactionsBar emojiReactions={emojiReactions} myReactionOnly={!showEmojiReactionOnTimeline} status={status} onEmojiReact={this.props.onEmojiReact} onUnEmojiReact={this.props.onUnEmojiReact} />;
} }
} }

View file

@ -60,6 +60,7 @@ class StatusEmojiReactionsBar extends PureComponent {
status: ImmutablePropTypes.map, status: ImmutablePropTypes.map,
onEmojiReact: PropTypes.func, onEmojiReact: PropTypes.func,
onUnEmojiReact: PropTypes.func, onUnEmojiReact: PropTypes.func,
myReactionOnly: PropTypes.bool,
}; };
onEmojiReact = (name) => { onEmojiReact = (name) => {
@ -73,20 +74,23 @@ class StatusEmojiReactionsBar extends PureComponent {
}; };
render () { render () {
const { emojiReactions } = this.props; const { emojiReactions, myReactionOnly } = this.props;
const emojiButtons = Array.from(emojiReactions).filter(emoji => emoji.get('count') !== 0).map((emoji, index) => ( const emojiButtons = Array.from(emojiReactions)
<EmojiReactionButton .filter(emoji => emoji.get('count') !== 0)
key={index} .filter(emoji => !myReactionOnly || emoji.get('me'))
name={emoji.get('name')} .map((emoji, index) => (
count={emoji.get('count')} <EmojiReactionButton
me={emoji.get('me')} key={index}
url={emoji.get('url')} name={emoji.get('name')}
staticUrl={emoji.get('static_url')} count={myReactionOnly ? 1 : emoji.get('count')}
domain={emoji.get('domain')} me={emoji.get('me')}
onEmojiReact={this.onEmojiReact} url={emoji.get('url')}
onUnEmojiReact={this.onUnEmojiReact} staticUrl={emoji.get('static_url')}
/>)); domain={emoji.get('domain')}
onEmojiReact={this.onEmojiReact}
onUnEmojiReact={this.onUnEmojiReact}
/>));
return ( return (
<div className='status__emoji-reactions-bar'> <div className='status__emoji-reactions-bar'>

View file

@ -267,7 +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_show_emoji_reaction_on_timeline: Show all 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

@ -278,7 +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_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: システムのデフォルトフォントを使う