add navigation using enter + buttons will be clicked if enter (if but… (#556)
Enter navigation
This commit is contained in:
parent
16db23c159
commit
698cfe910c
32 changed files with 3655 additions and 4373 deletions
|
@ -16,6 +16,8 @@ import "../Components"
|
|||
PageType {
|
||||
id: root
|
||||
|
||||
defaultActiveFocusItem: clientNameTextField.textField
|
||||
|
||||
enum ConfigType {
|
||||
AmneziaConnection,
|
||||
OpenVpn,
|
||||
|
@ -122,7 +124,7 @@ PageType {
|
|||
FlickableType {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
contentHeight: content.height + 10
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
|
@ -258,6 +260,8 @@ PageType {
|
|||
textField.maximumLength: 20
|
||||
|
||||
checkEmptyText: true
|
||||
|
||||
KeyNavigation.tab: shareButton
|
||||
}
|
||||
|
||||
DropDownType {
|
||||
|
@ -454,6 +458,8 @@ PageType {
|
|||
}
|
||||
|
||||
BasicButtonType {
|
||||
id: shareButton
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 40
|
||||
|
||||
|
@ -463,7 +469,7 @@ PageType {
|
|||
text: qsTr("Share")
|
||||
imageSource: "qrc:/images/controls/share-2.svg"
|
||||
|
||||
onClicked: {
|
||||
clickedFunc: function(){
|
||||
if (clientNameTextField.textFieldText !== "") {
|
||||
ExportController.generateConfig(root.connectionTypesModel[exportTypeSelector.currentIndex].type)
|
||||
}
|
||||
|
@ -593,7 +599,7 @@ PageType {
|
|||
|
||||
text: qsTr("Rename")
|
||||
|
||||
onClicked: function() {
|
||||
clickedFunc: function() {
|
||||
clientNameEditDrawer.open()
|
||||
}
|
||||
|
||||
|
@ -627,14 +633,18 @@ PageType {
|
|||
textFieldText: clientName
|
||||
textField.maximumLength: 20
|
||||
checkEmptyText: true
|
||||
|
||||
KeyNavigation.tab: saveButton
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
id: saveButton
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Save")
|
||||
|
||||
onClicked: {
|
||||
clickedFunc: function() {
|
||||
if (clientNameEditor.textFieldText === "") {
|
||||
return
|
||||
}
|
||||
|
@ -666,7 +676,7 @@ PageType {
|
|||
|
||||
text: qsTr("Revoke")
|
||||
|
||||
onClicked: function() {
|
||||
clickedFunc: function() {
|
||||
var headerText = qsTr("Revoke the config for a user - %1?").arg(clientName)
|
||||
var descriptionText = qsTr("The user will no longer be able to connect to your server.")
|
||||
var yesButtonText = qsTr("Continue")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue