mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-12 22:09:13 +00:00
Remove binary state from high-level API and use Jinja templates (#3147)
Signed-off-by: Jared Van Bortel <jared@nomic.ai> Signed-off-by: Adam Treat <treat.adam@gmail.com> Co-authored-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
@@ -9,7 +9,7 @@ Item {
|
||||
property string title: ""
|
||||
property Item contentItem: null
|
||||
property bool showRestoreDefaultsButton: true
|
||||
signal restoreDefaultsClicked
|
||||
signal restoreDefaults
|
||||
|
||||
onContentItemChanged: function() {
|
||||
if (contentItem) {
|
||||
@@ -19,6 +19,13 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
ConfirmationDialog {
|
||||
id: restoreDefaultsDialog
|
||||
dialogTitle: qsTr("Restore defaults?")
|
||||
description: qsTr("This page of settings will be reset to the defaults.")
|
||||
onAccepted: root.restoreDefaults()
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
id: scrollView
|
||||
width: parent.width
|
||||
@@ -47,6 +54,7 @@ Item {
|
||||
Column {
|
||||
id: contentInner
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: parent.width
|
||||
}
|
||||
|
||||
Item {
|
||||
@@ -63,9 +71,7 @@ Item {
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Restores settings dialog to a default state")
|
||||
onClicked: {
|
||||
root.restoreDefaultsClicked();
|
||||
}
|
||||
onClicked: restoreDefaultsDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user