mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-08-28 04:20:40 +00:00
Allow closing the download dialog and display a message to the user if no models are installed.
This commit is contained in:
parent
fb172a2524
commit
e120eb5008
@ -87,6 +87,8 @@ Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property bool hasShownModelDownload: false
|
||||||
|
|
||||||
function startupDialogs() {
|
function startupDialogs() {
|
||||||
if (!LLM.compatHardware) {
|
if (!LLM.compatHardware) {
|
||||||
Network.sendNonCompatHardware();
|
Network.sendNonCompatHardware();
|
||||||
@ -100,9 +102,10 @@ Window {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for any current models and if not, open download dialog
|
// check for any current models and if not, open download dialog once
|
||||||
if (ModelList.installedModels.count === 0 && !firstStartDialog.opened) {
|
if (!hasShownModelDownload && ModelList.installedModels.count === 0 && !firstStartDialog.opened) {
|
||||||
downloadNewModels.open();
|
downloadNewModels.open();
|
||||||
|
hasShownModelDownload = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -654,8 +657,18 @@ Window {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: currentChat.isServer ? theme.backgroundDark : theme.backgroundLight
|
color: currentChat.isServer ? theme.backgroundDark : theme.backgroundLight
|
||||||
|
|
||||||
|
Text {
|
||||||
|
text: qsTr("You must install a model via the download dialog to continue. The download dialog can be accessed via the drawer button in the top left corner and then clicking the 'Downloads' button.")
|
||||||
|
color: theme.textColor
|
||||||
|
width: 500
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
anchors.centerIn: parent
|
||||||
|
visible: ModelList.installedModels.count === 0
|
||||||
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: listView
|
id: listView
|
||||||
|
visible: ModelList.installedModels.count !== 0
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
model: chatModel
|
model: chatModel
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user