mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Redirect to "Add cloud printer" page when button clicked
CURA-7022
This commit is contained in:
parent
a4c5e63355
commit
1d7c327b36
2 changed files with 17 additions and 0 deletions
|
@ -25,6 +25,9 @@ class AddPrinterPagesModel(WelcomePagesModel):
|
||||||
"page_url": self._getBuiltinWelcomePagePath("FirstStartMachineActionsContent.qml"),
|
"page_url": self._getBuiltinWelcomePagePath("FirstStartMachineActionsContent.qml"),
|
||||||
"should_show_function": self.shouldShowMachineActions,
|
"should_show_function": self.shouldShowMachineActions,
|
||||||
})
|
})
|
||||||
|
self._pages.append({"id": "add_cloud_printers",
|
||||||
|
"page_url": self._getBuiltinWelcomePagePath("AddCloudPrintersView.qml"),
|
||||||
|
})
|
||||||
self.setItems(self._pages)
|
self.setItems(self._pages)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,20 @@ Item
|
||||||
{
|
{
|
||||||
base.goToPage("add_printer_by_ip")
|
base.goToPage("add_printer_by_ip")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onAddCloudPrinterButtonClicked:
|
||||||
|
{
|
||||||
|
base.goToPage("add_cloud_printers")
|
||||||
|
if (!Cura.API.account.isLoggedIn)
|
||||||
|
{
|
||||||
|
Cura.API.account.login()
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Qt.openUrlExternally("https://mycloud.ultimaker.com/app/manage/printers")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue