Release Vulpes OS Preview 26 with Gecko 161.0 and Tundra 0.2.0
This commit is contained in:
parent
3a1fba4efe
commit
e241a42d2f
1 changed files with 1305 additions and 331 deletions
|
|
@ -21,13 +21,19 @@
|
|||
}
|
||||
let pendingNetwork = null;
|
||||
function update(network, status = network ? 'connected' : 'disconnected') {
|
||||
const changed = manager.connection.status !== status || manager.connection.network?.ssid !== network?.ssid;
|
||||
const previous = manager.connection.network;
|
||||
const info = manager.connectionInformation;
|
||||
const changed = manager.connection.status !== status || previous?.ssid !== network?.ssid ||
|
||||
previous?.vulpesId !== network?.vulpesId;
|
||||
manager.connection = {status, network};
|
||||
manager.connectionInformation = status === 'connected' && network ? {...connectionInfo,relSignalStrength:network.relSignalStrength} : null;
|
||||
if (changed) emit('statuschange', manager.connection);
|
||||
// Gaia's signal listeners require the associated network. A scan while
|
||||
// disconnected must not announce connection information for a missing AP.
|
||||
if (manager.connectionInformation) emit('connectioninfoupdate', {network, ...manager.connectionInformation});
|
||||
const current = manager.connectionInformation;
|
||||
if (current && (changed || !info || Object.keys({...info, ...current}).some(k => info[k] !== current[k]))) {
|
||||
emit('connectioninfoupdate', {network, ...current});
|
||||
}
|
||||
}
|
||||
function applyState(state) {
|
||||
power(state.enabled === true);
|
||||
|
|
@ -37,13 +43,14 @@
|
|||
if (state.enabled && (state.state === 'connecting' || (pendingNetwork && state.state === 'disconnected'))) {
|
||||
const target = state.network;
|
||||
const network = target ? {ssid:target.ssid, security:securityTypes(target.security)} : pendingNetwork;
|
||||
if (network) update(network, 'connecting');
|
||||
update(network, 'connecting');
|
||||
return;
|
||||
}
|
||||
const network=state.state==='connected' && state.network;
|
||||
update(network ? {
|
||||
...networks.find(n => network.id ? n.vulpesId === network.id : n.connected && n.ssid === network.ssid),
|
||||
ssid:network.ssid,
|
||||
...(network.id ? {vulpesId:network.id} : {}),
|
||||
security:securityTypes(network.security),
|
||||
relSignalStrength:network.signal,savedId:network.savedId,connected:true
|
||||
} : null);
|
||||
|
|
|
|||
Loading…
Reference in a new issue