fix: journal border

This commit is contained in:
Tienson Qin
2025-04-01 16:35:13 +08:00
parent b836bde0a3
commit 4706a33b3b
3 changed files with 13 additions and 15 deletions

View File

@@ -9,8 +9,10 @@
[rum.core :as rum]))
(rum/defc journal-cp < rum/static
[id]
[id last?]
[:div.journal-item.content
(when last?
{:class "journal-last-item"})
(page/page-cp {:db/id id})])
(rum/defc all-journals
@@ -30,5 +32,6 @@
(str "journal-" id)))
:total-count (count data)
:item-content (fn [idx]
(let [id (util/nth-safe data idx)]
(journal-cp id)))})]))
(let [id (util/nth-safe data idx)
last? (= (inc idx) (count data))]
(journal-cp id last?)))})]))

View File

@@ -11,9 +11,9 @@
&:first-child {
@apply pt-0 min-h-[500px];
}
}
&:last-child {
@apply border-none;
}
.journal-last-item {
@apply border-none;
}
}

View File

@@ -1162,13 +1162,8 @@
(p/let [block (db-async/<get-block (state/get-current-repo) db-id opts)]
(set-item! block))))
[db-id])
(item-render (cond
(map? item)
item
(number? item)
{:db/id item}
:else
nil))))
(when item
(item-render (cond (map? item) item (number? item) {:db/id item})))))
(rum/defc table-body < rum/static
[table option rows *scroller-ref *rows-wrap set-items-rendered!]
@@ -1635,8 +1630,8 @@
(if value
(let [c (state/get-component :block/page-cp)]
(c {:disable-preview? true} value))
[:div.text-muted-foreground
"Other pages"])
[:div.text-muted-foreground.text-sm
"Pages"])
(some? value)
(let [icon (pu/get-block-property-value value :logseq.property/icon)]