import QtQuick import QtQuick.Layouts import "../../components" import "../../services" import "../../theme" ColumnLayout { id: root property string label property string setting property string error: "" Layout.fillWidth: true Text { text: root.label color: Theme.textSecondary Layout.fillWidth: true wrapMode: Text.Wrap } GlassTextField { Layout.fillWidth: true text: JSON.stringify(ConfigService.value(root.setting)) onEditingFinished: { try { if (ConfigService.setValue(root.setting, JSON.parse(text))) { root.error = ""; SystemService.refresh(); } else root.error = ConfigService.error; } catch (e) { root.error = "Enter a JSON array of command arguments"; } } } Text { visible: !!root.error text: root.error color: Theme.urgent wrapMode: Text.Wrap Layout.fillWidth: true } }