mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 14:14:55 +00:00
Fixed unpublish issue
This commit is contained in:
@@ -57,22 +57,23 @@
|
||||
today? (= (string/lower-case title)
|
||||
(string/lower-case (date/journal-name)))]
|
||||
[:div.flex-1
|
||||
[:a.initial-color {:href (str "/page/" encoded-page-name)
|
||||
:on-click (fn [e]
|
||||
(util/stop e)
|
||||
(when (gobj/get e "shiftKey")
|
||||
(when-let [page (db/pull [:page/name title])]
|
||||
(state/sidebar-add-block!
|
||||
(state/get-current-repo)
|
||||
(:db/id page)
|
||||
:page
|
||||
{:page page
|
||||
:journal? true}))
|
||||
(handler/show-right-sidebar)))}
|
||||
[:h1.title
|
||||
(util/capitalize-all title)]]
|
||||
(ui/foldable
|
||||
[:a.initial-color {:href (str "/page/" encoded-page-name)
|
||||
:on-click (fn [e]
|
||||
(util/stop e)
|
||||
(when (gobj/get e "shiftKey")
|
||||
(when-let [page (db/pull [:page/name title])]
|
||||
(state/sidebar-add-block!
|
||||
(state/get-current-repo)
|
||||
(:db/id page)
|
||||
:page
|
||||
{:page page
|
||||
:journal? true}))
|
||||
(handler/show-right-sidebar)))}
|
||||
[:h1.title
|
||||
(util/capitalize-all title)]]
|
||||
|
||||
(headings-cp repo page encoded-page-name format)
|
||||
(headings-cp repo page encoded-page-name format))
|
||||
|
||||
(page/today-queries repo today? false)
|
||||
|
||||
|
||||
@@ -63,4 +63,5 @@
|
||||
:group-by-page? true}
|
||||
{})]
|
||||
(content/content encoded-page-name
|
||||
{:hiccup ref-hiccup})))]))))
|
||||
{:hiccup ref-hiccup}))
|
||||
true)]))))
|
||||
|
||||
@@ -160,9 +160,10 @@
|
||||
[page-name]
|
||||
(page-add-directives! page-name {"published" false})
|
||||
(let [directives (db/get-page-directives page-name)
|
||||
permalink (:permalink directives)]
|
||||
(if permalink
|
||||
(util/delete (str config/api "pages/" permalink)
|
||||
permalink (:permalink directives)
|
||||
project (state/get-current-project)]
|
||||
(if (and project permalink)
|
||||
(util/delete (str config/api project "/" permalink)
|
||||
(unpublished-success-handler page-name)
|
||||
unpublished-failed-handler)
|
||||
(handler/show-notification!
|
||||
|
||||
Reference in New Issue
Block a user