Updated compose modal button
Removed pubilsh button from compose modal component. Using original compose form publish button instead.
This commit is contained in:
parent
caf72d0467
commit
236dbf8efd
@ -233,13 +233,15 @@ class ComposeForm extends ImmutablePureComponent {
|
|||||||
publishText = intl.formatMessage(messages.schedulePost);
|
publishText = intl.formatMessage(messages.schedulePost);
|
||||||
}
|
}
|
||||||
|
|
||||||
const showPublish = isModalOpen ? false : !condensed;
|
|
||||||
|
|
||||||
const composeClassNames = classNames({
|
const composeClassNames = classNames({
|
||||||
'compose-form': true,
|
'compose-form': true,
|
||||||
'condensed': condensed,
|
'condensed': condensed,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const composeFormPublishClasses = classNames('compose-form__publish', {
|
||||||
|
'in-modal': isModalOpen,
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={composeClassNames} ref={this.setForm} onClick={this.handleClick}>
|
<div className={composeClassNames} ref={this.setForm} onClick={this.handleClick}>
|
||||||
<WarningContainer />
|
<WarningContainer />
|
||||||
@ -311,8 +313,8 @@ class ComposeForm extends ImmutablePureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
showPublish &&
|
!condensed &&
|
||||||
<div className='compose-form__publish'>
|
<div className={composeFormPublishClasses}>
|
||||||
<div className='compose-form__publish-button-wrapper'><Button text={publishText} onClick={this.handleSubmit} disabled={disabledButton} block /></div>
|
<div className='compose-form__publish-button-wrapper'><Button text={publishText} onClick={this.handleSubmit} disabled={disabledButton} block /></div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
@ -7,14 +7,12 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
|||||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
import ComposeFormContainer from '../../compose/containers/compose_form_container';
|
import ComposeFormContainer from '../../compose/containers/compose_form_container';
|
||||||
import IconButton from 'gabsocial/components/icon_button';
|
import IconButton from 'gabsocial/components/icon_button';
|
||||||
import Button from 'gabsocial/components/button';
|
|
||||||
import { openModal } from '../../../actions/modal';
|
import { openModal } from '../../../actions/modal';
|
||||||
import { cancelReplyCompose } from '../../../actions/compose';
|
import { cancelReplyCompose } from '../../../actions/compose';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
close: { id: 'lightbox.close', defaultMessage: 'Close' },
|
close: { id: 'lightbox.close', defaultMessage: 'Close' },
|
||||||
confirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
|
confirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
|
||||||
publish: { id: 'compose_form.publish', defaultMessage: 'Publish' },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
@ -61,7 +59,6 @@ class ComposeModal extends ImmutablePureComponent {
|
|||||||
<h3 className='compose-modal__header__title'>
|
<h3 className='compose-modal__header__title'>
|
||||||
<FormattedMessage id='navigation_bar.compose' defaultMessage='Compose new gab' />
|
<FormattedMessage id='navigation_bar.compose' defaultMessage='Compose new gab' />
|
||||||
</h3>
|
</h3>
|
||||||
<Button className='compose-modal__publish' text={intl.formatMessage(messages.publish)} onClick={this.onClickClose} />
|
|
||||||
</div>
|
</div>
|
||||||
<div className='compose-modal__content compose-modal__content--scroll'>
|
<div className='compose-modal__content compose-modal__content--scroll'>
|
||||||
<div className='timeline-compose-block'>
|
<div className='timeline-compose-block'>
|
||||||
|
@ -4967,6 +4967,12 @@ noscript {
|
|||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
|
||||||
|
.compose-form__publish.in-modal {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user