forked from Shinonome/dots-hyprland
adjusting timeout for wifinetwork
This commit is contained in:
@@ -81,7 +81,8 @@ const NetResource = (icon, command) => {
|
|||||||
|
|
||||||
const CurrentNetwork = () => {
|
const CurrentNetwork = () => {
|
||||||
let authLock = false;
|
let authLock = false;
|
||||||
// console.log(Network.wifi);
|
let timeoutId = null;
|
||||||
|
|
||||||
const bottomSeparator = Box({
|
const bottomSeparator = Box({
|
||||||
className: 'separator-line',
|
className: 'separator-line',
|
||||||
});
|
});
|
||||||
@@ -138,7 +139,7 @@ const CurrentNetwork = () => {
|
|||||||
}),
|
}),
|
||||||
Entry({
|
Entry({
|
||||||
className: 'sidebar-wifinetworks-auth-entry',
|
className: 'sidebar-wifinetworks-auth-entry',
|
||||||
visibility: false, // Password dots
|
visibility: false,
|
||||||
onAccept: (self) => {
|
onAccept: (self) => {
|
||||||
authLock = false;
|
authLock = false;
|
||||||
networkAuth.revealChild = false;
|
networkAuth.revealChild = false;
|
||||||
@@ -155,6 +156,14 @@ const CurrentNetwork = () => {
|
|||||||
authLock = true;
|
authLock = true;
|
||||||
connectAttempt = Network.wifi.ssid;
|
connectAttempt = Network.wifi.ssid;
|
||||||
self.revealChild = true;
|
self.revealChild = true;
|
||||||
|
if (timeoutId) {
|
||||||
|
clearTimeout(timeoutId);
|
||||||
|
}
|
||||||
|
timeoutId = setTimeout(() => {
|
||||||
|
authLock = false;
|
||||||
|
self.revealChild = false;
|
||||||
|
Network.wifi.state = 'activated';
|
||||||
|
}, 20000); // 20 seconds timeout
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user