Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD
This commit is contained in:
commit
a91ab0e910
12 changed files with 41 additions and 12 deletions
|
@ -312,9 +312,8 @@ PageType {
|
|||
|
||||
onClicked: {
|
||||
forceActiveFocus()
|
||||
PageController.showBusyIndicator(true)
|
||||
PageController.goToPage(PageEnum.PageSetupWizardInstalling);
|
||||
InstallController.updateContainer(AwgConfigModel.getConfig())
|
||||
PageController.showBusyIndicator(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@ import QtQuick.Layouts
|
|||
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
|
@ -160,9 +162,8 @@ PageType {
|
|||
|
||||
onClicked: {
|
||||
forceActiveFocus()
|
||||
PageController.showBusyIndicator(true)
|
||||
PageController.goToPage(PageEnum.PageSetupWizardInstalling);
|
||||
InstallController.updateContainer(CloakConfigModel.getConfig())
|
||||
PageController.showBusyIndicator(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -390,9 +390,8 @@ PageType {
|
|||
|
||||
onClicked: {
|
||||
forceActiveFocus()
|
||||
PageController.showBusyIndicator(true)
|
||||
PageController.goToPage(PageEnum.PageSetupWizardInstalling);
|
||||
InstallController.updateContainer(OpenVpnConfigModel.getConfig())
|
||||
PageController.showBusyIndicator(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@ import QtQuick.Layouts
|
|||
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
|
@ -138,9 +140,8 @@ PageType {
|
|||
|
||||
onClicked: {
|
||||
forceActiveFocus()
|
||||
PageController.showBusyIndicator(true)
|
||||
PageController.goToPage(PageEnum.PageSetupWizardInstalling);
|
||||
InstallController.updateContainer(ShadowSocksConfigModel.getConfig())
|
||||
PageController.showBusyIndicator(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ PageType {
|
|||
|
||||
property bool isTimerRunning: true
|
||||
property string progressBarText: qsTr("Usually it takes no more than 5 minutes")
|
||||
property bool isCancelButtonVisible: false
|
||||
|
||||
Connections {
|
||||
target: InstallController
|
||||
|
@ -61,11 +62,13 @@ PageType {
|
|||
|
||||
function onServerIsBusy(isBusy) {
|
||||
if (isBusy) {
|
||||
root.isCancelButtonVisible = true
|
||||
root.progressBarText = qsTr("Amnezia has detected that your server is currently ") +
|
||||
qsTr("busy installing other software. Amnezia installation ") +
|
||||
qsTr("will pause until the server finishes installing other software")
|
||||
root.isTimerRunning = false
|
||||
} else {
|
||||
root.isCancelButtonVisible = false
|
||||
root.progressBarText = qsTr("Usually it takes no more than 5 minutes")
|
||||
root.isTimerRunning = true
|
||||
}
|
||||
|
@ -150,6 +153,22 @@ PageType {
|
|||
|
||||
text: root.progressBarText
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
id: cancelIntallationButton
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 24
|
||||
|
||||
visible: root.isCancelButtonVisible
|
||||
|
||||
text: qsTr("Cancel installation")
|
||||
|
||||
onClicked: {
|
||||
InstallController.cancelInstallation()
|
||||
PageController.showBusyIndicator(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ PageType {
|
|||
target: InstallController
|
||||
|
||||
function onInstallationErrorOccurred(errorMessage) {
|
||||
PageController.showBusyIndicator(false)
|
||||
PageController.showErrorMessage(errorMessage)
|
||||
|
||||
var currentPageName = stackView.currentItem.objectName
|
||||
|
|
|
@ -82,6 +82,7 @@ PageType {
|
|||
target: InstallController
|
||||
|
||||
function onInstallationErrorOccurred(errorMessage) {
|
||||
PageController.showBusyIndicator(false)
|
||||
PageController.showErrorMessage(errorMessage)
|
||||
|
||||
var needCloseCurrentPage = false
|
||||
|
@ -99,6 +100,7 @@ PageType {
|
|||
|
||||
function onUpdateContainerFinished(message) {
|
||||
PageController.showNotificationMessage(message)
|
||||
PageController.closePage()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,6 +109,7 @@ PageType {
|
|||
|
||||
function onReconnectWithUpdatedContainer(message) {
|
||||
PageController.showNotificationMessage(message)
|
||||
PageController.closePage()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue