Browse Source

WIP: Fixes and add cloud logic to cloud welcome page

Lipu Fei 6 years ago
parent
commit
60f6d881a3

+ 1 - 1
cura/Machines/Models/DiscoveredPrintersModel.py

@@ -16,7 +16,7 @@ class DiscoveredPrinter(QObject):
         self._ip_address = ip_address
         self._ip_address = ip_address
         self._key = key
         self._key = key
         self._name = name
         self._name = name
-        self._create_callback = create_callback
+        self.create_callback = create_callback
         self._machine_type = machine_type
         self._machine_type = machine_type
         self._device = device
         self._device = device
 
 

+ 2 - 3
resources/qml/WelcomePages/CloudContent.qml

@@ -99,14 +99,13 @@ Item
         text: catalog.i18nc("@button", "Create an account")
         text: catalog.i18nc("@button", "Create an account")
         width: 140
         width: 140
         fixedWidthMode: true
         fixedWidthMode: true
-        onClicked: base.showNextPage() // TODO: create account
+        onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create")
     }
     }
 
 
     Cura.SecondaryButton
     Cura.SecondaryButton
     {
     {
         id: signInButton
         id: signInButton
         anchors.left: createAccountButton.right
         anchors.left: createAccountButton.right
-        //anchors.leftMargin: 10
         anchors.verticalCenter: finishButton.verticalCenter
         anchors.verticalCenter: finishButton.verticalCenter
         text: catalog.i18nc("@button", "Sign in")
         text: catalog.i18nc("@button", "Sign in")
         width: 80
         width: 80
@@ -115,6 +114,6 @@ Item
         hoverColor: "transparent"
         hoverColor: "transparent"
         textHoverColor: UM.Theme.getColor("text_light_blue")
         textHoverColor: UM.Theme.getColor("text_light_blue")
         fixedWidthMode: true
         fixedWidthMode: true
-        onClicked: base.showNextPage() // TODO: sign in
+        onClicked: Cura.API.account.login()
     }
     }
 }
 }