fix: when publishing display page properties before class ones

Emphasis should be on the few page properties when reading about a page.
This was the behavior before properties got moved to configure modal
This commit is contained in:
Gabriel Horner
2023-11-08 08:39:11 -05:00
parent ddc34692ef
commit 1fb9d35e0d

View File

@@ -580,26 +580,47 @@
page
(str edit-input-id-prefix "-page")
(assoc configure-opts :class-schema? false))])
[:div.flex.flex-col.gap-4
(when has-class-properties?
[:div
(when has-viewable-properties?
[:div.mb-1.opacity-70.font-medium.text-sm "Class properties:"])
(component-block/db-properties-cp {:editor-box editor/box}
page
(str edit-input-id-prefix "-schema")
(assoc configure-opts :class-schema? true))])
(if config/publishing?
[:div.flex.flex-col.gap-4
(when has-viewable-properties?
[:div
(when has-class-properties?
[:div.mb-1.opacity-70.font-medium.text-sm "Page properties:"])
(component-block/db-properties-cp {:editor-box editor/box}
page
(str edit-input-id-prefix "-page")
{:selected? false
:page-configure? false
:class-schema? false})])
(when has-class-properties?
[:div
(when has-viewable-properties?
[:div.mb-1.opacity-70.font-medium.text-sm "Class properties:"])
(component-block/db-properties-cp {:editor-box editor/box}
page
(str edit-input-id-prefix "-schema")
(assoc configure-opts :class-schema? true))])]
(when has-viewable-properties?
[:div
(when has-class-properties?
[:div.mb-1.opacity-70.font-medium.text-sm "Page properties:"])
(component-block/db-properties-cp {:editor-box editor/box}
page
(str edit-input-id-prefix "-page")
{:selected? false
:page-configure? false
:class-schema? false})])])])))
[:div.flex.flex-col.gap-4
(when has-class-properties?
[:div
(when has-viewable-properties?
[:div.mb-1.opacity-70.font-medium.text-sm "Class properties:"])
(component-block/db-properties-cp {:editor-box editor/box}
page
(str edit-input-id-prefix "-schema")
(assoc configure-opts :class-schema? true))])
(when has-viewable-properties?
[:div
(when has-class-properties?
[:div.mb-1.opacity-70.font-medium.text-sm "Page properties:"])
(component-block/db-properties-cp {:editor-box editor/box}
page
(str edit-input-id-prefix "-page")
{:selected? false
:page-configure? false
:class-schema? false})])]))])))
(rum/defc page-properties-react < rum/reactive
[page* page-opts]