mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Return account widget to it's former glory
This commit is contained in:
parent
af712785c8
commit
124602d2ad
3 changed files with 5 additions and 5 deletions
|
@ -269,10 +269,10 @@ class Account(QObject):
|
||||||
return self._authorization_service.getAccessToken()
|
return self._authorization_service.getAccessToken()
|
||||||
|
|
||||||
@pyqtProperty("QVariantMap", notify = userProfileChanged)
|
@pyqtProperty("QVariantMap", notify = userProfileChanged)
|
||||||
def userProfile(self) -> Optional[Dict[str, Optional[str]]]:
|
def userProfile(self) -> Dict[str, Optional[str]]:
|
||||||
"""None if no user is logged in otherwise the logged in user as a dict containing containing user_id, username and profile_image_url """
|
"""None if no user is logged in otherwise the logged in user as a dict containing containing user_id, username and profile_image_url """
|
||||||
if not self._user_profile:
|
if not self._user_profile:
|
||||||
return None
|
return {}
|
||||||
return self._user_profile.__dict__
|
return self._user_profile.__dict__
|
||||||
|
|
||||||
@pyqtProperty(str, notify=lastSyncDateTimeChanged)
|
@pyqtProperty(str, notify=lastSyncDateTimeChanged)
|
||||||
|
|
|
@ -10,7 +10,7 @@ import Cura 1.1 as Cura
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
property var profile: Cura.API.account.userProfile
|
property var profile: Cura.API.account.userProfile
|
||||||
property var loggedIn: Cura.API.account.isLoggedIn
|
property bool loggedIn: Cura.API.account.isLoggedIn
|
||||||
|
|
||||||
height: signInButton.visible ? signInButton.height : accountWidget.height
|
height: signInButton.visible ? signInButton.height : accountWidget.height
|
||||||
width: signInButton.visible ? signInButton.width : accountWidget.width
|
width: signInButton.visible ? signInButton.width : accountWidget.width
|
||||||
|
|
|
@ -203,7 +203,7 @@ Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*AccountWidget
|
AccountWidget
|
||||||
{
|
{
|
||||||
id: accountWidget
|
id: accountWidget
|
||||||
anchors
|
anchors
|
||||||
|
@ -212,5 +212,5 @@ Item
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: UM.Theme.getSize("default_margin").width
|
rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue