mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Add sign in wall
CURA-10183
This commit is contained in:
parent
8d6ab7aa30
commit
1133e76e66
2 changed files with 33 additions and 0 deletions
|
@ -2076,3 +2076,7 @@ class CuraApplication(QtApplication):
|
||||||
@classmethod
|
@classmethod
|
||||||
def getInstance(cls, *args, **kwargs) -> "CuraApplication":
|
def getInstance(cls, *args, **kwargs) -> "CuraApplication":
|
||||||
return cast(CuraApplication, super().getInstance(**kwargs))
|
return cast(CuraApplication, super().getInstance(**kwargs))
|
||||||
|
|
||||||
|
@pyqtProperty(bool, constant=True)
|
||||||
|
def isEnterprise(self) -> bool:
|
||||||
|
return ApplicationMetadata.IsEnterpriseVersion
|
||||||
|
|
|
@ -285,4 +285,33 @@ Window
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
color: UM.Theme.getColor("main_background")
|
||||||
|
anchors.fill: parent
|
||||||
|
visible: !Cura.API.account.isLoggedIn && CuraApplication.isEnterprise
|
||||||
|
|
||||||
|
UM.Label
|
||||||
|
{
|
||||||
|
id: signInLabel
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: Math.round(UM.Theme.getSize("modal_window_minimum").width / 2.5)
|
||||||
|
text: catalog.i18nc("@description","Please sign in to get verified plugins and materials for UltiMaker Cura Enterprise")
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
Cura.PrimaryButton
|
||||||
|
{
|
||||||
|
id: loginButton
|
||||||
|
width: UM.Theme.getSize("account_button").width
|
||||||
|
height: UM.Theme.getSize("account_button").height
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.top: signInLabel.bottom
|
||||||
|
anchors.topMargin: UM.Theme.getSize("default_margin").height * 2
|
||||||
|
text: catalog.i18nc("@button", "Sign in")
|
||||||
|
fixedWidthMode: true
|
||||||
|
onClicked: Cura.API.account.login()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue