additional new ui changes, part 4 (#2481)

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
Jared Van Bortel 2024-06-28 17:11:12 -04:00 committed by GitHub
parent d893a6e5d6
commit f2cad6abaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 184 additions and 117 deletions

View File

@ -210,9 +210,9 @@ qt_add_qml_module(chat
icons/twitter.svg icons/twitter.svg
icons/left_panel_closed.svg icons/left_panel_closed.svg
icons/left_panel_open.svg icons/left_panel_open.svg
icons/logo.svg icons/gpt4all.svg
icons/logo-32.png icons/gpt4all-32.png
icons/logo-48.png icons/gpt4all-48.png
icons/you.svg icons/you.svg
icons/alt_logo.svg icons/alt_logo.svg
) )
@ -405,7 +405,7 @@ set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_PACKAGE_HOMEPAGE_URL "https://gpt4all.io") set(CPACK_PACKAGE_HOMEPAGE_URL "https://gpt4all.io")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png") set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-48.png")
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE) set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md) set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
set(CPACK_PACKAGE_EXECUTABLES "GPT4All") set(CPACK_PACKAGE_EXECUTABLES "GPT4All")
@ -415,8 +415,8 @@ set(CPACK_IFW_PACKAGE_TITLE "GPT4All Installer")
set(CPACK_IFW_PACKAGE_PUBLISHER "Nomic, Inc.") set(CPACK_IFW_PACKAGE_PUBLISHER "Nomic, Inc.")
set(CPACK_IFW_PRODUCT_URL "https://gpt4all.io") set(CPACK_IFW_PRODUCT_URL "https://gpt4all.io")
set(CPACK_IFW_PACKAGE_WIZARD_STYLE "Aero") set(CPACK_IFW_PACKAGE_WIZARD_STYLE "Aero")
set(CPACK_IFW_PACKAGE_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png") set(CPACK_IFW_PACKAGE_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-48.png")
set(CPACK_IFW_PACKAGE_WINDOW_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png") set(CPACK_IFW_PACKAGE_WINDOW_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-32.png")
set(CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST OFF) set(CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST OFF)
include(InstallRequiredSystemLibraries) include(InstallRequiredSystemLibraries)

View File

@ -6,7 +6,7 @@ set(BIN_DIR ${DATA_DIR}/bin)
set(Qt6_ROOT_DIR "@Qt6_ROOT_DIR@") set(Qt6_ROOT_DIR "@Qt6_ROOT_DIR@")
set(ENV{LD_LIBRARY_PATH} "${BIN_DIR}:${Qt6_ROOT_DIR}/../lib/") set(ENV{LD_LIBRARY_PATH} "${BIN_DIR}:${Qt6_ROOT_DIR}/../lib/")
execute_process(COMMAND ${LINUXDEPLOYQT} ${BIN_DIR}/chat -qmldir=${CMAKE_CURRENT_SOURCE_DIR} -bundle-non-qt-libs -qmake=${Qt6_ROOT_DIR}/bin/qmake -verbose=2 -exclude-libs=libcuda.so.1) execute_process(COMMAND ${LINUXDEPLOYQT} ${BIN_DIR}/chat -qmldir=${CMAKE_CURRENT_SOURCE_DIR} -bundle-non-qt-libs -qmake=${Qt6_ROOT_DIR}/bin/qmake -verbose=2 -exclude-libs=libcuda.so.1)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png" file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-32.png"
DESTINATION ${DATA_DIR}) DESTINATION ${DATA_DIR})
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png" file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-48.png"
DESTINATION ${DATA_DIR}) DESTINATION ${DATA_DIR})

View File

@ -12,9 +12,9 @@ file(COPY ${MYLLAMALIBS}
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin/gpt4all.app/Contents/Frameworks) DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin/gpt4all.app/Contents/Frameworks)
file(COPY ${MYLLMODELLIBS} file(COPY ${MYLLMODELLIBS}
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin/gpt4all.app/Contents/Frameworks) DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin/gpt4all.app/Contents/Frameworks)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png" file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-32.png"
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data) DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png" file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-48.png"
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data) DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/resources/gpt4all.icns" file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/resources/gpt4all.icns"
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data) DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)

View File

