1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-26 14:32:52 -05:00

Add proxy service for legacy nmcli version

This commit is contained in:
bbedward
2025-10-08 14:00:51 -04:00
parent ad43ca11eb
commit e327b1ca5b
12 changed files with 1441 additions and 111 deletions

View File

@@ -17,7 +17,7 @@ DankModal {
networkData = data
networkInfoModalVisible = true
open()
NetworkManagerService.fetchNetworkInfo(ssid)
NetworkService.fetchNetworkInfo(ssid)
}
function hideDialog() {
@@ -101,7 +101,7 @@ DankModal {
id: detailsText
width: parent.width
text: NetworkManagerService.networkInfoDetails && NetworkManagerService.networkInfoDetails.replace(/\\n/g, '\n') || "No information available"
text: NetworkService.networkInfoDetails && NetworkService.networkInfoDetails.replace(/\\n/g, '\n') || "No information available"
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
wrapMode: Text.WordWrap

View File

@@ -17,7 +17,7 @@ DankModal {
wifiPasswordInput = ""
wifiUsernameInput = ""
const network = NetworkManagerService.wifiNetworks.find(n => n.ssid === ssid)
const network = NetworkService.wifiNetworks.find(n => n.ssid === ssid)
requiresEnterprise = network?.enterprise || false
open()
@@ -59,14 +59,14 @@ DankModal {
}
Connections {
target: NetworkManagerService
target: NetworkService
function onPasswordDialogShouldReopenChanged() {
if (NetworkManagerService.passwordDialogShouldReopen && NetworkManagerService.connectingSSID !== "") {
wifiPasswordSSID = NetworkManagerService.connectingSSID
if (NetworkService.passwordDialogShouldReopen && NetworkService.connectingSSID !== "") {
wifiPasswordSSID = NetworkService.connectingSSID
wifiPasswordInput = ""
open()
NetworkManagerService.passwordDialogShouldReopen = false
NetworkService.passwordDialogShouldReopen = false
}
}
}
@@ -196,7 +196,7 @@ DankModal {
}
onAccepted: () => {
const username = requiresEnterprise ? usernameInput.text : ""
NetworkManagerService.connectToWifi(wifiPasswordSSID, passwordInput.text, username)
NetworkService.connectToWifi(wifiPasswordSSID, passwordInput.text, username)
close()
wifiPasswordInput = ""
wifiUsernameInput = ""
@@ -344,7 +344,7 @@ DankModal {
enabled: parent.enabled
onClicked: () => {
const username = requiresEnterprise ? usernameInput.text : ""
NetworkManagerService.connectToWifi(wifiPasswordSSID, passwordInput.text, username)
NetworkService.connectToWifi(wifiPasswordSSID, passwordInput.text, username)
close()
wifiPasswordInput = ""
wifiUsernameInput = ""