mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-29 05:41:05 -07:00
Expose Account.SyncState as an Enum to QML
Provides a single source of truth CURA-7290
This commit is contained in:
parent
8937c63219
commit
1ae050bbc5
5 changed files with 38 additions and 35 deletions
|
|
@ -82,20 +82,20 @@ Row // sync state icon + message
|
|||
signal syncStateChanged(string newState)
|
||||
|
||||
onSyncStateChanged: {
|
||||
if(newState == "syncing"){
|
||||
if(newState == Cura.AccountSyncState.SYNCING){
|
||||
syncRow.iconSource = UM.Theme.getIcon("update")
|
||||
syncRow.labelText = catalog.i18nc("@label", "Checking...")
|
||||
} else if (newState == "success") {
|
||||
} else if (newState == Cura.AccountSyncState.SUCCESS) {
|
||||
syncRow.iconSource = UM.Theme.getIcon("checked")
|
||||
syncRow.labelText = catalog.i18nc("@label", "You are up to date")
|
||||
} else if (newState == "error") {
|
||||
syncRow.iconSource = UM.Theme.getIcon("warning-light")
|
||||
} else if (newState == Cura.AccountSyncState.ERROR) {
|
||||
syncRow.iconSource = UM.Theme.getIcon("warning_light")
|
||||
syncRow.labelText = catalog.i18nc("@label", "Something went wrong...")
|
||||
} else {
|
||||
print("Error: unexpected sync state: " + newState)
|
||||
}
|
||||
|
||||
if(newState == "syncing"){
|
||||
if(newState == Cura.AccountSyncState.SYNCING){
|
||||
syncRow.animateIconRotation = true
|
||||
syncRow.syncButtonVisible = false
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue