fix: hide Edit page properties if there're class properties

This commit is contained in:
Tienson Qin
2023-11-08 13:56:34 +08:00
parent e0cbc963b0
commit bf41bd539d
2 changed files with 3 additions and 2 deletions

View File

@@ -377,7 +377,8 @@
(when (and class-or-property?
(not (property-handler/block-has-viewable-properties? page))
(not config/publishing?))
(not config/publishing?)
(empty? (:properties (:block/schema page))))
[:a.fade-link.flex.flex-row.items-center.gap-1.text-sm
{:on-click #(swap! *show-page-properties? not)}
(ui/icon (if @*show-page-properties?

View File

@@ -371,7 +371,7 @@
:close-modal? false
:show-new-when-not-exact-match? true
:exact-match-exclude-items exclude-properties
:input-default-placeholder "Add a property"
:input-default-placeholder "Add property"
:on-chosen (fn [{:keys [value]}]
(reset! *property-key value)
(add-property-from-dropdown entity value (assoc opts :*show-new-property-config? *show-new-property-config?)))