remove useless slots, logs, Drawer open and close
This commit is contained in:
parent
063851445a
commit
ada3f9a7fa
17 changed files with 3 additions and 132 deletions
|
|
@ -33,18 +33,6 @@ DrawerType2 {
|
||||||
root.expandedHeight = content.implicitHeight + 32
|
root.expandedHeight = content.implicitHeight + 32
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: root
|
|
||||||
enabled: !GC.isMobile()
|
|
||||||
function onOpened() {
|
|
||||||
FocusController.pushRootObject(root)
|
|
||||||
}
|
|
||||||
|
|
||||||
function onClosed() {
|
|
||||||
FocusController.dropRootObject(root)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Header2TextType {
|
Header2TextType {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 16
|
Layout.topMargin: 16
|
||||||
|
|
|
||||||
|
|
@ -20,18 +20,6 @@ DrawerType2 {
|
||||||
root.expandedHeight = container.implicitHeight
|
root.expandedHeight = container.implicitHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: root
|
|
||||||
enabled: !GC.isMobile()
|
|
||||||
function onOpened() {
|
|
||||||
FocusController.pushRootObject(root)
|
|
||||||
}
|
|
||||||
|
|
||||||
function onClosed() {
|
|
||||||
FocusController.dropRootObject(root)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: backButtonLayout
|
id: backButtonLayout
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,14 +39,6 @@ DrawerType2 {
|
||||||
expandedStateContent: Item {
|
expandedStateContent: Item {
|
||||||
implicitHeight: root.expandedHeight
|
implicitHeight: root.expandedHeight
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: root
|
|
||||||
enabled: !GC.isMobile()
|
|
||||||
function onOpened() {
|
|
||||||
header.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Header2Type {
|
Header2Type {
|
||||||
id: header
|
id: header
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|
@ -170,12 +162,6 @@ DrawerType2 {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
expandedHeight: parent.height * 0.9
|
expandedHeight: parent.height * 0.9
|
||||||
|
|
||||||
onClosed: {
|
|
||||||
if (!GC.isMobile()) {
|
|
||||||
header.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
expandedStateContent: Item {
|
expandedStateContent: Item {
|
||||||
id: configContentContainer
|
id: configContentContainer
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,10 +123,6 @@ PageType {
|
||||||
objectName: "homeSplitTunnelingDrawer"
|
objectName: "homeSplitTunnelingDrawer"
|
||||||
|
|
||||||
parent: root
|
parent: root
|
||||||
|
|
||||||
onClosed: {
|
|
||||||
console.log(objectName, " was closed...")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -145,12 +141,14 @@ PageType {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
drawer.expandedHeight = implicitHeight
|
drawer.expandedHeight = implicitHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
objectName: "drawerConnections"
|
objectName: "drawerConnections"
|
||||||
|
|
||||||
target: drawer
|
target: drawer
|
||||||
enabled: !GC.isMobile()
|
enabled: !GC.isMobile()
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: collapsed
|
id: collapsed
|
||||||
objectName: "collapsedColumnLayout"
|
objectName: "collapsedColumnLayout"
|
||||||
|
|
@ -253,7 +251,6 @@ PageType {
|
||||||
Keys.onReturnPressed: collapsedButtonChevron.clicked()
|
Keys.onReturnPressed: collapsedButtonChevron.clicked()
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.debug("onClicked collapsedButtonChevron")
|
|
||||||
if (drawer.isCollapsedStateActive()) {
|
if (drawer.isCollapsedStateActive()) {
|
||||||
drawer.openTriggered()
|
drawer.openTriggered()
|
||||||
}
|
}
|
||||||
|
|
@ -414,6 +411,7 @@ PageType {
|
||||||
Connections {
|
Connections {
|
||||||
target: drawer
|
target: drawer
|
||||||
|
|
||||||
|
// this item shouldn't be focused when drawer is closed
|
||||||
function onIsOpenedChanged() {
|
function onIsOpenedChanged() {
|
||||||
serversMenuContent.isFocusable = drawer.isOpened
|
serversMenuContent.isFocusable = drawer.isOpened
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -398,7 +398,6 @@ PageType {
|
||||||
|
|
||||||
text: qsTr("Save")
|
text: qsTr("Save")
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
|
|
|
||||||
|
|
@ -110,26 +110,12 @@ PageType {
|
||||||
|
|
||||||
expandedHeight: root.height * 0.9
|
expandedHeight: root.height * 0.9
|
||||||
|
|
||||||
onClosed: {
|
|
||||||
if (!GC.isMobile()) {
|
|
||||||
defaultActiveFocusItem.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parent: root
|
parent: root
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
expandedStateContent: Item {
|
expandedStateContent: Item {
|
||||||
implicitHeight: configContentDrawer.expandedHeight
|
implicitHeight: configContentDrawer.expandedHeight
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: configContentDrawer
|
|
||||||
enabled: !GC.isMobile()
|
|
||||||
function onOpened() {
|
|
||||||
focusItem1.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton1
|
id: backButton1
|
||||||
|
|
||||||
|
|
@ -209,7 +195,6 @@ PageType {
|
||||||
text: qsTr("Remove ") + ContainersModel.getProcessedContainerName()
|
text: qsTr("Remove ") + ContainersModel.getProcessedContainerName()
|
||||||
textColor: AmneziaStyle.color.vibrantRed
|
textColor: AmneziaStyle.color.vibrantRed
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
var headerText = qsTr("Remove %1 from server?").arg(ContainersModel.getProcessedContainerName())
|
var headerText = qsTr("Remove %1 from server?").arg(ContainersModel.getProcessedContainerName())
|
||||||
var descriptionText = qsTr("All users with whom you shared a connection with will no longer be able to connect to it.")
|
var descriptionText = qsTr("All users with whom you shared a connection with will no longer be able to connect to it.")
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,6 @@ PageType {
|
||||||
|
|
||||||
text: qsTr("Save")
|
text: qsTr("Save")
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
var headerText = qsTr("Save settings?")
|
var headerText = qsTr("Save settings?")
|
||||||
|
|
|
||||||
|
|
@ -140,8 +140,6 @@ PageType {
|
||||||
|
|
||||||
text: qsTr("Save")
|
text: qsTr("Save")
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
onClicked: function() {
|
onClicked: function() {
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,6 @@ PageType {
|
||||||
text: qsTr("Remove ") + ContainersModel.getProcessedContainerName()
|
text: qsTr("Remove ") + ContainersModel.getProcessedContainerName()
|
||||||
textColor: AmneziaStyle.color.vibrantRed
|
textColor: AmneziaStyle.color.vibrantRed
|
||||||
|
|
||||||
Keys.onTabPressed: root.lastItemTabClicked()
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
var headerText = qsTr("Remove %1 from server?").arg(ContainersModel.getProcessedContainerName())
|
var headerText = qsTr("Remove %1 from server?").arg(ContainersModel.getProcessedContainerName())
|
||||||
var yesButtonText = qsTr("Continue")
|
var yesButtonText = qsTr("Continue")
|
||||||
|
|
|
||||||
|
|
@ -174,14 +174,6 @@ PageType {
|
||||||
|
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
rightButton.Keys.onTabPressed: {
|
|
||||||
if (mountButton.visible) {
|
|
||||||
mountButton.forceActiveFocus()
|
|
||||||
} else {
|
|
||||||
detailedInstructionsButton.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rightImageSource: "qrc:/images/controls/copy.svg"
|
rightImageSource: "qrc:/images/controls/copy.svg"
|
||||||
rightImageColor: AmneziaStyle.color.paleGray
|
rightImageColor: AmneziaStyle.color.paleGray
|
||||||
|
|
||||||
|
|
@ -278,7 +270,6 @@ PageType {
|
||||||
text: qsTr("Detailed instructions")
|
text: qsTr("Detailed instructions")
|
||||||
|
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
// Qt.openUrlExternally("https://github.com/amnezia-vpn/desktop-client/releases/latest")
|
// Qt.openUrlExternally("https://github.com/amnezia-vpn/desktop-client/releases/latest")
|
||||||
|
|
|
||||||
|
|
@ -187,12 +187,6 @@ PageType {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
expandedHeight: root.height * 0.9
|
expandedHeight: root.height * 0.9
|
||||||
|
|
||||||
onClosed: {
|
|
||||||
if (!GC.isMobile()) {
|
|
||||||
focusItem.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
expandedStateContent: ColumnLayout {
|
expandedStateContent: ColumnLayout {
|
||||||
property string tempPort: port
|
property string tempPort: port
|
||||||
property string tempUsername: username
|
property string tempUsername: username
|
||||||
|
|
@ -209,9 +203,6 @@ PageType {
|
||||||
Connections {
|
Connections {
|
||||||
target: changeSettingsDrawer
|
target: changeSettingsDrawer
|
||||||
function onOpened() {
|
function onOpened() {
|
||||||
if (!GC.isMobile()) {
|
|
||||||
drawerFocusItem.forceActiveFocus()
|
|
||||||
}
|
|
||||||
tempPort = port
|
tempPort = port
|
||||||
tempUsername = username
|
tempUsername = username
|
||||||
tempPassword = password
|
tempPassword = password
|
||||||
|
|
@ -310,7 +301,6 @@ PageType {
|
||||||
Layout.bottomMargin: 24
|
Layout.bottomMargin: 24
|
||||||
|
|
||||||
text: qsTr("Change connection settings")
|
text: qsTr("Change connection settings")
|
||||||
Keys.onTabPressed: lastItemTabClicked(drawerFocusItem)
|
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
|
|
@ -348,7 +338,6 @@ PageType {
|
||||||
Layout.rightMargin: 16
|
Layout.rightMargin: 16
|
||||||
|
|
||||||
text: qsTr("Change connection settings")
|
text: qsTr("Change connection settings")
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
|
|
|
||||||
|
|
@ -80,8 +80,6 @@ PageType {
|
||||||
rightImageSource: "qrc:/images/controls/copy.svg"
|
rightImageSource: "qrc:/images/controls/copy.svg"
|
||||||
rightImageColor: AmneziaStyle.color.paleGray
|
rightImageColor: AmneziaStyle.color.paleGray
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
GC.copyToClipBoard(descriptionText)
|
GC.copyToClipBoard(descriptionText)
|
||||||
PageController.showNotificationMessage(qsTr("Copied"))
|
PageController.showNotificationMessage(qsTr("Copied"))
|
||||||
|
|
|
||||||
|
|
@ -140,8 +140,6 @@ PageType {
|
||||||
}
|
}
|
||||||
PageController.showNotificationMessage(qsTr("Settings saved"))
|
PageController.showNotificationMessage(qsTr("Settings saved"))
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,16 +158,6 @@ PageType {
|
||||||
text: qsTr("Remove server from application")
|
text: qsTr("Remove server from application")
|
||||||
textColor: AmneziaStyle.color.vibrantRed
|
textColor: AmneziaStyle.color.vibrantRed
|
||||||
|
|
||||||
Keys.onTabPressed: {
|
|
||||||
if (content.isServerWithWriteAccess) {
|
|
||||||
labelWithButton4.forceActiveFocus()
|
|
||||||
} else {
|
|
||||||
labelWithButton5.visible ?
|
|
||||||
labelWithButton5.forceActiveFocus() :
|
|
||||||
lastItemTabClickedSignal()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
var headerText = qsTr("Do you want to remove the server from application?")
|
var headerText = qsTr("Do you want to remove the server from application?")
|
||||||
var descriptionText = qsTr("All installed AmneziaVPN services will still remain on the server.")
|
var descriptionText = qsTr("All installed AmneziaVPN services will still remain on the server.")
|
||||||
|
|
@ -206,10 +196,6 @@ PageType {
|
||||||
text: qsTr("Clear server from Amnezia software")
|
text: qsTr("Clear server from Amnezia software")
|
||||||
textColor: AmneziaStyle.color.vibrantRed
|
textColor: AmneziaStyle.color.vibrantRed
|
||||||
|
|
||||||
Keys.onTabPressed: labelWithButton5.visible ?
|
|
||||||
labelWithButton5.forceActiveFocus() :
|
|
||||||
root.lastItemTabClickedSignal()
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
var headerText = qsTr("Do you want to clear server from Amnezia software?")
|
var headerText = qsTr("Do you want to clear server from Amnezia software?")
|
||||||
var descriptionText = qsTr("All users whom you shared a connection with will no longer be able to connect to it.")
|
var descriptionText = qsTr("All users whom you shared a connection with will no longer be able to connect to it.")
|
||||||
|
|
@ -249,8 +235,6 @@ PageType {
|
||||||
text: qsTr("Reset API config")
|
text: qsTr("Reset API config")
|
||||||
textColor: AmneziaStyle.color.vibrantRed
|
textColor: AmneziaStyle.color.vibrantRed
|
||||||
|
|
||||||
Keys.onTabPressed: root.lastItemTabClickedSignal()
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
var headerText = qsTr("Do you want to reset API config?")
|
var headerText = qsTr("Do you want to reset API config?")
|
||||||
var descriptionText = ""
|
var descriptionText = ""
|
||||||
|
|
|
||||||
|
|
@ -61,15 +61,6 @@ PageType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onTabPressed: {
|
|
||||||
if (currentFocusIndex < this.count - 1) {
|
|
||||||
currentFocusIndex += 1
|
|
||||||
protocols.itemAtIndex(currentFocusIndex).focusItem.forceActiveFocus()
|
|
||||||
} else {
|
|
||||||
clearCacheButton.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
property var focusItem: clientSettings.rightButton
|
property var focusItem: clientSettings.rightButton
|
||||||
|
|
||||||
|
|
@ -210,7 +201,6 @@ PageType {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
visible: ServersModel.isProcessedServerHasWriteAccess()
|
visible: ServersModel.isProcessedServerHasWriteAccess()
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
text: qsTr("Remove ")
|
text: qsTr("Remove ")
|
||||||
textColor: AmneziaStyle.color.vibrantRed
|
textColor: AmneziaStyle.color.vibrantRed
|
||||||
|
|
|
||||||
|
|
@ -199,11 +199,6 @@ PageType {
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
expandedHeight: root.height
|
expandedHeight: root.height
|
||||||
onClosed: {
|
|
||||||
if (!GC.isMobile()) {
|
|
||||||
// clientNameTextField.textField.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
expandedStateContent: ColumnLayout {
|
expandedStateContent: ColumnLayout {
|
||||||
id: shareFullAccessDrawerContent
|
id: shareFullAccessDrawerContent
|
||||||
|
|
@ -218,14 +213,6 @@ PageType {
|
||||||
shareFullAccessDrawer.expandedHeight = shareFullAccessDrawerContent.implicitHeight + 32
|
shareFullAccessDrawer.expandedHeight = shareFullAccessDrawerContent.implicitHeight + 32
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: shareFullAccessDrawer
|
|
||||||
enabled: !GC.isMobile()
|
|
||||||
function onOpened() {
|
|
||||||
// focusItem.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Header2Type {
|
Header2Type {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.bottomMargin: 16
|
Layout.bottomMargin: 16
|
||||||
|
|
@ -295,8 +282,6 @@ PageType {
|
||||||
implicitWidth: (root.width - 32) / 2
|
implicitWidth: (root.width - 32) / 2
|
||||||
text: qsTr("Users")
|
text: qsTr("Users")
|
||||||
|
|
||||||
// KeyNavigation.tab: accessTypeSelector.currentIndex === 0 ? clientNameTextField.textField : serverSelector
|
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
accessTypeSelector.currentIndex = 1
|
accessTypeSelector.currentIndex = 1
|
||||||
PageController.showBusyIndicator(true)
|
PageController.showBusyIndicator(true)
|
||||||
|
|
@ -565,7 +550,6 @@ PageType {
|
||||||
text: qsTr("Share")
|
text: qsTr("Share")
|
||||||
leftImageSource: "qrc:/images/controls/share-2.svg"
|
leftImageSource: "qrc:/images/controls/share-2.svg"
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
parentFlickable: a
|
parentFlickable: a
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ Window {
|
||||||
color: AmneziaStyle.color.midnightBlack
|
color: AmneziaStyle.color.midnightBlack
|
||||||
|
|
||||||
onClosing: function() {
|
onClosing: function() {
|
||||||
console.debug("QML onClosing signal")
|
|
||||||
PageController.closeWindow()
|
PageController.closeWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue