diff --git a/components/listitems/ListDateSelector.qml b/components/listitems/ListDateSelector.qml index 17ac63fd7..b92fb2a87 100644 --- a/components/listitems/ListDateSelector.qml +++ b/components/listitems/ListDateSelector.qml @@ -15,7 +15,7 @@ ListButton { property var date: dataItem.isValid ? new Date(dataItem.value * 1000) : null button.text: date == null ? "--" : Qt.formatDate(date, "yyyy-MM-dd") - enabled: dataItem.uid === "" || dataItem.isValid + enabled: userHasWriteAccess && (dataItem.uid === "" || dataItem.isValid) onClicked: Global.dialogLayer.open(dateSelectorComponent, { year: date ? date.getFullYear() : ClockTime.year, diff --git a/components/listitems/ListSpinBox.qml b/components/listitems/ListSpinBox.qml index 7c6517e94..0b31185f9 100644 --- a/components/listitems/ListSpinBox.qml +++ b/components/listitems/ListSpinBox.qml @@ -25,7 +25,7 @@ ListButton { signal selectorAccepted(newValue: var) button.text: value === undefined ? "--" : Units.formatNumber(value, decimals) + root.suffix - enabled: dataItem.uid === "" || dataItem.isValid + enabled: userHasWriteAccess && (dataItem.uid === "" || dataItem.isValid) onClicked: Global.dialogLayer.open(numberSelectorComponent, {value: value}) diff --git a/components/listitems/ListTimeSelector.qml b/components/listitems/ListTimeSelector.qml index f16d1ef3b..73bd3efd5 100644 --- a/components/listitems/ListTimeSelector.qml +++ b/components/listitems/ListTimeSelector.qml @@ -20,7 +20,7 @@ ListButton { property real value: !dataItem.isValid ? 0 : dataItem.value button.text: hour < 0 || minute < 0 ? "--" : ClockTime.formatTime(hour, minute) - enabled: dataItem.uid === "" || dataItem.isValid + enabled: userHasWriteAccess && (dataItem.uid === "" || dataItem.isValid) onClicked: Global.dialogLayer.open(timeSelectorComponent, {hour: hour, minute: minute}) diff --git a/components/settings/FirmwareCheckListButton.qml b/components/settings/FirmwareCheckListButton.qml index cab2bede5..1a4801e69 100644 --- a/components/settings/FirmwareCheckListButton.qml +++ b/components/settings/FirmwareCheckListButton.qml @@ -16,7 +16,7 @@ ListButton { ? qsTrId("settings_firmware_checking") //% "Press to check" : qsTrId("settings_firmware_press_to_check") - enabled: !Global.firmwareUpdate.busy + enabled: userHasWriteAccess && !Global.firmwareUpdate.busy writeAccessLevel: VenusOS.User_AccessType_User onClicked: { diff --git a/components/settings/ListClearHistoryButton.qml b/components/settings/ListClearHistoryButton.qml index dc3a5cad1..8bfc1b9e9 100644 --- a/components/settings/ListClearHistoryButton.qml +++ b/components/settings/ListClearHistoryButton.qml @@ -37,7 +37,7 @@ ListButton { id: timer interval: 2000 } - enabled: !timer.running + enabled: userHasWriteAccess && !timer.running onClicked: { /*