@ -2,9 +2,9 @@ set(WINDEPLOYQT "@WINDEPLOYQT@")
set(COMPONENT_NAME_MAIN "@COMPONENT_NAME_MAIN@") set(COMPONENT_NAME_MAIN "@COMPONENT_NAME_MAIN@")
set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@")
execute_process(COMMAND ${WINDEPLOYQT} --qmldir ${CMAKE_CURRENT_SOURCE_DIR} ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin) execute_process(COMMAND ${WINDEPLOYQT} --qmldir ${CMAKE_CURRENT_SOURCE_DIR} ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png" file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-32.png"
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data) DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png" file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-48.png"
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data) DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/resources/gpt4all.ico" file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/resources/gpt4all.ico"
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data) DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)

View File

@ -44,7 +44,7 @@ Component.prototype.createOperations = function()
homeDir + "/Desktop/GPT4All.desktop", homeDir + "/Desktop/GPT4All.desktop",
"Type=Application\nTerminal=false\nExec=\"" + targetDirectory + "Type=Application\nTerminal=false\nExec=\"" + targetDirectory +
"/bin/chat\"\nName=GPT4All\nIcon=" + targetDirectory + "/bin/chat\"\nName=GPT4All\nIcon=" + targetDirectory +
"/logo-48.png\nName[en_US]=GPT4All"); "/gpt4all-48.png\nName[en_US]=GPT4All");
} }
} }
} catch (e) { } catch (e) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,34 @@
<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(.8125 0 0 .8125 6 6)">
<rect width="64" height="64" rx="14.154" ry="14.154" fill="#f8f6f6"/>
<path d="m26.348 12.651c-0.716-1.4831 1.779-5.6511 5.6548-5.6511 3.8721 0 5.9433 3.9854 5.6547 5.6548-3.3351-1.4831-7.3607-1.8119-11.306 0l-0.0036-0.0037z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m44.398 15.902c0.716-1.4867 5.5306-2.1333 7.9452 0.895s0.5918 7.1342-0.895 7.9452c-0.9205-3.5324-3.1708-6.8858-7.0502-8.8402z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m53.114 32.037c1.6073-0.3689 5.1141 2.9918 4.252 6.7689-0.8621 3.7772-5.2091 4.9096-6.7689 4.2521 2.1881-2.9224 3.4045-6.7726 2.5169-11.021z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m45.932 48.914c1.2895 1.0264 0.8511 5.8666-2.6411 7.547-3.4923 1.6803-7.0868-1.0119-7.547-2.6411 3.6493-0.1096 7.4191-1.5598 10.188-4.9059z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m28.259 53.82c0 1.6475-4.0548 4.3214-7.547 2.6411-3.4886-1.6804-3.6274-6.1699-2.6411-7.547 2.3598 2.7835 5.8447 4.8292 10.188 4.9059z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m13.406 43.062c-1.2895 1.0301-5.9068-0.4785-6.7689-4.252-0.8621-3.7772 2.5607-6.6813 4.252-6.769-0.705 3.5836-0.1315 7.5799 2.5169 11.021z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m12.555 24.739c-1.6073-0.3653-3.3096-4.9169-0.895-7.9452s6.8237-2.1626 7.9452-0.895c-3.2402 1.684-6.0055 4.6246-7.0502 8.8402z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m31.999 35.646c1.4526 0 2.6301-1.1776 2.6301-2.6302s-1.1775-2.6301-2.6301-2.6301-2.6302 1.1775-2.6302 2.6301 1.1776 2.6302 2.6302 2.6302z" fill="#436544"/>
<path d="m36.661 49.798c0.5918 1.2237-1.4648 4.6575-4.6575 4.6575s-4.8987-3.284-4.6576-4.6575c2.7471 1.2237 6.064 1.4941 9.3151 0z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m21.786 47.124c-0.5881 1.2238-4.5552 1.7571-6.5461-0.7379-1.9909-2.4949-0.4858-5.8776 0.7379-6.5461 0.7562 2.9114 2.6119 5.6731 5.8082 7.284z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m14.604 33.827c-1.3261 0.3032-4.2156-2.4658-3.5032-5.5781 0.7123-3.1123 4.2922-4.0438 5.578-3.5032-1.8045 2.4073-2.8054 5.5817-2.0748 9.0813z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m20.522 19.921c-1.063-0.8475-0.7013-4.8328 2.1772-6.2173s5.8374 0.8329 6.2173 2.1771c-3.0064 0.0914-6.1114 1.2859-8.3945 4.0439z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m35.086 15.877c0-1.3589 3.3424-3.5617 6.2173-2.1772s2.9881 5.0849 2.1772 6.2174c-1.947-2.2941-4.8146-3.9781-8.3945-4.0439z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m47.327 24.743c1.063-0.8475 4.8694 0.3945 5.5781 3.5032 0.7086 3.1123-2.1114 5.5087-3.5032 5.5781 0.5808-2.9516 0.1059-6.2466-2.0749-9.0813z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m48.025 39.84c1.326 0.2996 2.7288 4.0512 0.7379 6.5461-1.9909 2.495-5.6219 1.7827-6.5461 0.7379 2.6703-1.3844 4.9498-3.81 5.8082-7.284z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m28.182 19.259c-0.4859-1.0045 1.2018-3.8173 3.8173-3.8173s4.0183 2.6922 3.8173 3.8173c-2.2538-1.0045-4.9716-1.2237-7.6383 0z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m40.376 21.455c0.4822-1.0046 3.737-1.4429 5.3662 0.6064s0.3982 4.8182-0.6064 5.3662c-0.621-2.3854-2.1406-4.6502-4.7634-5.9726z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m46.264 32.355c1.085-0.2484 3.4557 2.0201 2.8749 4.5735s-3.5178 3.3169-4.5735 2.8749c1.4795-1.9726 2.3014-4.5735 1.6986-7.4484z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m41.413 43.756c0.8731 0.694 0.5735 3.9634-1.7826 5.0995-2.3562 1.1361-4.7854-0.6831-5.0996-1.7827 2.4658-0.073 5.0119-1.052 6.8822-3.3132z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m29.472 47.069c0 1.1141-2.7398 2.9187-5.0996 1.7826-2.3598-1.136-2.4511-4.168-1.7826-5.0995 1.5963 1.8813 3.9488 3.2621 6.8822 3.3132z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m19.437 39.804c-0.8694 0.6941-3.9927-0.3214-4.5735-2.8749-0.5809-2.5534 1.7315-4.515 2.8748-4.5735-0.4749 2.4219-0.0876 5.1215 1.6987 7.4484z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m18.864 27.428c-1.085-0.2484-2.2357-3.3206-0.6064-5.3662 1.6328-2.0457 4.61-1.4612 5.3662-0.6064-2.1882 1.1361-4.0585 3.1233-4.7635 5.9726z" clip-rule="evenodd" fill="#436544" fill-rule="evenodd"/>
<path d="m32.003 39.665c0.4499 0 0.8146-0.3647 0.8146-0.8146s-0.3647-0.8147-0.8146-0.8147-0.8146 0.3648-0.8146 0.8147 0.3647 0.8146 0.8146 0.8146z" fill="#436544"/>
<path d="m27.44 37.47c0.4499 0 0.8147-0.3648 0.8147-0.8147s-0.3648-0.8146-0.8147-0.8146-0.8146 0.3647-0.8146 0.8146 0.3647 0.8147 0.8146 0.8147z" fill="#436544"/>
<path d="m26.315 32.534c0.4499 0 0.8147-0.3647 0.8147-0.8146s-0.3648-0.8146-0.8147-0.8146-0.8146 0.3647-0.8146 0.8146 0.3647 0.8146 0.8146 0.8146z" fill="#436544"/>
<path d="m29.471 28.578c0.4499 0 0.8147-0.3647 0.8147-0.8146s-0.3648-0.8146-0.8147-0.8146c-0.4498 0-0.8146 0.3647-0.8146 0.8146s0.3648 0.8146 0.8146 0.8146z" fill="#436544"/>
<path d="m34.531 28.578c0.4499 0 0.8146-0.3647 0.8146-0.8146s-0.3647-0.8146-0.8146-0.8146-0.8146 0.3647-0.8146 0.8146 0.3647 0.8146 0.8146 0.8146z" fill="#436544"/>
<path d="m37.687 32.534c0.4499 0 0.8146-0.3647 0.8146-0.8146s-0.3647-0.8146-0.8146-0.8146-0.8146 0.3647-0.8146 0.8146 0.3647 0.8146 0.8146 0.8146z" fill="#436544"/>
<path d="m36.562 37.47c0.4499 0 0.8146-0.3648 0.8146-0.8147s-0.3647-0.8146-0.8146-0.8146-0.8146 0.3647-0.8146 0.8146 0.3647 0.8147 0.8146 0.8147z" fill="#436544"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 34 KiB

