gpt4all/gpt4all-chat/qml/NewVersionDialog.qml

56 lines
1.3 KiB
QML
Raw Permalink Normal View History

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
2023-07-06 10:53:43 -04:00
MyDialog {
2023-04-28 10:54:05 -04:00
id: newVerionDialog
anchors.centerIn: parent
modal: true
width: contentItem.width
height: contentItem.height
2023-07-09 14:56:54 -04:00
padding: 20
closeButtonVisible: false
2023-04-28 10:54:05 -04:00
Theme {
id: theme
}
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.titleTextColor
2023-08-07 13:54:13 -04:00
font.pixelSize: theme.fontSizeLarge
font.bold: true
2023-04-28 10:54:05 -04:00
}
MySettingsButton {
2023-04-28 10:54:05 -04:00
id: button
anchors.left: label.right
anchors.leftMargin: 10
anchors.verticalCenter: label.verticalCenter
padding: 20
text: qsTr("Update")
2023-08-07 13:54:13 -04:00
font.pixelSize: theme.fontSizeLarge
Accessible.description: qsTr("Update to new version")
2023-04-28 10:54:05 -04:00
onClicked: {
if (!LLM.checkForUpdates())
checkForUpdatesError.open()
}
}
}
}