Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into HEAD
This commit is contained in:
commit
af0fe754fc
114 changed files with 4051 additions and 3700 deletions
|
|
@ -15,6 +15,7 @@ import "Pages2"
|
|||
Window {
|
||||
id: root
|
||||
objectName: "mainWindow"
|
||||
|
||||
visible: true
|
||||
width: GC.screenWidth
|
||||
height: GC.screenHeight
|
||||
|
|
@ -26,13 +27,39 @@ Window {
|
|||
color: AmneziaStyle.color.midnightBlack
|
||||
|
||||
onClosing: function() {
|
||||
console.debug("QML onClosing signal")
|
||||
PageController.closeWindow()
|
||||
}
|
||||
|
||||
title: "AmneziaVPN"
|
||||
|
||||
Item { // This item is needed for focus handling
|
||||
id: defaultFocusItem
|
||||
objectName: "defaultFocusItem"
|
||||
|
||||
focus: true
|
||||
|
||||
Keys.onPressed: function(event) {
|
||||
switch (event.key) {
|
||||
case Qt.Key_Tab:
|
||||
case Qt.Key_Down:
|
||||
case Qt.Key_Right:
|
||||
FocusController.nextKeyTabItem()
|
||||
break
|
||||
case Qt.Key_Backtab:
|
||||
case Qt.Key_Up:
|
||||
case Qt.Key_Left:
|
||||
FocusController.previousKeyTabItem()
|
||||
break
|
||||
default:
|
||||
PageController.keyPressEvent(event.key)
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
objectName: "pageControllerConnections"
|
||||
|
||||
target: PageController
|
||||
|
||||
function onRaiseMainWindow() {
|
||||
|
|
@ -58,7 +85,7 @@ Window {
|
|||
}
|
||||
|
||||
function onShowPassphraseRequestDrawer() {
|
||||
privateKeyPassphraseDrawer.open()
|
||||
privateKeyPassphraseDrawer.openTriggered()
|
||||
}
|
||||
|
||||
function onGoToPageSettingsBackup() {
|
||||
|
|
@ -76,6 +103,8 @@ Window {
|
|||
}
|
||||
|
||||
Connections {
|
||||
objectName: "settingsControllerConnections"
|
||||
|
||||
target: SettingsController
|
||||
|
||||
function onChangeSettingsFinished(finishedMessage) {
|
||||
|
|
@ -84,11 +113,15 @@ Window {
|
|||
}
|
||||
|
||||
PageStart {
|
||||
objectName: "pageStart"
|
||||
|
||||
width: root.width
|
||||
height: root.height
|
||||
}
|
||||
|
||||
Item {
|
||||
objectName: "popupNotificationItem"
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
|
|
@ -112,6 +145,8 @@ Window {
|
|||
}
|
||||
|
||||
Item {
|
||||
objectName: "popupErrorMessageItem"
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
|
|
@ -124,6 +159,8 @@ Window {
|
|||
}
|
||||
|
||||
Item {
|
||||
objectName: "privateKeyPassphraseDrawerItem"
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
DrawerType2 {
|
||||
|
|
@ -132,7 +169,7 @@ Window {
|
|||
anchors.fill: parent
|
||||
expandedHeight: root.height * 0.35
|
||||
|
||||
expandedContent: ColumnLayout {
|
||||
expandedStateContent: ColumnLayout {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
|
@ -171,8 +208,6 @@ Window {
|
|||
clickedFunc: function() {
|
||||
hidePassword = !hidePassword
|
||||
}
|
||||
|
||||
KeyNavigation.tab: saveButton
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
|
|
@ -190,7 +225,7 @@ Window {
|
|||
text: qsTr("Save")
|
||||
|
||||
clickedFunc: function() {
|
||||
privateKeyPassphraseDrawer.close()
|
||||
privateKeyPassphraseDrawer.closeTriggered()
|
||||
PageController.passphraseRequestDrawerClosed(passphrase.textFieldText)
|
||||
}
|
||||
}
|
||||
|
|
@ -199,6 +234,8 @@ Window {
|
|||
}
|
||||
|
||||
Item {
|
||||
objectName: "questionDrawerItem"
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
QuestionDrawer {
|
||||
|
|
@ -209,6 +246,8 @@ Window {
|
|||
}
|
||||
|
||||
Item {
|
||||
objectName: "busyIndicatorItem"
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
BusyIndicatorType {
|
||||
|
|
@ -225,26 +264,26 @@ Window {
|
|||
questionDrawer.noButtonText = noButtonText
|
||||
|
||||
questionDrawer.yesButtonFunction = function() {
|
||||
questionDrawer.close()
|
||||
questionDrawer.closeTriggered()
|
||||
if (yesButtonFunction && typeof yesButtonFunction === "function") {
|
||||
yesButtonFunction()
|
||||
}
|
||||
}
|
||||
questionDrawer.noButtonFunction = function() {
|
||||
questionDrawer.close()
|
||||
questionDrawer.closeTriggered()
|
||||
if (noButtonFunction && typeof noButtonFunction === "function") {
|
||||
noButtonFunction()
|
||||
}
|
||||
}
|
||||
questionDrawer.open()
|
||||
questionDrawer.openTriggered()
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: mainFileDialog
|
||||
objectName: "mainFileDialog"
|
||||
|
||||
property bool isSaveMode: false
|
||||
|
||||
objectName: "mainFileDialog"
|
||||
fileMode: isSaveMode ? FileDialog.SaveFile : FileDialog.OpenFile
|
||||
|
||||
onAccepted: SystemController.fileDialogClosed(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue