No forgetting, deleting or clearing on a single press, anywhere

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-25 00:41:39 -04:00
parent 88371d19f0
commit f9e5d3f470
8 changed files with 267 additions and 84 deletions
@@ -65,7 +65,7 @@ Rectangle {
id: aliasFrame
anchors.left: reorderControls.right
anchors.leftMargin: 10
anchors.right: removeButton.left
anchors.right: removeConfirm.left
anchors.rightMargin: 12
anchors.top: parent.top
anchors.topMargin: 12
@@ -107,17 +107,23 @@ Rectangle {
}
}
// The line under the field says which light this is; armed, it says what
// pressing again costs instead, because the alias only lives in this
// favourite and there is nowhere else to read it back from.
Text {
anchors.left: aliasFrame.left
anchors.right: removeButton.left
anchors.right: removeConfirm.left
anchors.rightMargin: 12
anchors.top: aliasFrame.bottom
anchors.topMargin: 7
text: root.sourceName
color: Theme.fgDim
text: removeConfirm.armed
? "Drops it from My Home — the name you gave it goes too"
: root.sourceName
color: removeConfirm.armed ? Theme.danger : Theme.fgDim
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
elide: Text.ElideRight
wrapMode: removeConfirm.armed ? Text.WordWrap : Text.NoWrap
elide: removeConfirm.armed ? Text.ElideNone : Text.ElideRight
}
Rectangle {
@@ -143,17 +149,14 @@ Rectangle {
}
}
SettingsButton {
id: removeButton
ConfirmAction {
id: removeConfirm
anchors.right: parent.right
anchors.rightMargin: 11
anchors.verticalCenter: parent.verticalCenter
text: "Remove"
activeFocusOnTab: true
border.width: activeFocus ? 2 : 1
border.color: activeFocus ? Theme.accent : Theme.alpha(Theme.fg, 0.08)
onClicked: root.removeRequested(root.favorite.id)
Keys.onReturnPressed: root.removeRequested(root.favorite.id)
Keys.onSpacePressed: root.removeRequested(root.favorite.id)
actionId: "home-favorite-remove:" + root.favorite.id
armText: "Remove…"
confirmText: "Remove it"
onConfirmed: root.removeRequested(root.favorite.id)
}
}