mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-08-27 03:58:37 +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() {
|
||||
if (!LLM.compatHardware) {
|
||||
Network.sendNonCompatHardware();
|
||||
@ -100,9 +102,10 @@ Window {
|
||||
return;
|
||||
}
|
||||
|
||||
// check for any current models and if not, open download dialog
|
||||
if (ModelList.installedModels.count === 0 && !firstStartDialog.opened) {
|
||||
// check for any current models and if not, open download dialog once
|
||||
if (!hasShownModelDownload && ModelList.installedModels.count === 0 && !firstStartDialog.opened) {
|
||||
downloadNewModels.open();
|
||||
hasShownModelDownload = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -654,8 +657,18 @@ Window {
|
||||
anchors.fill: parent
|
||||
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 {
|
||||
id: listView
|
||||
visible: ModelList.installedModels.count !== 0
|
||||
anchors.fill: parent
|
||||
model: chatModel
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user