Merge pull request #80 from kmycode/kb-merge-231010
Upstream main 20231010
This commit is contained in:
commit
5cb8ccad84
34 changed files with 202 additions and 207 deletions
|
@ -56,4 +56,4 @@ export const showAlertForError = (error, skipNotFound = false) => {
|
|||
title: messages.unexpectedTitle,
|
||||
message: messages.unexpectedMessage,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -290,7 +290,7 @@ export function submitComposeWithCircleSuccess(status, circleId) {
|
|||
type: COMPOSE_WITH_CIRCLE_SUCCESS,
|
||||
status,
|
||||
circleId,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function submitComposeFail(error) {
|
||||
|
|
|
@ -121,7 +121,7 @@ export function normalizeStatus(status, normalOldStatus) {
|
|||
normalStatus.media_attachments.forEach(item => {
|
||||
const oldItem = list.find(i => i.get('id') === item.id);
|
||||
if (oldItem && oldItem.get('description') === item.description) {
|
||||
item.translation = oldItem.get('translation')
|
||||
item.translation = oldItem.get('translation');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -165,13 +165,13 @@ export function normalizePoll(poll, normalOldPoll) {
|
|||
...option,
|
||||
voted: poll.own_votes && poll.own_votes.includes(index),
|
||||
titleHtml: emojify(escapeTextContentForBrowser(option.title), emojiMap),
|
||||
}
|
||||
};
|
||||
|
||||
if (normalOldPoll && normalOldPoll.getIn(['options', index, 'title']) === option.title) {
|
||||
normalOption.translation = normalOldPoll.getIn(['options', index, 'translation']);
|
||||
}
|
||||
|
||||
return normalOption
|
||||
return normalOption;
|
||||
});
|
||||
|
||||
return normalPoll;
|
||||
|
|
|
@ -192,4 +192,4 @@ export const connectListStream = listId =>
|
|||
* @returns {function(): void}
|
||||
*/
|
||||
export const connectAntennaStream = antennaId =>
|
||||
connectTimelineStream(`antenna:${antennaId}`, 'antenna', { antenna: antennaId }, { fillGaps: () => fillAntennaTimelineGaps(antennaId) });
|
||||
connectTimelineStream(`antenna:${antennaId}`, 'antenna', { antenna: antennaId }, { fillGaps: () => fillAntennaTimelineGaps(antennaId) });
|
||||
|
|
|
@ -22,7 +22,7 @@ export default class Column extends PureComponent {
|
|||
scrollable = document.scrollingElement;
|
||||
} else {
|
||||
scrollable = this.node.querySelector('.scrollable');
|
||||
}
|
||||
}
|
||||
|
||||
if (!scrollable) {
|
||||
return;
|
||||
|
|
|
@ -184,7 +184,7 @@ class CompactedStatus extends ImmutablePureComponent {
|
|||
} else if (attachments.getIn([0, 'type']) === 'audio') {
|
||||
return '16 / 9';
|
||||
} else {
|
||||
return (attachments.size === 1 && attachments.getIn([0, 'meta', 'small', 'aspect'])) ? attachments.getIn([0, 'meta', 'small', 'aspect']) : '3 / 2'
|
||||
return (attachments.size === 1 && attachments.getIn([0, 'meta', 'small', 'aspect'])) ? attachments.getIn([0, 'meta', 'small', 'aspect']) : '3 / 2';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -356,10 +356,10 @@ class MediaGallery extends PureComponent {
|
|||
|
||||
const rowClass = (size === 5 || size === 6 || size === 9 || size === 10 || size === 11 || size === 12) ? 'media-gallery--row3' :
|
||||
(size === 7 || size === 8 || size === 13 || size === 14 || size === 15 || size === 16) ? 'media-gallery--row4' :
|
||||
'media-gallery--row2';
|
||||
'media-gallery--row2';
|
||||
const columnClass = (size === 9) ? 'media-gallery--column3' :
|
||||
(size === 10 || size === 11 || size === 12 || size === 13 || size === 14 || size === 15 || size === 16) ? 'media-gallery--column4' :
|
||||
'media-gallery--column2';
|
||||
'media-gallery--column2';
|
||||
const compactClass = compact ? 'media-gallery__compact' : null;
|
||||
|
||||
return (
|
||||
|
|
|
@ -132,7 +132,7 @@ class Poll extends ImmutablePureComponent {
|
|||
|
||||
handleReveal = () => {
|
||||
this.setState({ revealed: true });
|
||||
}
|
||||
};
|
||||
|
||||
renderOption (option, optionIndex, showResults) {
|
||||
const { poll, lang, disabled, intl } = this.props;
|
||||
|
|
|
@ -13,7 +13,7 @@ import AttachmentList from 'mastodon/components/attachment_list';
|
|||
import { Icon } from 'mastodon/components/icon';
|
||||
import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder';
|
||||
|
||||
import CompactedStatusContainer from '../containers/compacted_status_container'
|
||||
import CompactedStatusContainer from '../containers/compacted_status_container';
|
||||
import Card from '../features/status/components/card';
|
||||
// We use the component (and not the container) since we do not want
|
||||
// to use the progress bar to show download progress
|
||||
|
@ -213,7 +213,7 @@ class Status extends ImmutablePureComponent {
|
|||
} else if (attachments.getIn([0, 'type']) === 'audio') {
|
||||
return '16 / 9';
|
||||
} else {
|
||||
return (attachments.size === 1 && attachments.getIn([0, 'meta', 'small', 'aspect'])) ? attachments.getIn([0, 'meta', 'small', 'aspect']) : '3 / 2'
|
||||
return (attachments.size === 1 && attachments.getIn([0, 'meta', 'small', 'aspect'])) ? attachments.getIn([0, 'meta', 'small', 'aspect']) : '3 / 2';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -489,12 +489,12 @@ class Status extends ImmutablePureComponent {
|
|||
</div>
|
||||
|
||||
<div >
|
||||
<FormattedMessage id='status.filtered' defaultMessage='Filtered' />: {matchedFilters.join(', ')}.
|
||||
{' '}
|
||||
<button className='status__wrapper--filtered__button' onClick={this.handleUnfilterClick}>
|
||||
<FormattedMessage id='status.show_filter_reason' defaultMessage='Show anyway' />
|
||||
</button>
|
||||
</div>
|
||||
<FormattedMessage id='status.filtered' defaultMessage='Filtered' />: {matchedFilters.join(', ')}.
|
||||
{' '}
|
||||
<button className='status__wrapper--filtered__button' onClick={this.handleUnfilterClick}>
|
||||
<FormattedMessage id='status.show_filter_reason' defaultMessage='Show anyway' />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</HotKeys>
|
||||
);
|
||||
|
@ -628,7 +628,7 @@ class Status extends ImmutablePureComponent {
|
|||
const withReference = (!withQuote && status.get('status_references_count') > 0) ? <span className='status__visibility-icon'><Icon id='link' title='Reference' /></span> : null;
|
||||
const withExpiration = status.get('expires_at') ? <span className='status__visibility-icon'><Icon id='clock-o' title='Expiration' /></span> : null;
|
||||
|
||||
const quote = !muted && status.get('quote_id') && (['public', 'community'].includes(contextType) ? showQuoteInPublic : showQuoteInHome) && <CompactedStatusContainer id={status.get('quote_id')} />
|
||||
const quote = !muted && status.get('quote_id') && (['public', 'community'].includes(contextType) ? showQuoteInPublic : showQuoteInHome) && <CompactedStatusContainer id={status.get('quote_id')} />;
|
||||
|
||||
return (
|
||||
<HotKeys handlers={handlers}>
|
||||
|
|
|
@ -192,7 +192,7 @@ class About extends PureComponent {
|
|||
</Section>
|
||||
|
||||
<Section title={intl.formatMessage(messages.capabilities)}>
|
||||
<p><FormattedMessage id='about.kmyblue_capability' defaultMessage='This server is using kmyblue, a fork of Mastodon. On this server, kmyblues unique features are configured as follows.' /></p>
|
||||
<p><FormattedMessage id='about.kmyblue_capability' defaultMessage='This server is using kmyblue, a fork of Mastodon. On this server, kmyblues unique features are configured as follows.' /></p>
|
||||
{!isLoading && (
|
||||
<ol className='rules-list'>
|
||||
<li>
|
||||
|
|
|
@ -33,7 +33,7 @@ class RadioPanel extends PureComponent {
|
|||
<div className='setting-radio-panel'>
|
||||
{values.map((val) => (
|
||||
<button className={classNames('setting-radio-panel__item', {'setting-radio-panel__item__active': value.get('value') === val.get('value')})}
|
||||
key={val.get('value')} onClick={this.handleChange} data-value={val.get('value')}>
|
||||
key={val.get('value')} onClick={this.handleChange} data-value={val.get('value')}>
|
||||
{val.get('label')}
|
||||
</button>
|
||||
))}
|
||||
|
|
|
@ -167,7 +167,7 @@ class AntennaSetting extends PureComponent {
|
|||
|
||||
handleEditAntennaClick = () => {
|
||||
window.open(`/antennas/${this.props.params.id}/edit`, '_blank');
|
||||
}
|
||||
};
|
||||
|
||||
handleDeleteClick = () => {
|
||||
const { dispatch, columnId, intl } = this.props;
|
||||
|
@ -193,7 +193,7 @@ class AntennaSetting extends PureComponent {
|
|||
|
||||
handleTimelineClick = () => {
|
||||
this.context.router.history.push(`/antennast/${this.props.params.id}`);
|
||||
}
|
||||
};
|
||||
|
||||
onStlToggle = ({ target }) => {
|
||||
const { dispatch } = this.props;
|
||||
|
@ -336,7 +336,7 @@ class AntennaSetting extends PureComponent {
|
|||
</label>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
let stlAlert;
|
||||
|
@ -369,7 +369,7 @@ class AntennaSetting extends PureComponent {
|
|||
const contentRadioAlert = antenna.get(contentRadioValue.get('value') === 'tags' ? 'keywords_count' : 'tags_count') > 0;
|
||||
|
||||
const listOptions = lists.toArray().filter((list) => list.length >= 2 && list[1]).map((list) => {
|
||||
return { value: list[1].get('id'), label: list[1].get('title') }
|
||||
return { value: list[1].get('id'), label: list[1].get('title') };
|
||||
});
|
||||
|
||||
return (
|
||||
|
@ -470,7 +470,7 @@ class AntennaSetting extends PureComponent {
|
|||
icon='sitemap'
|
||||
label={intl.formatMessage(messages.addDomainLabel)}
|
||||
title={intl.formatMessage(messages.addDomainTitle)}
|
||||
/>
|
||||
/>
|
||||
)}
|
||||
|
||||
{rangeRadioAlert && <div className='alert'><FormattedMessage id='antennas.warnings.range_radio' defaultMessage='Simultaneous account and domain designation is not recommended.' /></div>}
|
||||
|
@ -487,7 +487,7 @@ class AntennaSetting extends PureComponent {
|
|||
icon='hashtag'
|
||||
label={intl.formatMessage(messages.addTagLabel)}
|
||||
title={intl.formatMessage(messages.addTagTitle)}
|
||||
/>
|
||||
/>
|
||||
)}
|
||||
|
||||
{contentRadioValue.get('value') === 'keywords' && (
|
||||
|
@ -500,7 +500,7 @@ class AntennaSetting extends PureComponent {
|
|||
icon='paragraph'
|
||||
label={intl.formatMessage(messages.addKeywordLabel)}
|
||||
title={intl.formatMessage(messages.addKeywordTitle)}
|
||||
/>
|
||||
/>
|
||||
)}
|
||||
|
||||
{contentRadioAlert && <div className='alert'><FormattedMessage id='antennas.warnings.content_radio' defaultMessage='Simultaneous keyword and tag designation is not recommended.' /></div>}
|
||||
|
@ -518,7 +518,7 @@ class AntennaSetting extends PureComponent {
|
|||
icon='sitemap'
|
||||
label={intl.formatMessage(messages.addDomainLabel)}
|
||||
title={intl.formatMessage(messages.addDomainTitle)}
|
||||
/>
|
||||
/>
|
||||
<h3><FormattedMessage id='antennas.exclude_keywords' defaultMessage='Exclude keywords' /></h3>
|
||||
<TextList
|
||||
onChange={this.onExcludeKeywordNameChanged}
|
||||
|
@ -529,18 +529,18 @@ class AntennaSetting extends PureComponent {
|
|||
icon='paragraph'
|
||||
label={intl.formatMessage(messages.addKeywordLabel)}
|
||||
title={intl.formatMessage(messages.addKeywordTitle)}
|
||||
/>
|
||||
<h3><FormattedMessage id='antennas.exclude_tags' defaultMessage='Exclude tags' /></h3>
|
||||
<TextList
|
||||
onChange={this.onExcludeTagNameChanged}
|
||||
onAdd={this.onExcludeTagAdd}
|
||||
onRemove={this.onExcludeTagRemove}
|
||||
value={this.state.excludeTagName}
|
||||
values={tags.get('exclude_tags') || ImmutableList()}
|
||||
icon='hashtag'
|
||||
label={intl.formatMessage(messages.addTagLabel)}
|
||||
title={intl.formatMessage(messages.addTagTitle)}
|
||||
/>
|
||||
/>
|
||||
<h3><FormattedMessage id='antennas.exclude_tags' defaultMessage='Exclude tags' /></h3>
|
||||
<TextList
|
||||
onChange={this.onExcludeTagNameChanged}
|
||||
onAdd={this.onExcludeTagAdd}
|
||||
onRemove={this.onExcludeTagRemove}
|
||||
value={this.state.excludeTagName}
|
||||
values={tags.get('exclude_tags') || ImmutableList()}
|
||||
icon='hashtag'
|
||||
label={intl.formatMessage(messages.addTagLabel)}
|
||||
title={intl.formatMessage(messages.addTagTitle)}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
@ -79,7 +79,7 @@ class Antennas extends ImmutablePureComponent {
|
|||
>
|
||||
{antennas.map(antenna => (
|
||||
<ColumnLink key={antenna.get('id')} to={`/antennast/${antenna.get('id')}`} icon='wifi' text={antenna.get('title')}
|
||||
badge={antenna.get('insert_feeds') ? intl.formatMessage(antenna.get('list') ? messages.insert_list : messages.insert_home) : undefined} />
|
||||
badge={antenna.get('insert_feeds') ? intl.formatMessage(antenna.get('list') ? messages.insert_list : messages.insert_home) : undefined} />
|
||||
))}
|
||||
</ScrollableList>
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ export default class NavigationBar extends ImmutablePureComponent {
|
|||
};
|
||||
|
||||
render () {
|
||||
const username = this.props.account.get('acct')
|
||||
const username = this.props.account.get('acct');
|
||||
return (
|
||||
<div className='navigation-bar'>
|
||||
<Link to={`/@${username}`}>
|
||||
|
|
|
@ -57,17 +57,17 @@ class Search extends PureComponent {
|
|||
};
|
||||
|
||||
defaultOptions = [
|
||||
{ label: <><mark>has:</mark> <FormattedList type='disjunction' value={['media', 'poll', 'embed']} /></>, action: e => { e.preventDefault(); this._insertText('has:') } },
|
||||
{ label: <><mark>is:</mark> <FormattedList type='disjunction' value={['reply', 'sensitive']} /></>, action: e => { e.preventDefault(); this._insertText('is:') } },
|
||||
{ label: <><mark>my:</mark> <FormattedList type='disjunction' value={['favourited', 'bookmarked', 'boosted']} /></>, action: e => { e.preventDefault(); this._insertText('my:') } },
|
||||
{ label: <><mark>language:</mark> <FormattedMessage id='search_popout.language_code' defaultMessage='ISO language code' /></>, action: e => { e.preventDefault(); this._insertText('language:') } },
|
||||
{ label: <><mark>from:</mark> <FormattedMessage id='search_popout.user' defaultMessage='user' /></>, action: e => { e.preventDefault(); this._insertText('from:') } },
|
||||
{ label: <><mark>domain:</mark> <FormattedMessage id='search_popout.domain' defaultMessage='domain' /></>, action: e => { e.preventDefault(); this._insertText('domain:') } },
|
||||
{ label: <><mark>before:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('before:') } },
|
||||
{ label: <><mark>during:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('during:') } },
|
||||
{ label: <><mark>after:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('after:') } },
|
||||
{ label: <><mark>in:</mark> <FormattedList type='disjunction' value={['all', 'library']} /></>, action: e => { e.preventDefault(); this._insertText('in:') } },
|
||||
{ label: <><mark>order:</mark> <FormattedList type='disjunction' value={['desc', 'asc']} /></>, action: e => { e.preventDefault(); this._insertText('order:') } },
|
||||
{ label: <><mark>has:</mark> <FormattedList type='disjunction' value={['media', 'poll', 'embed']} /></>, action: e => { e.preventDefault(); this._insertText('has:'); } },
|
||||
{ label: <><mark>is:</mark> <FormattedList type='disjunction' value={['reply', 'sensitive']} /></>, action: e => { e.preventDefault(); this._insertText('is:'); } },
|
||||
{ label: <><mark>my:</mark> <FormattedList type='disjunction' value={['favourited', 'bookmarked', 'boosted']} /></>, action: e => { e.preventDefault(); this._insertText('my:'); } },
|
||||
{ label: <><mark>language:</mark> <FormattedMessage id='search_popout.language_code' defaultMessage='ISO language code' /></>, action: e => { e.preventDefault(); this._insertText('language:'); } },
|
||||
{ label: <><mark>from:</mark> <FormattedMessage id='search_popout.user' defaultMessage='user' /></>, action: e => { e.preventDefault(); this._insertText('from:'); } },
|
||||
{ label: <><mark>domain:</mark> <FormattedMessage id='search_popout.domain' defaultMessage='domain' /></>, action: e => { e.preventDefault(); this._insertText('domain:'); } },
|
||||
{ label: <><mark>before:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('before:'); } },
|
||||
{ label: <><mark>during:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('during:'); } },
|
||||
{ label: <><mark>after:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('after:'); } },
|
||||
{ label: <><mark>in:</mark> <FormattedList type='disjunction' value={['all', 'library']} /></>, action: e => { e.preventDefault(); this._insertText('in:'); } },
|
||||
{ label: <><mark>order:</mark> <FormattedList type='disjunction' value={['desc', 'asc']} /></>, action: e => { e.preventDefault(); this._insertText('order:'); } },
|
||||
];
|
||||
|
||||
setRef = c => {
|
||||
|
|
|
@ -80,7 +80,7 @@ class Results extends PureComponent {
|
|||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
handleSelectAll = () => {
|
||||
const { submittedType, dispatch } = this.props;
|
||||
|
@ -116,7 +116,7 @@ class Results extends PureComponent {
|
|||
}
|
||||
|
||||
this.setState({ type: 'hashtags' });
|
||||
}
|
||||
};
|
||||
|
||||
handleSelectStatuses = () => {
|
||||
const { submittedType, dispatch } = this.props;
|
||||
|
@ -128,7 +128,7 @@ class Results extends PureComponent {
|
|||
}
|
||||
|
||||
this.setState({ type: 'statuses' });
|
||||
}
|
||||
};
|
||||
|
||||
handleLoadMoreAccounts = () => this._loadMore('accounts');
|
||||
handleLoadMoreStatuses = () => this._loadMore('statuses');
|
||||
|
|
|
@ -199,7 +199,7 @@ const Firehose = ({ feedType, multiColumn }) => {
|
|||
</Helmet>
|
||||
</Column>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Firehose.propTypes = {
|
||||
multiColumn: PropTypes.bool,
|
||||
|
|
|
@ -27,9 +27,9 @@ const mapStateToProps = (state, { accountId }) => ({
|
|||
const mapDispatchToProps = (dispatch) => ({
|
||||
onSignupClick() {
|
||||
dispatch(closeModal({
|
||||
modalType: undefined,
|
||||
ignoreFocus: false,
|
||||
}));
|
||||
modalType: undefined,
|
||||
ignoreFocus: false,
|
||||
}));
|
||||
dispatch(openModal({ modalType: 'CLOSED_REGISTRATIONS' }));
|
||||
},
|
||||
});
|
||||
|
@ -187,7 +187,7 @@ class LoginForm extends React.PureComponent {
|
|||
|
||||
setIFrameRef = (iframe) => {
|
||||
this.iframeRef = iframe;
|
||||
}
|
||||
};
|
||||
|
||||
handleFocus = () => {
|
||||
this.setState({ expanded: true });
|
||||
|
|
|
@ -78,7 +78,7 @@ class Lists extends ImmutablePureComponent {
|
|||
>
|
||||
{lists.map(list =>
|
||||
(<ColumnLink key={list.get('id')} to={`/lists/${list.get('id')}`} icon='list-ul' text={list.get('title')}
|
||||
badge={(list.get('antennas') && list.get('antennas').size > 0) ? intl.formatMessage(messages.with_antenna) : undefined} />),
|
||||
badge={(list.get('antennas') && list.get('antennas').size > 0) ? intl.formatMessage(messages.with_antenna) : undefined} />),
|
||||
)}
|
||||
</ScrollableList>
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class ReactionEmoji extends ImmutablePureComponent {
|
|||
const html = { __html: emojify(emoji) };
|
||||
content = (
|
||||
<span dangerouslySetInnerHTML={html} />
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -100,7 +100,7 @@ class ReactionDeck extends ImmutablePureComponent {
|
|||
const newDeck = this.deckToArray();
|
||||
newDeck.push('👍');
|
||||
this.props.onChange(newDeck);
|
||||
}
|
||||
};
|
||||
|
||||
render () {
|
||||
const { intl, deck, emojiMap, multiColumn } = this.props;
|
||||
|
@ -123,38 +123,38 @@ class ReactionDeck extends ImmutablePureComponent {
|
|||
showBackButton
|
||||
/>
|
||||
|
||||
<ScrollableList
|
||||
scrollKey='reaction_deck'
|
||||
bindToDocument={!multiColumn}
|
||||
>
|
||||
<DragDropContext onDragEnd={this.handleReorder}>
|
||||
<StrictModeDroppable droppableId='deckitems'>
|
||||
{(provided) => (
|
||||
<div className='deckitems reaction_deck_container' {...provided.droppableProps} ref={provided.innerRef}>
|
||||
{deck.map((emoji, index) => (
|
||||
<Draggable key={index} draggableId={'' + index} index={index}>
|
||||
{(provided2) => (
|
||||
<div className='reaction_deck_container__row' ref={provided2.innerRef} {...provided2.draggableProps}>
|
||||
<Icon id='bars' className='handle' {...provided2.dragHandleProps} />
|
||||
<ReactionEmoji emojiMap={emojiMap}
|
||||
emoji={emoji.get('name')}
|
||||
index={index}
|
||||
onChange={this.handleChange}
|
||||
onRemove={this.handleRemove}
|
||||
className='reaction_emoji'
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</Draggable>
|
||||
))}
|
||||
{provided.placeholder}
|
||||
<ScrollableList
|
||||
scrollKey='reaction_deck'
|
||||
bindToDocument={!multiColumn}
|
||||
>
|
||||
<DragDropContext onDragEnd={this.handleReorder}>
|
||||
<StrictModeDroppable droppableId='deckitems'>
|
||||
{(provided) => (
|
||||
<div className='deckitems reaction_deck_container' {...provided.droppableProps} ref={provided.innerRef}>
|
||||
{deck.map((emoji, index) => (
|
||||
<Draggable key={index} draggableId={'' + index} index={index}>
|
||||
{(provided2) => (
|
||||
<div className='reaction_deck_container__row' ref={provided2.innerRef} {...provided2.draggableProps}>
|
||||
<Icon id='bars' className='handle' {...provided2.dragHandleProps} />
|
||||
<ReactionEmoji emojiMap={emojiMap}
|
||||
emoji={emoji.get('name')}
|
||||
index={index}
|
||||
onChange={this.handleChange}
|
||||
onRemove={this.handleRemove}
|
||||
className='reaction_emoji'
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</Draggable>
|
||||
))}
|
||||
{provided.placeholder}
|
||||
|
||||
<Button text={intl.formatMessage(messages.reaction_deck_add)} onClick={this.handleAdd} />
|
||||
</div>
|
||||
)}
|
||||
</StrictModeDroppable>
|
||||
</DragDropContext>
|
||||
</ScrollableList>
|
||||
<Button text={intl.formatMessage(messages.reaction_deck_add)} onClick={this.handleAdd} />
|
||||
</div>
|
||||
)}
|
||||
</StrictModeDroppable>
|
||||
</DragDropContext>
|
||||
</ScrollableList>
|
||||
|
||||
<Helmet>
|
||||
<meta name='robots' content='noindex' />
|
||||
|
|
|
@ -45,7 +45,7 @@ class Reblogs extends ImmutablePureComponent {
|
|||
if (!this.props.accountIds) {
|
||||
this.props.dispatch(fetchReblogs(this.props.params.statusId));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
handleRefresh = () => {
|
||||
this.props.dispatch(fetchReblogs(this.props.params.statusId));
|
||||
|
|
|
@ -104,7 +104,7 @@ const Comment = ({ comment, domain, statusIds, isRemote, isSubmitting, selectedD
|
|||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Comment.propTypes = {
|
||||
comment: PropTypes.string.isRequired,
|
||||
|
|
|
@ -147,7 +147,7 @@ class DetailedStatus extends ImmutablePureComponent {
|
|||
} else if (attachments.getIn([0, 'type']) === 'audio') {
|
||||
return '16 / 9';
|
||||
} else {
|
||||
return (attachments.size === 1 && attachments.getIn([0, 'meta', 'small', 'aspect'])) ? attachments.getIn([0, 'meta', 'small', 'aspect']) : '3 / 2'
|
||||
return (attachments.size === 1 && attachments.getIn([0, 'meta', 'small', 'aspect'])) ? attachments.getIn([0, 'meta', 'small', 'aspect']) : '3 / 2';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,8 +83,8 @@ class Header extends PureComponent {
|
|||
|
||||
if (sso_redirect) {
|
||||
content = (
|
||||
<a href={sso_redirect} data-method='post' className='button button--block button-tertiary'><FormattedMessage id='sign_in_banner.sso_redirect' defaultMessage='Login or Register' /></a>
|
||||
)
|
||||
<a href={sso_redirect} data-method='post' className='button button--block button-tertiary'><FormattedMessage id='sign_in_banner.sso_redirect' defaultMessage='Login or Register' /></a>
|
||||
);
|
||||
} else {
|
||||
let signupButton;
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ export default class ModalRoot extends PureComponent {
|
|||
<BundleContainer fetchComponent={MODAL_COMPONENTS[type]} loading={this.renderLoading(type)} error={this.renderError} renderDelay={200}>
|
||||
{(SpecificComponent) => {
|
||||
const ref = typeof SpecificComponent !== 'function' ? this.setModalRef : undefined;
|
||||
return <SpecificComponent {...props} onChangeBackgroundColor={this.setBackgroundColor} onClose={this.handleClose} ref={ref} />
|
||||
return <SpecificComponent {...props} onChangeBackgroundColor={this.setBackgroundColor} onClose={this.handleClose} ref={ref} />;
|
||||
}}
|
||||
</BundleContainer>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ const SignInBanner = () => {
|
|||
<p><FormattedMessage id='sign_in_banner.text' defaultMessage='Login to follow profiles or hashtags, favorite, share and reply to posts. You can also interact from your account on a different server.' /></p>
|
||||
<a href={sso_redirect} data-method='post' className='button button--block button-tertiary'><FormattedMessage id='sign_in_banner.sso_redirect' defaultMessage='Login or Register' /></a>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (registrationsOpen) {
|
||||
|
|
|
@ -38,10 +38,10 @@ export default function antennaAdderReducer(state = initialState, action) {
|
|||
return state.setIn(['antennas', 'isLoading'], true);
|
||||
case ANTENNA_ADDER_ANTENNAS_FETCH_FAIL:
|
||||
case ANTENNA_ADDER_EXCLUDE_ANTENNAS_FETCH_FAIL:
|
||||
return state.setIn(['antennas', 'isLoading'], false);
|
||||
return state.setIn(['antennas', 'isLoading'], false);
|
||||
case ANTENNA_ADDER_ANTENNAS_FETCH_SUCCESS:
|
||||
case ANTENNA_ADDER_EXCLUDE_ANTENNAS_FETCH_SUCCESS:
|
||||
return state.update('antennas', antennas => antennas.withMutations(map => {
|
||||
return state.update('antennas', antennas => antennas.withMutations(map => {
|
||||
map.set('isLoading', false);
|
||||
map.set('loaded', true);
|
||||
map.set('items', ImmutableList(action.antennas.map(item => item.id)));
|
||||
|
|
|
@ -83,7 +83,7 @@ const prependToCircleStatusById = (state, circleId, statusId) => {
|
|||
map.updateIn(['statuses', 'items'], list => ImmutableOrderedSet([statusId]).union(list));
|
||||
}
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
export default function circles(state = initialState, action) {
|
||||
switch(action.type) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import './public-path';
|
||||
import main from "mastodon/main"
|
||||
import main from "mastodon/main";
|
||||
|
||||
import { start } from '../mastodon/common';
|
||||
import { loadLocale } from '../mastodon/locales';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue