mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 11:28:58 +08:00
Redirect to "Add cloud printer" page when button clicked
CURA-7022
This commit is contained in:
parent
a4c5e63355
commit
1d7c327b36
@ -25,6 +25,9 @@ class AddPrinterPagesModel(WelcomePagesModel):
|
||||
"page_url": self._getBuiltinWelcomePagePath("FirstStartMachineActionsContent.qml"),
|
||||
"should_show_function": self.shouldShowMachineActions,
|
||||
})
|
||||
self._pages.append({"id": "add_cloud_printers",
|
||||
"page_url": self._getBuiltinWelcomePagePath("AddCloudPrintersView.qml"),
|
||||
})
|
||||
self.setItems(self._pages)
|
||||
|
||||
|
||||
|
@ -65,6 +65,20 @@ Item
|
||||
{
|
||||
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…
x
Reference in New Issue
Block a user