diff --git a/app/javascript/gabsocial/actions/compose.js b/app/javascript/gabsocial/actions/compose.js
index 46a59981..28bc0d2c 100644
--- a/app/javascript/gabsocial/actions/compose.js
+++ b/app/javascript/gabsocial/actions/compose.js
@@ -129,17 +129,6 @@ export function mentionCompose(account, routerHistory) {
};
};
-export function directCompose(account, routerHistory) {
- return (dispatch, getState) => {
- dispatch({
- type: COMPOSE_DIRECT,
- account: account,
- });
-
- ensureComposeIsVisible(getState, routerHistory);
- };
-};
-
export function handleComposeSubmit(dispatch, getState, response, status) {
if (!dispatch || !getState) return;
diff --git a/app/javascript/gabsocial/components/button.js b/app/javascript/gabsocial/components/button.js
index 732fe395..27b83ccc 100644
--- a/app/javascript/gabsocial/components/button.js
+++ b/app/javascript/gabsocial/components/button.js
@@ -106,6 +106,7 @@ export default class Button extends PureComponent {
colorPrimary: color === COLORS.primary,
colorSecondary: color === COLORS.secondary,
+ colorTertiary: color === COLORS.tertiary,
colorWhite: color === COLORS.white,
colorBrand: color === COLORS.brand,
diff --git a/app/javascript/gabsocial/components/comment.js b/app/javascript/gabsocial/components/comment.js
index 335af292..b1432d55 100644
--- a/app/javascript/gabsocial/components/comment.js
+++ b/app/javascript/gabsocial/components/comment.js
@@ -3,31 +3,127 @@ import { NavLink } from 'react-router-dom'
import ImmutablePropTypes from 'react-immutable-proptypes'
import { defineMessages, injectIntl } from 'react-intl'
import ImmutablePureComponent from 'react-immutable-pure-component'
-import { me } from '../initial_state'
+import { makeGetStatus } from '../selectors';
+import CommentHeader from './comment_header'
import Avatar from './avatar'
-import DisplayName from './display_name'
import Button from './button'
+import DisplayName from './display_name'
+import DotTextSeperator from './dot_text_seperator'
+import RelativeTimestamp from './relative_timestamp'
import Text from './text'
+import StatusContent from './status_content'
const messages = defineMessages({
follow: { id: 'follow', defaultMessage: 'Follow' },
})
+const makeMapStateToProps = () => {
+ const getStatus = makeGetStatus();
+
+ const mapStateToProps = (state, props) => ({
+ status: getStatus(state, props),
+ });
+
+ return mapStateToProps;
+};
+
export default
@injectIntl
+@connect(makeMapStateToProps)
class Comment extends ImmutablePureComponent {
static propTypes = {
status: ImmutablePropTypes.map.isRequired,
}
- render() {
+ handleClick = () => {
+ // if (this.props.onClick) {
+ // this.props.onClick();
+ // return;
+ // }
- //
+ // if (!this.context.router) return;
+
+ // this.context.router.history.push(
+ // `/${this._properStatus().getIn(['account', 'acct'])}/posts/${this._properStatus().get('id')}`
+ // )
+ }
+
+ render() {
+ const { status } = this.props
+
+ console.log("status:", status)
return (
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
)
}
diff --git a/app/javascript/gabsocial/components/comment_header.js b/app/javascript/gabsocial/components/comment_header.js
new file mode 100644
index 00000000..04fe0b91
--- /dev/null
+++ b/app/javascript/gabsocial/components/comment_header.js
@@ -0,0 +1,120 @@
+import { Fragment } from 'react'
+import { NavLink } from 'react-router-dom'
+import ImmutablePropTypes from 'react-immutable-proptypes'
+import { defineMessages, injectIntl } from 'react-intl'
+import ImmutablePureComponent from 'react-immutable-pure-component'
+import Avatar from './avatar'
+import Button from './button'
+import DisplayName from './display_name'
+import DotTextSeperator from './dot_text_seperator'
+import RelativeTimestamp from './relative_timestamp'
+import Text from './text'
+
+export default
+@injectIntl
+class CommentHeader extends ImmutablePureComponent {
+
+ static propTypes = {
+ status: ImmutablePropTypes.map.isRequired,
+ }
+
+ render() {
+ const { status } = this.props
+
+ const repostCount = 12 // status.get('reblogs_count')
+ const favoriteCount = 2 // status.get('favourites_count') // : todo :
+
+ const statusUrl = `/${status.getIn(['account', 'acct'])}/posts/${status.get('id')}`;
+
+ return (
+
+
+
+
+
+
+
+ {
+ status.get('revised_at') !== null &&
+
+
+
+
+ }
+
+ {
+ favoriteCount > 0 &&
+
+
+
+
+ }
+
+ {
+ repostCount > 0 &&
+
+
+
+
+ }
+
+
+
+
+
+
+
+ )
+ }
+
+}
diff --git a/app/javascript/gabsocial/components/display_name.js b/app/javascript/gabsocial/components/display_name.js
index 50ee5d82..ed7a3bd3 100644
--- a/app/javascript/gabsocial/components/display_name.js
+++ b/app/javascript/gabsocial/components/display_name.js
@@ -26,6 +26,7 @@ class DisplayName extends ImmutablePureComponent {
openUserInfoPopover: PropTypes.func.isRequired,
closeUserInfoPopover: PropTypes.func.isRequired,
multiline: PropTypes.bool,
+ small: PropTypes.bool,
large: PropTypes.bool,
noHover: PropTypes.bool,
noUsername: PropTypes.bool,
@@ -47,7 +48,8 @@ class DisplayName extends ImmutablePureComponent {
multiline,
large,
noHover,
- noUsername
+ noUsername,
+ small
} = this.props
if (!account) return null
@@ -70,10 +72,11 @@ class DisplayName extends ImmutablePureComponent {
whiteSpaceNoWrap: 1,
fontWeightBold: 1,
colorPrimary: 1,
- lineHeight125: 1,
marginRight2PX: 1,
+ lineHeight125: !small,
+ fontSize14PX: small,
fontSize15PX: !large,
- fontSize24PX: large,
+ fontSize24PX: large && !small,
})
const usernameClasses = cx({
@@ -88,11 +91,14 @@ class DisplayName extends ImmutablePureComponent {
lineHeight15: multiline,
lineHeight125: !multiline,
marginLeft5PX: !multiline,
+ fontSize14PX: small,
fontSize15PX: !large,
- fontSize16PX: large
+ fontSize16PX: large && !small,
})
- const iconSize = !!large ? '19px' : '16px'
+ const iconSize =
+ !!large ? '19px' :
+ !!small ? '14px' : '16px'
// : todo :
return (
diff --git a/app/javascript/gabsocial/components/dot_text_seperator.js b/app/javascript/gabsocial/components/dot_text_seperator.js
index 85da4bea..a6060440 100644
--- a/app/javascript/gabsocial/components/dot_text_seperator.js
+++ b/app/javascript/gabsocial/components/dot_text_seperator.js
@@ -4,7 +4,7 @@ export default class DotTextSeperator extends PureComponent {
render() {
return (
-
•
+
·
)
}
diff --git a/app/javascript/gabsocial/components/status/status.js b/app/javascript/gabsocial/components/status/status.js
index 6ca47db2..c6dd4af7 100644
--- a/app/javascript/gabsocial/components/status/status.js
+++ b/app/javascript/gabsocial/components/status/status.js
@@ -13,7 +13,7 @@ import Avatar from '../avatar';
import StatusQuote from '../status_quote';
import RelativeTimestamp from '../relative_timestamp';
import DisplayName from '../display_name';
-import StatusContent from '../status_content';
+import StatusContent from '../status_content'
import StatusActionBar from '../status_action_bar';
import Block from '../block';
import Icon from '../icon';
@@ -104,6 +104,7 @@ class Status extends ImmutablePureComponent {
promoted: PropTypes.bool,
onOpenProUpgradeModal: PropTypes.func,
intl: PropTypes.object.isRequired,
+ borderless: PropTypes.bool,
};
// Avoid checking props that are functions (and whose equality will always
@@ -279,7 +280,8 @@ class Status extends ImmutablePureComponent {
unread,
showThread,
group,
- promoted
+ promoted,
+ borderless
} = this.props
let media = null
@@ -450,12 +452,21 @@ class Status extends ImmutablePureComponent {
const containerClasses = cx({
default: 1,
- marginBottom15PX: 1,
+ marginBottom15PX: !borderless,
+ backgroundColorPrimary: 1,
paddingBottom15PX: featured,
borderBottom1PX: featured,
borderColorSecondary: featured,
})
+ const innerContainerClasses = cx({
+ default: 1,
+ overflowHidden: 1,
+ radiusSmall: !borderless,
+ borderColorSecondary: !borderless,
+ border1PX: !borderless,
+ })
+
return (
-
+
{prepend}
@@ -497,11 +508,11 @@ class Status extends ImmutablePureComponent {
) */ }
- {/*
-
+
);
diff --git a/app/javascript/gabsocial/components/status_action_bar.js b/app/javascript/gabsocial/components/status_action_bar.js
index 3c8f300d..81335208 100644
--- a/app/javascript/gabsocial/components/status_action_bar.js
+++ b/app/javascript/gabsocial/components/status_action_bar.js
@@ -132,7 +132,7 @@ class StatusActionBar extends ImmutablePureComponent {
const repostCount = status.get('reblogs_count')
const repostTitle = !publicStatus ? formatMessage(messages.cannot_repost) : formatMessage(messages.repost)
- const favoriteCount = status.get('favorites_count') // : todo :
+ const favoriteCount = status.get('favourites_count') // : todo :
const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && (