mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-08 20:09:12 +00:00
Huge change that completely revamps the settings dialog and implements
per model settings as well as the ability to clone a model into a "character." This also implements system prompts as well as quite a few bugfixes for instance this fixes chatgpt.
This commit is contained in:
@@ -5,42 +5,87 @@ import QtQuick.Controls.Basic
|
||||
import QtQuick.Layouts
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property string title: ""
|
||||
property Item contentItem: null
|
||||
property Item advancedSettings: null
|
||||
signal restoreDefaultsClicked
|
||||
|
||||
onContentItemChanged: function() {
|
||||
if (contentItem) {
|
||||
contentItem.parent = tabInner;
|
||||
contentItem.anchors.left = tabInner.left;
|
||||
contentItem.anchors.right = tabInner.right;
|
||||
contentItem.parent = contentInner;
|
||||
contentItem.anchors.left = contentInner.left;
|
||||
contentItem.anchors.right = contentInner.right;
|
||||
}
|
||||
}
|
||||
|
||||
onAdvancedSettingsChanged: function() {
|
||||
if (advancedSettings) {
|
||||
advancedSettings.parent = advancedInner;
|
||||
advancedSettings.anchors.left = advancedInner.left;
|
||||
advancedSettings.anchors.right = advancedInner.right;
|
||||
}
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
id: root
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
padding: 15
|
||||
rightPadding: 20
|
||||
contentWidth: availableWidth
|
||||
contentHeight: tabInner.height
|
||||
contentHeight: innerColumn.height
|
||||
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
||||
|
||||
Theme {
|
||||
id: theme
|
||||
}
|
||||
|
||||
// background: Rectangle {
|
||||
// color: 'transparent'
|
||||
// border.color: theme.tabBorder
|
||||
// border.width: 1
|
||||
// radius: 10
|
||||
// }
|
||||
|
||||
Column {
|
||||
id: tabInner
|
||||
ColumnLayout {
|
||||
id: innerColumn
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 15
|
||||
spacing: 10
|
||||
Column {
|
||||
id: contentInner
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Column {
|
||||
id: advancedInner
|
||||
visible: false
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
height: restoreDefaultsButton.height
|
||||
MyButton {
|
||||
id: restoreDefaultsButton
|
||||
anchors.left: parent.left
|
||||
width: implicitWidth
|
||||
text: qsTr("Restore Defaults")
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Restores the settings dialog to a default state")
|
||||
onClicked: {
|
||||
root.restoreDefaultsClicked();
|
||||
}
|
||||
}
|
||||
MyButton {
|
||||
id: advancedSettingsButton
|
||||
anchors.right: parent.right
|
||||
visible: root.advancedSettings
|
||||
width: implicitWidth
|
||||
text: !advancedInner.visible ? qsTr("Advanced Settings") : qsTr("Hide Advanced Settings")
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
Accessible.description: qsTr("Shows/hides the advanced settings")
|
||||
onClicked: {
|
||||
advancedInner.visible = !advancedInner.visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user