chore: fixed native config post processing
This commit is contained in:
parent
48980c486e
commit
8afe50cd87
2 changed files with 6 additions and 2 deletions
|
|
@ -87,6 +87,7 @@ bool ApiConfigsController::exportNativeConfig(const QString &serverCountryCode,
|
||||||
|
|
||||||
QJsonObject jsonConfig = QJsonDocument::fromJson(responseBody).object();
|
QJsonObject jsonConfig = QJsonDocument::fromJson(responseBody).object();
|
||||||
QString nativeConfig = jsonConfig.value(configKey::config).toString();
|
QString nativeConfig = jsonConfig.value(configKey::config).toString();
|
||||||
|
nativeConfig.replace("$WIREGUARD_CLIENT_PRIVATE_KEY", apiPayloadData.wireGuardClientPrivKey);
|
||||||
|
|
||||||
SystemController::saveFile(fileName, nativeConfig);
|
SystemController::saveFile(fileName, nativeConfig);
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -124,6 +125,8 @@ void ApiConfigsController::prepareVpnKeyExport()
|
||||||
|
|
||||||
auto vpnKey = apiConfigObject.value(apiDefs::key::vpnKey).toString();
|
auto vpnKey = apiConfigObject.value(apiDefs::key::vpnKey).toString();
|
||||||
|
|
||||||
|
vpnKey.replace("vpn://", "");
|
||||||
|
|
||||||
m_qrCodes = qrCodeUtils::generateQrCodeImageSeries(vpnKey.toUtf8());
|
m_qrCodes = qrCodeUtils::generateQrCodeImageSeries(vpnKey.toUtf8());
|
||||||
|
|
||||||
emit vpnKeyExportReady();
|
emit vpnKeyExportReady();
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ PageType {
|
||||||
LabelWithButtonType {
|
LabelWithButtonType {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
text: qsTr("How to connect on another devicey")
|
text: qsTr("How to connect on another device")
|
||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
|
|
@ -266,11 +266,12 @@ PageType {
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
id: revokeButton
|
id: revokeButton
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.topMargin: 24
|
|
||||||
Layout.bottomMargin: 16
|
Layout.bottomMargin: 16
|
||||||
Layout.leftMargin: 8
|
Layout.leftMargin: 8
|
||||||
implicitHeight: 32
|
implicitHeight: 32
|
||||||
|
|
||||||
|
visible: footer.isVisibleForAmneziaFree
|
||||||
|
|
||||||
defaultColor: "transparent"
|
defaultColor: "transparent"
|
||||||
hoveredColor: AmneziaStyle.color.translucentWhite
|
hoveredColor: AmneziaStyle.color.translucentWhite
|
||||||
pressedColor: AmneziaStyle.color.sheerWhite
|
pressedColor: AmneziaStyle.color.sheerWhite
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue