feat(GODT-3121): suggestions links are in the final bug report page.
This commit is contained in:
parent
cfd07cf893
commit
2206cb3f12
|
@ -22,6 +22,7 @@ SettingsView {
|
||||||
property var selectedAddress
|
property var selectedAddress
|
||||||
property var categoryId:-1
|
property var categoryId:-1
|
||||||
property string category: Backend.getBugCategory(root.categoryId)
|
property string category: Backend.getBugCategory(root.categoryId)
|
||||||
|
property var suggestions: null
|
||||||
|
|
||||||
signal bugReportWasSent
|
signal bugReportWasSent
|
||||||
|
|
||||||
|
@ -75,6 +76,29 @@ SettingsView {
|
||||||
label: "Your answers to: " + qsTr(root.category);
|
label: "Your answers to: " + qsTr(root.category);
|
||||||
readOnly : true
|
readOnly : true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: suggestionBox
|
||||||
|
visible: suggestions && suggestions.length > 0
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
Label {
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
text: qsTr("We believe these links might be relevant for your problem")
|
||||||
|
type: Label.Body_semibold
|
||||||
|
}
|
||||||
|
Repeater {
|
||||||
|
model: suggestions
|
||||||
|
LinkLabel {
|
||||||
|
required property var modelData
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
text: modelData.title
|
||||||
|
link: modelData.url
|
||||||
|
external: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: address
|
id: address
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -85,7 +109,6 @@ SettingsView {
|
||||||
if (!isValidEmail(str)) {
|
if (!isValidEmail(str)) {
|
||||||
return qsTr("Enter valid email address");
|
return qsTr("Enter valid email address");
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TextField {
|
TextField {
|
||||||
|
@ -98,7 +121,6 @@ SettingsView {
|
||||||
if (str.length === 0) {
|
if (str.length === 0) {
|
||||||
return qsTr("Enter an email client name and version");
|
return qsTr("Enter an email client name and version");
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -156,10 +178,7 @@ SettingsView {
|
||||||
sendButton.loading = false;
|
sendButton.loading = false;
|
||||||
}
|
}
|
||||||
function onReceivedKnowledgeBaseSuggestions(suggestions) {
|
function onReceivedKnowledgeBaseSuggestions(suggestions) {
|
||||||
console.error("QML: onReceivedKnowledgeBaseSuggestions() - len = %1".arg(suggestions.length))
|
root.suggestions = suggestions
|
||||||
console.error("QML: %1: %2".arg(suggestions[0].title).arg(suggestions[0].url))
|
|
||||||
console.error("QML: %1: %2".arg(suggestions[1].title).arg(suggestions[1].url))
|
|
||||||
console.error("QML: %1: %2".arg(suggestions[2].title).arg(suggestions[2].url))
|
|
||||||
}
|
}
|
||||||
target: Backend
|
target: Backend
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue