enhance(logbook): add two-level options to show logbook

This PR offer two options to control when the logbook drawer shows in
your block.

- `:logbook/enabled-in-timestamped-blocks`: This option defaults to
true, which means that the logbook drawer will be visible in blocks
only with scheduled or deadline timestamp after timetracking.

- `:logbook/enabled-in-all-blocks`: This option defaults to
nil. Adding `:logbook/enabled-in-all-blocks true` to your config file
will enable the logbook shown-up for all blocks after timetracking.
This commit is contained in:
leizhe
2021-10-19 15:13:04 +08:00
committed by Tienson Qin
parent 1c3536198e
commit 5bccc545de

View File

@@ -2531,7 +2531,8 @@
(when (or (not= name "logbook")
(and
(= name "logbook")
(state/enable-timetracking?)))
(state/enable-timetracking?)
(:drawer/logbook (state/get-config))))
[:div.flex.flex-col
[:div.text-sm.mt-1.flex.flex-row
[:div.drawer {:data-drawer-name name}