summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kacej <[email protected]>2018-04-25 12:23:00 +0200
committerMartin Kacej <[email protected]>2018-04-25 12:23:00 +0200
commit708f003bb9781ab74b30160f8a5536061d906ecd (patch)
tree38bdea513cf72ea85eeeceb7a61c09f89c6c452c
parent48ce5b70a8036f7a67ea840d5c630788f1621086 (diff)
confirmation dialog about deleting network
-rw-r--r--mobile/package/contents/ui/NetworkListView.qml40
-rw-r--r--mobile/package/contents/ui/RowItemDelegate.qml4
2 files changed, 39 insertions, 5 deletions
diff --git a/mobile/package/contents/ui/NetworkListView.qml b/mobile/package/contents/ui/NetworkListView.qml
index d0bca4e..6389fa0 100644
--- a/mobile/package/contents/ui/NetworkListView.qml
+++ b/mobile/package/contents/ui/NetworkListView.qml
@@ -60,14 +60,14 @@ Kirigami.ScrollablePage {
Kirigami.Action {
iconName: "edit"
- text: "Create Hotspot"
+ text: i18n("Create Hotspot")
onTriggered: {
- showPassiveNotification("Open tethering")
+ //applicationWindow().pageStack.push(tetheringComponent)
}
},
Kirigami.Action {
iconName: "edit"
- text: "Saved Connections"
+ text: i18n("Saved Connections")
checkable: true
checked: false
onTriggered: {
@@ -107,4 +107,38 @@ Kirigami.ScrollablePage {
}
}
*/
+ Kirigami.OverlayDrawer {
+ id: deleteConnectionDialog
+ property var name
+ property var dbusPath
+ edge: Qt.BottomEdge
+ contentItem: Item {
+ implicitHeight: childrenRect.height + Kirigami.Units.gridUnit
+ ColumnLayout{
+ anchors.centerIn: parent
+ Controls.Button {
+ text: i18n("Delete ") + deleteConnectionDialog.name
+ onClicked: {
+ handler.removeConnection(deleteConnectionDialog.dbusPath)
+ deleteConnectionDialog.close()
+ }
+ }
+ Controls.Button {
+ text: i18n("Cancel")
+ onClicked: deleteConnectionDialog.close()
+ }
+ Item {
+ Layout.minimumHeight: Kirigami.Units.gridUnit * 4
+ }
+ }
+ onVisibleChanged: {
+ if (visible) {
+
+ } else {
+ deleteConnectionDialog.name = ""
+ deleteConnectionDialog.dbusPath = ""
+ }
+ }
+ }
+ }
}
diff --git a/mobile/package/contents/ui/RowItemDelegate.qml b/mobile/package/contents/ui/RowItemDelegate.qml
index 105b522..32ad53d 100644
--- a/mobile/package/contents/ui/RowItemDelegate.qml
+++ b/mobile/package/contents/ui/RowItemDelegate.qml
@@ -158,7 +158,7 @@ Kirigami.SwipeListItem {
}
function forgetNetwork() {
- // TODO confirmation dialog
- handler.removeConnection(ConnectionPath)
+ deleteConnectionDialog.name = ItemUniqueName
+ deleteConnectionDialog.open()
}
}