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