Skip to content

Commit 910571b

Browse files
committed
ConnectToTail: Disable (dis)connect button when connecting to a device
1 parent ff9bb39 commit 910571b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/qml/ConnectToTail.qml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,12 @@ Kirigami.OverlaySheet {
9696
}
9797
}
9898
QQC2.Button {
99-
text: model.isConnected ?
100-
i18nc("Button for the action of disconnecting a device, in the prompt for connecting a device", "Disconnect") :
101-
i18nc("Button for the action of connecting a device, in the prompt for connecting a device", "Connect")
99+
text: model.isConnecting
100+
? i18nc("A label in the prompt for connecting to a device showing that the device is currently connecting", "Connecting...")
101+
: model.isConnected
102+
? i18nc("Button for the action of disconnecting a device, in the prompt for connecting a device", "Disconnect")
103+
: i18nc("Button for the action of connecting a device, in the prompt for connecting a device", "Connect")
104+
enabled: model.isConnecting == false
102105
onClicked: {
103106
sheet.close();
104107
if (model.isConnected) {

0 commit comments

Comments
 (0)