chore: add new whiteboard shortcut

This commit is contained in:
Konstantinos Kaloutas
2022-09-16 13:57:46 +03:00
parent 33edc94de3
commit bed8b0eb70
4 changed files with 16 additions and 9 deletions

View File

@@ -3,6 +3,7 @@
[frontend.db.model :as model]
[frontend.db.utils :as db-utils]
[frontend.handler.editor :as editor-handler]
[frontend.handler.route :as route-handler]
[frontend.modules.outliner.core :as outliner]
[frontend.modules.outliner.file :as outliner-file]
[frontend.state :as state]
@@ -153,6 +154,12 @@
(outliner-file/sync-to-file page-entity))))
tldr)))
(defn create-new-whiteboard!
[]
(let [name (str (d/squuid))]
(create-new-whiteboard-page! name)
(route-handler/redirect-to-whiteboard! name)))
(defn page-name->tldr!
([page-name]
(page-name->tldr! page-name nil))