Browse Source

重新整理了评论/回复图标及文字

pull/4/head
欧醚 4 years ago
parent
commit
4103b2a466
3 changed files with 8 additions and 6 deletions
  1. +5
    -4
      app/javascript/mastodon/components/status_action_bar.js
  2. +2
    -2
      app/javascript/mastodon/features/status/components/action_bar.js
  3. +1
    -0
      app/javascript/mastodon/locales/zh-CN.json

+ 5
- 4
app/javascript/mastodon/components/status_action_bar.js View File

@ -15,6 +15,7 @@ const messages = defineMessages({
mute: { id: 'account.mute', defaultMessage: 'Mute @{name}' },
block: { id: 'account.block', defaultMessage: 'Block @{name}' },
reply: { id: 'status.reply', defaultMessage: 'Reply' },
comment: {id: 'status.comment', defaultMessage: 'Comment' },
share: { id: 'status.share', defaultMessage: 'Share' },
more: { id: 'status.more', defaultMessage: 'More' },
replyAll: { id: 'status.replyAll', defaultMessage: 'Reply to thread' },
@ -237,10 +238,10 @@ class StatusActionBar extends ImmutablePureComponent {
if (status.get('in_reply_to_id', null) === null) {
replyIcon = 'comment';
replyTitle = intl.formatMessage(messages.reply);
replyTitle = intl.formatMessage(messages.comment);
} else {
replyIcon = 'comments';
replyTitle = intl.formatMessage(messages.replyAll);
replyIcon = 'reply';
replyTitle = intl.formatMessage(messages.reply);
}
const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && (
@ -249,7 +250,7 @@ class StatusActionBar extends ImmutablePureComponent {
return (
<div className='status__action-bar'>
<div className='status__action-bar__counter'><IconButton className='status__action-bar-button' title={replyTitle} icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'comments-o' : replyIcon} onClick={this.handleReplyClick} /><span className='status__action-bar__counter__label' >{obfuscatedCount(status.get('replies_count'))}</span></div>
<div className='status__action-bar__counter'><IconButton className='status__action-bar-button' title={replyTitle} icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'comment-o' : replyIcon} onClick={this.handleReplyClick} /><span className='status__action-bar__counter__label' >{obfuscatedCount(status.get('replies_count'))}</span></div>
<div className='status__action-bar__counter'><IconButton className='status__action-bar-button' disabled={!publicStatus} active={status.get('reblogged')} pressed={status.get('reblogged')} title={!publicStatus ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)} icon={reblogIcon} onClick={this.handleReblogClick} />{publicStatus && <span className='status__action-bar__counter__label' >{obfuscatedCount(status.get('reblogs_count'))}</span>}</div>
<div className='status__action-bar__counter'><IconButton className='status__action-bar-button star-icon' animate active={status.get('favourited')} pressed={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='heart' onClick={this.handleFavouriteClick} /><span className='status__action-bar__counter__label' >{obfuscatedCount(status.get('favourites_count'))}</span></div>
{shareButton}

+ 2
- 2
app/javascript/mastodon/features/status/components/action_bar.js View File

@ -183,7 +183,7 @@ class ActionBar extends React.PureComponent {
if (status.get('in_reply_to_id', null) === null) {
replyIcon = 'comment';
} else {
replyIcon = 'comments';
replyIcon = 'reply';
}
let reblogIcon = 'retweet';
@ -194,7 +194,7 @@ class ActionBar extends React.PureComponent {
return (
<div className='detailed-status__action-bar'>
<div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.reply)} icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'reply' : replyIcon} onClick={this.handleReplyClick} /></div>
<div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.reply)} icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'comment-o' : replyIcon} onClick={this.handleReplyClick} /></div>
<div className='detailed-status__button'><IconButton disabled={reblog_disabled} active={status.get('reblogged')} title={reblog_disabled ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)} icon={reblogIcon} onClick={this.handleReblogClick} /></div>
<div className='detailed-status__button'><IconButton className='star-icon' animate active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='heart' onClick={this.handleFavouriteClick} /></div>
{shareButton}

+ 1
- 0
app/javascript/mastodon/locales/zh-CN.json View File

@ -369,6 +369,7 @@
"status.reblogged_by": "{name} 转嘟了",
"status.reblogs.empty": "没有人转嘟过此条嘟文。如果有人转嘟了,就会显示在这里。",
"status.redraft": "删除并重新编辑",
"status.comment": "评论",
"status.reply": "回复",
"status.replyAll": "回复所有人",
"status.report": "举报 @{name}",

Loading…
Cancel
Save