Merge branch 'CURA-7017_link_to_help' of github.com:Ultimaker/Cura

This commit is contained in:
Jaime van Kessel 2020-03-18 10:49:35 +01:00
commit ced25adc2b
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -159,6 +159,7 @@ Item
enabled: !addPrinterByIpScreen.hasRequestInProgress && !addPrinterByIpScreen.isPrinterDiscovered && (hostnameField.state != "invalid" && hostnameField.text != "")
onClicked:
{
addPrinterByIpScreen.hasRequestFinished = false //In case it's pressed multiple times.
const address = hostnameField.text
if (!networkingUtil.isValidIP(address))
{
@ -197,17 +198,21 @@ Item
renderType: Text.NativeRendering
visible: addPrinterByIpScreen.hasRequestInProgress || (addPrinterByIpScreen.hasRequestFinished && !addPrinterByIpScreen.isPrinterDiscovered)
textFormat: Text.RichText
text:
{
if (addPrinterByIpScreen.hasRequestFinished)
{
catalog.i18nc("@label", "Could not connect to device.")
return catalog.i18nc("@label", "Could not connect to device.") + "<br /><br /><a href=\"https://ultimaker.com/en/resources/52891-set-up-a-cloud-connection\">"
+ catalog.i18nc("@label", "Can't connect to your Ultimaker printer?") + "</a>";
}
else
{
catalog.i18nc("@label", "The printer at this address has not responded yet.")
return catalog.i18nc("@label", "The printer at this address has not responded yet.") + "<br /><br /><a href=\"https://ultimaker.com/en/resources/52891-set-up-a-cloud-connection\">"
+ catalog.i18nc("@label", "Can't connect to your Ultimaker printer?") + "</a>";
}
}
onLinkActivated: Qt.openUrlExternally(link)
}
Item