0.7.7: un solo tasto del boost, con lo stato della Home
La pagina Regolazioni aveva due tasti sempre attivi (avvia/ferma) che non dicevano cosa sta facendo l'impianto e potevano contraddire la Home. Ora un ActionButton solo, con testo e comando da api.boostActive — lo stesso dato della Home — piu' il tempo che resta quando il boost corre.
This commit is contained in:
@@ -230,23 +230,31 @@ Page {
|
||||
|
||||
// ---- boost ------------------------------------------------------ //
|
||||
// Il boost e' dell'acqua calda: si vede con lei.
|
||||
//
|
||||
// UN tasto solo, che cambia con lo stato come quello della Home:
|
||||
// due tasti sempre attivi (avvia / ferma) non dicevano cosa sta
|
||||
// facendo l'impianto e potevano contraddire la Home. Niente
|
||||
// confirmText: la conferma la da' il messaggio in fondo, come in
|
||||
// Home, e il remorse non copre niente.
|
||||
SectionHeader {
|
||||
visible: page.mostraAcqua
|
||||
text: qsTr("Hot water boost")
|
||||
}
|
||||
|
||||
ActionButton {
|
||||
visible: page.mostraAcqua
|
||||
text: qsTr("Start DHW boost")
|
||||
confirmText: qsTr("Starting DHW boost")
|
||||
onTriggered: api.sendCommand("hot_water_boost_on")
|
||||
Label {
|
||||
visible: page.mostraAcqua && api.boostActive
|
||||
x: Theme.horizontalPageMargin
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
text: qsTr("Boost running · %1 left").arg(api.boostCountdown)
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
}
|
||||
|
||||
ActionButton {
|
||||
visible: page.mostraAcqua
|
||||
text: qsTr("Stop DHW boost")
|
||||
confirmText: qsTr("Stopping DHW boost")
|
||||
onTriggered: api.sendCommand("hot_water_boost_off")
|
||||
text: api.boostActive ? qsTr("Stop DHW boost") : qsTr("Start DHW boost")
|
||||
onTriggered: api.sendCommand(api.boostActive ? "hot_water_boost_off"
|
||||
: "hot_water_boost_on")
|
||||
}
|
||||
|
||||
Label {
|
||||
|
||||
Reference in New Issue
Block a user