/app/javascript/mastodon/components/status.jsの修正
This commit is contained in:
parent
21b64cfeeb
commit
14e0066830
@ -84,8 +84,7 @@ const messages = defineMessages({
|
|||||||
edited: { id: 'status.edited', defaultMessage: 'Edited {date}' },
|
edited: { id: 'status.edited', defaultMessage: 'Edited {date}' },
|
||||||
});
|
});
|
||||||
|
|
||||||
export default @connect(mapStateToProps)
|
export default @injectIntl
|
||||||
@injectIntl
|
|
||||||
class Status extends ImmutablePureComponent {
|
class Status extends ImmutablePureComponent {
|
||||||
|
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
@ -190,7 +189,7 @@ class Status extends ImmutablePureComponent {
|
|||||||
if (e && (e.button !== 0 || e.ctrlKey || e.metaKey)) {
|
if (e && (e.button !== 0 || e.ctrlKey || e.metaKey)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
handleQuoteClick = () => {
|
handleQuoteClick = () => {
|
||||||
if (!this.context.router) {
|
if (!this.context.router) {
|
||||||
return;
|
return;
|
||||||
@ -218,17 +217,17 @@ class Status extends ImmutablePureComponent {
|
|||||||
|
|
||||||
handleExpandedQuoteToggle = () => {
|
handleExpandedQuoteToggle = () => {
|
||||||
this.props.onQuoteToggleHidden(this._properStatus());
|
this.props.onQuoteToggleHidden(this._properStatus());
|
||||||
};
|
}
|
||||||
|
|
||||||
renderLoadingMediaGallery () {
|
renderLoadingMediaGallery = () => {
|
||||||
return <div className='media-gallery' style={{ height: '110px' }} />;
|
return <div className='media-gallery' style={{ height: '110px' }} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderLoadingVideoPlayer () {
|
renderLoadingVideoPlayer = () => {
|
||||||
return <div className='video-player' style={{ height: '110px' }} />;
|
return <div className='video-player' style={{ height: '110px' }} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderLoadingAudioPlayer () {
|
renderLoadingAudioPlayer = () => {
|
||||||
return <div className='audio-player' style={{ height: '110px' }} />;
|
return <div className='audio-player' style={{ height: '110px' }} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,7 +336,7 @@ class Status extends ImmutablePureComponent {
|
|||||||
this.handleToggleMediaVisibility();
|
this.handleToggleMediaVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
_properStatus () {
|
_properStatus = () => {
|
||||||
const { status } = this.props;
|
const { status } = this.props;
|
||||||
|
|
||||||
if (status.get('reblog', null) !== null && typeof status.get('reblog') === 'object') {
|
if (status.get('reblog', null) !== null && typeof status.get('reblog') === 'object') {
|
||||||
@ -347,7 +346,7 @@ class Status extends ImmutablePureComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_properQuoteStatus () {
|
_properQuoteStatus = () => {
|
||||||
const status = this._properStatus();
|
const status = this._properStatus();
|
||||||
|
|
||||||
if (status.get('quote', null) !== null && typeof status.get('quote') === 'object') {
|
if (status.get('quote', null) !== null && typeof status.get('quote') === 'object') {
|
||||||
@ -361,7 +360,7 @@ class Status extends ImmutablePureComponent {
|
|||||||
this.node = c;
|
this.node = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render = () => {
|
||||||
let media = null;
|
let media = null;
|
||||||
let statusAvatar, prepend, rebloggedByText;
|
let statusAvatar, prepend, rebloggedByText;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user