From 87f4b4d230454d4baa7116e55d9aee42199eeb9b Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sat, 20 Apr 2019 01:00:45 -0500 Subject: Implement share keys and related bangtags, add `sharekey`, `network`, and `curated` to the API, remove app info from the UI, and move timestamps to the right. --- .../features/status/components/detailed_status.js | 38 ++++++++++++++++++---- 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'app/javascript/flavours/glitch/features/status') 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 1633d26ee..e9bbcaa90 100644 --- a/app/javascript/flavours/glitch/features/status/components/detailed_status.js +++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.js @@ -15,6 +15,7 @@ import VisibilityIcon from 'flavours/glitch/components/status_visibility_icon'; import scheduleIdleTask from 'flavours/glitch/util/schedule_idle_task'; import classNames from 'classnames'; import PollContainer from 'flavours/glitch/containers/poll_container'; +import { me } from 'flavours/glitch/util/initial_state'; export default class DetailedStatus extends ImmutablePureComponent { @@ -114,10 +115,10 @@ export default class DetailedStatus extends ImmutablePureComponent { let media = null; let mediaIcon = null; - let applicationLink = ''; let reblogLink = ''; let reblogIcon = 'repeat'; let favouriteLink = ''; + let sharekeyLinks = ''; if (this.props.measureHeight) { outerStyle.height = `${this.state.height}px`; @@ -168,10 +169,6 @@ export default class DetailedStatus extends ImmutablePureComponent { mediaIcon = 'link'; } - if (status.get('application')) { - applicationLink = · {status.getIn(['application', 'name'])}; - } - if (status.get('visibility') === 'direct') { reblogIcon = 'envelope'; } else if (status.get('visibility') === 'private') { @@ -194,6 +191,34 @@ export default class DetailedStatus extends ImmutablePureComponent { ); } + if (status.get('sharekey')) { + sharekeyLinks = ( + + + + +  ·  + + + +  ·  + + + +  · + + ); + } else if (status.getIn(['account', 'id']) == me) { + sharekeyLinks = ( + + + + +  · + + ); + } + if (this.context.router) { favouriteLink = ( @@ -229,9 +254,10 @@ export default class DetailedStatus extends ImmutablePureComponent { />
+ {sharekeyLinks} {reblogLink} · {favouriteLink} · - {applicationLink} · {reblogLink} · {favouriteLink} · +
-- cgit