Markdown refactoring

tl-language-filters
Alex Gleason 2020-07-28 13:36:10 -05:00
rodzic daf039d9bb
commit b31cf22f43
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
6 zmienionych plików z 11 dodań i 10 usunięć

Wyświetl plik

@ -497,7 +497,7 @@ export function changeComposeSpoilerness() {
}; };
}; };
export function changeComposeMarkdown(value) { export function changeComposeContentType(value) {
return { return {
type: COMPOSE_TYPE_CHANGE, type: COMPOSE_TYPE_CHANGE,
value, value,

Wyświetl plik

@ -49,7 +49,6 @@ class ComposeForm extends ImmutablePureComponent {
text: PropTypes.string.isRequired, text: PropTypes.string.isRequired,
suggestions: ImmutablePropTypes.list, suggestions: ImmutablePropTypes.list,
spoiler: PropTypes.bool, spoiler: PropTypes.bool,
content_type: PropTypes.string,
privacy: PropTypes.string, privacy: PropTypes.string,
spoilerText: PropTypes.string, spoilerText: PropTypes.string,
focusDate: PropTypes.instanceOf(Date), focusDate: PropTypes.instanceOf(Date),

Wyświetl plik

@ -16,7 +16,6 @@ const mapStateToProps = state => ({
suggestions: state.getIn(['compose', 'suggestions']), suggestions: state.getIn(['compose', 'suggestions']),
spoiler: state.getIn(['compose', 'spoiler']), spoiler: state.getIn(['compose', 'spoiler']),
spoilerText: state.getIn(['compose', 'spoiler_text']), spoilerText: state.getIn(['compose', 'spoiler_text']),
content_type: state.getIn(['compose', 'text/markdown']),
privacy: state.getIn(['compose', 'privacy']), privacy: state.getIn(['compose', 'privacy']),
focusDate: state.getIn(['compose', 'focusDate']), focusDate: state.getIn(['compose', 'focusDate']),
caretPosition: state.getIn(['compose', 'caretPosition']), caretPosition: state.getIn(['compose', 'caretPosition']),

Wyświetl plik

@ -1,6 +1,6 @@
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import TextIconButton from '../components/text_icon_button'; import TextIconButton from '../components/text_icon_button';
import { changeComposeMarkdown } from '../../../actions/compose'; import { changeComposeContentType } from '../../../actions/compose';
import { injectIntl, defineMessages } from 'react-intl'; import { injectIntl, defineMessages } from 'react-intl';
const messages = defineMessages({ const messages = defineMessages({
@ -18,7 +18,7 @@ const mapStateToProps = (state, { intl }) => ({
const mapDispatchToProps = dispatch => ({ const mapDispatchToProps = dispatch => ({
onClick() { onClick() {
dispatch(changeComposeMarkdown(this.active ? 'text/plain' : 'text/markdown')); dispatch(changeComposeContentType(this.active ? 'text/plain' : 'text/markdown'));
}, },
}); });

Wyświetl plik

@ -214,8 +214,7 @@ export default function compose(state = initialState, action) {
.set('is_composing', false); .set('is_composing', false);
case COMPOSE_SENSITIVITY_CHANGE: case COMPOSE_SENSITIVITY_CHANGE:
return state.withMutations(map => { return state.withMutations(map => {
map.set('sensitive', !state.get('sensitive')); map.set('sensitive', !state.get('sensitive'));
map.set('idempotencyKey', uuid()); map.set('idempotencyKey', uuid());
}); });
case COMPOSE_TYPE_CHANGE: case COMPOSE_TYPE_CHANGE:

Wyświetl plik

@ -1,17 +1,21 @@
.status__content { .status__content {
p, li { p,
li {
strong { strong {
font-weight: bold; font-weight: bold;
} }
} }
p, li { p,
li {
em { em {
font-style: italic; font-style: italic;
} }
} }
ul, ol, blockquote { ul,
ol,
blockquote {
margin-bottom: 20px; margin-bottom: 20px;
margin-left: 15px; margin-left: 15px;
} }