mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-06 09:20:33 +00:00
Rearrange the buttons and provide a message what the copy button does.
This commit is contained in:
parent
f19abd6a18
commit
ef789b354b
85
main.qml
85
main.qml
@ -311,7 +311,7 @@ Window {
|
||||
}
|
||||
|
||||
Button {
|
||||
id: copyButton
|
||||
id: settingsButton
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 30
|
||||
@ -321,6 +321,55 @@ Window {
|
||||
z: 200
|
||||
padding: 15
|
||||
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
width: 40
|
||||
height: 40
|
||||
source: "qrc:/gpt4all-chat/icons/settings.svg"
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
settingsDialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
Dialog {
|
||||
id: copyMessage
|
||||
anchors.centerIn: parent
|
||||
modal: false
|
||||
opacity: 0.9
|
||||
Text {
|
||||
horizontalAlignment: Text.AlignJustify
|
||||
text: qsTr("Conversation copied to clipboard.")
|
||||
color: "#d1d5db"
|
||||
}
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "#202123"
|
||||
border.width: 1
|
||||
border.color: "white"
|
||||
radius: 10
|
||||
}
|
||||
|
||||
exit: Transition {
|
||||
NumberAnimation { duration: 500; property: "opacity"; from: 1.0; to: 0.0 }
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: copyButton
|
||||
anchors.right: settingsButton.left
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 30
|
||||
anchors.rightMargin: 30
|
||||
width: 60
|
||||
height: 40
|
||||
z: 200
|
||||
padding: 15
|
||||
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
@ -351,6 +400,13 @@ Window {
|
||||
copyEdit.text = conversation
|
||||
copyEdit.selectAll()
|
||||
copyEdit.copy()
|
||||
copyMessage.open()
|
||||
timer.start()
|
||||
}
|
||||
Timer {
|
||||
id: timer
|
||||
interval: 500; running: false; repeat: false
|
||||
onTriggered: copyMessage.close()
|
||||
}
|
||||
}
|
||||
|
||||
@ -382,33 +438,6 @@ Window {
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: settingsButton
|
||||
anchors.right: resetContextButton.left
|
||||
anchors.top: parent.top
|
||||
|
||||
anchors.topMargin: 30
|
||||
anchors.rightMargin: 30
|
||||
width: 60
|
||||
height: 40
|
||||
z: 200
|
||||
padding: 15
|
||||
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
width: 40
|
||||
height: 40
|
||||
source: "qrc:/gpt4all-chat/icons/settings.svg"
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
settingsDialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
Dialog {
|
||||
id: checkForUpdatesError
|
||||
anchors.centerIn: parent
|
||||
|
Loading…
Reference in New Issue
Block a user