-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add Date shortcut ISO 8601 format as an option in preference #3094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
6e45ee6
80a63f7
928e0ed
f64d0b3
bdfe8c0
b84f117
2b3538d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -321,6 +321,8 @@ class MarkdownEditor extends React.Component { | |
| switchPreview={config.editor.switchPreview} | ||
| enableMarkdownLint={config.editor.enableMarkdownLint} | ||
| customMarkdownLintConfig={config.editor.customMarkdownLintConfig} | ||
| // dateISO8601={config.ui.dateFormatISO8601} | ||
|
||
| dateFormatISO8601={config.editor.dateFormatISO8601} | ||
| /> | ||
| <MarkdownPreview styleName={this.state.status === 'PREVIEW' | ||
| ? 'preview' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,6 +181,8 @@ class MarkdownSplitEditor extends React.Component { | |
| switchPreview={config.editor.switchPreview} | ||
| enableMarkdownLint={config.editor.enableMarkdownLint} | ||
| customMarkdownLintConfig={config.editor.customMarkdownLintConfig} | ||
| // dateISO8601={config.ui.dateFormatISO8601} | ||
|
||
| dateFormatISO8601={config.editor.dateFormatISO8601} | ||
| /> | ||
| <div styleName='slider' style={{left: this.state.codeEditorWidthInPercent + '%'}} onMouseDown={e => this.handleMouseDown(e)} > | ||
| <div styleName='slider-hitbox' /> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -738,6 +738,8 @@ class SnippetNoteDetail extends React.Component { | |
| enableSmartPaste={config.editor.enableSmartPaste} | ||
| hotkey={config.hotkey} | ||
| autoDetect={autoDetect} | ||
| // dateISO8601={config.ui.dateFormatISO8601} | ||
|
||
| dateFormatISO8601={config.editor.dateFormatISO8601} | ||
| /> | ||
| } | ||
| </div> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,7 @@ export const DEFAULT_CONFIG = { | |
| disableDirectWrite: false, | ||
| defaultNote: 'ALWAYS_ASK', // 'ALWAYS_ASK', 'SNIPPET_NOTE', 'MARKDOWN_NOTE' | ||
| showMenuBar: false | ||
| // dateFormatISO8601: false | ||
|
||
| }, | ||
| editor: { | ||
| theme: 'base16-light', | ||
|
|
@@ -65,7 +66,8 @@ export const DEFAULT_CONFIG = { | |
| spellcheck: false, | ||
| enableSmartPaste: false, | ||
| enableMarkdownLint: false, | ||
| customMarkdownLintConfig: DEFAULT_MARKDOWN_LINT_CONFIG | ||
| customMarkdownLintConfig: DEFAULT_MARKDOWN_LINT_CONFIG, | ||
| dateFormatISO8601: false | ||
| }, | ||
| preview: { | ||
| fontSize: '14', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,6 +78,7 @@ class UiTab extends React.Component { | |
| saveTagsAlphabetically: this.refs.saveTagsAlphabetically.checked, | ||
| enableLiveNoteCounts: this.refs.enableLiveNoteCounts.checked, | ||
| showMenuBar: this.refs.showMenuBar.checked, | ||
| // dateFormatISO8601: this.refs.dateFormatISO8601.checked, | ||
|
||
| disableDirectWrite: this.refs.uiD2w != null | ||
| ? this.refs.uiD2w.checked | ||
| : false | ||
|
|
@@ -105,7 +106,8 @@ class UiTab extends React.Component { | |
| spellcheck: this.refs.spellcheck.checked, | ||
| enableSmartPaste: this.refs.enableSmartPaste.checked, | ||
| enableMarkdownLint: this.refs.enableMarkdownLint.checked, | ||
| customMarkdownLintConfig: this.customMarkdownLintConfigCM.getCodeMirror().getValue() | ||
| customMarkdownLintConfig: this.customMarkdownLintConfigCM.getCodeMirror().getValue(), | ||
| dateFormatISO8601: this.refs.dateFormatISO8601.checked | ||
| }, | ||
| preview: { | ||
| fontSize: this.refs.previewFontSize.value, | ||
|
|
@@ -293,7 +295,16 @@ class UiTab extends React.Component { | |
| </div> | ||
| : null | ||
| } | ||
|
|
||
| {/* <div styleName='group-checkBoxSection'> | ||
|
||
| <label> | ||
| <input onChange={(e) => this.handleUIChange(e)} | ||
| checked={this.state.config.ui.dateFormatISO8601} | ||
| ref='dateFormatISO8601' | ||
| type='checkbox' | ||
| /> | ||
| {i18n.__('Date shortcut use iso 8601 format')} | ||
| </label> | ||
| </div> */} | ||
| <div styleName='group-header2'>Tags</div> | ||
|
|
||
| <div styleName='group-checkBoxSection'> | ||
|
|
@@ -600,6 +611,17 @@ class UiTab extends React.Component { | |
| </label> | ||
| </div> | ||
|
|
||
| <div styleName='group-checkBoxSection'> | ||
| <label> | ||
| <input onChange={(e) => this.handleUIChange(e)} | ||
| checked={this.state.config.editor.dateFormatISO8601} | ||
| ref='dateFormatISO8601' | ||
| type='checkbox' | ||
| /> | ||
| {i18n.__('Date shortcut use iso 8601 format')} | ||
| </label> | ||
| </div> | ||
|
|
||
| <div styleName='group-section'> | ||
| <div styleName='group-section-label'> | ||
| {i18n.__('Matching character pairs')} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should remove the code for
Cmd-/andShift-Ctrl-/and replace that with[translateHotkey(hotkey.insertDateTime)]. You code should be something like this: