The safety layer: two presses for anything you cannot take back
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
@@ -157,15 +157,32 @@ SettingsPage {
|
||||
onTriggered: Sharing.setRdpCredentials(Quickshell.env("USER") || "")
|
||||
}
|
||||
|
||||
ActionRow {
|
||||
SettingRow {
|
||||
id: forgetCredentials
|
||||
|
||||
width: parent.width
|
||||
visible: Sharing.remoteDesktop?.available === true
|
||||
&& Sharing.remoteDesktop?.hasCredentials === true
|
||||
label: "Forget the stored credentials"
|
||||
detail: "Remote desktop cannot be turned on again until new ones are set"
|
||||
action: "Clear"
|
||||
enabled: !Sharing.busy
|
||||
// Armed, the row names the loss rather than the state: the keyring
|
||||
// entry goes, and the only way back is the terminal flow above.
|
||||
detail: forgetCredentialsConfirm.armed
|
||||
? "The user name and password are deleted from the login keyring. Remote desktop stays off until you set new ones in a terminal."
|
||||
: "Remote desktop cannot be turned on again until new ones are set"
|
||||
controlWidth: 200
|
||||
divider: false
|
||||
onTriggered: Sharing.clearRdpCredentials()
|
||||
|
||||
ConfirmAction {
|
||||
id: forgetCredentialsConfirm
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
actionId: "forget-rdp-credentials"
|
||||
armText: "Forget…"
|
||||
confirmText: "Forget them"
|
||||
enabled: !Sharing.busy
|
||||
onConfirmed: Sharing.clearRdpCredentials()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user