2023-04-28 10:54:05 -04:00
|
|
|
import QtCore
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Controls.Basic
|
|
|
|
import QtQuick.Layouts
|
|
|
|
import download
|
|
|
|
import network
|
|
|
|
import llm
|
|
|
|
|
|
|
|
Dialog {
|
|
|
|
id: newVerionDialog
|
|
|
|
anchors.centerIn: parent
|
|
|
|
modal: true
|
|
|
|
opacity: 0.9
|
|
|
|
width: contentItem.width
|
|
|
|
height: contentItem.height
|
|
|
|
padding: 20
|
|
|
|
|
|
|
|
Theme {
|
|
|
|
id: theme
|
|
|
|
}
|
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
anchors.fill: parent
|
|
|
|
color: theme.backgroundDarkest
|
|
|
|
border.width: 1
|
|
|
|
border.color: theme.dialogBorder
|
|
|
|
radius: 10
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: contentItem
|
|
|
|
width: childrenRect.width + 40
|
|
|
|
height: childrenRect.height + 40
|
|
|
|
|
|
|
|
Label {
|
|
|
|
id: label
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
topPadding: 20
|
|
|
|
bottomPadding: 20
|
|
|
|
text: qsTr("New version is available:")
|
|
|
|
color: theme.textColor
|
|
|
|
}
|
|
|
|
|
2023-05-23 09:53:32 -04:00
|
|
|
MyButton {
|
2023-04-28 10:54:05 -04:00
|
|
|
id: button
|
|
|
|
anchors.left: label.right
|
|
|
|
anchors.leftMargin: 10
|
|
|
|
anchors.verticalCenter: label.verticalCenter
|
|
|
|
padding: 20
|
2023-05-23 09:53:32 -04:00
|
|
|
text: qsTr("Update")
|
2023-05-23 11:26:49 -04:00
|
|
|
Accessible.description: qsTr("Update to new version")
|
2023-04-28 10:54:05 -04:00
|
|
|
onClicked: {
|
|
|
|
if (!LLM.checkForUpdates())
|
|
|
|
checkForUpdatesError.open()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|