diff options
author | Reverite <github@reverite.sh> | 2018-12-06 15:56:22 -0800 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2018-12-06 15:56:22 -0800 |
commit | a78e3f2206ddaeeb3e6f1c23e4b524af29e92b04 (patch) | |
tree | a054dda635ffd019bf2fdc10ed4f3341264f1490 /app/javascript | |
parent | a2cb6e3996f4e8f7775557e84c9e242d937f8f0c (diff) | |
parent | e3682c9c1750e5e7e5d2f817e29f6760a18400ca (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/javascript')
3 files changed, 27 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/status/components/detailed_status.js b/app/javascript/flavours/glitch/features/status/components/detailed_status.js index 436c2df0a..6302f11af 100644 --- a/app/javascript/flavours/glitch/features/status/components/detailed_status.js +++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.js @@ -29,7 +29,7 @@ export default class DetailedStatus extends ImmutablePureComponent { }; handleAccountClick = (e) => { - if (e.button === 0) { + if (e.button === 0 && !(e.ctrlKey || e.altKey || e.metaKey)) { e.preventDefault(); this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`); } @@ -37,6 +37,15 @@ export default class DetailedStatus extends ImmutablePureComponent { e.stopPropagation(); } + parseClick = (e, destination) => { + if (e.button === 0 && !(e.ctrlKey || e.altKey || e.metaKey)) { + e.preventDefault(); + this.context.router.history.push(destination); + } + + e.stopPropagation(); + } + handleOpenVideo = (media, startTime) => { this.props.onOpenVideo(media, startTime); } @@ -122,6 +131,7 @@ export default class DetailedStatus extends ImmutablePureComponent { expanded={expanded} collapsed={false} onExpandedToggle={onToggleHidden} + parseClick={this.parseClick} /> <div className='detailed-status__meta'> diff --git a/app/javascript/mastodon/features/notifications/components/notification.js b/app/javascript/mastodon/features/notifications/components/notification.js index 8df6830c5..e79bd1a3c 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.js +++ b/app/javascript/mastodon/features/notifications/components/notification.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import StatusContainer from '../../../containers/status_container'; import AccountContainer from '../../../containers/account_container'; +import RelativeTimestamp from '../../../components/relative_timestamp'; import { injectIntl, FormattedMessage } from 'react-intl'; import Permalink from '../../../components/permalink'; import ImmutablePureComponent from 'react-immutable-pure-component'; @@ -87,9 +88,11 @@ class Notification extends ImmutablePureComponent { </div> <span title={notification.get('created_at')}> <FormattedMessage id='notification.follow' defaultMessage='{name} followed you' values={{ name: link }} /> + <span className='notification__relative_time'> + <RelativeTimestamp timestamp={notification.get('created_at')} /> + </span> </span> </div> - <AccountContainer id={account.get('id')} withNote={false} hidden={this.props.hidden} /> </div> </HotKeys> @@ -120,6 +123,9 @@ class Notification extends ImmutablePureComponent { <i className='fa fa-fw fa-star star-icon' /> </div> <FormattedMessage id='notification.favourite' defaultMessage='{name} favourited your status' values={{ name: link }} /> + <span className='notification__relative_time'> + <RelativeTimestamp className='notification__relative_time' timestamp={notification.get('created_at')} /> + </span> </div> <StatusContainer id={notification.get('status')} account={notification.get('account')} muted withDismiss hidden={!!this.props.hidden} /> @@ -139,6 +145,9 @@ class Notification extends ImmutablePureComponent { <i className='fa fa-fw fa-retweet' /> </div> <FormattedMessage id='notification.reblog' defaultMessage='{name} boosted your status' values={{ name: link }} /> + <span className='notification__relative_time'> + <RelativeTimestamp className='notification__relative_time' timestamp={notification.get('created_at')} /> + </span> </div> <StatusContainer id={notification.get('status')} account={notification.get('account')} muted withDismiss hidden={this.props.hidden} /> diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index fc55163bc..6f3f57265 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -1489,6 +1489,7 @@ a.account__display-name { cursor: default; color: $darker-text-color; font-size: 15px; + line-height: 22px; position: relative; .fa { @@ -1496,7 +1497,7 @@ a.account__display-name { } > span { - display: block; + display: inline; overflow: hidden; text-overflow: ellipsis; } @@ -1526,6 +1527,10 @@ a.account__display-name { } } +.notification__relative_time { + float: right; +} + .display-name { display: block; max-width: 100%; |