diff --git a/.config/ags/modules/sideright/centermodules/wifinetworks.js b/.config/ags/modules/sideright/centermodules/wifinetworks.js index 5932ce4f7..3e856c53c 100644 --- a/.config/ags/modules/sideright/centermodules/wifinetworks.js +++ b/.config/ags/modules/sideright/centermodules/wifinetworks.js @@ -19,6 +19,7 @@ const MATERIAL_SYMBOL_SIGNAL_STRENGTH = { let connectAttempt = ''; let networkAuth = null; let networkAuthSSID = null; +let passwordVisible = false; const WifiNetwork = (accessPoint) => { const networkStrength = MaterialIcon(MATERIAL_SYMBOL_SIGNAL_STRENGTH[accessPoint.iconName], 'hugerass') @@ -171,6 +172,15 @@ const CurrentNetwork = () => { cancelAuthButton ] }); + const authVisible = Button({ + child: MaterialIcon('visibility', 'large'), + className: 'txt sidebar-wifinetworks-auth-visible', + onClicked: () => { + passwordVisible = !passwordVisible; + authEntry.visibility = passwordVisible; + }, + setup: setupCursorHover, + }); const authFailed = Revealer({ revealChild: false, child: Label({ @@ -181,6 +191,7 @@ const CurrentNetwork = () => { const authEntry = Entry({ className: 'sidebar-wifinetworks-auth-entry', visibility: false, + hexpand: true, onAccept: (self) => { authLock = false; // Delete SSID connection before attempting to reconnect @@ -202,6 +213,14 @@ const CurrentNetwork = () => { }, placeholderText: getString('Enter network password'), }); + const authBox = Box({ + className: 'spacing-h-5', + vertical: false, + children: [ + authEntry, + authVisible, + ] + }); const forgetButton = Button({ label: getString('Forget'), hexpand: true, @@ -270,7 +289,7 @@ const CurrentNetwork = () => { vertical: true, children: [ authHeader, - authEntry, + authBox, authFailed, ] }), @@ -291,7 +310,7 @@ const CurrentNetwork = () => { self.revealChild = false; authFailed.revealChild = false; Network.wifi.state = 'activated'; - }, 20000); // 20 seconds timeout + }, 60000); // 60 seconds timeout } } ).catch(print); diff --git a/.config/ags/scss/_sidebars.scss b/.config/ags/scss/_sidebars.scss index 3ffe0bccd..d6591e339 100644 --- a/.config/ags/scss/_sidebars.scss +++ b/.config/ags/scss/_sidebars.scss @@ -1007,13 +1007,27 @@ $waifu_image_overlay_transparency: 0.7; } .sidebar-wifinetworks-auth-entry { - @include small-rounding; + border-radius: 12px 0px 0px 12px; background-color: $layer1; color: $onLayer1; padding: 0.682rem; caret-color: $onLayer2; } +.sidebar-wifinetworks-auth-visible { + @include element_decel; + border-radius: 0px 12px 12px 0px; + background-color: $layer2Hover; + color: $onLayer2; + padding: 0.682rem; + min-width: 0.918rem; +} + +.sidebar-wifinetworks-auth-visible:hover, +.sidebar-wifinetworks-auth-visible:focus { + background-color: $layer2Active; +} + .sidebar-wifinetworks-bandwidth { min-width: 6.3rem; padding-left: 1rem;