Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/ovpn-config-import
This commit is contained in:
commit
22939a6707
15 changed files with 568 additions and 147 deletions
|
@ -112,7 +112,7 @@ New encryption keys pair will be generated.")
|
|||
Layout.bottomMargin: 10
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
text: qsTr("Save to file")
|
||||
text: Qt.platform.os === "android" ? qsTr("Share") : qsTr("Save to file")
|
||||
enabled: tfShareCode.textArea.length > 0
|
||||
visible: tfShareCode.textArea.length > 0
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ PageShareProtocolBase {
|
|||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
|
||||
text: qsTr("Save to file")
|
||||
text: Qt.platform.os === "android" ? qsTr("Share") : qsTr("Save to file")
|
||||
enabled: tfShareCode.textArea.length > 0
|
||||
visible: tfShareCode.textArea.length > 0
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ PageShareProtocolBase {
|
|||
Layout.preferredHeight: 40
|
||||
width: parent.width - 60
|
||||
|
||||
text: qsTr("Save to file")
|
||||
text: Qt.platform.os === "android" ? qsTr("Share") : qsTr("Save to file")
|
||||
enabled: tfShareCode.textArea.length > 0
|
||||
visible: tfShareCode.textArea.length > 0
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ PageShareProtocolBase {
|
|||
Layout.preferredHeight: 40
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Save to file")
|
||||
text: Qt.platform.os === "android" ? qsTr("Share") : qsTr("Save to file")
|
||||
enabled: tfShareCode.textArea.length > 0
|
||||
visible: tfShareCode.textArea.length > 0
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ void UiLogic::initalizeUiLogic()
|
|||
pageLogic<VpnLogic>()->onConnectionStateChanged(VpnProtocol::Connected);
|
||||
}
|
||||
});
|
||||
if (!AndroidController::instance()->initialize()) {
|
||||
if (!AndroidController::instance()->initialize(pageLogic<StartPageLogic>())) {
|
||||
qCritical() << QString("Init failed") ;
|
||||
emit VpnProtocol::Error;
|
||||
return;
|
||||
|
@ -593,8 +593,9 @@ void UiLogic::saveTextFile(const QString& desc, const QString& suggestedName, QS
|
|||
if (fileName.isEmpty()) return;
|
||||
if (!fileName.toString().endsWith(ext)) fileName = QUrl(fileName.toString() + ext);
|
||||
#elif defined Q_OS_ANDROID
|
||||
fileName = QFileDialog::getSaveFileUrl(nullptr, suggestedName,
|
||||
QUrl::fromLocalFile(docDir), "*" + ext);
|
||||
qDebug() << "UiLogic::shareConfig" << data;
|
||||
AndroidController::instance()->shareConfig(data, suggestedName);
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (fileName.isEmpty()) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue