Progress
This commit is contained in:
@@ -27,6 +27,14 @@ export default class ComposeExtraButton extends PureComponent {
|
||||
} = this.props
|
||||
|
||||
const btnClasses = cx({
|
||||
default: 1,
|
||||
circle: 1,
|
||||
noUnderline: 1,
|
||||
font: 1,
|
||||
cursorPointer: 1,
|
||||
textAlignCenter: 1,
|
||||
outlineNone: 1,
|
||||
bgTransparent: 1,
|
||||
bgSubtle_onHover: !active,
|
||||
bgBrandLight: active,
|
||||
py10: !small,
|
||||
@@ -45,6 +53,7 @@ export default class ComposeExtraButton extends PureComponent {
|
||||
|
||||
const button = (
|
||||
<Button
|
||||
noClasses
|
||||
className={btnClasses}
|
||||
title={title}
|
||||
isDisabled={disabled}
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
} from '../../../constants'
|
||||
import AutosuggestTextbox from '../../../components/autosuggest_textbox'
|
||||
import Responsive from '../../ui/util/responsive_component'
|
||||
import ResponsiveClassesComponent from '../../ui/util/responsive_classes_component'
|
||||
import Avatar from '../../../components/avatar'
|
||||
import Button from '../../../components/button'
|
||||
import CharacterCounter from '../../../components/character_counter'
|
||||
@@ -254,6 +255,8 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
flexWrap: 1,
|
||||
overflowHidden: 1,
|
||||
flex1: 1,
|
||||
heightMin28PX: 1,
|
||||
py2: shouldCondense,
|
||||
alignItemsEnd: shouldCondense,
|
||||
flexRow: shouldCondense,
|
||||
radiusSmall: shouldCondense,
|
||||
@@ -267,8 +270,9 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
alignItemsCenter: !shouldCondense,
|
||||
alignItemsStart: shouldCondense,
|
||||
mt10: !shouldCondense,
|
||||
px15: !shouldCondense,
|
||||
px10: !shouldCondense,
|
||||
mlAuto: shouldCondense,
|
||||
flexWrap: !shouldCondense,
|
||||
})
|
||||
|
||||
const commentPublishBtnClasses = CX({
|
||||
@@ -285,7 +289,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
<div className={[_s.default, _s.width100PC].join(' ')}>
|
||||
|
||||
<div className={[_s.default, _s.flexRow, _s.width100PC].join(' ')}>
|
||||
<div className={[_s.default, _s.mr10, _s.mt5].join(' ')}>
|
||||
<div className={[_s.default, _s.mr10].join(' ')}>
|
||||
<Avatar account={account} size={28} noHover />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import { FormattedMessage } from 'react-intl'
|
||||
import { withRouter } from 'react-router-dom'
|
||||
import { fetchSuggestions, dismissSuggestion } from '../actions/suggestions'
|
||||
import { me } from '../initial_state'
|
||||
import HashtagItem from '../components/hashtag_item'
|
||||
import Icon from '../components/icon'
|
||||
import { WhoToFollowPanel } from '../components/panel'
|
||||
// import TrendsPanel from '../ui/components/trends_panel'
|
||||
import GroupListItem from '../components/group_list_item'
|
||||
import Block from '../components/block'
|
||||
import Heading from '../components/heading'
|
||||
import Button from '../components/button'
|
||||
import Text from '../components/text'
|
||||
import Account from '../components/account'
|
||||
import PanelLayout from '../components/panel/panel_layout'
|
||||
@@ -91,7 +85,7 @@ class Search extends ImmutablePureComponent {
|
||||
)
|
||||
}
|
||||
|
||||
if (results.get('groups') && results.get('groups').size > 0 && (isTop || showGroups)) {
|
||||
if (results.get('groups') && results.get('groups').size > 0 && me && (isTop || showGroups)) {
|
||||
const size = isTop ? Math.min(results.get('groups').size, theLimit) : results.get('groups').size;
|
||||
const isMax = size === results.get('groups').size
|
||||
|
||||
@@ -123,7 +117,7 @@ class Search extends ImmutablePureComponent {
|
||||
)
|
||||
}
|
||||
|
||||
if (results.get('hashtags') && results.get('hashtags').size > 0 && (isTop || showHashtags)) {
|
||||
if (results.get('hashtags') && results.get('hashtags').size > 0 && me && (isTop || showHashtags)) {
|
||||
const size = isTop ? Math.min(results.get('hashtags').size, theLimit) : results.get('hashtags').size;
|
||||
const isMax = size === results.get('hashtags').size
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ class SwitchingArea extends PureComponent {
|
||||
<WrappedRoute path='/notifications' exact page={NotificationsPage} component={Notifications} content={children} />
|
||||
|
||||
<WrappedRoute path='/search' exact publicRoute page={SearchPage} component={Search} content={children} />
|
||||
<WrappedRoute path='/search/people' exact page={SearchPage} component={Search} content={children} />
|
||||
<WrappedRoute path='/search/people' exact publicRoute page={SearchPage} component={Search} content={children} />
|
||||
<WrappedRoute path='/search/hashtags' exact page={SearchPage} component={Search} content={children} />
|
||||
<WrappedRoute path='/search/groups' exact page={SearchPage} component={Search} content={children} />
|
||||
|
||||
@@ -350,12 +350,8 @@ class UI extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
// componentWillMount() {
|
||||
|
||||
// }
|
||||
|
||||
componentDidMount() {
|
||||
// if (!me) return
|
||||
if (!me) return
|
||||
|
||||
window.addEventListener('beforeunload', this.handleBeforeUnload, false)
|
||||
|
||||
@@ -373,13 +369,12 @@ class UI extends PureComponent {
|
||||
window.setTimeout(() => Notification.requestPermission(), 120 * 1000)
|
||||
}
|
||||
|
||||
if (me) {
|
||||
this.props.dispatch(expandHomeTimeline())
|
||||
this.props.dispatch(expandNotifications())
|
||||
this.props.dispatch(initializeNotifications())
|
||||
this.props.dispatch(expandHomeTimeline())
|
||||
this.props.dispatch(initializeNotifications())
|
||||
|
||||
setTimeout(() => this.props.dispatch(fetchFilters()), 500)
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.props.dispatch(fetchFilters())
|
||||
}, 500)
|
||||
// this.hotkeys.__mousetrap__.stopCallback = (e, element) => {
|
||||
// return ['TEXTAREA', 'SELECT', 'INPUT'].includes(element.tagName)
|
||||
// }
|
||||
@@ -394,11 +389,11 @@ class UI extends PureComponent {
|
||||
document.removeEventListener('dragend', this.handleDragEnd)
|
||||
}
|
||||
|
||||
setRef = c => {
|
||||
setRef = (c) => {
|
||||
this.node = c
|
||||
}
|
||||
|
||||
handleHotkeyNew = e => {
|
||||
handleHotkeyNew = (e) => {
|
||||
e.preventDefault()
|
||||
|
||||
const element = this.node.querySelector('.compose-form__autosuggest-wrapper textarea')
|
||||
@@ -408,7 +403,7 @@ class UI extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
handleHotkeySearch = e => {
|
||||
handleHotkeySearch = (e) => {
|
||||
e.preventDefault()
|
||||
|
||||
const element = this.node.querySelector('.search__input')
|
||||
@@ -418,7 +413,7 @@ class UI extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
handleHotkeyForceNew = e => {
|
||||
handleHotkeyForceNew = (e) => {
|
||||
this.handleHotkeyNew(e)
|
||||
this.props.dispatch(resetCompose())
|
||||
}
|
||||
@@ -431,7 +426,7 @@ class UI extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
setHotkeysRef = c => {
|
||||
setHotkeysRef = (c) => {
|
||||
this.hotkeys = c
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user