This commit is contained in:
mgabdev
2020-02-17 12:50:29 -05:00
parent cdde454915
commit be3daea78b
28 changed files with 456 additions and 176 deletions

View File

@@ -155,6 +155,7 @@ class Notification extends ImmutablePureComponent {
</span>
</div>
{ /*
<StatusContainer
id={notification.get('status')}
account={notification.get('account')}
@@ -165,7 +166,7 @@ class Notification extends ImmutablePureComponent {
updateScrollBottom={this.props.updateScrollBottom}
cachedMediaWidth={this.props.cachedMediaWidth}
cacheMediaWidth={this.props.cacheMediaWidth}
/>
/> */ }
</div>
</HotKeys>
);
@@ -186,7 +187,7 @@ class Notification extends ImmutablePureComponent {
<FormattedMessage id='notification.reblog' defaultMessage='{name} reposted your status' values={{ name: link }} />
</span>
</div>
{ /*
<StatusContainer
id={notification.get('status')}
account={notification.get('account')}
@@ -197,7 +198,7 @@ class Notification extends ImmutablePureComponent {
updateScrollBottom={this.props.updateScrollBottom}
cachedMediaWidth={this.props.cachedMediaWidth}
cacheMediaWidth={this.props.cacheMediaWidth}
/>
/> */ }
</div>
</HotKeys>
);
@@ -218,7 +219,7 @@ class Notification extends ImmutablePureComponent {
<FormattedMessage id='notification.poll' defaultMessage='A poll you have voted in has ended' />
</span>
</div>
{ /*
<StatusContainer
id={notification.get('status')}
account={notification.get('account')}
@@ -229,7 +230,7 @@ class Notification extends ImmutablePureComponent {
updateScrollBottom={this.props.updateScrollBottom}
cachedMediaWidth={this.props.cachedMediaWidth}
cacheMediaWidth={this.props.cacheMediaWidth}
/>
/> */}
</div>
</HotKeys>
);
@@ -242,16 +243,16 @@ class Notification extends ImmutablePureComponent {
const link = <bdi><Permalink className='notification__display-name' href={`/${account.get('acct')}`} title={account.get('acct')} to={`/${account.get('acct')}`} dangerouslySetInnerHTML={displayNameHtml} /></bdi>;
switch(notification.get('type')) {
case 'follow':
return this.renderFollow(notification, account, link);
case 'mention':
return this.renderMention(notification);
// case 'follow':
// return this.renderFollow(notification, account, link);
// case 'mention':
// return this.renderMention(notification);
case 'favourite':
return this.renderFavourite(notification, link);
case 'reblog':
return this.renderReblog(notification, link);
case 'poll':
return this.renderPoll(notification);
// case 'reblog':
// return this.renderReblog(notification, link);
// case 'poll':
// return this.renderPoll(notification);
}
return null;

View File

@@ -10,13 +10,12 @@ import {
dequeueNotifications,
} from '../../actions/notifications';
import NotificationContainer from './containers/notification_container';
import ColumnSettingsContainer from './containers/column_settings_container';
import FilterBarContainer from './containers/filter_bar_container';
// import ColumnSettingsContainer from './containers/column_settings_container';
// import FilterBarContainer from './containers/filter_bar_container';
import ScrollableList from '../../components/scrollable_list';
import LoadMore from '../../components/load_more';
import TimelineQueueButtonHeader from '../../components/timeline_queue_button_header';
// import TimelineQueueButtonHeader from '../../components/timeline_queue_button_header';
import Column from '../../components/column';
import { ColumnHeader } from '../../components/column_header';
const messages = defineMessages({
title: { id: 'column.notifications', defaultMessage: 'Notifications' },
@@ -128,9 +127,11 @@ class Notifications extends ImmutablePureComponent {
let scrollableContent = null;
const filterBarContainer = showFilterBar
? (<FilterBarContainer />)
: null;
// const filterBarContainer = showFilterBar
// ? (<FilterBarContainer />)
// : null;
console.log("notifications:", notifications)
if (isLoading && this.scrollableContent) {
scrollableContent = this.scrollableContent;
@@ -169,18 +170,15 @@ class Notifications extends ImmutablePureComponent {
onScrollToTop={this.handleScrollToTop}
onScroll={this.handleScroll}
>
{scrollableContent}
{ scrollableContent }
</ScrollableList>
);
return (
<Column ref={this.setColumnRef} heading={intl.formatMessage(messages.title)}>
<ColumnHeader icon='bell' active={isUnread} title={intl.formatMessage(messages.title)}>
<ColumnSettingsContainer />
</ColumnHeader>
{filterBarContainer}
<TimelineQueueButtonHeader onClick={this.handleDequeueNotifications} count={totalQueuedNotificationsCount} itemType='notification' />
{scrollContainer}
{ /* filterBarContainer */ }
{ /* <TimelineQueueButtonHeader onClick={this.handleDequeueNotifications} count={totalQueuedNotificationsCount} itemType='notification' /> */ }
{ scrollContainer }
</Column>
);
}