From fca2ee8d7aeee99e3e24a8cab90c17d7b7c34494 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 25 Jan 2022 19:54:21 +0100 Subject: [feat] expose snowflake to ui --- gui/components/StatusBox.qml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'gui/components/StatusBox.qml') diff --git a/gui/components/StatusBox.qml b/gui/components/StatusBox.qml index 7715123..5929033 100644 --- a/gui/components/StatusBox.qml +++ b/gui/components/StatusBox.qml @@ -80,9 +80,32 @@ Item { anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter - text: "" FadeBehavior on text { } } + Label { + id: snowflakeTip + anchors.top: connectionState.bottom + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: 20 + horizontalAlignment: Text.AlignHCenter + text: qsTr("This can take several minutes") + font.pixelSize: Theme.fontSize * 0.8 + visible: isSnowflakeOn() + } + ProgressBar { + id: snowflakeProgressBar + anchors.top: snowflakeTip.bottom + anchors.horizontalCenter: parent.horizontalCenter + visible: isSnowflakeOn() + value: 0 + } + Label { + id: snowflakeTag + anchors.top: snowflakeProgressBar.bottom + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + visible: isSnowflakeOn() + } } Column { @@ -156,4 +179,8 @@ Item { } } } + + function isSnowflakeOn() { + return ctx != undefined && ctx.snowflakeProgress != "" && ctx.snowflakeProgress != "100" + } } -- cgit v1.2.3