Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F140183
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/contents/ui/ProgressBar.qml b/src/contents/ui/ProgressBar.qml
index 06bd477..ad9fa9e 100644
--- a/src/contents/ui/ProgressBar.qml
+++ b/src/contents/ui/ProgressBar.qml
@@ -1,96 +1,96 @@
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2022 nannanko <nannanko@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.13 as Kirigami
import moe.kazv.mxc.kazv 0.0 as MK
ColumnLayout {
property var kazvIO
visible: false
RowLayout {
id: progressBarLayout
Layout.preferredWidth: parent.width
ProgressBar {
id: progressBar
Layout.fillWidth: true
- value: kazvIO.progress
}
Kirigami.Action {
id: pauseAction
iconName: suspended ? "media-playback-start" : "media-playback-pause"
property var suspended: false
onTriggered: {
if (pauseAction.suspended) {
kazvIO.resume()
} else {
kazvIO.suspend()
}
suspended = !suspended
}
}
Kirigami.Action {
id: cancelAction
iconName: "dialog-cancel"
onTriggered: {
pauseAction.suspended = false
kazvIO.cancel()
}
}
RoundButton {
id: pauseBtn
Accessible.name: pauseAction.suspended ? l10n.get('media-file-download-resume') : l10n.get('media-file-download-pause')
icon.name: pauseAction.suspended ? "media-playback-start" : "media-playback-pause"
onClicked: pauseAction.trigger()
}
RoundButton {
icon.name: "dialog-cancel"
Accessible.name: l10n.get('media-file-download-cancel')
onClicked: cancelAction.trigger()
}
}
RowLayout {
id: promptMsgLayout
Text {
id: promptMsg
}
Button {
text: l10n.get('media-file-download-prompt-close')
onClicked: {
close()
}
}
}
function show() {
+ progressBar.value = Qt.binding(function() { return kazvIO.progress })
visible = true
progressBarLayout.visible = true
promptMsgLayout.visible = false
}
function close() {
visible = false
}
function switchToPause() {
pauseAction.suspended = true
}
function showSuccMsg() {
progressBarLayout.visible = false
promptMsg.text = l10n.get('media-file-download-success-prompt')
promptMsgLayout.visible = true
}
function showFailMsg() {
progressBarLayout.visible = false
promptMsg.text = l10n.get('media-file-download-failure-prompt')
promptMsgLayout.visible = true
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 2:58 PM (23 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
55243
Default Alt Text
(2 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment