mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-04 04:42:05 -04:00
Wifi QR code generation (requires testing) (#1794)
* fix: add mockery v2 to nix flake pkgs * feat: add requests for generating wifi qr codes as png files in /tmp, and to delete them later. only supports NetworkManager backend for now. * feat: add modal for sharing wifi via qr code and saving the code as png file. * fix: uncomment QR code file deletion * network: light refactor and cleanup for QR code generation --------- Co-authored-by: bbedward <bbedward@gmail.com>
This commit is contained in:
@@ -651,6 +651,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: pinButton
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: optionsButton.width + Theme.spacingM + Theme.spacingS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -711,6 +712,19 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
id: qrCodeButton
|
||||
visible: modelData.secured && modelData.saved
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: optionsButton.width + pinWifiRow.width + 3 * Theme.spacingM + Theme.spacingS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
iconName: "qr_code"
|
||||
buttonSize: 28
|
||||
onClicked: {
|
||||
PopoutService.showWifiQRCodeModal(modelData.ssid);
|
||||
}
|
||||
}
|
||||
|
||||
DankRipple {
|
||||
id: wifiRipple
|
||||
cornerRadius: parent.radius
|
||||
@@ -719,7 +733,7 @@ Rectangle {
|
||||
MouseArea {
|
||||
id: networkMouseArea
|
||||
anchors.fill: parent
|
||||
anchors.rightMargin: optionsButton.width + Theme.spacingM + Theme.spacingS + pinWifiRow.width + Theme.spacingS * 4
|
||||
anchors.rightMargin: optionsButton.width + pinWifiRow.width + (qrCodeButton.visible ? qrCodeButton.width : 0) + Theme.spacingS * 5 + Theme.spacingM
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onPressed: mouse => wifiRipple.trigger(mouse.x, mouse.y)
|
||||
|
||||
Reference in New Issue
Block a user