mirror of
https://github.com/feather-wallet/feather.git
synced 2025-01-24 19:45:50 +00:00
Add open link button for udev rules
This commit is contained in:
parent
f2a72c342e
commit
161f07d2da
1 changed files with 11 additions and 2 deletions
|
@ -302,6 +302,7 @@ void WindowManager::handleWalletError(const QString &message) {
|
||||||
|
|
||||||
void WindowManager::displayWalletErrorMessage(const QString &message) {
|
void WindowManager::displayWalletErrorMessage(const QString &message) {
|
||||||
QString errMsg = QString("Error: %1").arg(message);
|
QString errMsg = QString("Error: %1").arg(message);
|
||||||
|
QString link;
|
||||||
|
|
||||||
// Ledger
|
// Ledger
|
||||||
if (message.contains("No device found")) {
|
if (message.contains("No device found")) {
|
||||||
|
@ -313,6 +314,7 @@ void WindowManager::displayWalletErrorMessage(const QString &message) {
|
||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX)
|
||||||
errMsg += "\n\nNote: On Linux you may need to follow the instructions in the link below before the device can be opened:\n"
|
errMsg += "\n\nNote: On Linux you may need to follow the instructions in the link below before the device can be opened:\n"
|
||||||
"https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues";
|
"https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues";
|
||||||
|
link = "https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,11 +328,11 @@ void WindowManager::displayWalletErrorMessage(const QString &message) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message.contains("Could not connect to the device Trezor") || message.contains("Device connect failed")) {
|
if (message.contains("Could not connect to the device Trezor") || message.contains("Device connect failed")) {
|
||||||
errMsg += "\n\nThis wallet is backed by a Trezor hardware device. Make sure the device is connected to your computer and unlocked.\n"
|
errMsg += "\n\nThis wallet is backed by a Trezor hardware device. Make sure the device is connected to your computer and unlocked.";
|
||||||
"You may need to restart Feather before the device can be detected.";
|
|
||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX)
|
||||||
errMsg += "\n\nNote: On Linux you may need to follow the instructions in the link below before the device can be opened:\n"
|
errMsg += "\n\nNote: On Linux you may need to follow the instructions in the link below before the device can be opened:\n"
|
||||||
"https://wiki.trezor.io/Udev_rules";
|
"https://wiki.trezor.io/Udev_rules";
|
||||||
|
link = "https://wiki.trezor.io/Udev_rules";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,7 +353,14 @@ void WindowManager::displayWalletErrorMessage(const QString &message) {
|
||||||
msgBox.setWindowTitle("Wallet error");
|
msgBox.setWindowTitle("Wallet error");
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||||
|
QPushButton *openLinkButton = nullptr;
|
||||||
|
if (!link.isEmpty()) {
|
||||||
|
openLinkButton = msgBox.addButton("Open link", QMessageBox::ActionRole);
|
||||||
|
}
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
|
if (openLinkButton && msgBox.clickedButton() == openLinkButton) {
|
||||||
|
Utils::externalLinkWarning(nullptr, link);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ######################## DEVICE ########################
|
// ######################## DEVICE ########################
|
||||||
|
|
Loading…
Reference in a new issue