View File

@ -498,7 +498,7 @@ Window {
Image { Image {
id: image id: image
anchors.centerIn: parent anchors.centerIn: parent
sourceSize: Qt.size(60, 40) sourceSize: Qt.size(48 * theme.fontScale, 32 * theme.fontScale)
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
mipmap: true mipmap: true
visible: false visible: false

View File

@ -32,7 +32,7 @@ Rectangle {
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.margins: 30 anchors.margins: 30
spacing: 50 spacing: 20
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
@ -61,10 +61,30 @@ Rectangle {
} }
} }
ColumnLayout { Text {
id: addDocBanner
Layout.alignment: Qt.AlignBottom | Qt.AlignHCenter
horizontalAlignment: Qt.AlignHCenter
text: qsTr("Add Document Collection")
font.pixelSize: theme.fontSizeBanner
color: theme.titleTextColor
}
Text {
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
Layout.maximumWidth: addDocBanner.width
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignJustify
text: qsTr("Add a folder containing plain text files, PDFs, or Markdown. Configure additional extensions in Settings.")
font.pixelSize: theme.fontSizeLarger
color: theme.titleInfoTextColor
}
GridLayout {
id: root id: root
Layout.alignment: Qt.AlignTop | Qt.AlignCenter Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
spacing: 50 rowSpacing: 50
columnSpacing: 20
property alias collection: collection.text property alias collection: collection.text
property alias folder_path: folderEdit.text property alias folder_path: folderEdit.text
@ -80,17 +100,20 @@ Rectangle {
folderDialog.open(); folderDialog.open();
} }
Text { Label {
horizontalAlignment: Qt.AlignHCenter Layout.row: 2
text: qsTr("New Local Doc\nCollection") Layout.column: 0
font.pixelSize: theme.fontSizeBanner text: qsTr("Name")
color: theme.titleTextColor font.bold: true
font.pixelSize: theme.fontSizeLarger
} }
MyTextField { MyTextField {
id: collection id: collection
Layout.alignment: Qt.AlignCenter Layout.row: 2
Layout.column: 1
Layout.minimumWidth: 400 Layout.minimumWidth: 400
Layout.alignment: Qt.AlignRight
horizontalAlignment: Text.AlignJustify horizontalAlignment: Text.AlignJustify
color: theme.textColor color: theme.textColor
font.pixelSize: theme.fontSizeLarge font.pixelSize: theme.fontSizeLarge
@ -109,10 +132,20 @@ Rectangle {
} }
} }
Label {
Layout.row: 3
Layout.column: 0
text: qsTr("Folder")
font.bold: true
font.pixelSize: theme.fontSizeLarger
}
RowLayout { RowLayout {
Layout.alignment: Qt.AlignCenter Layout.row: 3
Layout.column: 1
Layout.minimumWidth: 400 Layout.minimumWidth: 400
Layout.maximumWidth: 400 Layout.maximumWidth: 400
Layout.alignment: Qt.AlignRight
spacing: 10 spacing: 10
MyDirectoryField { MyDirectoryField {
id: folderEdit id: folderEdit
@ -143,8 +176,9 @@ Rectangle {
} }
MyButton { MyButton {
Layout.alignment: Qt.AlignCenter Layout.row: 4
Layout.minimumWidth: 400 Layout.column: 1
Layout.alignment: Qt.AlignRight
text: qsTr("Create Collection") text: qsTr("Create Collection")
onClicked: { onClicked: {
var isError = false; var isError = false;

View File

@ -46,7 +46,7 @@ Rectangle {
font.pixelSize: theme.fontSizeLarger font.pixelSize: theme.fontSizeLarger
topPadding: 24 topPadding: 24
bottomPadding: 24 bottomPadding: 24
text: qsTr("\uFF0B New chat") text: qsTr("\uFF0B New Chat")
Accessible.description: qsTr("Create a new chat") Accessible.description: qsTr("Create a new chat")
onClicked: { onClicked: {
ChatListModel.addChat() ChatListModel.addChat()

View File

@ -503,7 +503,12 @@ Rectangle {
background: Rectangle { background: Rectangle {
radius: collectionsButton.backgroundRadius radius: collectionsButton.backgroundRadius
color: collectionsButton.toggled ? collectionsButton.backgroundColorHovered : collectionsButton.backgroundColor // TODO(jared): either use collectionsButton-specific theming, or don't - this is inconsistent
color: conversation.state == "expanded" ? (
collectionsButton.hovered ? theme.lightButtonBackgroundHovered : theme.lightButtonBackground
) : (
collectionsButton.hovered ? theme.lighterButtonBackground : theme.lighterButtonBackgroundHovered
)
} }
Accessible.name: qsTr("Add documents") Accessible.name: qsTr("Add documents")

View File

@ -124,40 +124,6 @@ MySettingsTab {
} }
} }
RowLayout {
MySettingsLabel {
id: deviceLabel
text: qsTr("Embeddings Device")
helpText: qsTr('The compute device used for embeddings. "Auto" uses the CPU. Requires restart.')
}
MyComboBox {
id: deviceBox
enabled: !useNomicAPIBox.checked
Layout.minimumWidth: 400
Layout.maximumWidth: 400
Layout.fillWidth: false
Layout.alignment: Qt.AlignRight
model: MySettings.embeddingsDeviceList
Accessible.name: deviceLabel.text
Accessible.description: deviceLabel.helpText
function updateModel() {
deviceBox.currentIndex = deviceBox.indexOfValue(MySettings.localDocsEmbedDevice);
}
Component.onCompleted: {
deviceBox.updateModel();
}
Connections {
target: MySettings
function onDeviceChanged() {
deviceBox.updateModel();
}
}
onActivated: {
MySettings.localDocsEmbedDevice = deviceBox.currentText;
}
}
}
RowLayout { RowLayout {
MySettingsLabel { MySettingsLabel {
id: apiKeyLabel id: apiKeyLabel
@ -193,6 +159,40 @@ MySettingsTab {
} }
} }
RowLayout {
MySettingsLabel {
id: deviceLabel
text: qsTr("Embeddings Device")
helpText: qsTr('The compute device used for embeddings. "Auto" uses the CPU. Requires restart.')
}
MyComboBox {
id: deviceBox
enabled: !useNomicAPIBox.checked
Layout.minimumWidth: 400
Layout.maximumWidth: 400
Layout.fillWidth: false
Layout.alignment: Qt.AlignRight
model: MySettings.embeddingsDeviceList
Accessible.name: deviceLabel.text
Accessible.description: deviceLabel.helpText
function updateModel() {
deviceBox.currentIndex = deviceBox.indexOfValue(MySettings.localDocsEmbedDevice);
}
Component.onCompleted: {
deviceBox.updateModel();
}
Connections {
target: MySettings
function onDeviceChanged() {
deviceBox.updateModel();
}
}
onActivated: {
MySettings.localDocsEmbedDevice = deviceBox.currentText;
}
}
}
ColumnLayout { ColumnLayout {
spacing: 10 spacing: 10
Label { Label {

View File

@ -68,7 +68,7 @@ Rectangle {
MyButton { MyButton {
Layout.alignment: Qt.AlignTop | Qt.AlignRight Layout.alignment: Qt.AlignTop | Qt.AlignRight
text: qsTr("\uFF0B Add Doc Collection") text: qsTr("\uFF0B Add Collection")
onClicked: { onClicked: {
addCollectionViewRequested() addCollectionViewRequested()
} }
@ -399,30 +399,35 @@ Rectangle {
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
spacing: 30 spacing: 30
Layout.leftMargin: 15 MySettingsButton {
Layout.rightMargin: 15
Layout.topMargin: 15
MyTextButton {
text: qsTr("Remove") text: qsTr("Remove")
color: theme.red500 textColor: theme.red500
onClick: LocalDocs.removeFolder(collection, folder_path) onClicked: LocalDocs.removeFolder(collection, folder_path)
backgroundColor: "transparent"
backgroundColorHovered: theme.lighterButtonBackgroundHoveredRed
} }
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true
} }
MyTextButton { MySettingsButton {
id: rebuildButton
visible: !model.forceIndexing && !model.indexing && model.currentEmbeddingsToIndex === 0 visible: !model.forceIndexing && !model.indexing && model.currentEmbeddingsToIndex === 0
text: qsTr("Rebuild") text: qsTr("Rebuild")
color: theme.green500 textColor: theme.green500
onClick: { LocalDocs.forceRebuildFolder(folder_path); } onClicked: LocalDocs.forceRebuildFolder(folder_path)
tooltip: qsTr("Reindex this folder from scratch. This is slow and usually not needed.") toolTip: qsTr("Reindex this folder from scratch. This is slow and usually not needed.")
backgroundColor: "transparent"
backgroundColorHovered: theme.lighterButtonBackgroundHovered
} }
MyTextButton { MySettingsButton {
id: updateButton
visible: model.forceIndexing visible: model.forceIndexing
text: qsTr("Update") text: qsTr("Update")
color: theme.green500 textColor: theme.green500
onClick: { LocalDocs.forceIndexing(collection); } onClicked: LocalDocs.forceIndexing(collection)
tooltip: qsTr("Update the collection to the new version. This is a slow operation.") toolTip: qsTr("Update the collection to the new version. This is a slow operation.")
backgroundColor: "transparent"
backgroundColorHovered: theme.lighterButtonBackgroundHovered
} }
} }
} }

View File

@ -295,23 +295,12 @@ Rectangle {
color: theme.dividerColor color: theme.dividerColor
} }
RowLayout { MySettingsButton {
Layout.fillWidth: true text: qsTr("Remove")
spacing: 30 textColor: theme.red500
Layout.leftMargin: 15 onClicked: Download.removeModel(filename)
Layout.topMargin: 15 backgroundColor: "transparent"
Text { backgroundColorHovered: theme.lighterButtonBackgroundHoveredRed
text: qsTr("Remove")
elide: Text.ElideRight
color: theme.red500
font.bold: true
font.pixelSize: theme.fontSizeSmall
TapHandler {
onTapped: {
Download.removeModel(filename);
}
}
}
} }
} }
} }

View File

@ -9,13 +9,14 @@ Button {
padding: 10 padding: 10
rightPadding: 18 rightPadding: 18
leftPadding: 18 leftPadding: 18
property color textColor: theme.lightButtonText property color textColor: theme.lightButtonText
property color mutedTextColor: theme.lightButtonMutedText property color mutedTextColor: theme.lightButtonMutedText
property color backgroundColor: theme.lightButtonBackground property color backgroundColor: theme.lightButtonBackground
property color backgroundColorHovered: enabled ? theme.lightButtonBackgroundHovered : backgroundColor property color backgroundColorHovered: enabled ? theme.lightButtonBackgroundHovered : backgroundColor
property real borderWidth: 0 property real borderWidth: 0
property color borderColor: "transparent" property color borderColor: "transparent"
property real fontPixelSize: theme.fontSizeLarge property real fontPixelSize: theme.fontSizeLarge
property string toolTip
contentItem: Text { contentItem: Text {
text: myButton.text text: myButton.text
@ -34,5 +35,7 @@ Button {
} }
Accessible.role: Accessible.Button Accessible.role: Accessible.Button
Accessible.name: text Accessible.name: text
ToolTip.text: toolTip
ToolTip.visible: toolTip !== "" && myButton.hovered
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
} }

View File

@ -30,7 +30,7 @@ MyDialog {
anchors.left: parent.left anchors.left: parent.left
width: 60 width: 60
height: 60 height: 60
source: "qrc:/gpt4all/icons/logo.svg" source: "qrc:/gpt4all/icons/gpt4all.svg"
} }
Text { Text {
anchors.left: img.right anchors.left: img.right

View File

@ -467,6 +467,17 @@ QtObject {
} }
} }
property color lighterButtonBackgroundHoveredRed: {
switch (MySettings.chatTheme) {
case "LegacyDark":
return buttonBackgroundHovered;
case "Dark":
return buttonBackgroundHovered;
default:
return red50;
}
}
property color sourcesBackground: { property color sourcesBackground: {
switch (MySettings.chatTheme) { switch (MySettings.chatTheme) {
case "LegacyDark": case "LegacyDark":

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 320 KiB