The safety layer: two presses for anything you cannot take back
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
@@ -347,15 +347,27 @@ SettingsPage {
|
||||
|
||||
width: parent.width
|
||||
label: String(heldRow.modelData.name ?? "")
|
||||
detail: String(heldRow.modelData.fingerprint ?? "")
|
||||
controlWidth: 110
|
||||
// Armed, the row stops showing the fingerprint and says what
|
||||
// the confirming press will actually do -- including the case
|
||||
// where it will do nothing, which is owed BEFORE the press
|
||||
// rather than as an error afterwards.
|
||||
detail: removeHeld.armed
|
||||
? (SshKeys.durableRemoval
|
||||
? "The agent stops offering this key until it is added again. The key file in ~/.ssh is untouched."
|
||||
: "This agent lists every key in ~/.ssh, so it will refuse: removal here does not stick. Move the key out of ~/.ssh instead.")
|
||||
: String(heldRow.modelData.fingerprint ?? "")
|
||||
controlWidth: 190
|
||||
|
||||
ConfirmAction {
|
||||
id: removeHeld
|
||||
|
||||
SettingsButton {
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "Remove"
|
||||
actionId: "agent-remove:" + String(heldRow.modelData.path ?? "")
|
||||
armText: "Remove…"
|
||||
confirmText: "Remove it"
|
||||
enabled: !SshKeys.busy
|
||||
onClicked: SshKeys.removeFromAgent(String(heldRow.modelData.path ?? ""))
|
||||
onConfirmed: SshKeys.removeFromAgent(String(heldRow.modelData.path ?? ""))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user