wifi: right click -> configure with sidebar

This commit is contained in:
end-4
2024-04-02 21:55:14 +07:00
parent cf65d8640f
commit 731992bf6f
2 changed files with 9 additions and 3 deletions
@@ -268,6 +268,12 @@ export const ExpandingIconTabContainer = ({
mainBox.nextTab = () => shownIndex.value = Math.min(shownIndex.value + 1, count - 1);
mainBox.prevTab = () => shownIndex.value = Math.max(shownIndex.value - 1, 0);
mainBox.cycleTab = () => shownIndex.value = (shownIndex.value + 1) % count;
mainBox.focusName = (name) => {
const focusIndex = names.indexOf(name);
if (focusIndex !== -1) {
shownIndex.value = focusIndex;
}
}
mainBox.shown = shownIndex;
return mainBox;
@@ -9,14 +9,14 @@ const { execAsync, exec } = Utils;
import { BluetoothIndicator, NetworkIndicator } from '../.commonwidgets/statusicons.js';
import { setupCursorHover } from '../.widgetutils/cursorhover.js';
import { MaterialIcon } from '../.commonwidgets/materialicon.js';
import { sidebarOptionsStack } from './sideright.js';
export const ToggleIconWifi = (props = {}) => Widget.Button({
className: 'txt-small sidebar-iconbutton',
tooltipText: 'Wifi | Right-click to configure',
onClicked: () => Network.toggleWifi(),
onSecondaryClickRelease: () => {
execAsync(['bash', '-c', `${userOptions.apps.network}`, '&']);
App.closeWindow('sideright');
onSecondaryClick: () => {
sidebarOptionsStack.focusName('Wifi networks')
},
child: NetworkIndicator(),
setup: (self) => {