mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-26 22:42:50 -05:00
network: big feature enrichment
- Dedicated view in settings - VPN profile management - Ethernet disconnection - Turn prompts into floating windows
This commit is contained in:
@@ -18,6 +18,7 @@ Singleton {
|
||||
property string ethernetInterface: ""
|
||||
property bool ethernetConnected: false
|
||||
property string ethernetConnectionUuid: ""
|
||||
property var ethernetDevices: []
|
||||
|
||||
property var wiredConnections: []
|
||||
|
||||
@@ -116,7 +117,7 @@ Singleton {
|
||||
|
||||
signal networksUpdated
|
||||
signal connectionChanged
|
||||
signal credentialsNeeded(string token, string ssid, string setting, var fields, var hints, string reason, string connType, string connName, string vpnService)
|
||||
signal credentialsNeeded(string token, string ssid, string setting, var fields, var hints, string reason, string connType, string connName, string vpnService, var fieldsInfo)
|
||||
|
||||
readonly property string socketPath: Quickshell.env("DMS_SOCKET")
|
||||
|
||||
@@ -197,8 +198,9 @@ Singleton {
|
||||
const connType = data.connType || "";
|
||||
const connName = data.name || data.connectionId || "";
|
||||
const vpnService = data.vpnService || "";
|
||||
const fInfo = data.fieldsInfo || [];
|
||||
|
||||
credentialsNeeded(credentialsToken, credentialsSSID, credentialsSetting, credentialsFields, credentialsHints, credentialsReason, connType, connName, vpnService);
|
||||
credentialsNeeded(credentialsToken, credentialsSSID, credentialsSetting, credentialsFields, credentialsHints, credentialsReason, connType, connName, vpnService, fInfo);
|
||||
}
|
||||
|
||||
function addRef() {
|
||||
@@ -244,6 +246,7 @@ Singleton {
|
||||
ethernetInterface = state.ethernetDevice || "";
|
||||
ethernetConnected = state.ethernetConnected || false;
|
||||
ethernetConnectionUuid = state.ethernetConnectionUuid || "";
|
||||
ethernetDevices = state.ethernetDevices || [];
|
||||
|
||||
wiredConnections = state.wiredConnections || [];
|
||||
|
||||
@@ -618,7 +621,7 @@ Singleton {
|
||||
if (!networkAvailable)
|
||||
return;
|
||||
if (type === "ethernet") {
|
||||
if (networkStatus === "ethernet") {
|
||||
if (ethernetConnected) {
|
||||
DMSService.sendRequest("network.ethernet.disconnect", null, null);
|
||||
} else {
|
||||
DMSService.sendRequest("network.ethernet.connect", null, null);
|
||||
@@ -626,6 +629,14 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
function disconnectEthernetDevice(deviceName) {
|
||||
if (!networkAvailable)
|
||||
return;
|
||||
DMSService.sendRequest("network.ethernet.disconnect", {
|
||||
device: deviceName
|
||||
}, null);
|
||||
}
|
||||
|
||||
function startAutoScan() {
|
||||
autoScan = true;
|
||||
autoRefreshEnabled = true;
|
||||
|
||||
Reference in New Issue
Block a user