Merge branch 'CURA-8112_Inform_the_user_about_their_subscription_limits'

This commit is contained in:
Ghostkeeper 2021-07-16 10:04:43 +02:00
commit cc82ff97a7
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
6 changed files with 82 additions and 8 deletions

View file

@ -20,7 +20,7 @@ Item
width: parent.width
height: parent.height
property alias createNewProjectButtonVisible: createNewProjectButton.visible
property bool createNewProjectButtonVisible: true
anchors
{
@ -61,6 +61,7 @@ Item
id: createNewProjectButton
text: "New Library project"
visible: createNewProjectButtonVisible && manager.userAccountCanCreateNewLibraryProject && (manager.retrievingProjectsStatus == DF.RetrievalStatus.Success || manager.retrievingProjectsStatus == DF.RetrievalStatus.Failed)
onClicked:
{
@ -68,6 +69,20 @@ Item
}
busy: manager.creatingNewProjectStatus == DF.RetrievalStatus.InProgress
}
Cura.SecondaryButton
{
id: upgradePlanButton
text: "Upgrade plan"
iconSource: UM.Theme.getIcon("LinkExternal")
visible: createNewProjectButtonVisible && !manager.userAccountCanCreateNewLibraryProject && (manager.retrievingProjectsStatus == DF.RetrievalStatus.Success || manager.retrievingProjectsStatus == DF.RetrievalStatus.Failed)
tooltip: "You have reached the maximum number of projects allowed by your subscription. Please upgrade to the Professional subscription to create more projects."
tooltipWidth: parent.width * 0.5
onClicked: Qt.openUrlExternally("https://ultimaker.com/software/ultimaker-essentials/sign-up-cura?utm_source=cura&utm_medium=software&utm_campaign=lib-max")
}
}
Item