forked from Silverfish/proton-bridge
GODT-2091: animated "Connecting..." label. + unstaged changes from GODT-2003.
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user