additional new ui changes, part 4 (#2481)
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
@ -210,9 +210,9 @@ qt_add_qml_module(chat
|
||||
icons/twitter.svg
|
||||
icons/left_panel_closed.svg
|
||||
icons/left_panel_open.svg
|
||||
icons/logo.svg
|
||||
icons/logo-32.png
|
||||
icons/logo-48.png
|
||||
icons/gpt4all.svg
|
||||
icons/gpt4all-32.png
|
||||
icons/gpt4all-48.png
|
||||
icons/you.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_PATCH ${PROJECT_VERSION_PATCH})
|
||||
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_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
|
||||
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_PRODUCT_URL "https://gpt4all.io")
|
||||
set(CPACK_IFW_PACKAGE_WIZARD_STYLE "Aero")
|
||||
set(CPACK_IFW_PACKAGE_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-48.png")
|
||||
set(CPACK_IFW_PACKAGE_WINDOW_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.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/gpt4all-32.png")
|
||||
set(CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST OFF)
|
||||
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
@ -6,7 +6,7 @@ set(BIN_DIR ${DATA_DIR}/bin)
|
||||
set(Qt6_ROOT_DIR "@Qt6_ROOT_DIR@")
|
||||
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)
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png"
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/gpt4all-32.png"
|
||||
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})
|
||||
|
@ -12,9 +12,9 @@ file(COPY ${MYLLAMALIBS}
|
||||
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin/gpt4all.app/Contents/Frameworks)
|
||||
file(COPY ${MYLLMODELLIBS}
|
||||
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)
|
||||
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)
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/resources/gpt4all.icns"
|
||||
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)
|
||||
|
@ -2,9 +2,9 @@ set(WINDEPLOYQT "@WINDEPLOYQT@")
|
||||
set(COMPONENT_NAME_MAIN "@COMPONENT_NAME_MAIN@")
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/resources/gpt4all.ico"
|
||||
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)
|
||||
|
@ -44,7 +44,7 @@ Component.prototype.createOperations = function()
|
||||
homeDir + "/Desktop/GPT4All.desktop",
|
||||
"Type=Application\nTerminal=false\nExec=\"" + targetDirectory +
|
||||
"/bin/chat\"\nName=GPT4All\nIcon=" + targetDirectory +
|
||||
"/logo-48.png\nName[en_US]=GPT4All");
|
||||
"/gpt4all-48.png\nName[en_US]=GPT4All");
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
BIN
gpt4all-chat/icons/gpt4all-32.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
gpt4all-chat/icons/gpt4all-48.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
34
gpt4all-chat/icons/gpt4all.svg
Normal 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 |
Before Width: | Height: | Size: 203 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 735 B |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 34 KiB |
@ -498,7 +498,7 @@ Window {
|
||||
Image {
|
||||
id: image
|
||||
anchors.centerIn: parent
|
||||
sourceSize: Qt.size(60, 40)
|
||||
sourceSize: Qt.size(48 * theme.fontScale, 32 * theme.fontScale)
|
||||
fillMode: Image.PreserveAspectFit
|
||||
mipmap: true
|
||||
visible: false
|
||||
|
@ -32,7 +32,7 @@ Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: 30
|
||||
spacing: 50
|
||||
spacing: 20
|
||||
|
||||
RowLayout {
|
||||
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
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignCenter
|
||||
spacing: 50
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||
rowSpacing: 50
|
||||
columnSpacing: 20
|
||||
|
||||
property alias collection: collection.text
|
||||
property alias folder_path: folderEdit.text
|
||||
@ -80,17 +100,20 @@ Rectangle {
|
||||
folderDialog.open();
|
||||
}
|
||||
|
||||
Text {
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
text: qsTr("New Local Doc\nCollection")
|
||||
font.pixelSize: theme.fontSizeBanner
|
||||
color: theme.titleTextColor
|
||||
Label {
|
||||
Layout.row: 2
|
||||
Layout.column: 0
|
||||
text: qsTr("Name")
|
||||
font.bold: true
|
||||
font.pixelSize: theme.fontSizeLarger
|
||||
}
|
||||
|
||||
MyTextField {
|
||||
id: collection
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.row: 2
|
||||
Layout.column: 1
|
||||
Layout.minimumWidth: 400
|
||||
Layout.alignment: Qt.AlignRight
|
||||
horizontalAlignment: Text.AlignJustify
|
||||
color: theme.textColor
|
||||
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 {
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.row: 3
|
||||
Layout.column: 1
|
||||
Layout.minimumWidth: 400
|
||||
Layout.maximumWidth: 400
|
||||
Layout.alignment: Qt.AlignRight
|
||||
spacing: 10
|
||||
MyDirectoryField {
|
||||
id: folderEdit
|
||||
@ -143,8 +176,9 @@ Rectangle {
|
||||
}
|
||||
|
||||
MyButton {
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.minimumWidth: 400
|
||||
Layout.row: 4
|
||||
Layout.column: 1
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Create Collection")
|
||||
onClicked: {
|
||||
var isError = false;
|
||||
|
@ -46,7 +46,7 @@ Rectangle {
|
||||
font.pixelSize: theme.fontSizeLarger
|
||||
topPadding: 24
|
||||
bottomPadding: 24
|
||||
text: qsTr("\uFF0B New chat")
|
||||
text: qsTr("\uFF0B New Chat")
|
||||
Accessible.description: qsTr("Create a new chat")
|
||||
onClicked: {
|
||||
ChatListModel.addChat()
|
||||
|
@ -503,7 +503,12 @@ Rectangle {
|
||||
|
||||
background: Rectangle {
|
||||
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")
|
||||
|
@ -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 {
|
||||
MySettingsLabel {
|
||||
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 {
|
||||
spacing: 10
|
||||
Label {
|
||||
|
@ -68,7 +68,7 @@ Rectangle {
|
||||
|
||||
MyButton {
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignRight
|
||||
text: qsTr("\uFF0B Add Doc Collection")
|
||||
text: qsTr("\uFF0B Add Collection")
|
||||
onClicked: {
|
||||
addCollectionViewRequested()
|
||||
}
|
||||
@ -399,30 +399,35 @@ Rectangle {
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 30
|
||||
Layout.leftMargin: 15
|
||||
Layout.rightMargin: 15
|
||||
Layout.topMargin: 15
|
||||
MyTextButton {
|
||||
MySettingsButton {
|
||||
text: qsTr("Remove")
|
||||
color: theme.red500
|
||||
onClick: LocalDocs.removeFolder(collection, folder_path)
|
||||
textColor: theme.red500
|
||||
onClicked: LocalDocs.removeFolder(collection, folder_path)
|
||||
backgroundColor: "transparent"
|
||||
backgroundColorHovered: theme.lighterButtonBackgroundHoveredRed
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
MyTextButton {
|
||||
MySettingsButton {
|
||||
id: rebuildButton
|
||||
visible: !model.forceIndexing && !model.indexing && model.currentEmbeddingsToIndex === 0
|
||||
text: qsTr("Rebuild")
|
||||
color: theme.green500
|
||||
onClick: { LocalDocs.forceRebuildFolder(folder_path); }
|
||||
tooltip: qsTr("Reindex this folder from scratch. This is slow and usually not needed.")
|
||||
textColor: theme.green500
|
||||
onClicked: LocalDocs.forceRebuildFolder(folder_path)
|
||||
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
|
||||
text: qsTr("Update")
|
||||
color: theme.green500
|
||||
onClick: { LocalDocs.forceIndexing(collection); }
|
||||
tooltip: qsTr("Update the collection to the new version. This is a slow operation.")
|
||||
textColor: theme.green500
|
||||
onClicked: LocalDocs.forceIndexing(collection)
|
||||
toolTip: qsTr("Update the collection to the new version. This is a slow operation.")
|
||||
backgroundColor: "transparent"
|
||||
backgroundColorHovered: theme.lighterButtonBackgroundHovered
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -295,23 +295,12 @@ Rectangle {
|
||||
color: theme.dividerColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 30
|
||||
Layout.leftMargin: 15
|
||||
Layout.topMargin: 15
|
||||
Text {
|
||||
text: qsTr("Remove")
|
||||
elide: Text.ElideRight
|
||||
color: theme.red500
|
||||
font.bold: true
|
||||
font.pixelSize: theme.fontSizeSmall
|
||||
TapHandler {
|
||||
onTapped: {
|
||||
Download.removeModel(filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
MySettingsButton {
|
||||
text: qsTr("Remove")
|
||||
textColor: theme.red500
|
||||
onClicked: Download.removeModel(filename)
|
||||
backgroundColor: "transparent"
|
||||
backgroundColorHovered: theme.lighterButtonBackgroundHoveredRed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,13 +9,14 @@ Button {
|
||||
padding: 10
|
||||
rightPadding: 18
|
||||
leftPadding: 18
|
||||
property color textColor: theme.lightButtonText
|
||||
property color mutedTextColor: theme.lightButtonMutedText
|
||||
property color backgroundColor: theme.lightButtonBackground
|
||||
property color backgroundColorHovered: enabled ? theme.lightButtonBackgroundHovered : backgroundColor
|
||||
property real borderWidth: 0
|
||||
property color borderColor: "transparent"
|
||||
property real fontPixelSize: theme.fontSizeLarge
|
||||
property color textColor: theme.lightButtonText
|
||||
property color mutedTextColor: theme.lightButtonMutedText
|
||||
property color backgroundColor: theme.lightButtonBackground
|
||||
property color backgroundColorHovered: enabled ? theme.lightButtonBackgroundHovered : backgroundColor
|
||||
property real borderWidth: 0
|
||||
property color borderColor: "transparent"
|
||||
property real fontPixelSize: theme.fontSizeLarge
|
||||
property string toolTip
|
||||
|
||||
contentItem: Text {
|
||||
text: myButton.text
|
||||
@ -34,5 +35,7 @@ Button {
|
||||
}
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: text
|
||||
ToolTip.text: toolTip
|
||||
ToolTip.visible: toolTip !== "" && myButton.hovered
|
||||
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ MyDialog {
|
||||
anchors.left: parent.left
|
||||
width: 60
|
||||
height: 60
|
||||
source: "qrc:/gpt4all/icons/logo.svg"
|
||||
source: "qrc:/gpt4all/icons/gpt4all.svg"
|
||||
}
|
||||
Text {
|
||||
anchors.left: img.right
|
||||
|
@ -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: {
|
||||
switch (MySettings.chatTheme) {
|
||||
case "LegacyDark":
|
||||
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 320 KiB |