mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
fixed requested changes
This commit is contained in:
@@ -295,7 +295,7 @@ export default class CodeEditor extends React.Component {
|
||||
inputStyle: 'textarea',
|
||||
dragDrop: false,
|
||||
direction: RTL ? 'rtl' : 'ltr',
|
||||
rtlMoveVisually: RTL ? 'true' : 'false',
|
||||
rtlMoveVisually: RTL,
|
||||
foldGutter: true,
|
||||
lint: enableMarkdownLint ? this.getCodeEditorLintConfig() : false,
|
||||
gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter', 'CodeMirror-lint-markers'],
|
||||
@@ -559,7 +559,7 @@ export default class CodeEditor extends React.Component {
|
||||
}
|
||||
if (prevProps.RTL !== this.props.RTL) {
|
||||
this.editor.setOption('direction', this.props.RTL ? 'rtl' : 'ltr')
|
||||
this.editor.setOption('rtlMoveVisually', this.props.RTL ? 'true' : 'false')
|
||||
this.editor.setOption('rtlMoveVisually', this.props.RTL)
|
||||
}
|
||||
if (prevProps.enableMarkdownLint !== enableMarkdownLint || prevProps.customMarkdownLintConfig !== customMarkdownLintConfig) {
|
||||
if (!enableMarkdownLint) {
|
||||
|
||||
@@ -107,8 +107,6 @@ body {
|
||||
${optimizeOverflowScroll ? 'height: 100%;' : ''}
|
||||
${RTL ? 'direction: rtl;' : ''}
|
||||
${RTL ? 'text-align: right;' : ''}
|
||||
|
||||
|
||||
}
|
||||
@media print {
|
||||
body {
|
||||
|
||||
@@ -484,7 +484,7 @@ class MarkdownNoteDetail extends React.Component {
|
||||
</div>
|
||||
<div styleName='info-right'>
|
||||
<ToggleModeButton onClick={(e) => this.handleSwitchMode(e)} editorType={editorType} />
|
||||
<ToggleDirectionButton onClick={(e) => this.handleSwitchDirection(e)} editorDirection={this.state.RTL} />
|
||||
<ToggleDirectionButton onClick={(e) => this.handleSwitchDirection(e)} isRTL={this.state.RTL} />
|
||||
<StarButton
|
||||
onClick={(e) => this.handleStarButtonClick(e)}
|
||||
isActive={note.isStarred}
|
||||
|
||||
@@ -5,14 +5,14 @@ import styles from './ToggleDirectionButton.styl'
|
||||
import i18n from 'browser/lib/i18n'
|
||||
|
||||
const ToggleDirectionButton = ({
|
||||
onClick, editorDirection
|
||||
onClick, isRTL
|
||||
}) => (
|
||||
<div styleName='control-toggleModeButton'>
|
||||
<div styleName={editorDirection ? 'active' : undefined} onClick={() => onClick()}>
|
||||
<img src={!editorDirection ? '../resources/icon/icon-left-to-right.svg' : ''} />
|
||||
<div styleName={isRTL ? 'active' : undefined} onClick={() => onClick()}>
|
||||
<img src={!isRTL ? '../resources/icon/icon-left-to-right.svg' : ''} />
|
||||
</div>
|
||||
<div styleName={!editorDirection ? 'active' : undefined} onClick={() => onClick()}>
|
||||
<img src={!editorDirection ? '' : '../resources/icon/icon-right-to-left.svg'} />
|
||||
<div styleName={!isRTL ? 'active' : undefined} onClick={() => onClick()}>
|
||||
<img src={!isRTL ? '' : '../resources/icon/icon-right-to-left.svg'} />
|
||||
</div>
|
||||
<span lang={i18n.locale} styleName='tooltip'>{i18n.__('Toggle Direction')}</span>
|
||||
</div>
|
||||
@@ -20,7 +20,7 @@ const ToggleDirectionButton = ({
|
||||
|
||||
ToggleDirectionButton.propTypes = {
|
||||
onClick: PropTypes.func.isRequired,
|
||||
editorDirection: PropTypes.string.isRequired
|
||||
isRTL: PropTypes.string.isRequired
|
||||
}
|
||||
|
||||
export default CSSModules(ToggleDirectionButton, styles)
|
||||
|
||||
Reference in New Issue
Block a user