mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 15:46:44 +00:00
GODT-2091: animated "Connecting..." label. + unstaged changes from GODT-2003.
This commit is contained in:
@ -144,12 +144,28 @@ Item {
|
|||||||
default:
|
default:
|
||||||
return qsTr("Signed out")
|
return qsTr("Signed out")
|
||||||
case EUserState.Locked:
|
case EUserState.Locked:
|
||||||
return qsTr("Connecting...")
|
return qsTr("Connecting") + dotsTimer.dots
|
||||||
case EUserState.Connected:
|
case EUserState.Connected:
|
||||||
return root.usedSpace
|
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
|
color: root.usedSpaceColor
|
||||||
type: {
|
type: {
|
||||||
switch (root.type) {
|
switch (root.type) {
|
||||||
|
|||||||
@ -203,6 +203,7 @@ SPUser randomUser()
|
|||||||
user->setAddresses(QStringList() << (username + "@proton.me") << (username + "@protonmail.com") );
|
user->setAddresses(QStringList() << (username + "@proton.me") << (username + "@protonmail.com") );
|
||||||
user->setPassword(QUuid().createUuid().toString(QUuid::StringFormat::WithoutBraces).left(20));
|
user->setPassword(QUuid().createUuid().toString(QUuid::StringFormat::WithoutBraces).left(20));
|
||||||
user->setAvatarText(firstName.left(1) + lastName.left(1));
|
user->setAvatarText(firstName.left(1) + lastName.left(1));
|
||||||
|
user->setState(UserState::Connected);
|
||||||
user->setSplitMode(false);
|
user->setSplitMode(false);
|
||||||
user->setSetupGuideSeen(true);
|
user->setSetupGuideSeen(true);
|
||||||
qint64 const totalBytes = (500 + randN(2501)) * 1000000;
|
qint64 const totalBytes = (500 + randN(2501)) * 1000000;
|
||||||
|
|||||||
@ -33,7 +33,7 @@ class EUserState: public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
enum State
|
enum class State
|
||||||
{
|
{
|
||||||
SignedOut = 0,
|
SignedOut = 0,
|
||||||
Locked = 1,
|
Locked = 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user