Progress on Gab Deck, Updates on Compose

• Progress on Gab Deck, Updates on Compose
This commit is contained in:
mgabdev
2020-12-08 23:15:33 -05:00
parent 6950f67520
commit 998f00ae48
26 changed files with 895 additions and 381 deletions

View File

@@ -11,6 +11,7 @@ import { makeGetAccount } from '../../selectors'
import {
THEMES,
DEFAULT_THEME,
MODAL_COMPOSE,
POPOVER_NAV_SETTINGS,
MODAL_DECK_COLUMN_ADD,
} from '../../constants'
@@ -38,6 +39,10 @@ class DeckSidebar extends ImmutablePureComponent {
this.props.onOpenNewColumnModal()
}
handleOnOpenComposeModal = () => {
this.props.onOpenComposeModal()
}
setAvatarNode = (c) => {
this.avatarNode = c
}
@@ -70,9 +75,9 @@ class DeckSidebar extends ImmutablePureComponent {
<div className={[_s.d, _s.px10].join(' ')}>
<NavigationBarButton icon='pencil' />
<NavigationBarButton icon='pencil' onClick={this.handleOnOpenComposeModal} />
<NavigationBarButton icon='search' />
<NavigationBarButton icon='search' to='/search' />
<Divider isSmall />
@@ -117,12 +122,15 @@ const mapDispatchToProps = (dispatch) => ({
onOpenNavSettingsPopover(targetRef) {
dispatch(openPopover(POPOVER_NAV_SETTINGS, {
targetRef,
position: 'right-start',
position: 'top-start',
}))
},
onOpenNewColumnModal() {
dispatch(openModal(MODAL_DECK_COLUMN_ADD))
},
onOpenComposeModal() {
dispatch(openModal(MODAL_COMPOSE))
},
onChange(key, value) {
dispatch(changeSetting(['displayOptions', key], value))
dispatch(saveSettings())
@@ -133,6 +141,7 @@ DeckSidebar.propTypes = {
account: ImmutablePropTypes.map,
onOpenNavSettingsPopover: PropTypes.func.isRequired,
onOpenNewColumnModal: PropTypes.func.isRequired,
onOpenComposeModal: PropTypes.func.isRequired,
theme: PropTypes.string,
logoDisabled: PropTypes.bool,
}