mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-11 21:39:11 +00:00
This completes the work of consolidating all settings that can be changed by the user on new settings object.
This commit is contained in:
@@ -6,6 +6,7 @@ import QtQuick.Layouts
|
||||
import download
|
||||
import network
|
||||
import llm
|
||||
import mysettings
|
||||
|
||||
Dialog {
|
||||
id: networkDialog
|
||||
@@ -18,16 +19,6 @@ Dialog {
|
||||
id: theme
|
||||
}
|
||||
|
||||
Settings {
|
||||
id: settings
|
||||
category: "network"
|
||||
property string attribution: ""
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
settings.sync()
|
||||
}
|
||||
|
||||
Column {
|
||||
id: column
|
||||
spacing: 20
|
||||
@@ -86,7 +77,7 @@ NOTE: By turning on this feature, you will be sending your data to the GPT4All O
|
||||
color: theme.textColor
|
||||
padding: 20
|
||||
width: parent.width
|
||||
text: settings.attribution
|
||||
text: MySettings.networkAttribution
|
||||
font.pixelSize: theme.fontSizeLarge
|
||||
placeholderText: qsTr("Please provide a name for attribution (optional)")
|
||||
placeholderTextColor: theme.backgroundLightest
|
||||
@@ -98,8 +89,7 @@ NOTE: By turning on this feature, you will be sending your data to the GPT4All O
|
||||
Accessible.name: qsTr("Attribution (optional)")
|
||||
Accessible.description: qsTr("Textfield for providing attribution")
|
||||
onEditingFinished: {
|
||||
settings.attribution = attribution.text;
|
||||
settings.sync();
|
||||
MySettings.networkAttribution = attribution.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,16 +123,16 @@ NOTE: By turning on this feature, you will be sending your data to the GPT4All O
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
if (Network.isActive)
|
||||
if (MySettings.networkIsActive)
|
||||
return
|
||||
Network.isActive = true;
|
||||
MySettings.networkIsActive = true;
|
||||
Network.sendNetworkToggled(true);
|
||||
}
|
||||
|
||||
onRejected: {
|
||||
if (!Network.isActive)
|
||||
if (!MySettings.networkIsActive)
|
||||
return
|
||||
Network.isActive = false;
|
||||
MySettings.networkIsActive = false;
|
||||
Network.sendNetworkToggled(false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user