enhance(plugin): add report plugin entrances for the Marketplace.

This commit is contained in:
charlie
2024-08-29 16:26:42 +08:00
parent 93ba8fafa7
commit 99eda538ab
3 changed files with 25 additions and 2 deletions

View File

@@ -477,6 +477,23 @@
(state/pub-event! [:go/plugins-settings id nav? (or (:name plugin) (:title plugin))])
(open-settings-file-in-default-app! plugin)))))
(defn open-report-modal!
([] (open-report-modal! nil nil))
([pid name]
(shui/dialog-open!
[:div.p-1
(when pid
[:h1.opacity-90.font-bold.pb-1.flex.item-center.gap-1
[:span.text-red-rx-10.flex.items-center (shui/tabler-icon "alert-triangle-filled" {:size 20})]
[:span name " " [:code "#" (str pid)]]])
[:p
"If any plugin is unavailable or you think it contains malicious code,
please email " [:a.hover:underline {:href (str "mailto://support@logseq.com?subject=Report plugin from Logseq Marketplace"
(when pid (str " (#" pid ")")))} "support@logseq.com"]
" . Mention the name of the plugin and the URL of its GitHub repository.
The Logseq team usually responds within a business day."]
])))
(defn parse-user-md-content
[content {:keys [url]}]
(try