feat(ui): enhance left sidebar (#2899)

* feat(ui): enhance left sidebar

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
This commit is contained in:
Charlie
2021-10-01 21:27:31 +08:00
committed by GitHub
parent 575e7f976b
commit 7f9a04d2c1
40 changed files with 885 additions and 457 deletions

View File

@@ -43,11 +43,11 @@
^{:before m/prevent-default-behavior}
{:pdf/previous-page
{:desc "Previous page of current pdf doc"
:binding "ctrl+p"
:binding "alt+p"
:fn pdf-utils/prev-page}
:pdf/next-page
{:desc "Next page of current pdf doc"
:binding "ctrl+n"
:binding "alt+n"
:fn pdf-utils/next-page}}
:shortcut.handler/auto-complete
@@ -142,7 +142,7 @@
:fn editor-handler/strike-through-format!}
:editor/move-block-up
{:desc "Move block up"
:binding (if mac? "mod+shift+up" "alt+shift+up")
:binding (if mac? "mod+shift+up" "alt+shift+up")
:fn (editor-handler/move-up-down true)}
:editor/move-block-down
{:desc "Move block down"
@@ -185,13 +185,13 @@
:binding (if mac? false "alt+w")
:fn editor-handler/backward-kill-word}
:editor/replace-block-reference-at-point
{:desc "Replace block reference with its content at point"
{:desc "Replace block reference with its content at point"
:binding "mod+shift+r"
:fn editor-handler/replace-block-reference-with-content-at-point}
:fn editor-handler/replace-block-reference-with-content-at-point}
:editor/paste-text-in-one-block-at-point
{:desc "Paste text into one block at point"
{:desc "Paste text into one block at point"
:binding "mod+shift+v"
:fn editor-handler/paste-text-in-one-block-at-point}
:fn editor-handler/paste-text-in-one-block-at-point}
:editor/insert-youtube-timestamp
{:desc "Insert youtube timestamp"
:binding "mod+shift+y"
@@ -264,7 +264,11 @@
:editor/redo
{:desc "Redo"
:binding ["shift+mod+z" "mod+y"]
:fn history/redo!}}
:fn history/redo!}
:editor/new-page
{:desc "New page"
:binding "mod+n"
:fn #(state/pub-event! [:modal/show-new-page-modal])}}
:shortcut.handler/global-prevent-default
^{:before m/prevent-default-behavior}
@@ -327,12 +331,12 @@
;; always overrides the copy due to "mod+c mod+s"
{:misc/copy
{:binding "mod+c"
:fn (fn [] (js/document.execCommand "copy"))}
:fn (fn [] (js/document.execCommand "copy"))}
:command-palette/toggle
{:desc "Toggle command palette"
{:desc "Toggle command palette"
:binding "mod+shift+p"
:fn (fn [] (state/toggle! :ui/command-palette-open?))}}
:fn (fn [] (state/toggle! :ui/command-palette-open?))}}
:shortcut.handler/global-non-editing-only
^{:before m/enable-when-not-editing-mode!}
@@ -360,6 +364,10 @@
{:desc "Toggle right sidebar"
:binding "t r"
:fn ui-handler/toggle-right-sidebar!}
:ui/toggle-left-sidebar
{:desc "Toggle left sidebar"
:binding "t l"
:fn ui-handler/toggle-left-sidebar!}
:ui/toggle-help
{:desc "Toggle help"
:binding "shift+/"
@@ -378,11 +386,11 @@
:fn ui-handler/toggle-wide-mode!}
:ui/select-theme-color
{:desc "Select available theme colors"
:binding "t i"
:binding "t i"
:fn plugin-handler/show-themes-modal!}
:ui/goto-plugins
{:desc "Go to plugins dashboard"
:binding "t p"
:binding "t p"
:fn plugin-handler/goto-plugins-dashboard!}
:editor/toggle-open-blocks
{:desc "Toggle open blocks (collapse or expand all blocks)"