Skip to content

Commit

Permalink
chore: fixed native config post processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Nethius committed Feb 21, 2025
1 parent 48980c4 commit 8afe50c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions client/ui/controllers/api/apiConfigsController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ bool ApiConfigsController::exportNativeConfig(const QString &serverCountryCode,

QJsonObject jsonConfig = QJsonDocument::fromJson(responseBody).object();
QString nativeConfig = jsonConfig.value(configKey::config).toString();
nativeConfig.replace("$WIREGUARD_CLIENT_PRIVATE_KEY", apiPayloadData.wireGuardClientPrivKey);

SystemController::saveFile(fileName, nativeConfig);
return true;
Expand Down Expand Up @@ -124,6 +125,8 @@ void ApiConfigsController::prepareVpnKeyExport()

auto vpnKey = apiConfigObject.value(apiDefs::key::vpnKey).toString();

vpnKey.replace("vpn://", "");

m_qrCodes = qrCodeUtils::generateQrCodeImageSeries(vpnKey.toUtf8());

emit vpnKeyExportReady();
Expand Down
5 changes: 3 additions & 2 deletions client/ui/qml/Pages2/PageSettingsApiServerInfo.qml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ PageType {
LabelWithButtonType {
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"

clickedFunction: function() {
Expand Down Expand Up @@ -266,11 +266,12 @@ PageType {
BasicButtonType {
id: revokeButton
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 24
Layout.bottomMargin: 16
Layout.leftMargin: 8
implicitHeight: 32

visible: footer.isVisibleForAmneziaFree

defaultColor: "transparent"
hoveredColor: AmneziaStyle.color.translucentWhite
pressedColor: AmneziaStyle.color.sheerWhite
Expand Down

0 comments on commit 8afe50c

Please sign in to comment.