mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-05 03:55:14 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
6d173cec8e
28 changed files with 406 additions and 347 deletions
|
|
@ -37,6 +37,7 @@ class Conversation extends ImmutablePureComponent {
|
|||
onMoveUp: PropTypes.func,
|
||||
onMoveDown: PropTypes.func,
|
||||
markRead: PropTypes.func.isRequired,
|
||||
delete: PropTypes.func.isRequired,
|
||||
intl: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,17 +5,23 @@ import PropTypes from 'prop-types';
|
|||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import LoadingIndicator from '../../components/loading_indicator';
|
||||
import { fetchFavourites } from '../../actions/interactions';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import AccountContainer from '../../containers/account_container';
|
||||
import Column from '../ui/components/column';
|
||||
import ColumnBackButton from '../../components/column_back_button';
|
||||
import ScrollableList from '../../components/scrollable_list';
|
||||
import Icon from 'mastodon/components/icon';
|
||||
import ColumnHeader from '../../components/column_header';
|
||||
|
||||
const messages = defineMessages({
|
||||
refresh: { id: 'refresh', defaultMessage: 'Refresh' },
|
||||
});
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
accountIds: state.getIn(['user_lists', 'favourited_by', props.params.statusId]),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Favourites extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
|
@ -24,6 +30,7 @@ class Favourites extends ImmutablePureComponent {
|
|||
shouldUpdateScroll: PropTypes.func,
|
||||
accountIds: ImmutablePropTypes.list,
|
||||
multiColumn: PropTypes.bool,
|
||||
intl: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
componentWillMount () {
|
||||
|
|
@ -38,8 +45,12 @@ class Favourites extends ImmutablePureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
handleRefresh = () => {
|
||||
this.props.dispatch(fetchFavourites(this.props.params.statusId));
|
||||
}
|
||||
|
||||
render () {
|
||||
const { shouldUpdateScroll, accountIds, multiColumn } = this.props;
|
||||
const { intl, shouldUpdateScroll, accountIds, multiColumn } = this.props;
|
||||
|
||||
if (!accountIds) {
|
||||
return (
|
||||
|
|
@ -52,8 +63,14 @@ class Favourites extends ImmutablePureComponent {
|
|||
const emptyMessage = <FormattedMessage id='empty_column.favourites' defaultMessage='No one has favourited this toot yet. When someone does, they will show up here.' />;
|
||||
|
||||
return (
|
||||
<Column>
|
||||
<ColumnBackButton multiColumn={multiColumn} />
|
||||
<Column bindToDocument={!multiColumn}>
|
||||
<ColumnHeader
|
||||
showBackButton
|
||||
multiColumn={multiColumn}
|
||||
extraButton={(
|
||||
<button className='column-header__button' title={intl.formatMessage(messages.refresh)} aria-label={intl.formatMessage(messages.refresh)} onClick={this.handleRefresh}><Icon id='refresh' /></button>
|
||||
)}
|
||||
/>
|
||||
|
||||
<ScrollableList
|
||||
scrollKey='favourites'
|
||||
|
|
|
|||
|
|
@ -5,17 +5,23 @@ import PropTypes from 'prop-types';
|
|||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import LoadingIndicator from '../../components/loading_indicator';
|
||||
import { fetchReblogs } from '../../actions/interactions';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import AccountContainer from '../../containers/account_container';
|
||||
import Column from '../ui/components/column';
|
||||
import ColumnBackButton from '../../components/column_back_button';
|
||||
import ScrollableList from '../../components/scrollable_list';
|
||||
import Icon from 'mastodon/components/icon';
|
||||
import ColumnHeader from '../../components/column_header';
|
||||
|
||||
const messages = defineMessages({
|
||||
refresh: { id: 'refresh', defaultMessage: 'Refresh' },
|
||||
});
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
accountIds: state.getIn(['user_lists', 'reblogged_by', props.params.statusId]),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class Reblogs extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
|
|
@ -24,6 +30,7 @@ class Reblogs extends ImmutablePureComponent {
|
|||
shouldUpdateScroll: PropTypes.func,
|
||||
accountIds: ImmutablePropTypes.list,
|
||||
multiColumn: PropTypes.bool,
|
||||
intl: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
componentWillMount () {
|
||||
|
|
@ -38,8 +45,12 @@ class Reblogs extends ImmutablePureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
handleRefresh = () => {
|
||||
this.props.dispatch(fetchReblogs(this.props.params.statusId));
|
||||
}
|
||||
|
||||
render () {
|
||||
const { shouldUpdateScroll, accountIds, multiColumn } = this.props;
|
||||
const { intl, shouldUpdateScroll, accountIds, multiColumn } = this.props;
|
||||
|
||||
if (!accountIds) {
|
||||
return (
|
||||
|
|
@ -52,8 +63,14 @@ class Reblogs extends ImmutablePureComponent {
|
|||
const emptyMessage = <FormattedMessage id='status.reblogs.empty' defaultMessage='No one has boosted this toot yet. When someone does, they will show up here.' />;
|
||||
|
||||
return (
|
||||
<Column>
|
||||
<ColumnBackButton multiColumn={multiColumn} />
|
||||
<Column bindToDocument={!multiColumn}>
|
||||
<ColumnHeader
|
||||
showBackButton
|
||||
multiColumn={multiColumn}
|
||||
extraButton={(
|
||||
<button className='column-header__button' title={intl.formatMessage(messages.refresh)} aria-label={intl.formatMessage(messages.refresh)} onClick={this.handleRefresh}><Icon id='refresh' /></button>
|
||||
)}
|
||||
/>
|
||||
|
||||
<ScrollableList
|
||||
scrollKey='reblogs'
|
||||
|
|
|
|||
|
|
@ -238,6 +238,14 @@
|
|||
"description": "Tooltip of the \"voted\" checkmark in polls",
|
||||
"id": "poll.voted"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "{count, plural, one {# person} other {# people}}",
|
||||
"id": "poll.total_people"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "{count, plural, one {# vote} other {# votes}}",
|
||||
"id": "poll.total_votes"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Vote",
|
||||
"id": "poll.vote"
|
||||
|
|
@ -245,10 +253,6 @@
|
|||
{
|
||||
"defaultMessage": "Refresh",
|
||||
"id": "poll.refresh"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "{count, plural, one {# vote} other {# votes}}",
|
||||
"id": "poll.total_votes"
|
||||
}
|
||||
],
|
||||
"path": "app/javascript/mastodon/components/poll.json"
|
||||
|
|
@ -498,10 +502,6 @@
|
|||
"defaultMessage": "Are you sure you want to delete this status and re-draft it? Favourites and boosts will be lost, and replies to the original post will be orphaned.",
|
||||
"id": "confirmations.redraft.message"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Block",
|
||||
"id": "confirmations.block.confirm"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Reply",
|
||||
"id": "confirmations.reply.confirm"
|
||||
|
|
@ -509,14 +509,6 @@
|
|||
{
|
||||
"defaultMessage": "Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?",
|
||||
"id": "confirmations.reply.message"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Block & Report",
|
||||
"id": "confirmations.block.block_and_report"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Are you sure you want to block {name}?",
|
||||
"id": "confirmations.block.message"
|
||||
}
|
||||
],
|
||||
"path": "app/javascript/mastodon/containers/status_container.json"
|
||||
|
|
@ -553,26 +545,14 @@
|
|||
"defaultMessage": "Unfollow",
|
||||
"id": "confirmations.unfollow.confirm"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Block",
|
||||
"id": "confirmations.block.confirm"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Hide entire domain",
|
||||
"id": "confirmations.domain_block.confirm"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Block & Report",
|
||||
"id": "confirmations.block.block_and_report"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Are you sure you want to unfollow {name}?",
|
||||
"id": "confirmations.unfollow.message"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Are you sure you want to block {name}?",
|
||||
"id": "confirmations.block.message"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.",
|
||||
"id": "confirmations.domain_block.message"
|
||||
|
|
@ -1134,15 +1114,6 @@
|
|||
],
|
||||
"path": "app/javascript/mastodon/features/compose/components/upload_form.json"
|
||||
},
|
||||
{
|
||||
"descriptors": [
|
||||
{
|
||||
"defaultMessage": "Uploading...",
|
||||
"id": "upload_progress.label"
|
||||
}
|
||||
],
|
||||
"path": "app/javascript/mastodon/features/compose/components/upload_progress.json"
|
||||
},
|
||||
{
|
||||
"descriptors": [
|
||||
{
|
||||
|
|
@ -1635,6 +1606,10 @@
|
|||
},
|
||||
{
|
||||
"descriptors": [
|
||||
{
|
||||
"defaultMessage": "Basic",
|
||||
"id": "home.column_settings.basic"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Show boosts",
|
||||
"id": "home.column_settings.show_reblogs"
|
||||
|
|
@ -2016,14 +1991,6 @@
|
|||
"defaultMessage": "Push notifications",
|
||||
"id": "notifications.column_settings.push"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Basic",
|
||||
"id": "home.column_settings.basic"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Update in real-time",
|
||||
"id": "home.column_settings.update_live"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Quick filter bar",
|
||||
"id": "notifications.column_settings.filter_bar.category"
|
||||
|
|
@ -2082,10 +2049,6 @@
|
|||
},
|
||||
{
|
||||
"descriptors": [
|
||||
{
|
||||
"defaultMessage": "and {count, plural, one {# other} other {# others}}",
|
||||
"id": "notification.and_n_others"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "{name} followed you",
|
||||
"id": "notification.follow"
|
||||
|
|
@ -2273,10 +2236,6 @@
|
|||
"defaultMessage": "Are you sure you want to delete this status and re-draft it? Favourites and boosts will be lost, and replies to the original post will be orphaned.",
|
||||
"id": "confirmations.redraft.message"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Block",
|
||||
"id": "confirmations.block.confirm"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Reply",
|
||||
"id": "confirmations.reply.confirm"
|
||||
|
|
@ -2284,14 +2243,6 @@
|
|||
{
|
||||
"defaultMessage": "Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?",
|
||||
"id": "confirmations.reply.message"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Block & Report",
|
||||
"id": "confirmations.block.block_and_report"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Are you sure you want to block {name}?",
|
||||
"id": "confirmations.block.message"
|
||||
}
|
||||
],
|
||||
"path": "app/javascript/mastodon/features/status/containers/detailed_status_container.json"
|
||||
|
|
@ -2314,10 +2265,6 @@
|
|||
"defaultMessage": "Are you sure you want to delete this status and re-draft it? Favourites and boosts will be lost, and replies to the original post will be orphaned.",
|
||||
"id": "confirmations.redraft.message"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Block",
|
||||
"id": "confirmations.block.confirm"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Show more for all",
|
||||
"id": "status.show_more_all"
|
||||
|
|
@ -2337,21 +2284,30 @@
|
|||
{
|
||||
"defaultMessage": "Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?",
|
||||
"id": "confirmations.reply.message"
|
||||
}
|
||||
],
|
||||
"path": "app/javascript/mastodon/features/status/index.json"
|
||||
},
|
||||
{
|
||||
"descriptors": [
|
||||
{
|
||||
"defaultMessage": "Are you sure you want to block {name}?",
|
||||
"id": "confirmations.block.message"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Cancel",
|
||||
"id": "confirmation_modal.cancel"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Block & Report",
|
||||
"id": "confirmations.block.block_and_report"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Toot",
|
||||
"id": "column.status"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Are you sure you want to block {name}?",
|
||||
"id": "confirmations.block.message"
|
||||
"defaultMessage": "Block",
|
||||
"id": "confirmations.block.confirm"
|
||||
}
|
||||
],
|
||||
"path": "app/javascript/mastodon/features/status/index.json"
|
||||
"path": "app/javascript/mastodon/features/ui/components/block_modal.json"
|
||||
},
|
||||
{
|
||||
"descriptors": [
|
||||
|
|
@ -2569,6 +2525,10 @@
|
|||
"defaultMessage": "Are you sure you want to mute {name}?",
|
||||
"id": "confirmations.mute.message"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "This will hide posts from them and posts mentioning them, but it will still allow them to see your posts follow you.",
|
||||
"id": "confirmations.mute.explanation"
|
||||
},
|
||||
{
|
||||
"defaultMessage": "Hide notifications from this user?",
|
||||
"id": "mute_modal.hide_notifications"
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@
|
|||
"column.notifications": "Notifications",
|
||||
"column.pins": "Pinned toots",
|
||||
"column.public": "Federated timeline",
|
||||
"column.status": "Toot",
|
||||
"column_back_button.label": "Back",
|
||||
"column_header.hide_settings": "Hide settings",
|
||||
"column_header.moveLeft_settings": "Move column to the left",
|
||||
|
|
@ -104,6 +103,7 @@
|
|||
"confirmations.logout.confirm": "Log out",
|
||||
"confirmations.logout.message": "Are you sure you want to log out?",
|
||||
"confirmations.mute.confirm": "Mute",
|
||||
"confirmations.mute.explanation": "This will hide posts from them and posts mentioning them, but it will still allow them to see your posts follow you.",
|
||||
"confirmations.mute.message": "Are you sure you want to mute {name}?",
|
||||
"confirmations.redraft.confirm": "Delete & redraft",
|
||||
"confirmations.redraft.message": "Are you sure you want to delete this status and re-draft it? Favourites and boosts will be lost, and replies to the original post will be orphaned.",
|
||||
|
|
@ -174,7 +174,6 @@
|
|||
"home.column_settings.basic": "Basic",
|
||||
"home.column_settings.show_reblogs": "Show boosts",
|
||||
"home.column_settings.show_replies": "Show replies",
|
||||
"home.column_settings.update_live": "Update in real-time",
|
||||
"intervals.full.days": "{number, plural, one {# day} other {# days}}",
|
||||
"intervals.full.hours": "{number, plural, one {# hour} other {# hours}}",
|
||||
"intervals.full.minutes": "{number, plural, one {# minute} other {# minutes}}",
|
||||
|
|
@ -268,7 +267,6 @@
|
|||
"navigation_bar.preferences": "Preferences",
|
||||
"navigation_bar.public_timeline": "Federated timeline",
|
||||
"navigation_bar.security": "Security",
|
||||
"notification.and_n_others": "and {count, plural, one {# other} other {# others}}",
|
||||
"notification.favourite": "{name} favourited your status",
|
||||
"notification.follow": "{name} followed you",
|
||||
"notification.mention": "{name} mentioned you",
|
||||
|
|
@ -297,6 +295,7 @@
|
|||
"notifications.group": "{count} notifications",
|
||||
"poll.closed": "Closed",
|
||||
"poll.refresh": "Refresh",
|
||||
"poll.total_people": "{count, plural, one {# person} other {# people}}",
|
||||
"poll.total_votes": "{count, plural, one {# vote} other {# votes}}",
|
||||
"poll.vote": "Vote",
|
||||
"poll.voted": "You voted for this answer",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import {
|
|||
CONVERSATIONS_FETCH_FAIL,
|
||||
CONVERSATIONS_UPDATE,
|
||||
CONVERSATIONS_READ,
|
||||
CONVERSATIONS_DELETE_SUCCESS,
|
||||
} from '../actions/conversations';
|
||||
import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'mastodon/actions/accounts';
|
||||
import { DOMAIN_BLOCK_SUCCESS } from 'mastodon/actions/domain_blocks';
|
||||
|
|
@ -107,6 +108,8 @@ export default function conversations(state = initialState, action) {
|
|||
return filterConversations(state, [action.relationship.id]);
|
||||
case DOMAIN_BLOCK_SUCCESS:
|
||||
return filterConversations(state, action.accounts);
|
||||
case CONVERSATIONS_DELETE_SUCCESS:
|
||||
return state.update('items', list => list.filterNot(item => item.get('id') === action.id));
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,8 +145,6 @@ $small-breakpoint: 960px;
|
|||
|
||||
thead tr,
|
||||
tbody tr {
|
||||
break-after: auto;
|
||||
break-inside: avoid;
|
||||
border-bottom: 1px solid lighten($ui-base-color, 4%);
|
||||
font-size: 1em;
|
||||
line-height: 1.625;
|
||||
|
|
@ -167,12 +165,25 @@ $small-breakpoint: 960px;
|
|||
padding: 8px;
|
||||
align-self: start;
|
||||
align-items: start;
|
||||
word-break: break-all;
|
||||
|
||||
&.nowrap {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 25%;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: ' ';
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
right: 8px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6473,8 +6473,8 @@ noscript {
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin-bottom: 4px;
|
||||
flex-basis: 170px;
|
||||
flex-shrink: 1000;
|
||||
flex-basis: 90px;
|
||||
flex-grow: 1;
|
||||
|
||||
a {
|
||||
color: $primary-text-color;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue