mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e8909c50c | |||
| 699b2e8a4e |
@@ -236,5 +236,6 @@
|
|||||||
<file>server_scripts/socks5_proxy/Dockerfile</file>
|
<file>server_scripts/socks5_proxy/Dockerfile</file>
|
||||||
<file>server_scripts/socks5_proxy/configure_container.sh</file>
|
<file>server_scripts/socks5_proxy/configure_container.sh</file>
|
||||||
<file>server_scripts/socks5_proxy/start.sh</file>
|
<file>server_scripts/socks5_proxy/start.sh</file>
|
||||||
|
<file>ui/qml/Controls2/FocusChainType.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -14,74 +14,71 @@ DrawerType2 {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
expandedContent: ColumnLayout {
|
expandedContent: FocusChainType {
|
||||||
id: content
|
focus: root.visible
|
||||||
|
focusTabBarOnLastItem: false
|
||||||
|
|
||||||
anchors.top: parent.top
|
ColumnLayout {
|
||||||
anchors.left: parent.left
|
id: content
|
||||||
anchors.right: parent.right
|
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
anchors.top: parent.top
|
||||||
root.expandedHeight = content.implicitHeight + 32
|
anchors.left: parent.left
|
||||||
}
|
anchors.right: parent.right
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
Connections {
|
Component.onCompleted: {
|
||||||
target: root
|
root.expandedHeight = content.implicitHeight + 32
|
||||||
enabled: !GC.isMobile()
|
|
||||||
function onOpened() {
|
|
||||||
focusItem.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Header2Type {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 24
|
|
||||||
Layout.rightMargin: 16
|
|
||||||
Layout.leftMargin: 16
|
|
||||||
Layout.bottomMargin: 16
|
|
||||||
|
|
||||||
headerText: qsTr("Add new connection")
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: ip.rightButton
|
|
||||||
}
|
|
||||||
|
|
||||||
LabelWithButtonType {
|
|
||||||
id: ip
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 16
|
|
||||||
|
|
||||||
text: qsTr("Configure your server")
|
|
||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
|
||||||
PageController.goToPage(PageEnum.PageSetupWizardCredentials)
|
|
||||||
root.close()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: qrCode.rightButton
|
Header2Type {
|
||||||
}
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 24
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.bottomMargin: 16
|
||||||
|
|
||||||
DividerType {}
|
headerText: qsTr("Add new connection")
|
||||||
|
|
||||||
LabelWithButtonType {
|
|
||||||
id: qrCode
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
text: qsTr("Open config file, key or QR code")
|
|
||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
|
||||||
PageController.goToPage(PageEnum.PageSetupWizardConfigSource)
|
|
||||||
root.close()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: focusItem
|
// Item {
|
||||||
}
|
// id: focusItem
|
||||||
|
// KeyNavigation.tab: ip.rightButton
|
||||||
|
// }
|
||||||
|
|
||||||
DividerType {}
|
LabelWithButtonType {
|
||||||
|
id: ip
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 16
|
||||||
|
|
||||||
|
text: qsTr("Configure your server")
|
||||||
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
|
|
||||||
|
clickedFunction: function() {
|
||||||
|
PageController.goToPage(PageEnum.PageSetupWizardCredentials)
|
||||||
|
root.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
// KeyNavigation.tab: qrCode.rightButton
|
||||||
|
}
|
||||||
|
|
||||||
|
DividerType {}
|
||||||
|
|
||||||
|
LabelWithButtonType {
|
||||||
|
id: qrCode
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
text: qsTr("Open config file, key or QR code")
|
||||||
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
|
|
||||||
|
clickedFunction: function() {
|
||||||
|
PageController.goToPage(PageEnum.PageSetupWizardConfigSource)
|
||||||
|
root.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
// KeyNavigation.tab: focusItem
|
||||||
|
}
|
||||||
|
|
||||||
|
DividerType {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,103 +16,109 @@ DrawerType2 {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
expandedHeight: parent.height * 0.9
|
expandedHeight: parent.height * 0.9
|
||||||
|
|
||||||
expandedContent: ColumnLayout {
|
expandedContent: FocusChainType {
|
||||||
id: content
|
focus: root.visible
|
||||||
|
focusTabBarOnLastItem: false
|
||||||
|
|
||||||
anchors.top: parent.top
|
ColumnLayout {
|
||||||
anchors.left: parent.left
|
id: content
|
||||||
anchors.right: parent.right
|
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
Connections {
|
anchors.top: parent.top
|
||||||
target: root
|
anchors.left: parent.left
|
||||||
enabled: !GC.isMobile()
|
anchors.right: parent.right
|
||||||
function onOpened() {
|
spacing: 0
|
||||||
focusItem.forceActiveFocus()
|
|
||||||
|
// onActiveFocusChanged: {
|
||||||
|
// if (activeFocus) {
|
||||||
|
// focusItem.forceActiveFocus()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Connections {
|
||||||
|
// target: root
|
||||||
|
// enabled: !GC.isMobile()
|
||||||
|
// function onOpened() {
|
||||||
|
// focusItem.forceActiveFocus()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
Header2Type {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 24
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.bottomMargin: 16
|
||||||
|
|
||||||
|
headerText: qsTr("Split tunneling")
|
||||||
|
descriptionText: qsTr("Allows you to connect to some sites or applications through a VPN connection and bypass others")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Header2Type {
|
LabelWithButtonType {
|
||||||
Layout.fillWidth: true
|
id: splitTunnelingSwitch
|
||||||
Layout.topMargin: 24
|
Layout.fillWidth: true
|
||||||
Layout.rightMargin: 16
|
Layout.topMargin: 16
|
||||||
Layout.leftMargin: 16
|
|
||||||
Layout.bottomMargin: 16
|
|
||||||
|
|
||||||
headerText: qsTr("Split tunneling")
|
visible: ServersModel.isDefaultServerDefaultContainerHasSplitTunneling && ServersModel.getDefaultServerData("isServerFromApi")
|
||||||
descriptionText: qsTr("Allows you to connect to some sites or applications through a VPN connection and bypass others")
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
text: qsTr("Split tunneling on the server")
|
||||||
id: focusItem
|
descriptionText: qsTr("Enabled \nCan't be disabled for current server")
|
||||||
KeyNavigation.tab: splitTunnelingSwitch.visible ? splitTunnelingSwitch : siteBasedSplitTunnelingSwitch.rightButton
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
}
|
|
||||||
|
|
||||||
LabelWithButtonType {
|
// KeyNavigation.tab: siteBasedSplitTunnelingSwitch.visible ? siteBasedSplitTunnelingSwitch.rightButton : focusItem
|
||||||
id: splitTunnelingSwitch
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 16
|
|
||||||
|
|
||||||
visible: ServersModel.isDefaultServerDefaultContainerHasSplitTunneling && ServersModel.getDefaultServerData("isServerFromApi")
|
clickedFunction: function() {
|
||||||
|
// PageController.goToPage(PageEnum.PageSettingsSplitTunneling)
|
||||||
text: qsTr("Split tunneling on the server")
|
// root.close()
|
||||||
descriptionText: qsTr("Enabled \nCan't be disabled for current server")
|
}
|
||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
||||||
|
|
||||||
KeyNavigation.tab: siteBasedSplitTunnelingSwitch.visible ? siteBasedSplitTunnelingSwitch.rightButton : focusItem
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
|
||||||
// PageController.goToPage(PageEnum.PageSettingsSplitTunneling)
|
|
||||||
// root.close()
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
DividerType {
|
DividerType {
|
||||||
visible: ServersModel.isDefaultServerDefaultContainerHasSplitTunneling && ServersModel.getDefaultServerData("isServerFromApi")
|
visible: ServersModel.isDefaultServerDefaultContainerHasSplitTunneling && ServersModel.getDefaultServerData("isServerFromApi")
|
||||||
}
|
|
||||||
|
|
||||||
LabelWithButtonType {
|
|
||||||
id: siteBasedSplitTunnelingSwitch
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 16
|
|
||||||
|
|
||||||
text: qsTr("Site-based split tunneling")
|
|
||||||
descriptionText: enabled && SitesModel.isTunnelingEnabled ? qsTr("Enabled") : qsTr("Disabled")
|
|
||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
||||||
|
|
||||||
KeyNavigation.tab: appSplitTunnelingSwitch.visible ?
|
|
||||||
appSplitTunnelingSwitch.rightButton :
|
|
||||||
focusItem
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
|
||||||
PageController.goToPage(PageEnum.PageSettingsSplitTunneling)
|
|
||||||
root.close()
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
DividerType {
|
LabelWithButtonType {
|
||||||
}
|
id: siteBasedSplitTunnelingSwitch
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 16
|
||||||
|
|
||||||
LabelWithButtonType {
|
text: qsTr("Site-based split tunneling")
|
||||||
id: appSplitTunnelingSwitch
|
descriptionText: enabled && SitesModel.isTunnelingEnabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||||
visible: isAppSplitTinnelingEnabled
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
|
|
||||||
Layout.fillWidth: true
|
// KeyNavigation.tab: appSplitTunnelingSwitch.visible ?
|
||||||
|
// appSplitTunnelingSwitch.rightButton :
|
||||||
|
// focusItem
|
||||||
|
|
||||||
text: qsTr("App-based split tunneling")
|
clickedFunction: function() {
|
||||||
descriptionText: AppSplitTunnelingModel.isTunnelingEnabled ? qsTr("Enabled") : qsTr("Disabled")
|
PageController.goToPage(PageEnum.PageSettingsSplitTunneling)
|
||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
root.close()
|
||||||
|
}
|
||||||
KeyNavigation.tab: focusItem
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
|
||||||
PageController.goToPage(PageEnum.PageSettingsAppSplitTunneling)
|
|
||||||
root.close()
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
DividerType {
|
DividerType {
|
||||||
visible: isAppSplitTinnelingEnabled
|
}
|
||||||
|
|
||||||
|
LabelWithButtonType {
|
||||||
|
id: appSplitTunnelingSwitch
|
||||||
|
visible: isAppSplitTinnelingEnabled
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
text: qsTr("App-based split tunneling")
|
||||||
|
descriptionText: AppSplitTunnelingModel.isTunnelingEnabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||||
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
|
|
||||||
|
// KeyNavigation.tab: focusItem
|
||||||
|
|
||||||
|
clickedFunction: function() {
|
||||||
|
PageController.goToPage(PageEnum.PageSettingsAppSplitTunneling)
|
||||||
|
root.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DividerType {
|
||||||
|
visible: isAppSplitTinnelingEnabled
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import Qt5Compat.GraphicalEffects
|
|||||||
|
|
||||||
import Style 1.0
|
import Style 1.0
|
||||||
|
|
||||||
Item {
|
FocusScope {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property string backButtonImage: "qrc:/images/controls/arrow-left.svg"
|
property string backButtonImage: "qrc:/images/controls/arrow-left.svg"
|
||||||
@@ -15,12 +15,6 @@ Item {
|
|||||||
|
|
||||||
visible: backButtonImage !== ""
|
visible: backButtonImage !== ""
|
||||||
|
|
||||||
onActiveFocusChanged: {
|
|
||||||
if (activeFocus) {
|
|
||||||
backButton.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ import QtQuick.Layouts
|
|||||||
|
|
||||||
import Style 1.0
|
import Style 1.0
|
||||||
|
|
||||||
|
import "../Config"
|
||||||
import "TextTypes"
|
import "TextTypes"
|
||||||
|
|
||||||
Item {
|
FocusScope {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property string drawerExpanded: "expanded"
|
readonly property string drawerExpanded: "expanded"
|
||||||
@@ -40,6 +41,50 @@ Item {
|
|||||||
signal closed
|
signal closed
|
||||||
signal opened
|
signal opened
|
||||||
|
|
||||||
|
onClosed: {
|
||||||
|
if (GC.isMobile()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (parent && parent instanceof PageType) {
|
||||||
|
// parent.focusItem_.forceActiveFocus()
|
||||||
|
// }
|
||||||
|
|
||||||
|
// tabBarStackView.currentItem.focusItem_.forceActiveFocus()
|
||||||
|
|
||||||
|
// PageController.forceStackActiveFocus()
|
||||||
|
}
|
||||||
|
|
||||||
|
// onOpened: {
|
||||||
|
// if (GC.isMobile()) {
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (root.expandedContent) {
|
||||||
|
// expandedLoader.item.forceActiveFocus()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
onActiveFocusChanged: {
|
||||||
|
if (GC.isMobile()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (root.activeFocus && !root.isOpened && root.collapsedContent) {
|
||||||
|
collapsedLoader.item.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onOpened: {
|
||||||
|
if (isOpened) {
|
||||||
|
if (drawerContent.state === root.drawerExpanded) {
|
||||||
|
expandedLoader.item.forceActiveFocus()
|
||||||
|
} else {
|
||||||
|
collapsedLoader.item.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: PageController
|
target: PageController
|
||||||
|
|
||||||
@@ -175,6 +220,7 @@ Item {
|
|||||||
Item {
|
Item {
|
||||||
id: drawerContent
|
id: drawerContent
|
||||||
|
|
||||||
|
focus: true
|
||||||
Drag.active: dragArea.drag.active
|
Drag.active: dragArea.drag.active
|
||||||
anchors.right: root.right
|
anchors.right: root.right
|
||||||
anchors.left: root.left
|
anchors.left: root.left
|
||||||
|
|||||||
@@ -0,0 +1,131 @@
|
|||||||
|
import QtQuick
|
||||||
|
|
||||||
|
import "../Config"
|
||||||
|
import "../Components"
|
||||||
|
|
||||||
|
FocusScope {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property bool focusTabBarOnLastItem: true
|
||||||
|
property alias focusItem_: focusItem
|
||||||
|
|
||||||
|
QtObject {
|
||||||
|
id: internal
|
||||||
|
|
||||||
|
property var firstActiveFocusItem: null
|
||||||
|
property var focusChain: []
|
||||||
|
}
|
||||||
|
|
||||||
|
onVisibleChanged: {
|
||||||
|
focusItem_.focus = true
|
||||||
|
}
|
||||||
|
|
||||||
|
function getChildren(parent) {
|
||||||
|
for (var i = 0; i < parent.children.length; i++) {
|
||||||
|
var child = parent.children[i]
|
||||||
|
|
||||||
|
if (child.children) {
|
||||||
|
getChildren(child)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isFocusableItem(item) {
|
||||||
|
if (!item || !item.visible || !item.enabled) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return item instanceof BasicButtonType ||
|
||||||
|
item instanceof ConnectButton ||
|
||||||
|
item instanceof LabelWithButtonType ||
|
||||||
|
item instanceof SwitcherType ||
|
||||||
|
item instanceof ImageButtonType ||
|
||||||
|
item instanceof TextFieldWithHeaderType ||
|
||||||
|
item instanceof BackButtonType ||
|
||||||
|
item instanceof HorizontalRadioButton ||
|
||||||
|
item instanceof DrawerType2 && !item.isOpened && item.collapsedContent
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFocusChain(parent) {
|
||||||
|
let focusChain = []
|
||||||
|
for (var i = 0; i < parent.children.length; i++) {
|
||||||
|
var child = parent.children[i]
|
||||||
|
|
||||||
|
if (child instanceof DropDownType ||
|
||||||
|
child instanceof HomeSplitTunnelingDrawer ||
|
||||||
|
child instanceof ConnectionTypeSelectionDrawer
|
||||||
|
) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isFocusableItem(child)) {
|
||||||
|
focusChain.push(child)
|
||||||
|
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (child.children) {
|
||||||
|
focusChain = focusChain.concat(getFocusChain(child))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return focusChain
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
internal.focusChain = getFocusChain(root)
|
||||||
|
|
||||||
|
if (internal.focusChain.length === 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < internal.focusChain.length; i++) {
|
||||||
|
internal.focusChain[i].KeyNavigation.tab = internal.focusChain[(i + 1) % internal.focusChain.length]
|
||||||
|
internal.focusChain[i].KeyNavigation.backtab = internal.focusChain[(i + internal.focusChain.length - 1) % internal.focusChain.length]
|
||||||
|
}
|
||||||
|
|
||||||
|
internal.firstActiveFocusItem = internal.focusChain[0]
|
||||||
|
|
||||||
|
const lastItem = internal.focusChain[internal.focusChain.length - 1]
|
||||||
|
lastItem.Keys.onTabPressed.connect(function() {
|
||||||
|
lastItemTabClicked(lastItem)
|
||||||
|
})
|
||||||
|
|
||||||
|
for (let j = 0; j < internal.focusChain.length; j++) {
|
||||||
|
if (internal.focusChain[j] instanceof TextFieldWithHeaderType) {
|
||||||
|
internal.focusChain[j].forceActiveFocus()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: focusItem
|
||||||
|
focus: true
|
||||||
|
|
||||||
|
Keys.onTabPressed: {
|
||||||
|
if (internal.firstActiveFocusItem) {
|
||||||
|
internal.firstActiveFocusItem.focus = true
|
||||||
|
internal.firstActiveFocusItem.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function lastItemTabClicked() {
|
||||||
|
focusItem.focus = true
|
||||||
|
|
||||||
|
if (GC.isMobile()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (focusTabBarOnLastItem) {
|
||||||
|
PageController.forceTabBarActiveFocus()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (lastItem && lastItem.parentFlickable) {
|
||||||
|
lastItem.parentFlickable.contentY = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -43,25 +43,17 @@ Item {
|
|||||||
implicitWidth: content.implicitWidth + content.anchors.topMargin + content.anchors.bottomMargin
|
implicitWidth: content.implicitWidth + content.anchors.topMargin + content.anchors.bottomMargin
|
||||||
implicitHeight: content.implicitHeight + content.anchors.leftMargin + content.anchors.rightMargin
|
implicitHeight: content.implicitHeight + content.anchors.leftMargin + content.anchors.rightMargin
|
||||||
|
|
||||||
onFocusChanged: {
|
onActiveFocusChanged: {
|
||||||
if (root.activeFocus) {
|
if (root.activeFocus) {
|
||||||
|
if (rightImage.visible) {
|
||||||
|
rightImage.forceActiveFocus()
|
||||||
|
}
|
||||||
if (root.parentFlickable) {
|
if (root.parentFlickable) {
|
||||||
root.parentFlickable.ensureVisible(root)
|
root.parentFlickable.ensureVisible(root)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: rightImage
|
|
||||||
function onFocusChanged() {
|
|
||||||
if (rightImage.activeFocus) {
|
|
||||||
if (root.parentFlickable) {
|
|
||||||
root.parentFlickable.ensureVisible(root)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
@@ -251,6 +243,7 @@ Item {
|
|||||||
hoverEnabled: false
|
hoverEnabled: false
|
||||||
image: rightImageSource
|
image: rightImageSource
|
||||||
imageColor: rightImageColor
|
imageColor: rightImageColor
|
||||||
|
// focus: visible
|
||||||
visible: rightImageSource ? true : false
|
visible: rightImageSource ? true : false
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
@@ -277,6 +270,7 @@ Item {
|
|||||||
id: background
|
id: background
|
||||||
anchors.fill: root
|
anchors.fill: root
|
||||||
color: AmneziaStyle.color.transparent
|
color: AmneziaStyle.color.transparent
|
||||||
|
visible: !rightImageSource
|
||||||
|
|
||||||
border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
|
border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
|
||||||
border.width: root.activeFocus ? root.borderFocusedWidth : 0
|
border.width: root.activeFocus ? root.borderFocusedWidth : 0
|
||||||
|
|||||||
@@ -1,37 +1,19 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
|
||||||
|
|
||||||
import "../Config"
|
import "../Config"
|
||||||
|
import "../Components"
|
||||||
|
|
||||||
Item {
|
FocusChainType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property StackView stackView: StackView.view
|
property StackView stackView: StackView.view
|
||||||
|
|
||||||
property var defaultActiveFocusItem: null
|
// onVisibleChanged: {
|
||||||
|
// if (visible && !GC.isMobile()) {
|
||||||
onVisibleChanged: {
|
// timer.start()
|
||||||
if (visible && !GC.isMobile()) {
|
// }
|
||||||
timer.start()
|
// }
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function lastItemTabClicked(focusItem) {
|
|
||||||
if (GC.isMobile()) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (focusItem) {
|
|
||||||
focusItem.forceActiveFocus()
|
|
||||||
PageController.forceTabBarActiveFocus()
|
|
||||||
} else {
|
|
||||||
if (defaultActiveFocusItem) {
|
|
||||||
defaultActiveFocusItem.forceActiveFocus()
|
|
||||||
}
|
|
||||||
PageController.forceTabBarActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MouseArea {
|
// MouseArea {
|
||||||
// id: globalMouseArea
|
// id: globalMouseArea
|
||||||
@@ -47,15 +29,13 @@ Item {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// Set a timer to set focus after a short delay
|
// Set a timer to set focus after a short delay
|
||||||
Timer {
|
// Timer {
|
||||||
id: timer
|
// id: timer
|
||||||
interval: 100 // Milliseconds
|
// interval: 100 // Milliseconds
|
||||||
onTriggered: {
|
// onTriggered: {
|
||||||
if (defaultActiveFocusItem) {
|
// focusItem.forceActiveFocus()
|
||||||
defaultActiveFocusItem.forceActiveFocus()
|
// }
|
||||||
}
|
// repeat: false // Stop the timer after one trigger
|
||||||
}
|
// running: !GC.isMobile() // Start the timer
|
||||||
repeat: false // Stop the timer after one trigger
|
// }
|
||||||
running: !GC.isMobile() // Start the timer
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ TabButton {
|
|||||||
|
|
||||||
property var clickedFunc
|
property var clickedFunc
|
||||||
|
|
||||||
|
focus: true
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
focusPolicy: Qt.TabFocus
|
focusPolicy: Qt.TabFocus
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Style 1.0
|
|||||||
|
|
||||||
import "TextTypes"
|
import "TextTypes"
|
||||||
|
|
||||||
Item {
|
FocusScope {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property string headerText
|
property string headerText
|
||||||
@@ -40,16 +40,17 @@ Item {
|
|||||||
implicitHeight: content.implicitHeight
|
implicitHeight: content.implicitHeight
|
||||||
|
|
||||||
property FlickableType parentFlickable
|
property FlickableType parentFlickable
|
||||||
Connections {
|
|
||||||
target: textField
|
// Connections {
|
||||||
function onFocusChanged() {
|
// target: textField
|
||||||
if (textField.activeFocus) {
|
// function onFocusChanged() {
|
||||||
if (root.parentFlickable) {
|
// if (textField.activeFocus) {
|
||||||
root.parentFlickable.ensureVisible(root)
|
// if (root.parentFlickable) {
|
||||||
}
|
// root.parentFlickable.ensureVisible(root)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
@@ -85,6 +86,7 @@ Item {
|
|||||||
TextField {
|
TextField {
|
||||||
id: textField
|
id: textField
|
||||||
activeFocusOnTab: false
|
activeFocusOnTab: false
|
||||||
|
focus: true
|
||||||
|
|
||||||
enabled: root.textFieldEditable
|
enabled: root.textFieldEditable
|
||||||
color: root.enabled ? root.textFieldTextColor : root.textFieldTextDisabledColor
|
color: root.enabled ? root.textFieldTextColor : root.textFieldTextDisabledColor
|
||||||
@@ -119,6 +121,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onActiveFocusChanged: {
|
onActiveFocusChanged: {
|
||||||
|
backgroud.border.color = getBackgroundBorderColor(root.borderColor)
|
||||||
if (checkEmptyText && textFieldText === "") {
|
if (checkEmptyText && textFieldText === "") {
|
||||||
errorText = qsTr("The field can't be empty")
|
errorText = qsTr("The field can't be empty")
|
||||||
}
|
}
|
||||||
@@ -136,9 +139,6 @@ Item {
|
|||||||
textObj: textField
|
textObj: textField
|
||||||
}
|
}
|
||||||
|
|
||||||
onFocusChanged: {
|
|
||||||
backgroud.border.color = getBackgroundBorderColor(root.borderColor)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -199,7 +199,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getBackgroundBorderColor(noneFocusedColor) {
|
function getBackgroundBorderColor(noneFocusedColor) {
|
||||||
return textField.focus ? root.borderFocusedColor : noneFocusedColor
|
return textField.activeFocus ? root.borderFocusedColor : noneFocusedColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onEnterPressed: {
|
Keys.onEnterPressed: {
|
||||||
|
|||||||
+419
-418
@@ -18,8 +18,7 @@ import "../Components"
|
|||||||
|
|
||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
focus: true
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: PageController
|
target: PageController
|
||||||
@@ -32,7 +31,7 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
FocusScope {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.bottomMargin: drawer.collapsedHeight
|
anchors.bottomMargin: drawer.collapsedHeight
|
||||||
|
|
||||||
@@ -41,12 +40,6 @@ PageType {
|
|||||||
anchors.topMargin: 34
|
anchors.topMargin: 34
|
||||||
anchors.bottomMargin: 34
|
anchors.bottomMargin: 34
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: loggingButton.visible ?
|
|
||||||
loggingButton :
|
|
||||||
connectButton
|
|
||||||
}
|
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
id: loggingButton
|
id: loggingButton
|
||||||
@@ -68,8 +61,9 @@ PageType {
|
|||||||
|
|
||||||
Keys.onEnterPressed: loggingButton.clicked()
|
Keys.onEnterPressed: loggingButton.clicked()
|
||||||
Keys.onReturnPressed: loggingButton.clicked()
|
Keys.onReturnPressed: loggingButton.clicked()
|
||||||
|
// activeFocusOnTab: true
|
||||||
|
|
||||||
KeyNavigation.tab: connectButton
|
// KeyNavigation.tab: connectButton
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
PageController.goToPage(PageEnum.PageSettingsLogging)
|
PageController.goToPage(PageEnum.PageSettingsLogging)
|
||||||
@@ -78,9 +72,10 @@ PageType {
|
|||||||
|
|
||||||
ConnectButton {
|
ConnectButton {
|
||||||
id: connectButton
|
id: connectButton
|
||||||
|
activeFocusOnTab: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
KeyNavigation.tab: splitTunnelingButton
|
// KeyNavigation.tab: splitTunnelingButton
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
@@ -116,7 +111,7 @@ PageType {
|
|||||||
Keys.onEnterPressed: splitTunnelingButton.clicked()
|
Keys.onEnterPressed: splitTunnelingButton.clicked()
|
||||||
Keys.onReturnPressed: splitTunnelingButton.clicked()
|
Keys.onReturnPressed: splitTunnelingButton.clicked()
|
||||||
|
|
||||||
KeyNavigation.tab: drawer
|
// KeyNavigation.tab: drawer
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
homeSplitTunnelingDrawer.open()
|
homeSplitTunnelingDrawer.open()
|
||||||
@@ -126,420 +121,426 @@ PageType {
|
|||||||
id: homeSplitTunnelingDrawer
|
id: homeSplitTunnelingDrawer
|
||||||
parent: root
|
parent: root
|
||||||
|
|
||||||
onClosed: {
|
// onClosed: {
|
||||||
if (!GC.isMobile()) {
|
// if (!GC.isMobile()) {
|
||||||
focusItem.forceActiveFocus()
|
// focusItem.forceActiveFocus()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DrawerType2 {
|
DrawerType2 {
|
||||||
id: drawer
|
id: drawer
|
||||||
|
objectName: "drawer"
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
focus: true
|
||||||
|
|
||||||
|
// collapsedContent: FocusScope {
|
||||||
|
// id: collapsed123
|
||||||
|
// focus: true
|
||||||
|
// implicitHeight: Qt.platform.os !== "ios" ? root.height * 0.9 : screen.height * 0.77
|
||||||
|
// Component.onCompleted: {
|
||||||
|
// drawer.expandedHeight = implicitHeight
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Connections {
|
||||||
|
// // target: drawer
|
||||||
|
// // enabled: !GC.isMobile()
|
||||||
|
// // function onActiveFocusChanged() {
|
||||||
|
// // if (drawer.activeFocus && !drawer.isOpened) {
|
||||||
|
// // collapsed123.forceActiveFocus()
|
||||||
|
// // // collapsedButtonChevron.forceActiveFocus()
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// ColumnLayout {
|
||||||
|
// id: collapsed
|
||||||
|
|
||||||
|
// anchors.left: parent.left
|
||||||
|
// anchors.right: parent.right
|
||||||
|
|
||||||
|
// Component.onCompleted: {
|
||||||
|
// drawer.collapsedHeight = collapsed.implicitHeight
|
||||||
|
// }
|
||||||
|
|
||||||
|
// DividerType {
|
||||||
|
// Layout.topMargin: 10
|
||||||
|
// Layout.fillWidth: false
|
||||||
|
// Layout.preferredWidth: 20
|
||||||
|
// Layout.preferredHeight: 2
|
||||||
|
// Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
|
// }
|
||||||
|
|
||||||
|
// RowLayout {
|
||||||
|
// Layout.topMargin: 14
|
||||||
|
// Layout.leftMargin: 24
|
||||||
|
// Layout.rightMargin: 24
|
||||||
|
// Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
|
|
||||||
|
// spacing: 0
|
||||||
|
|
||||||
|
// Connections {
|
||||||
|
// target: drawer
|
||||||
|
// function onEntered() {
|
||||||
|
// if (drawer.isCollapsed) {
|
||||||
|
// collapsedButtonChevron.backgroundColor = collapsedButtonChevron.hoveredColor
|
||||||
|
// collapsedButtonHeader.opacity = 0.8
|
||||||
|
// } else {
|
||||||
|
// collapsedButtonHeader.opacity = 1
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function onExited() {
|
||||||
|
// if (drawer.isCollapsed) {
|
||||||
|
// collapsedButtonChevron.backgroundColor = collapsedButtonChevron.defaultColor
|
||||||
|
// collapsedButtonHeader.opacity = 1
|
||||||
|
// } else {
|
||||||
|
// collapsedButtonHeader.opacity = 1
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function onPressed(pressed, entered) {
|
||||||
|
// if (drawer.isCollapsed) {
|
||||||
|
// collapsedButtonChevron.backgroundColor = pressed ? collapsedButtonChevron.pressedColor : entered ? collapsedButtonChevron.hoveredColor : collapsedButtonChevron.defaultColor
|
||||||
|
// collapsedButtonHeader.opacity = 0.7
|
||||||
|
// } else {
|
||||||
|
// collapsedButtonHeader.opacity = 1
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Header1TextType {
|
||||||
|
// id: collapsedButtonHeader
|
||||||
|
// Layout.maximumWidth: drawer.width - 48 - 18 - 12
|
||||||
|
|
||||||
|
// maximumLineCount: 2
|
||||||
|
// elide: Qt.ElideRight
|
||||||
|
|
||||||
|
// text: ServersModel.defaultServerName
|
||||||
|
// horizontalAlignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
// Behavior on opacity {
|
||||||
|
// PropertyAnimation { duration: 200 }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ImageButtonType {
|
||||||
|
// id: collapsedButtonChevron
|
||||||
|
|
||||||
|
// Layout.leftMargin: 8
|
||||||
|
|
||||||
|
// visible: drawer.isCollapsed
|
||||||
|
|
||||||
|
// hoverEnabled: false
|
||||||
|
// image: "qrc:/images/controls/chevron-down.svg"
|
||||||
|
// imageColor: AmneziaStyle.color.white
|
||||||
|
|
||||||
|
// icon.width: 18
|
||||||
|
// icon.height: 18
|
||||||
|
// backgroundRadius: 16
|
||||||
|
// horizontalPadding: 4
|
||||||
|
// topPadding: 4
|
||||||
|
// bottomPadding: 3
|
||||||
|
|
||||||
|
// Keys.onEnterPressed: collapsedButtonChevron.clicked()
|
||||||
|
// Keys.onReturnPressed: collapsedButtonChevron.clicked()
|
||||||
|
// // Keys.onTabPressed: lastItemTabClicked()
|
||||||
|
|
||||||
|
// focus: true
|
||||||
|
|
||||||
|
// onClicked: {
|
||||||
|
// if (drawer.isCollapsed) {
|
||||||
|
// drawer.open()
|
||||||
|
// focusItem1.forceActiveFocus()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// LabelTextType {
|
||||||
|
// id: collapsedServerMenuDescription
|
||||||
|
// Layout.bottomMargin: drawer.isCollapsed ? 44 : ServersModel.isDefaultServerFromApi ? 89 : 44
|
||||||
|
// Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
|
// text: drawer.isCollapsed ? ServersModel.defaultServerDescriptionCollapsed : ServersModel.defaultServerDescriptionExpanded
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Connections {
|
||||||
|
// // target: drawer
|
||||||
|
// // enabled: !GC.isMobile()
|
||||||
|
// // function onIsCollapsedChanged() {
|
||||||
|
// // if (!drawer.isCollapsed) {
|
||||||
|
// // focusItem1.forceActiveFocus()
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// ColumnLayout {
|
||||||
|
// id: serversMenuHeader
|
||||||
|
|
||||||
|
// anchors.top: collapsed.bottom
|
||||||
|
// anchors.right: parent.right
|
||||||
|
// anchors.left: parent.left
|
||||||
|
|
||||||
|
// RowLayout {
|
||||||
|
// Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
|
// focus: false
|
||||||
|
// spacing: 8
|
||||||
|
|
||||||
|
// visible: !ServersModel.isDefaultServerFromApi
|
||||||
|
|
||||||
|
// Item {
|
||||||
|
// id: focusItem1
|
||||||
|
// KeyNavigation.tab: serversMenuContent /*containersDropDown*/
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // DropDownType {
|
||||||
|
// // id: containersDropDown
|
||||||
|
|
||||||
|
// // rootButtonImageColor: AmneziaStyle.color.black
|
||||||
|
// // rootButtonBackgroundColor: AmneziaStyle.color.white
|
||||||
|
// // rootButtonBackgroundHoveredColor: Qt.rgba(215, 216, 219, 0.8)
|
||||||
|
// // rootButtonBackgroundPressedColor: Qt.rgba(215, 216, 219, 0.65)
|
||||||
|
// // rootButtonHoveredBorderColor: AmneziaStyle.color.transparent
|
||||||
|
// // rootButtonDefaultBorderColor: AmneziaStyle.color.transparent
|
||||||
|
// // rootButtonTextTopMargin: 8
|
||||||
|
// // rootButtonTextBottomMargin: 8
|
||||||
|
|
||||||
|
// // text: ServersModel.defaultServerDefaultContainerName
|
||||||
|
// // textColor: AmneziaStyle.color.black
|
||||||
|
// // headerText: qsTr("VPN protocol")
|
||||||
|
// // headerBackButtonImage: "qrc:/images/controls/arrow-left.svg"
|
||||||
|
|
||||||
|
// // rootButtonClickedFunction: function() {
|
||||||
|
// // containersDropDown.open()
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // drawerParent: root
|
||||||
|
// // KeyNavigation.tab: serversMenuContent
|
||||||
|
|
||||||
|
// // listView: HomeContainersListView {
|
||||||
|
// // id: containersListView
|
||||||
|
// // rootWidth: root.width
|
||||||
|
// // // onVisibleChanged: {
|
||||||
|
// // // if (containersDropDown.visible && !GC.isMobile()) {
|
||||||
|
// // // focusItem1.forceActiveFocus()
|
||||||
|
// // // }
|
||||||
|
// // // }
|
||||||
|
|
||||||
|
// // Connections {
|
||||||
|
// // target: ServersModel
|
||||||
|
|
||||||
|
// // function onDefaultServerIndexChanged() {
|
||||||
|
// // updateContainersModelFilters()
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // function updateContainersModelFilters() {
|
||||||
|
// // if (ServersModel.isDefaultServerHasWriteAccess()) {
|
||||||
|
// // proxyDefaultServerContainersModel.filters = ContainersModelFilters.getWriteAccessProtocolsListFilters()
|
||||||
|
// // } else {
|
||||||
|
// // proxyDefaultServerContainersModel.filters = ContainersModelFilters.getReadAccessProtocolsListFilters()
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // model: SortFilterProxyModel {
|
||||||
|
// // id: proxyDefaultServerContainersModel
|
||||||
|
// // sourceModel: DefaultServerContainersModel
|
||||||
|
|
||||||
|
// // sorters: [
|
||||||
|
// // RoleSorter { roleName: "isInstalled"; sortOrder: Qt.DescendingOrder }
|
||||||
|
// // ]
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // Component.onCompleted: updateContainersModelFilters()
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Header2Type {
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
// Layout.topMargin: 48
|
||||||
|
// Layout.leftMargin: 16
|
||||||
|
// Layout.rightMargin: 16
|
||||||
|
|
||||||
|
// headerText: qsTr("Servers")
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ButtonGroup {
|
||||||
|
// id: serversRadioButtonGroup
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ListView {
|
||||||
|
// id: serversMenuContent
|
||||||
|
|
||||||
|
// anchors.top: serversMenuHeader.bottom
|
||||||
|
// anchors.right: parent.right
|
||||||
|
// anchors.left: parent.left
|
||||||
|
// anchors.bottom: parent.bottom
|
||||||
|
// anchors.topMargin: 16
|
||||||
|
|
||||||
|
// model: ServersModel
|
||||||
|
// currentIndex: ServersModel.defaultIndex
|
||||||
|
|
||||||
|
// ScrollBar.vertical: ScrollBar {
|
||||||
|
// id: scrollBar
|
||||||
|
// policy: serversMenuContent.height >= serversMenuContent.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// activeFocusOnTab: true
|
||||||
|
// focus: true
|
||||||
|
|
||||||
|
// property int focusItemIndex: 0
|
||||||
|
// onActiveFocusChanged: {
|
||||||
|
// if (activeFocus) {
|
||||||
|
// serversMenuContent.focusItemIndex = 0
|
||||||
|
// serversMenuContent.itemAtIndex(focusItemIndex).forceActiveFocus()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// onFocusItemIndexChanged: {
|
||||||
|
// const focusedElement = serversMenuContent.itemAtIndex(focusItemIndex)
|
||||||
|
// if (focusedElement) {
|
||||||
|
// if (focusedElement.y + focusedElement.height > serversMenuContent.height) {
|
||||||
|
// serversMenuContent.contentY = focusedElement.y + focusedElement.height - serversMenuContent.height
|
||||||
|
// } else {
|
||||||
|
// serversMenuContent.contentY = 0
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Keys.onUpPressed: scrollBar.decrease()
|
||||||
|
// Keys.onDownPressed: scrollBar.increase()
|
||||||
|
|
||||||
|
// Connections {
|
||||||
|
// target: drawer
|
||||||
|
// enabled: !GC.isMobile()
|
||||||
|
// function onIsCollapsedChanged() {
|
||||||
|
// if (drawer.isCollapsed) {
|
||||||
|
// const item = serversMenuContent.itemAtIndex(serversMenuContent.focusItemIndex)
|
||||||
|
// if (item) { item.serverRadioButtonProperty.focus = false }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Connections {
|
||||||
|
// target: ServersModel
|
||||||
|
// function onDefaultServerIndexChanged(serverIndex) {
|
||||||
|
// serversMenuContent.currentIndex = serverIndex
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// clip: true
|
||||||
|
|
||||||
|
// delegate: Item {
|
||||||
|
// id: menuContentDelegate
|
||||||
|
|
||||||
|
// property variant delegateData: model
|
||||||
|
// property VerticalRadioButton serverRadioButtonProperty: serverRadioButton
|
||||||
|
|
||||||
|
// implicitWidth: serversMenuContent.width
|
||||||
|
// implicitHeight: serverRadioButtonContent.implicitHeight
|
||||||
|
|
||||||
|
// onActiveFocusChanged: {
|
||||||
|
// if (activeFocus) {
|
||||||
|
// serverRadioButton.forceActiveFocus()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ColumnLayout {
|
||||||
|
// id: serverRadioButtonContent
|
||||||
|
|
||||||
|
// anchors.fill: parent
|
||||||
|
// anchors.rightMargin: 16
|
||||||
|
// anchors.leftMargin: 16
|
||||||
|
|
||||||
|
// spacing: 0
|
||||||
|
|
||||||
|
// RowLayout {
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
// VerticalRadioButton {
|
||||||
|
// id: serverRadioButton
|
||||||
|
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
|
||||||
|
// text: name
|
||||||
|
// descriptionText: serverDescription
|
||||||
|
|
||||||
|
// checked: index === serversMenuContent.currentIndex
|
||||||
|
// checkable: !ConnectionController.isConnected
|
||||||
|
|
||||||
|
// ButtonGroup.group: serversRadioButtonGroup
|
||||||
|
|
||||||
|
// onClicked: {
|
||||||
|
// if (ConnectionController.isConnected) {
|
||||||
|
// PageController.showNotificationMessage(qsTr("Unable change server while there is an active connection"))
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
// serversMenuContent.currentIndex = index
|
||||||
|
|
||||||
|
// ServersModel.defaultIndex = index
|
||||||
|
// }
|
||||||
|
|
||||||
|
// MouseArea {
|
||||||
|
// anchors.fill: serverRadioButton
|
||||||
|
// cursorShape: Qt.PointingHandCursor
|
||||||
|
// enabled: false
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Keys.onTabPressed: serverInfoButton.forceActiveFocus()
|
||||||
|
// Keys.onEnterPressed: serverRadioButton.clicked()
|
||||||
|
// Keys.onReturnPressed: serverRadioButton.clicked()
|
||||||
|
|
||||||
|
// KeyNavigation.tab: serverInfoButton
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ImageButtonType {
|
||||||
|
// id: serverInfoButton
|
||||||
|
// image: "qrc:/images/controls/settings.svg"
|
||||||
|
// imageColor: AmneziaStyle.color.white
|
||||||
|
|
||||||
|
// implicitWidth: 56
|
||||||
|
// implicitHeight: 56
|
||||||
|
|
||||||
|
// z: 1
|
||||||
|
|
||||||
|
// Keys.onTabPressed: {
|
||||||
|
// if (serversMenuContent.focusItemIndex < serversMenuContent.count - 1) {
|
||||||
|
// serversMenuContent.focusItemIndex++
|
||||||
|
// serversMenuContent.itemAtIndex(serversMenuContent.focusItemIndex).forceActiveFocus()
|
||||||
|
// } else {
|
||||||
|
// focusItem1.forceActiveFocus()
|
||||||
|
// serversMenuContent.contentY = 0
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// Keys.onEnterPressed: serverInfoButton.clicked()
|
||||||
|
// Keys.onReturnPressed: serverInfoButton.clicked()
|
||||||
|
|
||||||
|
// onClicked: function() {
|
||||||
|
// ServersModel.processedIndex = index
|
||||||
|
// PageController.goToPage(PageEnum.PageSettingsServerInfo)
|
||||||
|
// drawer.close()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// DividerType {
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
// Layout.leftMargin: 0
|
||||||
|
// Layout.rightMargin: 0
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
onClosed: {
|
|
||||||
if (!GC.isMobile()) {
|
|
||||||
focusItem.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
collapsedContent: Item {
|
|
||||||
implicitHeight: Qt.platform.os !== "ios" ? root.height * 0.9 : screen.height * 0.77
|
|
||||||
Component.onCompleted: {
|
|
||||||
drawer.expandedHeight = implicitHeight
|
|
||||||
}
|
|
||||||
Connections {
|
|
||||||
target: drawer
|
|
||||||
enabled: !GC.isMobile()
|
|
||||||
function onActiveFocusChanged() {
|
|
||||||
if (drawer.activeFocus && !drawer.isOpened) {
|
|
||||||
collapsedButtonChevron.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ColumnLayout {
|
|
||||||
id: collapsed
|
|
||||||
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
drawer.collapsedHeight = collapsed.implicitHeight
|
|
||||||
}
|
|
||||||
|
|
||||||
DividerType {
|
|
||||||
Layout.topMargin: 10
|
|
||||||
Layout.fillWidth: false
|
|
||||||
Layout.preferredWidth: 20
|
|
||||||
Layout.preferredHeight: 2
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.topMargin: 14
|
|
||||||
Layout.leftMargin: 24
|
|
||||||
Layout.rightMargin: 24
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
||||||
|
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: drawer
|
|
||||||
function onEntered() {
|
|
||||||
if (drawer.isCollapsed) {
|
|
||||||
collapsedButtonChevron.backgroundColor = collapsedButtonChevron.hoveredColor
|
|
||||||
collapsedButtonHeader.opacity = 0.8
|
|
||||||
} else {
|
|
||||||
collapsedButtonHeader.opacity = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onExited() {
|
|
||||||
if (drawer.isCollapsed) {
|
|
||||||
collapsedButtonChevron.backgroundColor = collapsedButtonChevron.defaultColor
|
|
||||||
collapsedButtonHeader.opacity = 1
|
|
||||||
} else {
|
|
||||||
collapsedButtonHeader.opacity = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onPressed(pressed, entered) {
|
|
||||||
if (drawer.isCollapsed) {
|
|
||||||
collapsedButtonChevron.backgroundColor = pressed ? collapsedButtonChevron.pressedColor : entered ? collapsedButtonChevron.hoveredColor : collapsedButtonChevron.defaultColor
|
|
||||||
collapsedButtonHeader.opacity = 0.7
|
|
||||||
} else {
|
|
||||||
collapsedButtonHeader.opacity = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Header1TextType {
|
|
||||||
id: collapsedButtonHeader
|
|
||||||
Layout.maximumWidth: drawer.width - 48 - 18 - 12
|
|
||||||
|
|
||||||
maximumLineCount: 2
|
|
||||||
elide: Qt.ElideRight
|
|
||||||
|
|
||||||
text: ServersModel.defaultServerName
|
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
|
||||||
|
|
||||||
KeyNavigation.tab: tabBar
|
|
||||||
|
|
||||||
Behavior on opacity {
|
|
||||||
PropertyAnimation { duration: 200 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImageButtonType {
|
|
||||||
id: collapsedButtonChevron
|
|
||||||
|
|
||||||
Layout.leftMargin: 8
|
|
||||||
|
|
||||||
visible: drawer.isCollapsed
|
|
||||||
|
|
||||||
hoverEnabled: false
|
|
||||||
image: "qrc:/images/controls/chevron-down.svg"
|
|
||||||
imageColor: AmneziaStyle.color.white
|
|
||||||
|
|
||||||
icon.width: 18
|
|
||||||
icon.height: 18
|
|
||||||
backgroundRadius: 16
|
|
||||||
horizontalPadding: 4
|
|
||||||
topPadding: 4
|
|
||||||
bottomPadding: 3
|
|
||||||
|
|
||||||
Keys.onEnterPressed: collapsedButtonChevron.clicked()
|
|
||||||
Keys.onReturnPressed: collapsedButtonChevron.clicked()
|
|
||||||
Keys.onTabPressed: lastItemTabClicked()
|
|
||||||
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
if (drawer.isCollapsed) {
|
|
||||||
drawer.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LabelTextType {
|
|
||||||
id: collapsedServerMenuDescription
|
|
||||||
Layout.bottomMargin: drawer.isCollapsed ? 44 : ServersModel.isDefaultServerFromApi ? 89 : 44
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
||||||
text: drawer.isCollapsed ? ServersModel.defaultServerDescriptionCollapsed : ServersModel.defaultServerDescriptionExpanded
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: drawer
|
|
||||||
enabled: !GC.isMobile()
|
|
||||||
function onIsCollapsedChanged() {
|
|
||||||
if (!drawer.isCollapsed) {
|
|
||||||
focusItem1.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: serversMenuHeader
|
|
||||||
|
|
||||||
anchors.top: collapsed.bottom
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.left: parent.left
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
|
||||||
spacing: 8
|
|
||||||
|
|
||||||
visible: !ServersModel.isDefaultServerFromApi
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem1
|
|
||||||
KeyNavigation.tab: containersDropDown
|
|
||||||
}
|
|
||||||
|
|
||||||
DropDownType {
|
|
||||||
id: containersDropDown
|
|
||||||
|
|
||||||
rootButtonImageColor: AmneziaStyle.color.black
|
|
||||||
rootButtonBackgroundColor: AmneziaStyle.color.white
|
|
||||||
rootButtonBackgroundHoveredColor: Qt.rgba(215, 216, 219, 0.8)
|
|
||||||
rootButtonBackgroundPressedColor: Qt.rgba(215, 216, 219, 0.65)
|
|
||||||
rootButtonHoveredBorderColor: AmneziaStyle.color.transparent
|
|
||||||
rootButtonDefaultBorderColor: AmneziaStyle.color.transparent
|
|
||||||
rootButtonTextTopMargin: 8
|
|
||||||
rootButtonTextBottomMargin: 8
|
|
||||||
|
|
||||||
text: ServersModel.defaultServerDefaultContainerName
|
|
||||||
textColor: AmneziaStyle.color.black
|
|
||||||
headerText: qsTr("VPN protocol")
|
|
||||||
headerBackButtonImage: "qrc:/images/controls/arrow-left.svg"
|
|
||||||
|
|
||||||
rootButtonClickedFunction: function() {
|
|
||||||
containersDropDown.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
drawerParent: root
|
|
||||||
KeyNavigation.tab: serversMenuContent
|
|
||||||
|
|
||||||
listView: HomeContainersListView {
|
|
||||||
id: containersListView
|
|
||||||
rootWidth: root.width
|
|
||||||
onVisibleChanged: {
|
|
||||||
if (containersDropDown.visible && !GC.isMobile()) {
|
|
||||||
focusItem1.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: ServersModel
|
|
||||||
|
|
||||||
function onDefaultServerIndexChanged() {
|
|
||||||
updateContainersModelFilters()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateContainersModelFilters() {
|
|
||||||
if (ServersModel.isDefaultServerHasWriteAccess()) {
|
|
||||||
proxyDefaultServerContainersModel.filters = ContainersModelFilters.getWriteAccessProtocolsListFilters()
|
|
||||||
} else {
|
|
||||||
proxyDefaultServerContainersModel.filters = ContainersModelFilters.getReadAccessProtocolsListFilters()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
model: SortFilterProxyModel {
|
|
||||||
id: proxyDefaultServerContainersModel
|
|
||||||
sourceModel: DefaultServerContainersModel
|
|
||||||
|
|
||||||
sorters: [
|
|
||||||
RoleSorter { roleName: "isInstalled"; sortOrder: Qt.DescendingOrder }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted: updateContainersModelFilters()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Header2Type {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 48
|
|
||||||
Layout.leftMargin: 16
|
|
||||||
Layout.rightMargin: 16
|
|
||||||
|
|
||||||
headerText: qsTr("Servers")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ButtonGroup {
|
|
||||||
id: serversRadioButtonGroup
|
|
||||||
}
|
|
||||||
|
|
||||||
ListView {
|
|
||||||
id: serversMenuContent
|
|
||||||
|
|
||||||
anchors.top: serversMenuHeader.bottom
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.topMargin: 16
|
|
||||||
|
|
||||||
model: ServersModel
|
|
||||||
currentIndex: ServersModel.defaultIndex
|
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
|
||||||
id: scrollBar
|
|
||||||
policy: serversMenuContent.height >= serversMenuContent.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
activeFocusOnTab: true
|
|
||||||
focus: true
|
|
||||||
|
|
||||||
property int focusItemIndex: 0
|
|
||||||
onActiveFocusChanged: {
|
|
||||||
if (activeFocus) {
|
|
||||||
serversMenuContent.focusItemIndex = 0
|
|
||||||
serversMenuContent.itemAtIndex(focusItemIndex).forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onFocusItemIndexChanged: {
|
|
||||||
const focusedElement = serversMenuContent.itemAtIndex(focusItemIndex)
|
|
||||||
if (focusedElement) {
|
|
||||||
if (focusedElement.y + focusedElement.height > serversMenuContent.height) {
|
|
||||||
serversMenuContent.contentY = focusedElement.y + focusedElement.height - serversMenuContent.height
|
|
||||||
} else {
|
|
||||||
serversMenuContent.contentY = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Keys.onUpPressed: scrollBar.decrease()
|
|
||||||
Keys.onDownPressed: scrollBar.increase()
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: drawer
|
|
||||||
enabled: !GC.isMobile()
|
|
||||||
function onIsCollapsedChanged() {
|
|
||||||
if (drawer.isCollapsed) {
|
|
||||||
const item = serversMenuContent.itemAtIndex(serversMenuContent.focusItemIndex)
|
|
||||||
if (item) { item.serverRadioButtonProperty.focus = false }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: ServersModel
|
|
||||||
function onDefaultServerIndexChanged(serverIndex) {
|
|
||||||
serversMenuContent.currentIndex = serverIndex
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
delegate: Item {
|
|
||||||
id: menuContentDelegate
|
|
||||||
|
|
||||||
property variant delegateData: model
|
|
||||||
property VerticalRadioButton serverRadioButtonProperty: serverRadioButton
|
|
||||||
|
|
||||||
implicitWidth: serversMenuContent.width
|
|
||||||
implicitHeight: serverRadioButtonContent.implicitHeight
|
|
||||||
|
|
||||||
onActiveFocusChanged: {
|
|
||||||
if (activeFocus) {
|
|
||||||
serverRadioButton.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: serverRadioButtonContent
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.rightMargin: 16
|
|
||||||
anchors.leftMargin: 16
|
|
||||||
|
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
VerticalRadioButton {
|
|
||||||
id: serverRadioButton
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
text: name
|
|
||||||
descriptionText: serverDescription
|
|
||||||
|
|
||||||
checked: index === serversMenuContent.currentIndex
|
|
||||||
checkable: !ConnectionController.isConnected
|
|
||||||
|
|
||||||
ButtonGroup.group: serversRadioButtonGroup
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
if (ConnectionController.isConnected) {
|
|
||||||
PageController.showNotificationMessage(qsTr("Unable change server while there is an active connection"))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
serversMenuContent.currentIndex = index
|
|
||||||
|
|
||||||
ServersModel.defaultIndex = index
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: serverRadioButton
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
enabled: false
|
|
||||||
}
|
|
||||||
|
|
||||||
Keys.onTabPressed: serverInfoButton.forceActiveFocus()
|
|
||||||
Keys.onEnterPressed: serverRadioButton.clicked()
|
|
||||||
Keys.onReturnPressed: serverRadioButton.clicked()
|
|
||||||
}
|
|
||||||
|
|
||||||
ImageButtonType {
|
|
||||||
id: serverInfoButton
|
|
||||||
image: "qrc:/images/controls/settings.svg"
|
|
||||||
imageColor: AmneziaStyle.color.white
|
|
||||||
|
|
||||||
implicitWidth: 56
|
|
||||||
implicitHeight: 56
|
|
||||||
|
|
||||||
z: 1
|
|
||||||
|
|
||||||
Keys.onTabPressed: {
|
|
||||||
if (serversMenuContent.focusItemIndex < serversMenuContent.count - 1) {
|
|
||||||
serversMenuContent.focusItemIndex++
|
|
||||||
serversMenuContent.itemAtIndex(serversMenuContent.focusItemIndex).forceActiveFocus()
|
|
||||||
} else {
|
|
||||||
focusItem1.forceActiveFocus()
|
|
||||||
serversMenuContent.contentY = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Keys.onEnterPressed: serverInfoButton.clicked()
|
|
||||||
Keys.onReturnPressed: serverInfoButton.clicked()
|
|
||||||
|
|
||||||
onClicked: function() {
|
|
||||||
ServersModel.processedIndex = index
|
|
||||||
PageController.goToPage(PageEnum.PageSettingsServerInfo)
|
|
||||||
drawer.close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DividerType {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.leftMargin: 0
|
|
||||||
Layout.rightMargin: 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: listview.currentItem.portTextField.textField
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: focusItem
|
id: focusItem
|
||||||
onFocusChanged: {
|
onFocusChanged: {
|
||||||
|
|||||||
@@ -15,12 +15,7 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: listview.currentItem.trafficFromField.textField
|
// defaultActiveFocusItem: listview.currentItem.trafficFromField.textField
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: backButtonLayout
|
id: backButtonLayout
|
||||||
@@ -183,7 +178,6 @@ PageType {
|
|||||||
Layout.bottomMargin: 24
|
Layout.bottomMargin: 24
|
||||||
|
|
||||||
text: qsTr("Save")
|
text: qsTr("Save")
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: listview.currentItem.vpnAddressSubnetTextField.textField
|
// defaultActiveFocusItem: listview.currentItem.vpnAddressSubnetTextField.textField
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: focusItem
|
id: focusItem
|
||||||
|
|||||||
@@ -19,13 +19,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: header
|
id: header
|
||||||
|
|
||||||
@@ -122,7 +115,7 @@ PageType {
|
|||||||
|
|
||||||
onClosed: {
|
onClosed: {
|
||||||
if (!GC.isMobile()) {
|
if (!GC.isMobile()) {
|
||||||
defaultActiveFocusItem.forceActiveFocus()
|
// defaultActiveFocusItem.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +219,6 @@ PageType {
|
|||||||
text: qsTr("Remove ") + ContainersModel.getProcessedContainerName()
|
text: qsTr("Remove ") + ContainersModel.getProcessedContainerName()
|
||||||
textColor: AmneziaStyle.color.red
|
textColor: AmneziaStyle.color.red
|
||||||
|
|
||||||
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.")
|
||||||
@@ -239,7 +231,7 @@ PageType {
|
|||||||
}
|
}
|
||||||
var noButtonFunction = function() {
|
var noButtonFunction = function() {
|
||||||
if (!GC.isMobile()) {
|
if (!GC.isMobile()) {
|
||||||
focusItem.forceActiveFocus()
|
// focusItem.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: listview.currentItem.focusItemId.enabled ?
|
// defaultActiveFocusItem: listview.currentItem.focusItemId.enabled ?
|
||||||
listview.currentItem.focusItemId.textField :
|
// listview.currentItem.focusItemId.textField :
|
||||||
focusItem
|
// focusItem
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: focusItem
|
id: focusItem
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: listview
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: focusItem
|
id: focusItem
|
||||||
KeyNavigation.tab: backButton
|
KeyNavigation.tab: backButton
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: listview
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: focusItem
|
id: focusItem
|
||||||
KeyNavigation.tab: backButton
|
KeyNavigation.tab: backButton
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: focusItem
|
id: focusItem
|
||||||
KeyNavigation.tab: backButton
|
KeyNavigation.tab: backButton
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: InstallController
|
target: InstallController
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: listview
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: InstallController
|
target: InstallController
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: InstallController
|
target: InstallController
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ import "../Config"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: header
|
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
@@ -38,8 +36,6 @@ PageType {
|
|||||||
Layout.leftMargin: 16
|
Layout.leftMargin: 16
|
||||||
|
|
||||||
headerText: qsTr("Settings")
|
headerText: qsTr("Settings")
|
||||||
|
|
||||||
KeyNavigation.tab: account.rightButton
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LabelWithButtonType {
|
LabelWithButtonType {
|
||||||
@@ -55,7 +51,7 @@ PageType {
|
|||||||
PageController.goToPage(PageEnum.PageSettingsServersList)
|
PageController.goToPage(PageEnum.PageSettingsServersList)
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: connection.rightButton
|
// KeyNavigation.tab: connection.rightButton
|
||||||
}
|
}
|
||||||
|
|
||||||
DividerType {}
|
DividerType {}
|
||||||
@@ -72,7 +68,7 @@ PageType {
|
|||||||
PageController.goToPage(PageEnum.PageSettingsConnection)
|
PageController.goToPage(PageEnum.PageSettingsConnection)
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: application.rightButton
|
// KeyNavigation.tab: application.rightButton
|
||||||
}
|
}
|
||||||
|
|
||||||
DividerType {}
|
DividerType {}
|
||||||
@@ -89,7 +85,7 @@ PageType {
|
|||||||
PageController.goToPage(PageEnum.PageSettingsApplication)
|
PageController.goToPage(PageEnum.PageSettingsApplication)
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: backup.rightButton
|
// KeyNavigation.tab: backup.rightButton
|
||||||
}
|
}
|
||||||
|
|
||||||
DividerType {}
|
DividerType {}
|
||||||
@@ -106,7 +102,7 @@ PageType {
|
|||||||
PageController.goToPage(PageEnum.PageSettingsBackup)
|
PageController.goToPage(PageEnum.PageSettingsBackup)
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: about.rightButton
|
// KeyNavigation.tab: about.rightButton
|
||||||
}
|
}
|
||||||
|
|
||||||
DividerType {}
|
DividerType {}
|
||||||
@@ -122,7 +118,7 @@ PageType {
|
|||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
PageController.goToPage(PageEnum.PageSettingsAbout)
|
PageController.goToPage(PageEnum.PageSettingsAbout)
|
||||||
}
|
}
|
||||||
KeyNavigation.tab: close
|
// KeyNavigation.tab: close
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,9 +132,9 @@ PageType {
|
|||||||
|
|
||||||
text: qsTr("Close application")
|
text: qsTr("Close application")
|
||||||
leftImageSource: "qrc:/images/controls/x-circle.svg"
|
leftImageSource: "qrc:/images/controls/x-circle.svg"
|
||||||
isLeftImageHoverEnabled: false
|
isLeftImageHoverEnabled: false
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(header)
|
// Keys.onTabPressed: lastItemTabClicked()
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
PageController.closeApplication()
|
PageController.closeApplication()
|
||||||
|
|||||||
@@ -14,19 +14,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
|
|
||||||
onFocusChanged: {
|
|
||||||
if (focusItem.activeFocus) {
|
|
||||||
fl.contentY = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
|
|
||||||
@@ -34,8 +21,6 @@ PageType {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
|
||||||
KeyNavigation.tab: telegramButton
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
@@ -106,7 +91,7 @@ PageType {
|
|||||||
descriptionText: qsTr("To discuss features")
|
descriptionText: qsTr("To discuss features")
|
||||||
leftImageSource: "qrc:/images/controls/telegram.svg"
|
leftImageSource: "qrc:/images/controls/telegram.svg"
|
||||||
|
|
||||||
KeyNavigation.tab: mailButton
|
// KeyNavigation.tab: mailButton
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
@@ -124,7 +109,7 @@ PageType {
|
|||||||
descriptionText: qsTr("For reviews and bug reports")
|
descriptionText: qsTr("For reviews and bug reports")
|
||||||
leftImageSource: "qrc:/images/controls/mail.svg"
|
leftImageSource: "qrc:/images/controls/mail.svg"
|
||||||
|
|
||||||
KeyNavigation.tab: githubButton
|
// KeyNavigation.tab: githubButton
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
@@ -141,7 +126,7 @@ PageType {
|
|||||||
text: qsTr("GitHub")
|
text: qsTr("GitHub")
|
||||||
leftImageSource: "qrc:/images/controls/github.svg"
|
leftImageSource: "qrc:/images/controls/github.svg"
|
||||||
|
|
||||||
KeyNavigation.tab: websiteButton
|
// KeyNavigation.tab: websiteButton
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
@@ -195,7 +180,7 @@ PageType {
|
|||||||
|
|
||||||
text: qsTr("Check for updates")
|
text: qsTr("Check for updates")
|
||||||
|
|
||||||
KeyNavigation.tab: privacyPolicyButton
|
// KeyNavigation.tab: privacyPolicyButton
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
@@ -218,7 +203,6 @@ PageType {
|
|||||||
|
|
||||||
text: qsTr("Privacy Policy")
|
text: qsTr("Privacy Policy")
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked()
|
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
property bool pageEnabled
|
property bool pageEnabled
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
@@ -66,11 +64,6 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: header
|
id: header
|
||||||
|
|
||||||
@@ -82,7 +75,6 @@ PageType {
|
|||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
KeyNavigation.tab: switcher
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
@@ -103,10 +95,6 @@ PageType {
|
|||||||
|
|
||||||
enabled: root.pageEnabled
|
enabled: root.pageEnabled
|
||||||
|
|
||||||
KeyNavigation.tab: selector.enabled ?
|
|
||||||
selector :
|
|
||||||
searchField.textField
|
|
||||||
|
|
||||||
checked: AppSplitTunnelingModel.isTunnelingEnabled
|
checked: AppSplitTunnelingModel.isTunnelingEnabled
|
||||||
onToggled: {
|
onToggled: {
|
||||||
AppSplitTunnelingModel.toggleSplitTunneling(checked)
|
AppSplitTunnelingModel.toggleSplitTunneling(checked)
|
||||||
@@ -130,8 +118,6 @@ PageType {
|
|||||||
|
|
||||||
enabled: Qt.platform.os === "android" && root.pageEnabled
|
enabled: Qt.platform.os === "android" && root.pageEnabled
|
||||||
|
|
||||||
KeyNavigation.tab: searchField.textField
|
|
||||||
|
|
||||||
listView: ListViewWithRadioButtonType {
|
listView: ListViewWithRadioButtonType {
|
||||||
rootWidth: root.width
|
rootWidth: root.width
|
||||||
|
|
||||||
@@ -267,7 +253,6 @@ PageType {
|
|||||||
textFieldPlaceholderText: qsTr("application name")
|
textFieldPlaceholderText: qsTr("application name")
|
||||||
buttonImageSource: "qrc:/images/controls/plus.svg"
|
buttonImageSource: "qrc:/images/controls/plus.svg"
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
rightButtonClickedOnEnter: true
|
rightButtonClickedOnEnter: true
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
|
|||||||
@@ -14,18 +14,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
|
|
||||||
onFocusChanged: {
|
|
||||||
if (focusItem.activeFocus) {
|
|
||||||
fl.contentY = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
@@ -35,7 +23,7 @@ PageType {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
|
||||||
KeyNavigation.tab: GC.isMobile() ? switcher : switcherAutoStart
|
// KeyNavigation.tab: GC.isMobile() ? switcher : switcherAutoStart
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
@@ -77,8 +65,8 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: Qt.platform.os === "android" && !SettingsController.isNotificationPermissionGranted ?
|
// KeyNavigation.tab: Qt.platform.os === "android" && !SettingsController.isNotificationPermissionGranted ?
|
||||||
labelWithButtonNotification.rightButton : labelWithButtonLanguage.rightButton
|
// labelWithButtonNotification.rightButton : labelWithButtonLanguage.rightButton
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +83,7 @@ PageType {
|
|||||||
descriptionText: qsTr("Enable notifications to show the VPN state in the status bar")
|
descriptionText: qsTr("Enable notifications to show the VPN state in the status bar")
|
||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
|
|
||||||
KeyNavigation.tab: labelWithButtonLanguage.rightButton
|
// KeyNavigation.tab: labelWithButtonLanguage.rightButton
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
@@ -117,7 +105,7 @@ PageType {
|
|||||||
text: qsTr("Auto start")
|
text: qsTr("Auto start")
|
||||||
descriptionText: qsTr("Launch the application every time the device is starts")
|
descriptionText: qsTr("Launch the application every time the device is starts")
|
||||||
|
|
||||||
KeyNavigation.tab: switcherAutoConnect
|
// KeyNavigation.tab: switcherAutoConnect
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
checked: SettingsController.isAutoStartEnabled()
|
checked: SettingsController.isAutoStartEnabled()
|
||||||
@@ -142,7 +130,7 @@ PageType {
|
|||||||
text: qsTr("Auto connect")
|
text: qsTr("Auto connect")
|
||||||
descriptionText: qsTr("Connect to VPN on app start")
|
descriptionText: qsTr("Connect to VPN on app start")
|
||||||
|
|
||||||
KeyNavigation.tab: switcherStartMinimized
|
// KeyNavigation.tab: switcherStartMinimized
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
checked: SettingsController.isAutoConnectEnabled()
|
checked: SettingsController.isAutoConnectEnabled()
|
||||||
@@ -167,7 +155,7 @@ PageType {
|
|||||||
text: qsTr("Start minimized")
|
text: qsTr("Start minimized")
|
||||||
descriptionText: qsTr("Launch application minimized")
|
descriptionText: qsTr("Launch application minimized")
|
||||||
|
|
||||||
KeyNavigation.tab: labelWithButtonLanguage.rightButton
|
// KeyNavigation.tab: labelWithButtonLanguage.rightButton
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
checked: SettingsController.isStartMinimizedEnabled()
|
checked: SettingsController.isStartMinimizedEnabled()
|
||||||
@@ -190,7 +178,7 @@ PageType {
|
|||||||
descriptionText: LanguageModel.currentLanguageName
|
descriptionText: LanguageModel.currentLanguageName
|
||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
|
|
||||||
KeyNavigation.tab: labelWithButtonLogging.rightButton
|
// KeyNavigation.tab: labelWithButtonLogging.rightButton
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
@@ -208,7 +196,7 @@ PageType {
|
|||||||
descriptionText: SettingsController.isLoggingEnabled ? qsTr("Enabled") : qsTr("Disabled")
|
descriptionText: SettingsController.isLoggingEnabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
|
|
||||||
KeyNavigation.tab: labelWithButtonReset.rightButton
|
// KeyNavigation.tab: labelWithButtonReset.rightButton
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
@@ -226,9 +214,6 @@ PageType {
|
|||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
textColor: AmneziaStyle.color.red
|
textColor: AmneziaStyle.color.red
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked()
|
|
||||||
parentFlickable: fl
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
var headerText = qsTr("Reset settings and remove all data from the application?")
|
var headerText = qsTr("Reset settings and remove all data from the application?")
|
||||||
var descriptionText = qsTr("All settings will be reset to default. All installed AmneziaVPN services will still remain on the server.")
|
var descriptionText = qsTr("All settings will be reset to default. All installed AmneziaVPN services will still remain on the server.")
|
||||||
@@ -245,12 +230,12 @@ PageType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!GC.isMobile()) {
|
if (!GC.isMobile()) {
|
||||||
root.defaultActiveFocusItem.forceActiveFocus()
|
// root.defaultActiveFocusItem.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var noButtonFunction = function() {
|
var noButtonFunction = function() {
|
||||||
if (!GC.isMobile()) {
|
if (!GC.isMobile()) {
|
||||||
root.defaultActiveFocusItem.forceActiveFocus()
|
// root.defaultActiveFocusItem.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ import "../Controls2/TextTypes"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: SettingsController
|
target: SettingsController
|
||||||
|
|
||||||
@@ -37,11 +35,6 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
|
|
||||||
@@ -50,7 +43,7 @@ PageType {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
|
||||||
KeyNavigation.tab: makeBackupButton
|
// KeyNavigation.tab: makeBackupButton
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
@@ -113,7 +106,7 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: restoreBackupButton
|
// KeyNavigation.tab: restoreBackupButton
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
@@ -138,7 +131,7 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked()
|
// Keys.onTabPressed: lastItemTabClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,15 +11,8 @@ import "../Config"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
property bool isAppSplitTinnelingEnabled: Qt.platform.os === "windows" || Qt.platform.os === "android"
|
property bool isAppSplitTinnelingEnabled: Qt.platform.os === "windows" || Qt.platform.os === "android"
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
|
|
||||||
@@ -28,7 +21,7 @@ PageType {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
|
||||||
KeyNavigation.tab: amneziaDnsSwitch
|
// KeyNavigation.tab: amneziaDnsSwitch
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
@@ -67,7 +60,7 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: dnsServersButton.rightButton
|
// KeyNavigation.tab: dnsServersButton.rightButton
|
||||||
}
|
}
|
||||||
|
|
||||||
DividerType {}
|
DividerType {}
|
||||||
@@ -84,7 +77,7 @@ PageType {
|
|||||||
PageController.goToPage(PageEnum.PageSettingsDns)
|
PageController.goToPage(PageEnum.PageSettingsDns)
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: splitTunnelingButton.rightButton
|
// KeyNavigation.tab: splitTunnelingButton.rightButton
|
||||||
}
|
}
|
||||||
|
|
||||||
DividerType {}
|
DividerType {}
|
||||||
@@ -166,7 +159,7 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked()
|
// Keys.onTabPressed: lastItemTabClicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
DividerType {
|
DividerType {
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: primaryDns.textField
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: focusItem
|
id: focusItem
|
||||||
KeyNavigation.tab: backButton
|
KeyNavigation.tab: backButton
|
||||||
@@ -29,7 +27,7 @@ PageType {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
|
||||||
KeyNavigation.tab: root.defaultActiveFocusItem
|
// KeyNavigation.tab: root.defaultActiveFocusItem
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
@@ -124,12 +122,12 @@ PageType {
|
|||||||
PageController.showNotificationMessage(qsTr("Settings have been reset"))
|
PageController.showNotificationMessage(qsTr("Settings have been reset"))
|
||||||
|
|
||||||
if (!GC.isMobile()) {
|
if (!GC.isMobile()) {
|
||||||
defaultActiveFocusItem.forceActiveFocus()
|
// defaultActiveFocusItem.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var noButtonFunction = function() {
|
var noButtonFunction = function() {
|
||||||
if (!GC.isMobile()) {
|
if (!GC.isMobile()) {
|
||||||
defaultActiveFocusItem.forceActiveFocus()
|
// defaultActiveFocusItem.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,13 +28,6 @@ disabled after 14 days, and all log files will be deleted.")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
|
|
||||||
@@ -42,8 +35,6 @@ disabled after 14 days, and all log files will be deleted.")
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
|
||||||
KeyNavigation.tab: switcher
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
@@ -79,7 +70,6 @@ disabled after 14 days, and all log files will be deleted.")
|
|||||||
text: qsTr("Save logs")
|
text: qsTr("Save logs")
|
||||||
|
|
||||||
checked: SettingsController.isLoggingEnabled
|
checked: SettingsController.isLoggingEnabled
|
||||||
KeyNavigation.tab: openFolderButton
|
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if (checked !== SettingsController.isLoggingEnabled) {
|
if (checked !== SettingsController.isLoggingEnabled) {
|
||||||
SettingsController.isLoggingEnabled = checked
|
SettingsController.isLoggingEnabled = checked
|
||||||
@@ -103,7 +93,6 @@ disabled after 14 days, and all log files will be deleted.")
|
|||||||
implicitHeight: 56
|
implicitHeight: 56
|
||||||
|
|
||||||
image: "qrc:/images/controls/folder-open.svg"
|
image: "qrc:/images/controls/folder-open.svg"
|
||||||
KeyNavigation.tab: saveButton
|
|
||||||
|
|
||||||
onClicked: SettingsController.openLogsFolder()
|
onClicked: SettingsController.openLogsFolder()
|
||||||
Keys.onReturnPressed: openFolderButton.clicked()
|
Keys.onReturnPressed: openFolderButton.clicked()
|
||||||
@@ -131,7 +120,6 @@ disabled after 14 days, and all log files will be deleted.")
|
|||||||
implicitHeight: 56
|
implicitHeight: 56
|
||||||
|
|
||||||
image: "qrc:/images/controls/save.svg"
|
image: "qrc:/images/controls/save.svg"
|
||||||
KeyNavigation.tab: clearButton
|
|
||||||
|
|
||||||
Keys.onReturnPressed: saveButton.clicked()
|
Keys.onReturnPressed: saveButton.clicked()
|
||||||
Keys.onEnterPressed: saveButton.clicked()
|
Keys.onEnterPressed: saveButton.clicked()
|
||||||
@@ -176,7 +164,6 @@ disabled after 14 days, and all log files will be deleted.")
|
|||||||
implicitHeight: 56
|
implicitHeight: 56
|
||||||
|
|
||||||
image: "qrc:/images/controls/delete.svg"
|
image: "qrc:/images/controls/delete.svg"
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
Keys.onReturnPressed: clearButton.clicked()
|
Keys.onReturnPressed: clearButton.clicked()
|
||||||
Keys.onEnterPressed: clearButton.clicked()
|
Keys.onEnterPressed: clearButton.clicked()
|
||||||
@@ -190,14 +177,14 @@ disabled after 14 days, and all log files will be deleted.")
|
|||||||
SettingsController.clearLogs()
|
SettingsController.clearLogs()
|
||||||
PageController.showBusyIndicator(false)
|
PageController.showBusyIndicator(false)
|
||||||
PageController.showNotificationMessage(qsTr("Logs have been cleaned up"))
|
PageController.showNotificationMessage(qsTr("Logs have been cleaned up"))
|
||||||
if (!GC.isMobile()) {
|
// if (!GC.isMobile()) {
|
||||||
focusItem.forceActiveFocus()
|
// focusItem.forceActiveFocus()
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
var noButtonFunction = function() {
|
var noButtonFunction = function() {
|
||||||
if (!GC.isMobile()) {
|
// if (!GC.isMobile()) {
|
||||||
focusItem.forceActiveFocus()
|
// focusItem.forceActiveFocus()
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
showQuestionDrawer(headerText, "", yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
|
showQuestionDrawer(headerText, "", yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: PageController
|
target: PageController
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ PageType {
|
|||||||
|
|
||||||
property bool isClearCacheVisible: ServersModel.isProcessedServerHasWriteAccess() && !ContainersModel.isServiceContainer(ContainersModel.getProcessedContainerIndex())
|
property bool isClearCacheVisible: ServersModel.isProcessedServerHasWriteAccess() && !ContainersModel.isServiceContainer(ContainersModel.getProcessedContainerIndex())
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: focusItem
|
id: focusItem
|
||||||
KeyNavigation.tab: backButton
|
KeyNavigation.tab: backButton
|
||||||
|
|||||||
@@ -17,13 +17,6 @@ import "../Components"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: header
|
id: header
|
||||||
|
|
||||||
@@ -35,7 +28,7 @@ PageType {
|
|||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
KeyNavigation.tab: servers
|
// KeyNavigation.tab: servers
|
||||||
}
|
}
|
||||||
|
|
||||||
HeaderType {
|
HeaderType {
|
||||||
@@ -69,8 +62,8 @@ PageType {
|
|||||||
clip: true
|
clip: true
|
||||||
interactive: false
|
interactive: false
|
||||||
|
|
||||||
activeFocusOnTab: true
|
// activeFocusOnTab: true
|
||||||
focus: true
|
// focus: true
|
||||||
Keys.onTabPressed: {
|
Keys.onTabPressed: {
|
||||||
if (currentIndex < servers.count - 1) {
|
if (currentIndex < servers.count - 1) {
|
||||||
servers.incrementCurrentIndex()
|
servers.incrementCurrentIndex()
|
||||||
@@ -93,11 +86,11 @@ PageType {
|
|||||||
implicitWidth: servers.width
|
implicitWidth: servers.width
|
||||||
implicitHeight: delegateContent.implicitHeight
|
implicitHeight: delegateContent.implicitHeight
|
||||||
|
|
||||||
onFocusChanged: {
|
// onFocusChanged: {
|
||||||
if (focus) {
|
// if (focus) {
|
||||||
server.rightButton.forceActiveFocus()
|
// server.rightButton.forceActiveFocus()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: delegateContent
|
id: delegateContent
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ PageType {
|
|||||||
|
|
||||||
property var isServerFromApi: ServersModel.getDefaultServerData("isServerFromApi")
|
property var isServerFromApi: ServersModel.getDefaultServerData("isServerFromApi")
|
||||||
|
|
||||||
defaultActiveFocusItem: searchField.textField
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: focusItem
|
id: focusItem
|
||||||
KeyNavigation.tab: backButton
|
KeyNavigation.tab: backButton
|
||||||
@@ -360,11 +358,11 @@ PageType {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
expandedHeight: parent.height * 0.4375
|
expandedHeight: parent.height * 0.4375
|
||||||
|
|
||||||
onClosed: {
|
// onClosed: {
|
||||||
if (root.defaultActiveFocusItem && !GC.isMobile()) {
|
// if (root.defaultActiveFocusItem && !GC.isMobile()) {
|
||||||
root.defaultActiveFocusItem.forceActiveFocus()
|
// root.defaultActiveFocusItem.forceActiveFocus()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
expandedContent: ColumnLayout {
|
expandedContent: ColumnLayout {
|
||||||
id: moreActionsDrawerContent
|
id: moreActionsDrawerContent
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
@@ -39,15 +37,9 @@ PageType {
|
|||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
KeyNavigation.tab: fileButton.rightButton
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HeaderType {
|
HeaderType {
|
||||||
@@ -78,8 +70,6 @@ PageType {
|
|||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
leftImageSource: "qrc:/images/controls/folder-open.svg"
|
leftImageSource: "qrc:/images/controls/folder-open.svg"
|
||||||
|
|
||||||
KeyNavigation.tab: qrButton.visible ? qrButton.rightButton : textButton.rightButton
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
var nameFilter = !ServersModel.getServersCount() ? "Config or backup files (*.vpn *.ovpn *.conf *.json *.backup)" :
|
var nameFilter = !ServersModel.getServersCount() ? "Config or backup files (*.vpn *.ovpn *.conf *.json *.backup)" :
|
||||||
"Config files (*.vpn *.ovpn *.conf *.json)"
|
"Config files (*.vpn *.ovpn *.conf *.json)"
|
||||||
@@ -103,8 +93,6 @@ PageType {
|
|||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
leftImageSource: "qrc:/images/controls/qr-code.svg"
|
leftImageSource: "qrc:/images/controls/qr-code.svg"
|
||||||
|
|
||||||
KeyNavigation.tab: textButton.rightButton
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
ImportController.startDecodingQr()
|
ImportController.startDecodingQr()
|
||||||
if (Qt.platform.os === "ios") {
|
if (Qt.platform.os === "ios") {
|
||||||
@@ -125,8 +113,6 @@ PageType {
|
|||||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||||
leftImageSource: "qrc:/images/controls/text-cursor.svg"
|
leftImageSource: "qrc:/images/controls/text-cursor.svg"
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
PageController.goToPage(PageEnum.PageSetupWizardTextKey)
|
PageController.goToPage(PageEnum.PageSetupWizardTextKey)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,13 +12,6 @@ import "../Controls2/TextTypes"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: hostname.textField
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
|
|
||||||
@@ -26,8 +19,6 @@ PageType {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
|
||||||
KeyNavigation.tab: hostname.textField
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
@@ -67,7 +58,7 @@ PageType {
|
|||||||
textField.text = textField.text.replace(/^\s+|\s+$/g, '')
|
textField.text = textField.text.replace(/^\s+|\s+$/g, '')
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: username.textField
|
// KeyNavigation.stab: username.textField
|
||||||
}
|
}
|
||||||
|
|
||||||
TextFieldWithHeaderType {
|
TextFieldWithHeaderType {
|
||||||
@@ -81,7 +72,7 @@ PageType {
|
|||||||
textField.text = textField.text.replace(/^\s+|\s+$/g, '')
|
textField.text = textField.text.replace(/^\s+|\s+$/g, '')
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: secretData.textField
|
// KeyNavigation.tab: secretData.textField
|
||||||
}
|
}
|
||||||
|
|
||||||
TextFieldWithHeaderType {
|
TextFieldWithHeaderType {
|
||||||
@@ -103,7 +94,7 @@ PageType {
|
|||||||
textField.text = textField.text.replace(/^\s+|\s+$/g, '')
|
textField.text = textField.text.replace(/^\s+|\s+$/g, '')
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: continueButton
|
// KeyNavigation.tab: continueButton
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
@@ -114,7 +105,7 @@ PageType {
|
|||||||
|
|
||||||
text: qsTr("Continue")
|
text: qsTr("Continue")
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
// Keys.onTabPressed: lastItemTabClicked()
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ PageType {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
property bool isEasySetup: true
|
property bool isEasySetup: true
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
SortFilterProxyModel {
|
SortFilterProxyModel {
|
||||||
id: proxyContainersModel
|
id: proxyContainersModel
|
||||||
@@ -34,14 +33,6 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
implicitWidth: 1
|
|
||||||
implicitHeight: 54
|
|
||||||
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
|
|
||||||
@@ -49,8 +40,6 @@ PageType {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
|
||||||
KeyNavigation.tab: continueButton
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
@@ -163,7 +152,6 @@ PageType {
|
|||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
|
|
||||||
text: qsTr("Continue")
|
text: qsTr("Continue")
|
||||||
KeyNavigation.tab: setupLaterButton
|
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
@@ -193,7 +181,6 @@ PageType {
|
|||||||
textColor: AmneziaStyle.color.white
|
textColor: AmneziaStyle.color.white
|
||||||
borderWidth: 1
|
borderWidth: 1
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
|
|
||||||
visible: {
|
visible: {
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import "../Config"
|
|||||||
|
|
||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
Component.onCompleted: PageController.disableTabBar(true)
|
Component.onCompleted: PageController.disableTabBar(true)
|
||||||
Component.onDestruction: PageController.disableTabBar(false)
|
Component.onDestruction: PageController.disableTabBar(false)
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ PageType {
|
|||||||
parent: root
|
parent: root
|
||||||
onClosed: {
|
onClosed: {
|
||||||
if (!GC.isMobile()) {
|
if (!GC.isMobile()) {
|
||||||
defaultActiveFocusItem.forceActiveFocus()
|
// defaultActiveFocusItem.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -288,10 +288,10 @@ PageType {
|
|||||||
transportProtoSelector.visible = protocolSelectorVisible
|
transportProtoSelector.visible = protocolSelectorVisible
|
||||||
transportProtoHeader.visible = protocolSelectorVisible
|
transportProtoHeader.visible = protocolSelectorVisible
|
||||||
|
|
||||||
if (port.visible && port.enabled)
|
// if (port.visible && port.enabled)
|
||||||
defaultActiveFocusItem = port.textField
|
// defaultActiveFocusItem = port.textField
|
||||||
else
|
// else
|
||||||
defaultActiveFocusItem = focusItem
|
// defaultActiveFocusItem = focusItem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,13 +14,6 @@ import "../Config"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
SortFilterProxyModel {
|
SortFilterProxyModel {
|
||||||
id: proxyContainersModel
|
id: proxyContainersModel
|
||||||
sourceModel: ContainersModel
|
sourceModel: ContainersModel
|
||||||
|
|||||||
@@ -13,11 +13,10 @@ import "../Components"
|
|||||||
|
|
||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
objectName: "PageStart"
|
||||||
|
|
||||||
property bool isControlsDisabled: false
|
property bool isControlsDisabled: false
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: PageController
|
target: PageController
|
||||||
|
|
||||||
@@ -139,11 +138,6 @@ PageType {
|
|||||||
qsTr(" Helps you access blocked content without revealing your privacy, even to VPN providers.")
|
qsTr(" Helps you access blocked content without revealing your privacy, even to VPN providers.")
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: startButton
|
|
||||||
}
|
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
id: startButton
|
id: startButton
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -156,8 +150,6 @@ PageType {
|
|||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
connectionTypeSelection.open()
|
connectionTypeSelection.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: startButton2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
@@ -179,8 +171,6 @@ PageType {
|
|||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
Qt.openUrlExternally(qsTr("https://amnezia.org/instructions/0_starter-guide"))
|
Qt.openUrlExternally(qsTr("https://amnezia.org/instructions/0_starter-guide"))
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -188,9 +178,12 @@ PageType {
|
|||||||
ConnectionTypeSelectionDrawer {
|
ConnectionTypeSelectionDrawer {
|
||||||
id: connectionTypeSelection
|
id: connectionTypeSelection
|
||||||
|
|
||||||
onClosed: {
|
// onClosed: {
|
||||||
PageController.forceTabBarActiveFocus()
|
// PageController.forceTabBarActiveFocus()
|
||||||
root.defaultActiveFocusItem.forceActiveFocus()
|
// root.defaultActiveFocusItem.forceActiveFocus()
|
||||||
}
|
// PageController.forceStackActiveFocus()
|
||||||
|
|
||||||
|
// startButton2.forceActiveFocus()
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,14 +12,6 @@ import "../Config"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: textKey.textField
|
|
||||||
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
@@ -38,7 +30,6 @@ PageType {
|
|||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
KeyNavigation.tab: textKey.textField
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HeaderType {
|
HeaderType {
|
||||||
@@ -66,8 +57,6 @@ PageType {
|
|||||||
textField.text = ""
|
textField.text = ""
|
||||||
textField.paste()
|
textField.paste()
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: continueButton
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -83,7 +72,6 @@ PageType {
|
|||||||
anchors.bottomMargin: 32
|
anchors.bottomMargin: 32
|
||||||
|
|
||||||
text: qsTr("Continue")
|
text: qsTr("Continue")
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
if (ImportController.extractConfigFromData(textKey.textFieldText)) {
|
if (ImportController.extractConfigFromData(textKey.textFieldText)) {
|
||||||
|
|||||||
@@ -16,13 +16,6 @@ PageType {
|
|||||||
|
|
||||||
property bool showContent: false
|
property bool showContent: false
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
|
|
||||||
@@ -30,8 +23,6 @@ PageType {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
|
||||||
KeyNavigation.tab: showContentButton
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
@@ -192,8 +183,6 @@ PageType {
|
|||||||
anchors.rightMargin: 16
|
anchors.rightMargin: 16
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
id: connectButton
|
id: connectButton
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ import "../Config"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: clientNameTextField.textField
|
|
||||||
|
|
||||||
enum ConfigType {
|
enum ConfigType {
|
||||||
AmneziaConnection,
|
AmneziaConnection,
|
||||||
OpenVpn,
|
OpenVpn,
|
||||||
@@ -154,7 +152,7 @@ PageType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: a
|
id: fl
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
@@ -177,7 +175,7 @@ PageType {
|
|||||||
KeyNavigation.tab: header.actionButton
|
KeyNavigation.tab: header.actionButton
|
||||||
onFocusChanged: {
|
onFocusChanged: {
|
||||||
if (focusItem.activeFocus) {
|
if (focusItem.activeFocus) {
|
||||||
a.contentY = 0
|
fl.contentY = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -288,7 +286,7 @@ PageType {
|
|||||||
implicitWidth: (root.width - 32) / 2
|
implicitWidth: (root.width - 32) / 2
|
||||||
text: qsTr("Connection")
|
text: qsTr("Connection")
|
||||||
|
|
||||||
KeyNavigation.tab: usersRadioButton
|
// KeyNavigation.tab: usersRadioButton
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
accessTypeSelector.currentIndex = 0
|
accessTypeSelector.currentIndex = 0
|
||||||
@@ -305,7 +303,7 @@ 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
|
// KeyNavigation.tab: accessTypeSelector.currentIndex === 0 ? clientNameTextField.textField : serverSelector
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
accessTypeSelector.currentIndex = 1
|
accessTypeSelector.currentIndex = 1
|
||||||
@@ -343,7 +341,7 @@ PageType {
|
|||||||
|
|
||||||
checkEmptyText: true
|
checkEmptyText: true
|
||||||
|
|
||||||
KeyNavigation.tab: serverSelector
|
// KeyNavigation.tab: serverSelector
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -409,7 +407,7 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: protocolSelector
|
// KeyNavigation.tab: protocolSelector
|
||||||
}
|
}
|
||||||
|
|
||||||
DropDownType {
|
DropDownType {
|
||||||
@@ -509,11 +507,11 @@ PageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: accessTypeSelector.currentIndex === 0 ?
|
// KeyNavigation.tab: accessTypeSelector.currentIndex === 0 ?
|
||||||
exportTypeSelector :
|
// exportTypeSelector :
|
||||||
isSearchBarVisible ?
|
// isSearchBarVisible ?
|
||||||
searchTextField.textField :
|
// searchTextField.textField :
|
||||||
usersHeader.actionButton
|
// usersHeader.actionButton
|
||||||
}
|
}
|
||||||
|
|
||||||
DropDownType {
|
DropDownType {
|
||||||
@@ -577,7 +575,7 @@ PageType {
|
|||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
||||||
|
|
||||||
parentFlickable: a
|
parentFlickable:fl
|
||||||
|
|
||||||
clickedFunc: function(){
|
clickedFunc: function(){
|
||||||
if (clientNameTextField.textFieldText !== "") {
|
if (clientNameTextField.textFieldText !== "") {
|
||||||
@@ -723,10 +721,10 @@ PageType {
|
|||||||
|
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
if (currentItem) {
|
if (currentItem) {
|
||||||
if (currentItem.y < a.contentY) {
|
if (currentItem.y < fl.contentY) {
|
||||||
a.contentY = currentItem.y
|
fl.contentY = currentItem.y
|
||||||
} else if (currentItem.y + currentItem.height + clientsListView.y > a.contentY + a.height) {
|
} else if (currentItem.y + currentItem.height + clientsListView.y > fl.contentY + fl.height) {
|
||||||
a.contentY = currentItem.y + clientsListView.y + currentItem.height - a.height
|
fl.contentY = currentItem.y + clientsListView.y + currentItem.height - fl.height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,13 +18,6 @@ import "../Config"
|
|||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: focusItem
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: focusItem
|
|
||||||
KeyNavigation.tab: backButton
|
|
||||||
}
|
|
||||||
|
|
||||||
BackButtonType {
|
BackButtonType {
|
||||||
id: backButton
|
id: backButton
|
||||||
|
|
||||||
@@ -32,8 +25,6 @@ PageType {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
|
||||||
KeyNavigation.tab: serverSelector
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
@@ -85,8 +76,6 @@ PageType {
|
|||||||
descriptionText: qsTr("Server")
|
descriptionText: qsTr("Server")
|
||||||
headerText: qsTr("Server")
|
headerText: qsTr("Server")
|
||||||
|
|
||||||
KeyNavigation.tab: shareButton
|
|
||||||
|
|
||||||
listView: ListViewWithRadioButtonType {
|
listView: ListViewWithRadioButtonType {
|
||||||
id: serverSelectorListView
|
id: serverSelectorListView
|
||||||
|
|
||||||
@@ -137,8 +126,6 @@ PageType {
|
|||||||
text: qsTr("Share")
|
text: qsTr("Share")
|
||||||
imageSource: "qrc:/images/controls/share-2.svg"
|
imageSource: "qrc:/images/controls/share-2.svg"
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
shareConnectionDrawer.headerText = qsTr("Connection to ") + serverSelector.text
|
shareConnectionDrawer.headerText = qsTr("Connection to ") + serverSelector.text
|
||||||
shareConnectionDrawer.configContentHeaderText = qsTr("File with connection settings to ") + serverSelector.text
|
shareConnectionDrawer.configContentHeaderText = qsTr("File with connection settings to ") + serverSelector.text
|
||||||
|
|||||||
@@ -12,11 +12,9 @@ import "../Controls2/TextTypes"
|
|||||||
import "../Config"
|
import "../Config"
|
||||||
import "../Components"
|
import "../Components"
|
||||||
|
|
||||||
PageType {
|
FocusScope {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
defaultActiveFocusItem: homeTabButton
|
|
||||||
|
|
||||||
property bool isControlsDisabled: false
|
property bool isControlsDisabled: false
|
||||||
property bool isTabBarDisabled: false
|
property bool isTabBarDisabled: false
|
||||||
|
|
||||||
@@ -88,7 +86,7 @@ PageType {
|
|||||||
|
|
||||||
function onForceTabBarActiveFocus() {
|
function onForceTabBarActiveFocus() {
|
||||||
homeTabButton.focus = true
|
homeTabButton.focus = true
|
||||||
tabBar.forceActiveFocus()
|
homeTabButton.forceActiveFocus()
|
||||||
}
|
}
|
||||||
|
|
||||||
function onForceStackActiveFocus() {
|
function onForceStackActiveFocus() {
|
||||||
@@ -168,12 +166,27 @@ PageType {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.bottom: tabBar.top
|
anchors.bottom: tabBar.top
|
||||||
|
focus: true
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: root.height - tabBar.implicitHeight
|
height: root.height - tabBar.implicitHeight
|
||||||
|
|
||||||
enabled: !root.isControlsDisabled
|
enabled: !root.isControlsDisabled
|
||||||
|
|
||||||
|
// onActiveFocusChanged: {
|
||||||
|
// if (currentItem) {
|
||||||
|
// currentItem.forceActiveFocus()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// KeyNavigation.tab: homeTabButton
|
||||||
|
// Keys.onTabPressed: tabBarStackView.currentItem.lastItemTabClicked()
|
||||||
|
// onCurrentItemChanged: {
|
||||||
|
// if (currentItem) {
|
||||||
|
// currentItem.forceActiveFocus()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
function goToTabBarPage(page) {
|
function goToTabBarPage(page) {
|
||||||
connectionTypeSelection.close()
|
connectionTypeSelection.close()
|
||||||
|
|
||||||
@@ -236,6 +249,8 @@ PageType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
KeyNavigation.tab: shareTabButton
|
KeyNavigation.tab: shareTabButton
|
||||||
|
KeyNavigation.backtab: tabBarStackView
|
||||||
|
|
||||||
Keys.onEnterPressed: this.clicked()
|
Keys.onEnterPressed: this.clicked()
|
||||||
Keys.onReturnPressed: this.clicked()
|
Keys.onReturnPressed: this.clicked()
|
||||||
}
|
}
|
||||||
@@ -289,6 +304,8 @@ PageType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Keys.onTabPressed: PageController.forceStackActiveFocus()
|
Keys.onTabPressed: PageController.forceStackActiveFocus()
|
||||||
|
|
||||||
|
// KeysNavigation.tab: tabBarStackView.currentItem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import "Config"
|
|||||||
import "Controls2"
|
import "Controls2"
|
||||||
import "Components"
|
import "Components"
|
||||||
|
|
||||||
Window {
|
Window {
|
||||||
id: root
|
id: root
|
||||||
objectName: "mainWindow"
|
objectName: "mainWindow"
|
||||||
visible: true
|
visible: true
|
||||||
@@ -25,12 +25,16 @@ Window {
|
|||||||
color: AmneziaStyle.color.black
|
color: AmneziaStyle.color.black
|
||||||
|
|
||||||
onClosing: function() {
|
onClosing: function() {
|
||||||
console.debug("QML onClosing signal")
|
// console.debug("QML onClosing signal")
|
||||||
PageController.closeWindow()
|
PageController.closeWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
title: "AmneziaVPN"
|
title: "AmneziaVPN"
|
||||||
|
|
||||||
|
onActiveFocusItemChanged: {
|
||||||
|
console.debug("onActiveFocusItemChanged", activeFocusItem)
|
||||||
|
}
|
||||||
|
|
||||||
StackViewType {
|
StackViewType {
|
||||||
id: rootStackView
|
id: rootStackView
|
||||||
|
|
||||||
@@ -220,6 +224,8 @@ Window {
|
|||||||
id: questionDrawer
|
id: questionDrawer
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
onClosed: PageController.forceStackActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user