mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
adjusting timeout for wifinetwork
This commit is contained in:
parent
db4a6d953e
commit
ad63420198
1 changed files with 12 additions and 3 deletions
|
|
@ -81,7 +81,8 @@ const NetResource = (icon, command) => {
|
|||
|
||||
const CurrentNetwork = () => {
|
||||
let authLock = false;
|
||||
// console.log(Network.wifi);
|
||||
let timeoutId = null;
|
||||
|
||||
const bottomSeparator = Box({
|
||||
className: 'separator-line',
|
||||
});
|
||||
|
|
@ -138,7 +139,7 @@ const CurrentNetwork = () => {
|
|||
}),
|
||||
Entry({
|
||||
className: 'sidebar-wifinetworks-auth-entry',
|
||||
visibility: false, // Password dots
|
||||
visibility: false,
|
||||
onAccept: (self) => {
|
||||
authLock = false;
|
||||
networkAuth.revealChild = false;
|
||||
|
|
@ -155,6 +156,14 @@ const CurrentNetwork = () => {
|
|||
authLock = true;
|
||||
connectAttempt = Network.wifi.ssid;
|
||||
self.revealChild = true;
|
||||
if (timeoutId) {
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
timeoutId = setTimeout(() => {
|
||||
authLock = false;
|
||||
self.revealChild = false;
|
||||
Network.wifi.state = 'activated';
|
||||
}, 20000); // 20 seconds timeout
|
||||
}
|
||||
}),
|
||||
});
|
||||
|
|
@ -249,4 +258,4 @@ export default (props) => {
|
|||
bottomBar,
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue