Markdown refactoring
This commit is contained in:
parent
daf039d9bb
commit
b31cf22f43
6 changed files with 11 additions and 10 deletions
|
@ -497,7 +497,7 @@ export function changeComposeSpoilerness() {
|
|||
};
|
||||
};
|
||||
|
||||
export function changeComposeMarkdown(value) {
|
||||
export function changeComposeContentType(value) {
|
||||
return {
|
||||
type: COMPOSE_TYPE_CHANGE,
|
||||
value,
|
||||
|
|
|
@ -49,7 +49,6 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
text: PropTypes.string.isRequired,
|
||||
suggestions: ImmutablePropTypes.list,
|
||||
spoiler: PropTypes.bool,
|
||||
content_type: PropTypes.string,
|
||||
privacy: PropTypes.string,
|
||||
spoilerText: PropTypes.string,
|
||||
focusDate: PropTypes.instanceOf(Date),
|
||||
|
|
|
@ -16,7 +16,6 @@ const mapStateToProps = state => ({
|
|||
suggestions: state.getIn(['compose', 'suggestions']),
|
||||
spoiler: state.getIn(['compose', 'spoiler']),
|
||||
spoilerText: state.getIn(['compose', 'spoiler_text']),
|
||||
content_type: state.getIn(['compose', 'text/markdown']),
|
||||
privacy: state.getIn(['compose', 'privacy']),
|
||||
focusDate: state.getIn(['compose', 'focusDate']),
|
||||
caretPosition: state.getIn(['compose', 'caretPosition']),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { connect } from 'react-redux';
|
||||
import TextIconButton from '../components/text_icon_button';
|
||||
import { changeComposeMarkdown } from '../../../actions/compose';
|
||||
import { changeComposeContentType } from '../../../actions/compose';
|
||||
import { injectIntl, defineMessages } from 'react-intl';
|
||||
|
||||
const messages = defineMessages({
|
||||
|
@ -18,7 +18,7 @@ const mapStateToProps = (state, { intl }) => ({
|
|||
const mapDispatchToProps = dispatch => ({
|
||||
|
||||
onClick() {
|
||||
dispatch(changeComposeMarkdown(this.active ? 'text/plain' : 'text/markdown'));
|
||||
dispatch(changeComposeContentType(this.active ? 'text/plain' : 'text/markdown'));
|
||||
},
|
||||
|
||||
});
|
||||
|
|
|
@ -214,8 +214,7 @@ export default function compose(state = initialState, action) {
|
|||
.set('is_composing', false);
|
||||
case COMPOSE_SENSITIVITY_CHANGE:
|
||||
return state.withMutations(map => {
|
||||
map.set('sensitive', !state.get('sensitive'));
|
||||
|
||||
map.set('sensitive', !state.get('sensitive'));
|
||||
map.set('idempotencyKey', uuid());
|
||||
});
|
||||
case COMPOSE_TYPE_CHANGE:
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
.status__content {
|
||||
p, li {
|
||||
p,
|
||||
li {
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
p, li {
|
||||
p,
|
||||
li {
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
|
||||
ul, ol, blockquote {
|
||||
ul,
|
||||
ol,
|
||||
blockquote {
|
||||
margin-bottom: 20px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue