Loading client/qml/PublishDialog.qml +13 −20 Changes for client/qml/PublishDialog.qml: 13 added lines, 20 removed lines. Original line number Diff line number Diff line Loading @@ -81,7 +81,10 @@ Dialog { spacing: 2 property var fieldDef: modelData property var fieldControl: null property bool isText: fieldDef.type === "text" || fieldDef.type === "textarea" || !fieldDef.type property bool isSelect: fieldDef.type === "select" property bool isCheck: fieldDef.type === "checkbox" property var fieldControl: isSelect ? selInput : isCheck ? chkInput : txtInput Label { text: (fieldDef.label || fieldDef.key) + (fieldDef.required ? " *" : "") Loading @@ -90,25 +93,21 @@ Dialog { } /* text field */ Loader { TextField { id: txtInput Layout.fillWidth: true active: fieldDef.type === "text" || fieldDef.type === "textarea" || fieldDef.type === undefined visible: active sourceComponent: TextField { visible: isText text: fieldDef.defaultValue || "" placeholderText: fieldDef.placeholder || "" font.pixelSize: 13; color: Theme.textPrimary background: Rectangle { color: Theme.bgTertiary; border.color: Theme.border; radius: Theme.radius } } onLoaded: parent.fieldControl = item } /* select field */ Loader { ComboBox { id: selInput Layout.fillWidth: true active: fieldDef.type === "select" visible: active sourceComponent: ComboBox { visible: isSelect model: fieldDef.options || [] textRole: "label" valueRole: "value" Loading @@ -117,15 +116,11 @@ Dialog { palette.buttonText: Theme.textPrimary background: Rectangle { color: Theme.bgTertiary; border.color: Theme.border; radius: Theme.radius } } onLoaded: parent.fieldControl = item } /* checkbox field */ Loader { Layout.fillWidth: true active: fieldDef.type === "checkbox" visible: active sourceComponent: CheckBox { CheckBox { id: chkInput visible: isCheck checked: fieldDef.defaultValue === true || fieldDef.defaultValue === "true" text: fieldDef.label || fieldDef.key contentItem: Text { Loading @@ -134,8 +129,6 @@ Dialog { verticalAlignment: Text.AlignVCenter } } onLoaded: parent.fieldControl = item } } } } Loading Loading
client/qml/PublishDialog.qml +13 −20 Changes for client/qml/PublishDialog.qml: 13 added lines, 20 removed lines. Original line number Diff line number Diff line Loading @@ -81,7 +81,10 @@ Dialog { spacing: 2 property var fieldDef: modelData property var fieldControl: null property bool isText: fieldDef.type === "text" || fieldDef.type === "textarea" || !fieldDef.type property bool isSelect: fieldDef.type === "select" property bool isCheck: fieldDef.type === "checkbox" property var fieldControl: isSelect ? selInput : isCheck ? chkInput : txtInput Label { text: (fieldDef.label || fieldDef.key) + (fieldDef.required ? " *" : "") Loading @@ -90,25 +93,21 @@ Dialog { } /* text field */ Loader { TextField { id: txtInput Layout.fillWidth: true active: fieldDef.type === "text" || fieldDef.type === "textarea" || fieldDef.type === undefined visible: active sourceComponent: TextField { visible: isText text: fieldDef.defaultValue || "" placeholderText: fieldDef.placeholder || "" font.pixelSize: 13; color: Theme.textPrimary background: Rectangle { color: Theme.bgTertiary; border.color: Theme.border; radius: Theme.radius } } onLoaded: parent.fieldControl = item } /* select field */ Loader { ComboBox { id: selInput Layout.fillWidth: true active: fieldDef.type === "select" visible: active sourceComponent: ComboBox { visible: isSelect model: fieldDef.options || [] textRole: "label" valueRole: "value" Loading @@ -117,15 +116,11 @@ Dialog { palette.buttonText: Theme.textPrimary background: Rectangle { color: Theme.bgTertiary; border.color: Theme.border; radius: Theme.radius } } onLoaded: parent.fieldControl = item } /* checkbox field */ Loader { Layout.fillWidth: true active: fieldDef.type === "checkbox" visible: active sourceComponent: CheckBox { CheckBox { id: chkInput visible: isCheck checked: fieldDef.defaultValue === true || fieldDef.defaultValue === "true" text: fieldDef.label || fieldDef.key contentItem: Text { Loading @@ -134,8 +129,6 @@ Dialog { verticalAlignment: Text.AlignVCenter } } onLoaded: parent.fieldControl = item } } } } Loading