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