fix: mirror error code link (#1863)

* fix: mirror error code link

* remake
This commit is contained in:
MrMirDan
2025-09-29 05:48:36 +03:00
committed by GitHub
parent b4938c2cc9
commit 657eeb40c7
2 changed files with 2 additions and 2 deletions

View File

@@ -169,7 +169,7 @@ void PageController::onShowErrorMessage(ErrorCode errorCode)
{
const auto fullErrorMessage = errorString(errorCode);
const auto errorMessage = fullErrorMessage.mid(fullErrorMessage.indexOf(". ") + 1); // remove ErrorCode %1.
const auto errorUrl = QStringLiteral("https://docs.amnezia.org/troubleshooting/error-codes/#error-%1-%2").arg(static_cast<int>(errorCode)).arg(utils::enumToString(errorCode).toLower());
const auto errorUrl = QStringLiteral("troubleshooting/error-codes/#error-%1-%2").arg(static_cast<int>(errorCode)).arg(utils::enumToString(errorCode).toLower());
const auto fullMessage = QStringLiteral("<a href=\"%1\" style=\"color: #FBB26A;\">ErrorCode: %2</a>. %3").arg(errorUrl).arg(static_cast<int>(errorCode)).arg(errorMessage);
emit showErrorMessage(fullMessage);

View File

@@ -72,7 +72,7 @@ Popup {
Layout.fillWidth: true
onLinkActivated: function(link) {
Qt.openUrlExternally(link)
Qt.openUrlExternally(LanguageModel.getCurrentDocsUrl(link))
}
text: root.text