GODT-2091: animated "Connecting..." label. + unstaged changes from GODT-2003.

This commit is contained in:
Xavier Michelon
2022-11-16 19:46:56 +01:00
parent e087a7972e
commit c7cfcb29f6
3 changed files with 19 additions and 2 deletions

View File

@ -144,12 +144,28 @@ Item {
default:
return qsTr("Signed out")
case EUserState.Locked:
return qsTr("Connecting...")
return qsTr("Connecting") + dotsTimer.dots
case EUserState.Connected:
return root.usedSpace
}
}
Timer { // dots animation while connecting. 1 sec cycle, roughly similar to the webmail loading page.
id:dotsTimer
property string dots: ""
interval: 250;
repeat: true;
running: (root.user.state === EUserState.Locked)
onTriggered: {
dots = dots + "."
if (dots.length > 3)
dots = ""
}
onRunningChanged: {
dots = ""
}
}
color: root.usedSpaceColor
type: {
switch (root.type) {