Loading client/qml/PublishDialog.qml +14 −11 Changes for client/qml/PublishDialog.qml: 14 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -77,10 +77,12 @@ Dialog { model: [] delegate: ColumnLayout { id: fieldDelegate Layout.fillWidth: true spacing: 2 property var fieldDef: modelData property var fieldControl: null Label { text: (fieldDef.label || fieldDef.key) + (fieldDef.required ? " *" : "") Loading @@ -99,7 +101,7 @@ Dialog { placeholderText: fieldDef.placeholder || "" font.pixelSize: 13; color: Theme.textPrimary background: Rectangle { color: Theme.bgTertiary; border.color: Theme.border; radius: Theme.radius } Component.onCompleted: fieldDef._control = textInput Component.onCompleted: fieldDelegate.fieldControl = textInput } } Loading @@ -117,7 +119,7 @@ Dialog { palette.text: Theme.textPrimary palette.buttonText: Theme.textPrimary background: Rectangle { color: Theme.bgTertiary; border.color: Theme.border; radius: Theme.radius } Component.onCompleted: fieldDef._control = selectInput Component.onCompleted: fieldDelegate.fieldControl = selectInput } } Loading @@ -135,7 +137,7 @@ Dialog { leftPadding: parent.indicator.width + 4 verticalAlignment: Text.AlignVCenter } Component.onCompleted: fieldDef._control = checkInput Component.onCompleted: fieldDelegate.fieldControl = checkInput } } } Loading Loading @@ -186,9 +188,6 @@ Dialog { } var t = publishDlg.targets[publishDlg.selectedTargetIndex] var fields = t.fields || [] /* Reset _control references */ for (var i = 0; i < fields.length; i++) fields[i]._control = null publishDlg.currentFields = fields fieldRepeater.model = fields publishStatus.text = "" Loading @@ -196,9 +195,11 @@ Dialog { function collectParams() { var params = {} for (var i = 0; i < publishDlg.currentFields.length; i++) { var f = publishDlg.currentFields[i] var ctrl = f._control for (var i = 0; i < fieldRepeater.count; i++) { var delegate = fieldRepeater.itemAt(i) if (!delegate) continue var f = delegate.fieldDef var ctrl = delegate.fieldControl if (!ctrl) continue if (f.type === "select") { params[f.key] = ctrl.currentValue || "" Loading @@ -217,8 +218,10 @@ Dialog { var params = collectParams() /* Validate required fields */ for (var i = 0; i < publishDlg.currentFields.length; i++) { var f = publishDlg.currentFields[i] for (var i = 0; i < fieldRepeater.count; i++) { var delegate = fieldRepeater.itemAt(i) if (!delegate) continue var f = delegate.fieldDef if (f.required && (!params[f.key] || params[f.key].length === 0)) { publishStatus.text = (f.label || f.key) + " is required" publishStatus.color = Theme.warning Loading Loading
client/qml/PublishDialog.qml +14 −11 Changes for client/qml/PublishDialog.qml: 14 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -77,10 +77,12 @@ Dialog { model: [] delegate: ColumnLayout { id: fieldDelegate Layout.fillWidth: true spacing: 2 property var fieldDef: modelData property var fieldControl: null Label { text: (fieldDef.label || fieldDef.key) + (fieldDef.required ? " *" : "") Loading @@ -99,7 +101,7 @@ Dialog { placeholderText: fieldDef.placeholder || "" font.pixelSize: 13; color: Theme.textPrimary background: Rectangle { color: Theme.bgTertiary; border.color: Theme.border; radius: Theme.radius } Component.onCompleted: fieldDef._control = textInput Component.onCompleted: fieldDelegate.fieldControl = textInput } } Loading @@ -117,7 +119,7 @@ Dialog { palette.text: Theme.textPrimary palette.buttonText: Theme.textPrimary background: Rectangle { color: Theme.bgTertiary; border.color: Theme.border; radius: Theme.radius } Component.onCompleted: fieldDef._control = selectInput Component.onCompleted: fieldDelegate.fieldControl = selectInput } } Loading @@ -135,7 +137,7 @@ Dialog { leftPadding: parent.indicator.width + 4 verticalAlignment: Text.AlignVCenter } Component.onCompleted: fieldDef._control = checkInput Component.onCompleted: fieldDelegate.fieldControl = checkInput } } } Loading Loading @@ -186,9 +188,6 @@ Dialog { } var t = publishDlg.targets[publishDlg.selectedTargetIndex] var fields = t.fields || [] /* Reset _control references */ for (var i = 0; i < fields.length; i++) fields[i]._control = null publishDlg.currentFields = fields fieldRepeater.model = fields publishStatus.text = "" Loading @@ -196,9 +195,11 @@ Dialog { function collectParams() { var params = {} for (var i = 0; i < publishDlg.currentFields.length; i++) { var f = publishDlg.currentFields[i] var ctrl = f._control for (var i = 0; i < fieldRepeater.count; i++) { var delegate = fieldRepeater.itemAt(i) if (!delegate) continue var f = delegate.fieldDef var ctrl = delegate.fieldControl if (!ctrl) continue if (f.type === "select") { params[f.key] = ctrl.currentValue || "" Loading @@ -217,8 +218,10 @@ Dialog { var params = collectParams() /* Validate required fields */ for (var i = 0; i < publishDlg.currentFields.length; i++) { var f = publishDlg.currentFields[i] for (var i = 0; i < fieldRepeater.count; i++) { var delegate = fieldRepeater.itemAt(i) if (!delegate) continue var f = delegate.fieldDef if (f.required && (!params[f.key] || params[f.key].length === 0)) { publishStatus.text = (f.label || f.key) + " is required" publishStatus.color = Theme.warning Loading