mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
debug info in threads
This commit is contained in:
parent
a572fd707a
commit
0b5c3dba2a
@ -82,11 +82,15 @@ class Status extends ImmutablePureComponent {
|
||||
onMoveUp : PropTypes.func,
|
||||
onMoveDown : PropTypes.func,
|
||||
showThread : PropTypes.bool,
|
||||
threadsCompile : PropTypes.bool,
|
||||
getScrollPosition : PropTypes.func,
|
||||
updateScrollBottom: PropTypes.func,
|
||||
cacheMediaWidth : PropTypes.func,
|
||||
cachedMediaWidth : PropTypes.number,
|
||||
};
|
||||
static defaultProps = {
|
||||
threadsCompile: true,
|
||||
};
|
||||
|
||||
// Avoid checking props that are functions (and whose equality will always
|
||||
// evaluate to false. See react-immutable-pure-component for usage.
|
||||
@ -199,24 +203,24 @@ class Status extends ImmutablePureComponent {
|
||||
};
|
||||
|
||||
renderLoadingMediaGallery() {
|
||||
return <div
|
||||
return (<div
|
||||
className='media-gallery'
|
||||
style={{ height: '110px' }}
|
||||
/>;
|
||||
/>);
|
||||
}
|
||||
|
||||
renderLoadingVideoPlayer() {
|
||||
return <div
|
||||
return (<div
|
||||
className='video-player'
|
||||
style={{ height: '110px' }}
|
||||
/>;
|
||||
/>);
|
||||
}
|
||||
|
||||
renderLoadingAudioPlayer() {
|
||||
return <div
|
||||
return (<div
|
||||
className='audio-player'
|
||||
style={{ height: '110px' }}
|
||||
/>;
|
||||
/>);
|
||||
}
|
||||
|
||||
handleOpenVideo = (media, startTime) => {
|
||||
@ -308,6 +312,8 @@ class Status extends ImmutablePureComponent {
|
||||
return null;
|
||||
}
|
||||
|
||||
const moreStatusCount = this.props.status.replies;
|
||||
|
||||
const handlers = this.props.muted ? {} : {
|
||||
reply : this.handleHotkeyReply,
|
||||
favourite : this.handleHotkeyFavourite,
|
||||
@ -497,20 +503,20 @@ class Status extends ImmutablePureComponent {
|
||||
}
|
||||
|
||||
if (otherAccounts && otherAccounts.size > 0) {
|
||||
statusAvatar = <AvatarComposite
|
||||
statusAvatar = (<AvatarComposite
|
||||
accounts={otherAccounts}
|
||||
size={48}
|
||||
/>;
|
||||
/>);
|
||||
} else if (account === undefined || account === null) {
|
||||
statusAvatar = <Avatar
|
||||
statusAvatar = (<Avatar
|
||||
account={status.get('account')}
|
||||
size={48}
|
||||
/>;
|
||||
/>);
|
||||
} else {
|
||||
statusAvatar = <AvatarOverlay
|
||||
statusAvatar = (<AvatarOverlay
|
||||
account={status.get('account')}
|
||||
friend={account}
|
||||
/>;
|
||||
/>);
|
||||
}
|
||||
|
||||
return (
|
||||
@ -545,7 +551,7 @@ class Status extends ImmutablePureComponent {
|
||||
|
||||
{isStaff && (<div className='administrate-stuff pull-left'>
|
||||
|
||||
<i className='fa fa-gears'></i >
|
||||
<i className='fa fa-gears' />
|
||||
</div >
|
||||
)}
|
||||
<a
|
||||
@ -601,10 +607,19 @@ class Status extends ImmutablePureComponent {
|
||||
/>
|
||||
</button >
|
||||
)}
|
||||
<div className='well'>
|
||||
|
||||
{status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) &&
|
||||
<p > oui je cause tout seul, c'est un thread</p >
|
||||
}
|
||||
{this.props.threadsCompile &&
|
||||
<p > les threads sont en mode compilés</p >
|
||||
}
|
||||
</div >
|
||||
<StatusActionBar
|
||||
status={status}
|
||||
account={account} {...other} />
|
||||
account={account} {...other}
|
||||
/>
|
||||
</div >
|
||||
</div >
|
||||
</HotKeys >
|
||||
|
@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import LoadingIndicator from '../../components/loading_indicator';
|
||||
import { fetchReblogs } from '../../actions/interactions';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
|
||||
import AccountContainer from '../../containers/account_container';
|
||||
import Column from '../ui/components/column';
|
||||
import ScrollableList from '../../components/scrollable_list';
|
||||
@ -25,15 +25,15 @@ export default @connect(mapStateToProps)
|
||||
class Reblogs extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
params: PropTypes.object.isRequired,
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
params : PropTypes.object.isRequired,
|
||||
dispatch : PropTypes.func.isRequired,
|
||||
shouldUpdateScroll: PropTypes.func,
|
||||
accountIds: ImmutablePropTypes.list,
|
||||
multiColumn: PropTypes.bool,
|
||||
intl: PropTypes.object.isRequired,
|
||||
accountIds : ImmutablePropTypes.list,
|
||||
multiColumn : PropTypes.bool,
|
||||
intl : PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
componentWillMount () {
|
||||
componentWillMount() {
|
||||
if (!this.props.accountIds) {
|
||||
this.props.dispatch(fetchReblogs(this.props.params.statusId));
|
||||
}
|
||||
@ -47,20 +47,23 @@ class Reblogs extends ImmutablePureComponent {
|
||||
|
||||
handleRefresh = () => {
|
||||
this.props.dispatch(fetchReblogs(this.props.params.statusId));
|
||||
}
|
||||
};
|
||||
|
||||
render () {
|
||||
render() {
|
||||
const { intl, shouldUpdateScroll, accountIds, multiColumn } = this.props;
|
||||
|
||||
if (!accountIds) {
|
||||
return (
|
||||
<Column>
|
||||
<Column >
|
||||
<LoadingIndicator />
|
||||
</Column>
|
||||
</Column >
|
||||
);
|
||||
}
|
||||
|
||||
const emptyMessage = <FormattedMessage id='status.reblogs.empty' defaultMessage='No one has boosted this toot yet. When someone does, they will show up here.' />;
|
||||
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 bindToDocument={!multiColumn}>
|
||||
@ -68,7 +71,12 @@ class Reblogs extends ImmutablePureComponent {
|
||||
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>
|
||||
<button
|
||||
className='column-header__button'
|
||||
title={intl.formatMessage(messages.refresh)}
|
||||
aria-label={intl.formatMessage(messages.refresh)}
|
||||
onClick={this.handleRefresh}
|
||||
><Icon id='refresh' /></button >
|
||||
)}
|
||||
/>
|
||||
|
||||
@ -79,10 +87,14 @@ class Reblogs extends ImmutablePureComponent {
|
||||
bindToDocument={!multiColumn}
|
||||
>
|
||||
{accountIds.map(id =>
|
||||
<AccountContainer key={id} id={id} withNote={false} />
|
||||
(<AccountContainer
|
||||
key={id}
|
||||
id={id}
|
||||
withNote={false}
|
||||
/>),
|
||||
)}
|
||||
</ScrollableList>
|
||||
</Column>
|
||||
</ScrollableList >
|
||||
</Column >
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -551,8 +551,9 @@ class Status extends ImmutablePureComponent {
|
||||
className={classNames('scrollable', { fullscreen })}
|
||||
ref={this.setRef}
|
||||
>
|
||||
<h2 className='debug'>ancestors:</h2 >
|
||||
{ancestors}
|
||||
|
||||
<h2 className='debug'>common:</h2 >
|
||||
<HotKeys handlers={handlers}>
|
||||
<div
|
||||
className={classNames('focusable', 'detailed-status__wrapper')}
|
||||
@ -591,7 +592,7 @@ class Status extends ImmutablePureComponent {
|
||||
/>
|
||||
</div >
|
||||
</HotKeys >
|
||||
|
||||
<h2 className='debug'>Descendants:</h2 >
|
||||
{descendants}
|
||||
</div >
|
||||
</ScrollContainer >
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
|
||||
export default class ConversationStream extends React.PureComponent {
|
||||
export default class Conversation extends React.PureComponent {
|
||||
|
||||
following = [];
|
||||
|
||||
|
@ -52,7 +52,7 @@ export default class Messaging extends React.PureComponent {
|
||||
<div >
|
||||
messagerie todo
|
||||
|
||||
{/*<Conversations />*/}
|
||||
{/*<Conversation />*/}
|
||||
<ContactsList />
|
||||
</div >
|
||||
);
|
||||
|
@ -1,21 +1,16 @@
|
||||
import {
|
||||
REBLOG_REQUEST,
|
||||
REBLOG_FAIL,
|
||||
FAVOURITE_REQUEST,
|
||||
FAVOURITE_FAIL,
|
||||
UNFAVOURITE_SUCCESS,
|
||||
BOOKMARK_REQUEST,
|
||||
BOOKMARK_FAIL,
|
||||
BOOKMARK_REQUEST,
|
||||
FAVOURITE_FAIL,
|
||||
FAVOURITE_REQUEST,
|
||||
REBLOG_FAIL,
|
||||
REBLOG_REQUEST,
|
||||
UNFAVOURITE_SUCCESS,
|
||||
} from '../actions/interactions';
|
||||
import {
|
||||
STATUS_MUTE_SUCCESS,
|
||||
STATUS_UNMUTE_SUCCESS,
|
||||
STATUS_REVEAL,
|
||||
STATUS_HIDE,
|
||||
} from '../actions/statuses';
|
||||
import { STATUS_HIDE, STATUS_MUTE_SUCCESS, STATUS_REVEAL, STATUS_UNMUTE_SUCCESS } from '../actions/statuses';
|
||||
import { TIMELINE_DELETE } from '../actions/timelines';
|
||||
import { STATUS_IMPORT, STATUSES_IMPORT } from '../actions/importer';
|
||||
import { Map as ImmutableMap, fromJS } from 'immutable';
|
||||
import { fromJS, Map as ImmutableMap } from 'immutable';
|
||||
|
||||
const importStatus = (state, status) => state.set(status.id, fromJS(status));
|
||||
|
||||
@ -33,7 +28,7 @@ const deleteStatus = (state, id, references) => {
|
||||
const initialState = ImmutableMap();
|
||||
|
||||
export default function statuses(state = initialState, action) {
|
||||
switch(action.type) {
|
||||
switch (action.type) {
|
||||
case STATUS_IMPORT:
|
||||
return importStatus(state, action.status);
|
||||
case STATUSES_IMPORT:
|
||||
|
@ -14,16 +14,23 @@ $messagingBoxHeight: 20em;
|
||||
right: 1em;
|
||||
width: $messagingBoxWidth;
|
||||
background: $ui-base-color;
|
||||
|
||||
.messager-textarea {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.conversations_list {
|
||||
|
||||
|
||||
}
|
||||
|
||||
.conversation-item {
|
||||
@extend .fixed-box;
|
||||
width: $messagingBoxWidth;
|
||||
right: $messagingBoxWidth + 5em;
|
||||
background: $ui-secondary-color;
|
||||
}
|
||||
|
||||
.conversation-item {
|
||||
&.has-new-message {
|
||||
background: $ui-highlight-color;
|
||||
color: $classic-primary-color;
|
||||
|
@ -28,3 +28,11 @@ $media-modal-media-max-height: 80%;
|
||||
// then we import the rest of the world
|
||||
@import 'application';
|
||||
@import 'bliss/messaging';
|
||||
|
||||
.debug, .well {
|
||||
padding: 0.5rem;
|
||||
border: solid 1px greenyellow;
|
||||
background: yellow;
|
||||
color: #222;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user