mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-08 14:33:23 +00:00
fix: mirror links (#1760)
* Instructions links * amnezia free feature link * trying fix api instructions page issue * androidTV link fix * tv link fix 2
This commit is contained in:
@@ -112,7 +112,7 @@ QVariant ApiServicesModel::data(const QModelIndex &index, int role) const
|
||||
} else {
|
||||
return tr("VPN will open only popular sites blocked in your region, such as Instagram, Facebook, Twitter and others. "
|
||||
"Other sites will be opened from your real IP address, "
|
||||
"<a href=\"%1/free\" style=\"color: #FBB26A;\">more details on the website.</a>");
|
||||
"<a href=\"%1\" style=\"color: #FBB26A;\">more details on the website.</a>");
|
||||
}
|
||||
}
|
||||
case PriceRole: {
|
||||
|
||||
@@ -110,3 +110,13 @@ QString LanguageModel::getCurrentSiteUrl(const QString &path)
|
||||
default: return QString("https://amnezia.org") + (path.isEmpty() ? "" : (QString("/%1").arg(path)));
|
||||
}
|
||||
}
|
||||
|
||||
QString LanguageModel::getCurrentDocsUrl(const QString &path)
|
||||
{
|
||||
auto language = static_cast<LanguageSettings::AvailableLanguageEnum>(getCurrentLanguageIndex());
|
||||
switch (language) {
|
||||
case LanguageSettings::AvailableLanguageEnum::Russian:
|
||||
return "https://storage.googleapis.com/amnezia/docs" + (path.isEmpty() ? "" : (QString("?m-path=/%1").arg(path)));
|
||||
default: return QString("https://docs.amnezia.org") + (path.isEmpty() ? "" : (QString("/%1").arg(path)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ public slots:
|
||||
int getLineHeightAppend();
|
||||
QString getCurrentLanguageName();
|
||||
QString getCurrentSiteUrl(const QString &path = "");
|
||||
QString getCurrentDocsUrl(const QString &path = "");
|
||||
|
||||
signals:
|
||||
void updateTranslations(const QLocale &locale);
|
||||
|
||||
@@ -20,49 +20,49 @@ PageType {
|
||||
id: windows
|
||||
|
||||
readonly property string title: qsTr("Windows")
|
||||
readonly property string link: qsTr("https://docs.amnezia.org/documentation/instructions/connect-amnezia-premium#windows")
|
||||
readonly property string link: qsTr("documentation/instructions/connect-amnezia-premium#windows")
|
||||
}
|
||||
|
||||
QtObject {
|
||||
id: macos
|
||||
|
||||
readonly property string title: qsTr("macOS")
|
||||
readonly property string link: qsTr("https://docs.amnezia.org/documentation/instructions/connect-amnezia-premium#macos")
|
||||
readonly property string link: qsTr("documentation/instructions/connect-amnezia-premium#macos")
|
||||
}
|
||||
|
||||
QtObject {
|
||||
id: android
|
||||
|
||||
readonly property string title: qsTr("Android")
|
||||
readonly property string link: qsTr("https://docs.amnezia.org/documentation/instructions/connect-amnezia-premium#android")
|
||||
readonly property string link: qsTr("documentation/instructions/connect-amnezia-premium#android")
|
||||
}
|
||||
|
||||
QtObject {
|
||||
id: androidTv
|
||||
|
||||
readonly property string title: qsTr("AndroidTV")
|
||||
readonly property string link: qsTr("https://docs.amnezia.org/ru/documentation/instructions/android_tv_connect/")
|
||||
readonly property string link: qsTr("documentation/instructions/android_tv_connect/")
|
||||
}
|
||||
|
||||
QtObject {
|
||||
id: ios
|
||||
|
||||
readonly property string title: qsTr("iOS")
|
||||
readonly property string link: qsTr("https://docs.amnezia.org/documentation/instructions/connect-amnezia-premium#ios")
|
||||
readonly property string link: qsTr("documentation/instructions/connect-amnezia-premium#ios")
|
||||
}
|
||||
|
||||
QtObject {
|
||||
id: linux
|
||||
|
||||
readonly property string title: qsTr("Linux")
|
||||
readonly property string link: qsTr("https://docs.amnezia.org/documentation/instructions/connect-amnezia-premium#linux")
|
||||
readonly property string link: qsTr("documentation/instructions/connect-amnezia-premium#linux")
|
||||
}
|
||||
|
||||
QtObject {
|
||||
id: routers
|
||||
|
||||
readonly property string title: qsTr("Routers")
|
||||
readonly property string link: qsTr("https://docs.amnezia.org/documentation/instructions/connect-amnezia-premium#routers")
|
||||
readonly property string link: qsTr("documentation/instructions/connect-amnezia-premium#routers")
|
||||
}
|
||||
|
||||
property list<QtObject> instructionsModel: [
|
||||
@@ -114,7 +114,7 @@ PageType {
|
||||
rightImageSource: "qrc:/images/controls/external-link.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
Qt.openUrlExternally(link)
|
||||
Qt.openUrlExternally(LanguageModel.getCurrentDocsUrl(link))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ PageType {
|
||||
textFormat: Text.RichText
|
||||
text: {
|
||||
var text = ApiServicesModel.getSelectedServiceData("features")
|
||||
return text.replace("%1", LanguageModel.getCurrentSiteUrl())
|
||||
return text.replace("%1", LanguageModel.getCurrentSiteUrl("free"))
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
||||
Reference in New Issue
Block a user