fix(plugin): invalid readme for the web plugin

This commit is contained in:
charlie
2024-12-30 22:33:00 +08:00
parent 15f7b9c764
commit 72bf7093f3
2 changed files with 5 additions and 5 deletions

View File

@@ -200,9 +200,9 @@
:dangerouslySetInnerHTML {:__html content}}]]))
(rum/defc remote-readme-display
[repo _content]
[{:keys [repo]} _content]
(let [src (str "lsp://logseq.com/marketplace.html?repo=" repo)]
(let [src (str "./marketplace.html?repo=" repo)]
[:iframe.lsp-frame-readme {:src src}]))
(defn security-warning
@@ -300,9 +300,9 @@
true)]])
(defn get-open-plugin-readme-handler
[url item repo]
[url {:keys [webPkg] :as item} repo]
#(plugin-handler/open-readme!
url item (if repo remote-readme-display local-markdown-display)))
url item (if (or repo webPkg) remote-readme-display local-markdown-display)))
(rum/defc plugin-item-card < rum/static
[t {:keys [id name title version url description author icon iir repo sponsors webPkg] :as item}

View File

@@ -554,7 +554,7 @@
(p/catch #(do (js/console.warn %)
(notification/show! "No README content." :warning))))
;; market
(shui/dialog-open! (fn [_] (display repo nil)) {:label "plugin-readme"}))))
(shui/dialog-open! (fn [_] (display item nil)) {:label "plugin-readme"}))))
(defn load-unpacked-plugin
[]