enhance(plugin): add support for DB graphs in plugin UI

This commit is contained in:
charlie
2026-01-14 11:05:31 +08:00
parent 5138f0c58b
commit 6be47c18be
3 changed files with 22 additions and 2 deletions

View File

@@ -338,7 +338,7 @@
[:div.r
[:h3.head.text-xl.font-bold.pt-1.5
{:title name}
[:span.l.link-block.cursor-pointer
{:on-click (get-open-plugin-readme-handler url item repo)}
name]
@@ -361,7 +361,14 @@
(str "ID: " id)]]]
;; Github repo
[:div.flag.is-top.opacity-50
[:div.flag.is-top.flex.items-center.space-x-2
(cond
(false? (:supportsDB item))
[:a.flex.cursor-help {:title "Not supports DB graph"}
(shui/tabler-icon "database-off" {:size 17})]
(true? (:supportsDB item))
[:a.flex.cursor-help {:title "Supports DB graph"}
(shui/tabler-icon "database-heart" {:size 17})])
(when repo
[:a.flex {:target "_blank"
:href (plugin-handler/gh-repo-url repo)}
@@ -671,6 +678,10 @@
:options {:on-click #(reset! *sort-by :letters)}
:icon (ui/icon (aim-icon :letters))}
{:title (t :plugin/supports-db)
:options {:on-click #(reset! *sort-by :supportsDB)}
:icon (ui/icon (aim-icon :supportsDB))}
{:title (t :plugin/date-added)
:options {:on-click #(reset! *sort-by :addedAt)}
:icon (ui/icon (aim-icon :addedAt))}]]

View File

@@ -192,6 +192,14 @@
overflow: hidden;
line-height: 24px;
padding-right: 24px;
> .l {
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 92%;
}
}
.desc {

View File

@@ -325,6 +325,7 @@
:plugin/marketplace "Marketplace"
:plugin/downloads "Downloads"
:plugin/date-added "Newly added"
:plugin/supports-db "Supports DB graphs"
:plugin/popular "Popular"
:plugin/stars "Stars"
:plugin/title "Title ({1})"