mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-01 06:41:06 -07:00
Merge branch 'CURA-9146_account_sync' into 5.0
This commit is contained in:
commit
9389a6f4e8
18 changed files with 1152 additions and 18 deletions
|
|
@ -13,31 +13,38 @@ Row // Sync state icon + message
|
|||
height: childrenRect.height
|
||||
spacing: UM.Theme.getSize("narrow_margin").height
|
||||
|
||||
// These are the enums from cura/API/account.py
|
||||
// somehow exposing these enums from python to QML doesn't work properly anymore
|
||||
property var _Cura_AccountSyncState_SYNCING: 0
|
||||
property var _Cura_AccountSyncState_SUCCESS: 1
|
||||
property var _Cura_AccountSyncState_ERROR: 2
|
||||
property var _Cura_AccountSyncState_IDLE: 3
|
||||
|
||||
states: [
|
||||
State
|
||||
{
|
||||
name: "idle"
|
||||
when: syncState == Cura.AccountSyncState.IDLE
|
||||
when: syncState == _Cura_AccountSyncState_IDLE
|
||||
PropertyChanges { target: icon; source: UM.Theme.getIcon("ArrowDoubleCircleRight")}
|
||||
},
|
||||
State
|
||||
{
|
||||
name: "syncing"
|
||||
when: syncState == Cura.AccountSyncState.SYNCING
|
||||
when: syncState == _Cura_AccountSyncState_SYNCING
|
||||
PropertyChanges { target: icon; source: UM.Theme.getIcon("ArrowDoubleCircleRight") }
|
||||
PropertyChanges { target: stateLabel; text: catalog.i18nc("@label", "Checking...")}
|
||||
},
|
||||
State
|
||||
{
|
||||
name: "up_to_date"
|
||||
when: syncState == Cura.AccountSyncState.SUCCESS
|
||||
when: syncState == _Cura_AccountSyncState_SUCCESS
|
||||
PropertyChanges { target: icon; source: UM.Theme.getIcon("CheckCircle") }
|
||||
PropertyChanges { target: stateLabel; text: catalog.i18nc("@label", "Account synced")}
|
||||
},
|
||||
State
|
||||
{
|
||||
name: "error"
|
||||
when: syncState == Cura.AccountSyncState.ERROR
|
||||
when: syncState == _Cura_AccountSyncState_ERROR
|
||||
PropertyChanges { target: icon; source: UM.Theme.getIcon("Warning") }
|
||||
PropertyChanges { target: stateLabel; text: catalog.i18nc("@label", "Something went wrong...")}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ Column
|
|||
{
|
||||
id: initialLabel
|
||||
anchors.centerIn: parent
|
||||
text: profile["username"].charAt(0).toUpperCase()
|
||||
text: profile.username.charAt(0).toUpperCase()
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Cura.Menu
|
|||
Cura.MachineManager.switchPrinterType(modelData.machine_type)
|
||||
}
|
||||
}
|
||||
onObjectAdded: menu.insertItem(index, object)
|
||||
onObjectRemoved: menu.removeItem(object)
|
||||
onObjectAdded: function(index, object) { return menu.insertItem(index, object); }
|
||||
onObjectRemoved: function(object) { return menu.removeItem(object); }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue