Commit 588bc12f authored by jan.koester's avatar jan.koester
Browse files

test

parent 09b19823
Loading
Loading
Loading
Loading
+39 −3
Changes for client/qml/ConnectionPanel.qml: 39 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -94,17 +94,22 @@ ColumnLayout {
        }
    }

    /* Connect / Disconnect button */
    /* Connect / Abort / Disconnect buttons */
    RowLayout {
        Layout.fillWidth: true
        spacing: 6

        Button {
            id: connectBtn
            Layout.fillWidth: true
            text: connected ? qsTr("Disconnect") : qsTr("Connect")
        highlighted: true
            enabled: !connecting
            opacity: enabled ? 1.0 : 0.5

            background: Rectangle {
                color: connected ? Theme.danger : Theme.accent
                radius: Theme.radius
            opacity: parent.hovered ? 0.9 : 1.0
                opacity: parent.hovered && parent.enabled ? 0.9 : 1.0
            }
            contentItem: Text {
                text: parent.text
@@ -118,6 +123,7 @@ ColumnLayout {
                if (connected) {
                    localApi.disconnectServer()
                    connected = false
                    connecting = false
                    statusText = "Disconnected"
                    statusColor = Theme.textMuted
                } else {
@@ -126,6 +132,7 @@ ColumnLayout {
                        statusColor = Theme.warning
                        return
                    }
                    connecting = true
                    statusText = "Connecting..."
                    statusColor = Theme.textMuted
                    localApi.connectToServer(
@@ -134,6 +141,35 @@ ColumnLayout {
            }
        }

        Button {
            id: abortBtn
            Layout.preferredWidth: 70
            text: qsTr("Abort")
            visible: connecting
            enabled: connecting

            background: Rectangle {
                color: Theme.warning
                radius: Theme.radius
                opacity: parent.hovered ? 0.9 : 1.0
            }
            contentItem: Text {
                text: parent.text
                color: "#1c1c1e"
                font.pixelSize: 13; font.bold: true
                horizontalAlignment: Text.AlignHCenter
                verticalAlignment: Text.AlignVCenter
            }

            onClicked: {
                localApi.abortConnection()
                connecting = false
                statusText = "Aborted"
                statusColor = Theme.warning
            }
        }
    }

    /* Publish button */
    Button {
        Layout.fillWidth: true