+
{
!!account && !showBackBtn &&
}
diff --git a/app/javascript/gabsocial/components/panel/profile_info_panel.js b/app/javascript/gabsocial/components/panel/profile_info_panel.js
index 4378bba8..eaacbd3b 100644
--- a/app/javascript/gabsocial/components/panel/profile_info_panel.js
+++ b/app/javascript/gabsocial/components/panel/profile_info_panel.js
@@ -1,6 +1,5 @@
import { Fragment } from 'react'
import { defineMessages, injectIntl } from 'react-intl'
-import { fetchSuggestions, dismissSuggestion } from '../../actions/suggestions'
import ImmutablePureComponent from 'react-immutable-pure-component'
import ImmutablePropTypes from 'react-immutable-proptypes'
import { List as ImmutableList } from 'immutable'
@@ -27,13 +26,8 @@ const mapStateToProps = (state, { account }) => {
}
}
-const mapDispatchToProps = (dispatch) => ({
- fetchSuggestions: () => dispatch(fetchSuggestions()),
- dismissSuggestion: account => dispatch(dismissSuggestion(account.get('id'))),
-})
-
export default
-@connect(mapStateToProps, mapDispatchToProps)
+@connect(mapStateToProps, null)
@injectIntl
class ProfileInfoPanel extends ImmutablePureComponent {
@@ -44,10 +38,6 @@ class ProfileInfoPanel extends ImmutablePureComponent {
intl: PropTypes.object.isRequired,
}
- componentDidMount() {
- this.props.fetchSuggestions()
- }
-
render() {
const {
intl,
diff --git a/app/javascript/gabsocial/components/panel/who_to_follow_panel.js b/app/javascript/gabsocial/components/panel/who_to_follow_panel.js
index 26e092e4..6d2b6c27 100644
--- a/app/javascript/gabsocial/components/panel/who_to_follow_panel.js
+++ b/app/javascript/gabsocial/components/panel/who_to_follow_panel.js
@@ -36,24 +36,8 @@ class WhoToFollowPanel extends ImmutablePureComponent {
'suggestions',
]
- state = {
- fetched: false,
- }
-
- static getDerivedStateFromProps(nextProps, prevState) {
- if (!nextProps.isHidden && nextProps.isIntersecting && !prevState.fetched) {
- return {
- fetched: true
- }
- }
-
- return null
- }
-
- componentDidUpdate(prevProps, prevState, snapshot) {
- if (!prevState.fetched && this.state.fetched) {
- this.props.fetchSuggestions()
- }
+ componentDidMount() {
+ this.props.fetchSuggestions()
}
render() {
diff --git a/app/javascript/gabsocial/components/poll.js b/app/javascript/gabsocial/components/poll.js
index 64efee75..635ad2c7 100644
--- a/app/javascript/gabsocial/components/poll.js
+++ b/app/javascript/gabsocial/components/poll.js
@@ -5,6 +5,7 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'
import classNames from 'classnames/bind'
import escapeTextContentForBrowser from 'escape-html'
import spring from 'react-motion/lib/spring'
+import { me } from '../initial_state'
import Motion from '../features/ui/util/optional_motion'
import { vote } from '../actions/polls'
import emojify from './emoji/emoji'
@@ -202,7 +203,7 @@ class Poll extends ImmutablePureComponent {
{
- !showResults &&
+ !showResults && me &&
-
+
@@ -214,7 +220,7 @@ class ProfileHeader extends ImmutablePureComponent {
diff --git a/app/javascript/gabsocial/components/sidebar.js b/app/javascript/gabsocial/components/sidebar.js
index aefc0904..88b83e2b 100644
--- a/app/javascript/gabsocial/components/sidebar.js
+++ b/app/javascript/gabsocial/components/sidebar.js
@@ -63,10 +63,6 @@ export default
@injectIntl
class Sidebar extends ImmutablePureComponent {
- static contextTypes = {
- router: PropTypes.object,
- }
-
static propTypes = {
intl: PropTypes.object.isRequired,
account: ImmutablePropTypes.map,
@@ -94,18 +90,6 @@ class Sidebar extends ImmutablePureComponent {
})
}
- historyBack = () => {
- if (window.history && window.history.length === 1) {
- this.context.router.history.push('/home')
- } else {
- this.context.router.history.goBack()
- }
- }
-
- handleBackClick = () => {
- this.historyBack()
- }
-
setMoreButtonRef = n => {
this.moreBtnRef = n
}
@@ -221,14 +205,16 @@ class Sidebar extends ImmutablePureComponent {
-
+
{
!!title &&
{
showBackBtn &&
-
+
}
{title}
diff --git a/app/javascript/gabsocial/components/status_prepend.js b/app/javascript/gabsocial/components/status_prepend.js
index 358b9fbc..ad706aa9 100644
--- a/app/javascript/gabsocial/components/status_prepend.js
+++ b/app/javascript/gabsocial/components/status_prepend.js
@@ -39,8 +39,6 @@ class StatusPrepend extends ImmutablePureComponent {
const isRepost = (status.get('reblog', null) !== null && typeof status.get('reblog') === 'object')
- console.log("isComment:", isComment)
-
if (!isFeatured && !isPromoted && !isRepost && !isComment) return null
let iconId
diff --git a/app/javascript/gabsocial/features/notifications.js b/app/javascript/gabsocial/features/notifications.js
index 9f6424c2..09b4684d 100644
--- a/app/javascript/gabsocial/features/notifications.js
+++ b/app/javascript/gabsocial/features/notifications.js
@@ -117,7 +117,7 @@ class Notifications extends ImmutablePureComponent {
// : todo : include follow requests
- console.log('--0--notifications:', notifications)
+ console.log('--0--notifications:', hasMore)
if (isLoading && this.scrollableContent) {
scrollableContent = this.scrollableContent
diff --git a/app/javascript/gabsocial/features/ui/ui.js b/app/javascript/gabsocial/features/ui/ui.js
index ac04c263..59bc217b 100644
--- a/app/javascript/gabsocial/features/ui/ui.js
+++ b/app/javascript/gabsocial/features/ui/ui.js
@@ -370,6 +370,7 @@ class UI extends PureComponent {
}
this.props.dispatch(expandHomeTimeline())
+ this.props.dispatch(expandNotifications())
this.props.dispatch(initializeNotifications())
setTimeout(() => {
diff --git a/app/javascript/gabsocial/layouts/profile_layout.js b/app/javascript/gabsocial/layouts/profile_layout.js
index fe17f5c0..3af8a51b 100644
--- a/app/javascript/gabsocial/layouts/profile_layout.js
+++ b/app/javascript/gabsocial/layouts/profile_layout.js
@@ -21,6 +21,7 @@ export default class ProfileLayout extends ImmutablePureComponent {
account: ImmutablePropTypes.map,
children: PropTypes.node.isRequired,
title: PropTypes.string,
+ unavailable: PropTypes.bool,
}
render() {
@@ -28,6 +29,7 @@ export default class ProfileLayout extends ImmutablePureComponent {
account,
children,
title,
+ unavailable,
} = this.props
return (
@@ -101,7 +103,7 @@ export default class ProfileLayout extends ImmutablePureComponent {
diff --git a/app/javascript/gabsocial/pages/group_page.js b/app/javascript/gabsocial/pages/group_page.js
index 21a92d24..28368088 100644
--- a/app/javascript/gabsocial/pages/group_page.js
+++ b/app/javascript/gabsocial/pages/group_page.js
@@ -37,7 +37,6 @@ class GroupPage extends ImmutablePureComponent {
}
componentDidMount() {
- console.log("group page mounted:", this.props.params.id)
this.props.onFetchGroup(this.props.params.id)
}
@@ -54,16 +53,9 @@ class GroupPage extends ImmutablePureComponent {
return (
diff --git a/app/javascript/gabsocial/pages/notifications_page.js b/app/javascript/gabsocial/pages/notifications_page.js
index 88f5c666..7826c270 100644
--- a/app/javascript/gabsocial/pages/notifications_page.js
+++ b/app/javascript/gabsocial/pages/notifications_page.js
@@ -16,6 +16,7 @@ const filters = [
'reblog',
'poll',
'follow',
+ 'follow_requests',
]
const messages = defineMessages({
@@ -25,6 +26,7 @@ const messages = defineMessages({
reblog: { id: 'reposts', defaultMessage: 'Reposts' },
poll: { id: 'polls', defaultMessage: 'Poll' },
follow: { id: 'notifications.filter.follows', defaultMessage: 'Follows' },
+ follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },
all: { id: 'notifications.filter.all', defaultMessage: 'All' },
})
@@ -35,7 +37,6 @@ const mapStateToProps = (state) => ({
const mapDispatchToProps = (dispatch) => ({
setFilter(value) {
- console.log("SETTING ACTIVE FILTER:", value)
dispatch(setFilter('active', value))
},
})
diff --git a/app/javascript/gabsocial/pages/profile_page.js b/app/javascript/gabsocial/pages/profile_page.js
index 1a782a2b..f6e0cac1 100644
--- a/app/javascript/gabsocial/pages/profile_page.js
+++ b/app/javascript/gabsocial/pages/profile_page.js
@@ -1,4 +1,4 @@
-import { Fragment } from 'react'
+import { FormattedMessage } from 'react-intl'
import ImmutablePropTypes from 'react-immutable-proptypes'
import ImmutablePureComponent from 'react-immutable-pure-component'
import { fetchAccountByUsername } from '../actions/accounts'
@@ -6,6 +6,7 @@ import { makeGetAccount } from '../selectors'
import { me } from '../initial_state'
import PageTitle from '../features/ui/util/page_title'
import ColumnIndicator from '../components/column_indicator'
+import Block from '../components/block'
import ProfileLayout from '../layouts/profile_layout'
const mapStateToProps = (state, { params: { username } }) => {
@@ -63,6 +64,7 @@ class ProfilePage extends ImmutablePureComponent {
{
@@ -74,6 +76,12 @@ class ProfilePage extends ImmutablePureComponent {
account,
})
}
+ {
+ unavailable &&
+
+ } />
+ }
)
}
diff --git a/app/javascript/gabsocial/utils/numbers.js b/app/javascript/gabsocial/utils/numbers.js
index afbf9019..0823c059 100644
--- a/app/javascript/gabsocial/utils/numbers.js
+++ b/app/javascript/gabsocial/utils/numbers.js
@@ -12,7 +12,7 @@ export const shortNumberFormat = (number) => {
return (
-
+ k
)
}
diff --git a/app/javascript/styles/global.css b/app/javascript/styles/global.css
index eeb5f5d1..2ec4a404 100644
--- a/app/javascript/styles/global.css
+++ b/app/javascript/styles/global.css
@@ -1,4 +1,5 @@
:root {
+ --color_highlight: #CCF3DF;
--color_brand-dark: #378e61;
--color_brand-light: #63DA9D;
--color_brand-light-opaque: rgb(54, 233, 145, .125);
@@ -94,6 +95,14 @@
--navigation_brand: var(--color_brand) !important;
}
+::selection {
+ background: var(--color_highlight);
+}
+
+::-moz-selection {
+ background: var(--color_highlight);
+}
+
html,
body {
height: 100%;
@@ -296,6 +305,7 @@ body {
.borderBottom6PX { border-bottom-width: 6px; }
.borderLeft1PX { border-left-width: 1px; }
.borderTop1PX { border-top-width: 1px; }
+.borderTop2PX { border-top-width: 2px; }
.border1PX { border-width: 1px; }
.border2PX { border-width: 2px; }