From 839285485acc21c39df217094b8dcf14fa26fc83 Mon Sep 17 00:00:00 2001 From: CJSS Date: Mon, 24 Oct 2022 16:50:28 +0800 Subject: [PATCH 1/6] Update example-markdown.ts --- .../app/src/components/example-markdown.ts | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/app/src/components/example-markdown.ts b/packages/app/src/components/example-markdown.ts index 663c6965e7..a03e1ec33d 100644 --- a/packages/app/src/components/example-markdown.ts +++ b/packages/app/src/components/example-markdown.ts @@ -26,23 +26,23 @@ There also somethings you should consider about this AFFiNE Alpha including some **Keyboard Shortcuts:** -1. Undo: \`⌘ + Z\` or \`Ctrl+Z\` -2. Redo: \`⌘ + ⇧ + Z\` or \`Ctrl+Shift+Z\` -3. Bold: \`⌘ + B\` or \`Ctrl+B\` -4. Italic: \`⌘ + I\` or \`Ctrl+I\` -5. Underline: \`⌘ + U\` or \`Ctrl+U\` -6. Strikethrough: \`⌘ + ⇧ + S\` or \`Ctrl+Shift+S\` -7. Inline code: \`⌘ + E\` or \`Ctrl+E\` -8. Link: \`⌘ + K\` or \`Ctrl+K\` -9. Body text: \`⌘ + ⌥ + 0\` or \`Ctrl+Shift+0\` -10. Heading 1: \`⌘ + ⌥ + 1\` or \`Ctrl+Shift+1\` -11. Heading 2: \`⌘ + ⌥ + 2\` or \`Ctrl+Shift+2\` -12. Heading 3: \`⌘ + ⌥ + 3\` or \`Ctrl+Shift+3\` -13. Heading 4: \`⌘ + ⌥ + 4\` or \`Ctrl+Shift+4\` -14. Heading 5: \`⌘ + ⌥ + 5\` or \`Ctrl+Shift+5\` -15. Heading 6: \`⌘ + ⌥ + 6\` or \`Ctrl+Shift+6\` +1. Undo: \`⌘+Z\` or \`Ctrl+Z\` +2. Redo: \`⌘+⇧+Z\` or \`Ctrl+Shift+Z\` +3. Bold: \`⌘+B\` or \`Ctrl+B\` +4. Italic: \`⌘+I\` or \`Ctrl+I\` +5. Underline: \`⌘+U\` or \`Ctrl+U\` +6. Strikethrough: \`⌘+⇧+S\` or \`Ctrl+Shift+S\` +7. Inline code: \`⌘+E\` or \`Ctrl+E\` +8. Link: \`⌘+K\` or \`Ctrl+K\` +9. Body text: \`⌘+⌥+0\` or \`Ctrl+Shift+0\` +10. Heading 1: \`⌘+⌥+1\` or \`Ctrl+Shift+1\` +11. Heading 2: \`⌘+⌥+2\` or \`Ctrl+Shift+2\` +12. Heading 3: \`⌘+⌥+3\` or \`Ctrl+Shift+3\` +13. Heading 4: \`⌘+⌥+4\` or \`Ctrl+Shift+4\` +14. Heading 5: \`⌘+⌥+5\` or \`Ctrl+Shift+5\` +15. Heading 6: \`⌘+⌥+6\` or \`Ctrl+Shift+6\` 16. Increase indent: \`Tab\` -17. Reduce indent: \`⇧ + Tab\` or \`Shift+Tab\` +17. Reduce indent: \`⇧+Tab\` or \`Shift+Tab\` _Markdown Syntax:_ From 541b895d153c7c4bf58888a3fb49f587ccc9c1c9 Mon Sep 17 00:00:00 2001 From: CJSS Date: Mon, 24 Oct 2022 16:54:49 +0800 Subject: [PATCH 2/6] Update config.ts --- .../src/components/shortcuts-modal/config.ts | 131 +++++++++--------- 1 file changed, 66 insertions(+), 65 deletions(-) diff --git a/packages/app/src/components/shortcuts-modal/config.ts b/packages/app/src/components/shortcuts-modal/config.ts index 26b9ea6555..826cec6d4d 100644 --- a/packages/app/src/components/shortcuts-modal/config.ts +++ b/packages/app/src/components/shortcuts-modal/config.ts @@ -1,66 +1,67 @@ export const macKeyboardShortcuts = { - Undo: '⌘ + Z', - Redo: '⌘ + ⇧ + Z', - Bold: '⌘ + B', - Italic: '⌘ + I', - Underline: '⌘ + U', - Strikethrough: '⌘ + ⇧ + S', - 'Inline code': ' ⌘ + E', - Link: '⌘ + K', - 'Body text': '⌘ + ⌥ + 0', - 'Heading 1': '⌘ + ⌥ + 1', - 'Heading 2': '⌘ + ⌥ + 2', - 'Heading 3': '⌘ + ⌥ + 3', - 'Heading 4': '⌘ + ⌥ + 4', - 'Heading 5': '⌘ + ⌥ + 5', - 'Heading 6': '⌘ + ⌥ + 6', - 'Increase indent': 'Tab', - 'Reduce indent': '⇧ + Tab', -}; - -export const macMarkdownShortcuts = { - Bold: '**Text** ', - Italic: '*Text* ', - Underline: '~Text~ ', - Strikethrough: '~~Text~~ ', - 'Inline code': '`Code` ', - 'Heading 1': '# ', - 'Heading 2': '## ', - 'Heading 3': '### ', - 'Heading 4': '#### ', - 'Heading 5': '##### ', - 'Heading 6': '###### ', -}; - -export const windowsKeyboardShortcuts = { - Undo: 'Ctrl + Z', - Redo: 'Ctrl + Y', - Bold: 'Ctrl + B', - Italic: 'Ctrl + I', - Underline: 'Ctrl + U', - Strikethrough: 'Ctrl + Shift + S', - 'Inline code': ' Ctrl + E', - Link: 'Ctrl + K', - 'Body text': 'Ctrl + Shift + 0', - 'Heading 1': 'Ctrl + Shift + 1', - 'Heading 2': 'Ctrl + Shift + 2', - 'Heading 3': 'Ctrl + Shift + 3', - 'Heading 4': 'Ctrl + Shift + 4', - 'Heading 5': 'Ctrl + Shift + 5', - 'Heading 6': 'Ctrl + Shift + 6', - 'Increase indent': 'Tab', - 'Reduce indent': 'Shift + Tab', -}; -export const winMarkdownShortcuts = { - Bold: '**Text** ', - Italic: '*Text* ', - Underline: '~Text~ ', - Strikethrough: '~~Text~~ ', - 'Inline code': '`Code` ', - 'Heading 1': '# ', - 'Heading 2': '## ', - 'Heading 3': '### ', - 'Heading 4': '#### ', - 'Heading 5': '##### ', - 'Heading 6': '###### ', -}; + Undo: '⌘+Z', + Redo: '⌘+⇧+Z', + Bold: '⌘+B', + Italic: '⌘+I', + Underline: '⌘+U', + Strikethrough: '⌘+⇧+S', + 'Inline code': ' ⌘+E', + Link: '⌘+K', + 'Body text': '⌘+⌥+0', + 'Heading 1': '⌘+⌥+1', + 'Heading 2': '⌘+⌥+2', + 'Heading 3': '⌘+⌥+3', + 'Heading 4': '⌘+⌥+4', + 'Heading 5': '⌘+⌥+5', + 'Heading 6': '⌘+⌥+6', + 'Increase indent': 'Tab', + 'Reduce indent': '⇧+Tab', + }; + + export const macMarkdownShortcuts = { + Bold: '**Text** ', + Italic: '*Text* ', + Underline: '~Text~ ', + Strikethrough: '~~Text~~ ', + 'Inline code': '`Text` ', + 'Heading 1': '# Text', + 'Heading 2': '## Text', + 'Heading 3': '### Text', + 'Heading 4': '#### Text', + 'Heading 5': '##### Text', + 'Heading 6': '###### Text', + }; + + export const windowsKeyboardShortcuts = { + Undo: 'Ctrl+Z', + Redo: 'Ctrl+Y', + Bold: 'Ctrl+B', + Italic: 'Ctrl+I', + Underline: 'Ctrl+U', + Strikethrough: 'Ctrl+Shift+S', + 'Inline code': ' Ctrl+E', + Link: 'Ctrl+K', + 'Body text': 'Ctrl+Shift+0', + 'Heading 1': 'Ctrl+Shift+1', + 'Heading 2': 'Ctrl+Shift+2', + 'Heading 3': 'Ctrl+Shift+3', + 'Heading 4': 'Ctrl+Shift+4', + 'Heading 5': 'Ctrl+Shift+5', + 'Heading 6': 'Ctrl+Shift+6', + 'Increase indent': 'Tab', + 'Reduce indent': 'Shift+Tab', + }; + export const winMarkdownShortcuts = { + Bold: '**Text** ', + Italic: '*Text* ', + Underline: '~Text~ ', + Strikethrough: '~~Text~~ ', + 'Inline code': '`Text` ', + 'Heading 1': '# Text', + 'Heading 2': '## Text', + 'Heading 3': '### Text', + 'Heading 4': '#### Text', + 'Heading 5': '##### Text', + 'Heading 6': '###### Text', + }; + From 572f29e3cdb992e4ae0885174c661cd3bc92f679 Mon Sep 17 00:00:00 2001 From: fyZheng07 <63830919+fyZheng07@users.noreply.github.com> Date: Mon, 24 Oct 2022 16:56:08 +0800 Subject: [PATCH 3/6] userguide style change --- packages/app/src/components/example-markdown.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/app/src/components/example-markdown.ts b/packages/app/src/components/example-markdown.ts index a03e1ec33d..fd1ca5ba3a 100644 --- a/packages/app/src/components/example-markdown.ts +++ b/packages/app/src/components/example-markdown.ts @@ -1,18 +1,18 @@ -const exampleMarkdown = `The [AFFiNE Alpha](https://pathfinder.affine.systems/) is here! 👏 +const exampleMarkdown = `The AFFiNE Alpha is here! You can also view our [Official Website](https://affine.pro/)! **What's different in AFFiNE Alpha?** 1. A much ~smoother editing~ experience, with much ~greater stability~; 2. More complete ~Markdown~ support and improved ~keyboard shortcuts~; -3. New features such as ~dark mode~ +3. New features such as ~dark mode~; * **Switch between view styles using the** ☀ **and** 🌙. 4. ~Clean and modern UI/UX~ design. **Looking for Markdown syntax or keyboard shortcuts?** -* Find the (?) in the bottom right, then the ️, to view a full list. of \`Keyboard Shortcuts\` +* Find the (?) in the bottom right, then the ️⌨️, to view a full list of \`Keyboard Shortcuts\` -**Have an enjoyable editing experience !!!** **😃** +**Have an enjoyable editing experience !!!** 😃 Have some feedback or just want to get in touch? Use the (?), then 🎧 to get in touch and join our communities. @@ -21,7 +21,7 @@ Have some feedback or just want to get in touch? Use the (?), then 🎧 to get i There also somethings you should consider about this AFFiNE Alpha including some ~limitations~: * Single page editing - currently editing multiple docs/pages is not supported; -* Changes are not automatically stored, to save changes you should export your data. Options can be found by going to the top right and finding the \`⋮\` icon. +* Changes are not automatically stored, to save changes you should export your data. Options can be found by going to the top right and finding the \`⋮\` icon; * Without an import/open feature you are still able to access your data by copying it back in. **Keyboard Shortcuts:** @@ -44,7 +44,7 @@ There also somethings you should consider about this AFFiNE Alpha including some 16. Increase indent: \`Tab\` 17. Reduce indent: \`⇧+Tab\` or \`Shift+Tab\` -_Markdown Syntax:_ +**Markdown Syntax:** 1. Bold: \`**text**\` 2. Italic: \`*text*\` From 4b94694a26aa560aa39165de5c0ae9103c49460d Mon Sep 17 00:00:00 2001 From: CJSS Date: Mon, 24 Oct 2022 17:00:47 +0800 Subject: [PATCH 4/6] Update example-markdown.ts --- packages/app/src/components/example-markdown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/components/example-markdown.ts b/packages/app/src/components/example-markdown.ts index fd1ca5ba3a..ce0cb31a87 100644 --- a/packages/app/src/components/example-markdown.ts +++ b/packages/app/src/components/example-markdown.ts @@ -18,7 +18,7 @@ Have some feedback or just want to get in touch? Use the (?), then 🎧 to get i **Still in development** -There also somethings you should consider about this AFFiNE Alpha including some ~limitations~: +There are also some things you should consider about this AFFiNE Alpha including some ~limitations~: * Single page editing - currently editing multiple docs/pages is not supported; * Changes are not automatically stored, to save changes you should export your data. Options can be found by going to the top right and finding the \`⋮\` icon; From 422678dfdf50fbc5c931af8d8dc5bd7ecfa74fa8 Mon Sep 17 00:00:00 2001 From: CJSS Date: Mon, 24 Oct 2022 17:23:57 +0800 Subject: [PATCH 5/6] Update example-markdown.ts --- packages/app/src/components/example-markdown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/components/example-markdown.ts b/packages/app/src/components/example-markdown.ts index ce0cb31a87..0e267cb6ec 100644 --- a/packages/app/src/components/example-markdown.ts +++ b/packages/app/src/components/example-markdown.ts @@ -21,7 +21,7 @@ Have some feedback or just want to get in touch? Use the (?), then 🎧 to get i There are also some things you should consider about this AFFiNE Alpha including some ~limitations~: * Single page editing - currently editing multiple docs/pages is not supported; -* Changes are not automatically stored, to save changes you should export your data. Options can be found by going to the top right and finding the \`⋮\` icon; +* Changes are not automatically stored, to save changes you should export your data. Options can be found by going to the top right and finding the \`⋮\` icon; * Without an import/open feature you are still able to access your data by copying it back in. **Keyboard Shortcuts:** From fb4387ddbbe539960ea40ea18bcb8e294d3adc77 Mon Sep 17 00:00:00 2001 From: QiShaoXuan Date: Mon, 24 Oct 2022 18:16:54 +0800 Subject: [PATCH 6/6] fix: lint problems --- .../src/components/shortcuts-modal/config.ts | 131 +++++++++--------- 1 file changed, 65 insertions(+), 66 deletions(-) diff --git a/packages/app/src/components/shortcuts-modal/config.ts b/packages/app/src/components/shortcuts-modal/config.ts index 826cec6d4d..5638268a99 100644 --- a/packages/app/src/components/shortcuts-modal/config.ts +++ b/packages/app/src/components/shortcuts-modal/config.ts @@ -1,67 +1,66 @@ export const macKeyboardShortcuts = { - Undo: '⌘+Z', - Redo: '⌘+⇧+Z', - Bold: '⌘+B', - Italic: '⌘+I', - Underline: '⌘+U', - Strikethrough: '⌘+⇧+S', - 'Inline code': ' ⌘+E', - Link: '⌘+K', - 'Body text': '⌘+⌥+0', - 'Heading 1': '⌘+⌥+1', - 'Heading 2': '⌘+⌥+2', - 'Heading 3': '⌘+⌥+3', - 'Heading 4': '⌘+⌥+4', - 'Heading 5': '⌘+⌥+5', - 'Heading 6': '⌘+⌥+6', - 'Increase indent': 'Tab', - 'Reduce indent': '⇧+Tab', - }; - - export const macMarkdownShortcuts = { - Bold: '**Text** ', - Italic: '*Text* ', - Underline: '~Text~ ', - Strikethrough: '~~Text~~ ', - 'Inline code': '`Text` ', - 'Heading 1': '# Text', - 'Heading 2': '## Text', - 'Heading 3': '### Text', - 'Heading 4': '#### Text', - 'Heading 5': '##### Text', - 'Heading 6': '###### Text', - }; - - export const windowsKeyboardShortcuts = { - Undo: 'Ctrl+Z', - Redo: 'Ctrl+Y', - Bold: 'Ctrl+B', - Italic: 'Ctrl+I', - Underline: 'Ctrl+U', - Strikethrough: 'Ctrl+Shift+S', - 'Inline code': ' Ctrl+E', - Link: 'Ctrl+K', - 'Body text': 'Ctrl+Shift+0', - 'Heading 1': 'Ctrl+Shift+1', - 'Heading 2': 'Ctrl+Shift+2', - 'Heading 3': 'Ctrl+Shift+3', - 'Heading 4': 'Ctrl+Shift+4', - 'Heading 5': 'Ctrl+Shift+5', - 'Heading 6': 'Ctrl+Shift+6', - 'Increase indent': 'Tab', - 'Reduce indent': 'Shift+Tab', - }; - export const winMarkdownShortcuts = { - Bold: '**Text** ', - Italic: '*Text* ', - Underline: '~Text~ ', - Strikethrough: '~~Text~~ ', - 'Inline code': '`Text` ', - 'Heading 1': '# Text', - 'Heading 2': '## Text', - 'Heading 3': '### Text', - 'Heading 4': '#### Text', - 'Heading 5': '##### Text', - 'Heading 6': '###### Text', - }; - + Undo: '⌘+Z', + Redo: '⌘+⇧+Z', + Bold: '⌘+B', + Italic: '⌘+I', + Underline: '⌘+U', + Strikethrough: '⌘+⇧+S', + 'Inline code': ' ⌘+E', + Link: '⌘+K', + 'Body text': '⌘+⌥+0', + 'Heading 1': '⌘+⌥+1', + 'Heading 2': '⌘+⌥+2', + 'Heading 3': '⌘+⌥+3', + 'Heading 4': '⌘+⌥+4', + 'Heading 5': '⌘+⌥+5', + 'Heading 6': '⌘+⌥+6', + 'Increase indent': 'Tab', + 'Reduce indent': '⇧+Tab', +}; + +export const macMarkdownShortcuts = { + Bold: '**Text** ', + Italic: '*Text* ', + Underline: '~Text~ ', + Strikethrough: '~~Text~~ ', + 'Inline code': '`Text` ', + 'Heading 1': '# Text', + 'Heading 2': '## Text', + 'Heading 3': '### Text', + 'Heading 4': '#### Text', + 'Heading 5': '##### Text', + 'Heading 6': '###### Text', +}; + +export const windowsKeyboardShortcuts = { + Undo: 'Ctrl+Z', + Redo: 'Ctrl+Y', + Bold: 'Ctrl+B', + Italic: 'Ctrl+I', + Underline: 'Ctrl+U', + Strikethrough: 'Ctrl+Shift+S', + 'Inline code': ' Ctrl+E', + Link: 'Ctrl+K', + 'Body text': 'Ctrl+Shift+0', + 'Heading 1': 'Ctrl+Shift+1', + 'Heading 2': 'Ctrl+Shift+2', + 'Heading 3': 'Ctrl+Shift+3', + 'Heading 4': 'Ctrl+Shift+4', + 'Heading 5': 'Ctrl+Shift+5', + 'Heading 6': 'Ctrl+Shift+6', + 'Increase indent': 'Tab', + 'Reduce indent': 'Shift+Tab', +}; +export const winMarkdownShortcuts = { + Bold: '**Text** ', + Italic: '*Text* ', + Underline: '~Text~ ', + Strikethrough: '~~Text~~ ', + 'Inline code': '`Text` ', + 'Heading 1': '# Text', + 'Heading 2': '## Text', + 'Heading 3': '### Text', + 'Heading 4': '#### Text', + 'Heading 5': '##### Text', + 'Heading 6': '###### Text', +};