Commit 356c86e5 authored by jan.koester's avatar jan.koester
Browse files

teste

parent 2ec7c777
Loading
Loading
Loading
Loading
+11 −1
Changes for client/qml/PropertyPanel.qml: 11 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -121,6 +121,16 @@ ColumnLayout {
            property var val: propPanel.currentProps[field.key] !== undefined
                              ? propPanel.currentProps[field.key] : (field["default"] || "")

            // visibleWhen support: hide field unless another property matches a value
            visible: {
                if (!field.visibleWhen) return true
                var depKey = field.visibleWhen.key
                var depVal = field.visibleWhen.value
                var cur = propPanel.currentProps[depKey]
                if (cur === undefined) cur = ""
                return String(cur) === String(depVal)
            }

            Label {
                text: field.label || field.key
                font.pixelSize: 11
@@ -130,7 +140,7 @@ ColumnLayout {

            /* text / number */
            TextField {
                visible: !["richtext","select","checkbox","color","color_var","textarea","image","media_browse","survey_select"].includes(field.type)
                visible: !["richtext","select","checkbox","color","color_var","textarea","image","media_browse","survey_select","section_select"].includes(field.type)
                         && !field.key.endsWith("_src") && field.key !== "media_id"
                Layout.fillWidth: true
                text: val