enhance: add tasks and assets to sidebar

Make useful new tag pages easier to discover
This commit is contained in:
Gabriel Horner
2024-10-14 11:24:36 -04:00
parent 3132c5c92e
commit cacb6c863d
2 changed files with 20 additions and 0 deletions

View File

@@ -354,6 +354,24 @@
:icon "calendar"
:shortcut :go/journals})))
(when db-based?
(let [tag-uuid (:block/uuid (db/entity :logseq.class/Task))]
(sidebar-item
{:class "task-view-nav"
:title (t :left-side-bar/tasks)
:href (rfe/href :page {:name tag-uuid})
:active (= (str tag-uuid) (get-in route-match [:path-params :name]))
:icon "hash"})))
(when db-based?
(let [tag-uuid (:block/uuid (db/entity :logseq.class/Asset))]
(sidebar-item
{:class "asset-view-nav"
:title (t :left-side-bar/assets)
:href (rfe/href :page {:name tag-uuid})
:active (= (str tag-uuid) (get-in route-match [:path-params :name]))
:icon "hash"})))
(when enable-whiteboards?
(when (or config/dev? (not db-based?))
(sidebar-item