1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

added rtl toggle button

This commit is contained in:
Itai Braude
2019-10-17 21:04:00 +03:00
parent e34485eb83
commit b22b09a93d
4 changed files with 8 additions and 9 deletions

View File

@@ -539,7 +539,7 @@ export default class CodeEditor extends React.Component {
rulers, rulers,
enableRulers, enableRulers,
enableMarkdownLint, enableMarkdownLint,
customMarkdownLintConfig, customMarkdownLintConfig
} = this.props } = this.props
if (prevProps.mode !== this.props.mode) { if (prevProps.mode !== this.props.mode) {
this.setMode(this.props.mode) this.setMode(this.props.mode)
@@ -558,8 +558,8 @@ export default class CodeEditor extends React.Component {
needRefresh = true needRefresh = true
} }
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 ? 'true' : 'false')
} }
if (prevProps.enableMarkdownLint !== enableMarkdownLint || prevProps.customMarkdownLintConfig !== customMarkdownLintConfig) { if (prevProps.enableMarkdownLint !== enableMarkdownLint || prevProps.customMarkdownLintConfig !== customMarkdownLintConfig) {
if (!enableMarkdownLint) { if (!enableMarkdownLint) {

View File

@@ -31,7 +31,7 @@ import { confirmDeleteNote } from 'browser/lib/confirmDeleteNote'
import markdownToc from 'browser/lib/markdown-toc-generator' import markdownToc from 'browser/lib/markdown-toc-generator'
import queryString from 'query-string' import queryString from 'query-string'
import { replace } from 'connected-react-router' import { replace } from 'connected-react-router'
import ToggleDirectionButton from "browser/main/Detail/ToggleDirectionButton"; import ToggleDirectionButton from 'browser/main/Detail/ToggleDirectionButton'
class MarkdownNoteDetail extends React.Component { class MarkdownNoteDetail extends React.Component {
constructor (props) { constructor (props) {
@@ -358,7 +358,7 @@ class MarkdownNoteDetail extends React.Component {
handleSwitchDirection () { handleSwitchDirection () {
// If in split mode, hide the lock button // If in split mode, hide the lock button
let direction = this.state.RTL const direction = this.state.RTL
this.setState({ RTL: !direction }) this.setState({ RTL: !direction })
} }
@@ -529,7 +529,6 @@ class MarkdownNoteDetail extends React.Component {
/> />
</div> </div>
</div> </div>
return ( return (

View File

@@ -212,7 +212,7 @@
}, },
"husky": { "husky": {
"hooks": { "hooks": {
"pre-commit": "" "pre-commit": "npm run lint"
} }
} }
} }