Update sideright.js

This commit is contained in:
end-4
2024-06-04 21:52:18 +07:00
parent 074328b3aa
commit 9eaf715666
+6 -7
View File
@@ -31,28 +31,28 @@ const centerWidgets = [
{ {
name: 'Notifications', name: 'Notifications',
materialIcon: 'notifications', materialIcon: 'notifications',
contentWidget: ModuleNotificationList(), contentWidget: ModuleNotificationList,
}, },
{ {
name: 'Audio controls', name: 'Audio controls',
materialIcon: 'volume_up', materialIcon: 'volume_up',
contentWidget: ModuleAudioControls(), contentWidget: ModuleAudioControls,
}, },
{ {
name: 'Bluetooth', name: 'Bluetooth',
materialIcon: 'bluetooth', materialIcon: 'bluetooth',
contentWidget: ModuleBluetooth(), contentWidget: ModuleBluetooth,
}, },
{ {
name: 'Wifi networks', name: 'Wifi networks',
materialIcon: 'wifi', materialIcon: 'wifi',
contentWidget: ModuleWifiNetworks(), contentWidget: ModuleWifiNetworks,
onFocus: () => execAsync('nmcli dev wifi list').catch(print), onFocus: () => execAsync('nmcli dev wifi list').catch(print),
}, },
{ {
name: 'Live config', name: 'Live config',
materialIcon: 'tune', materialIcon: 'tune',
contentWidget: ModuleConfigure(), contentWidget: ModuleConfigure,
}, },
]; ];
@@ -103,7 +103,7 @@ export const sidebarOptionsStack = ExpandingIconTabContainer({
tabSwitcherClassName: 'sidebar-icontabswitcher', tabSwitcherClassName: 'sidebar-icontabswitcher',
icons: centerWidgets.map((api) => api.materialIcon), icons: centerWidgets.map((api) => api.materialIcon),
names: centerWidgets.map((api) => api.name), names: centerWidgets.map((api) => api.name),
children: centerWidgets.map((api) => api.contentWidget), children: centerWidgets.map((api) => api.contentWidget()),
onChange: (self, id) => { onChange: (self, id) => {
self.shown = centerWidgets[id].name; self.shown = centerWidgets[id].name;
if (centerWidgets[id].onFocus) centerWidgets[id].onFocus(); if (centerWidgets[id].onFocus) centerWidgets[id].onFocus();
@@ -130,7 +130,6 @@ export default () => Box({
className: 'spacing-v-5', className: 'spacing-v-5',
children: [ children: [
timeRow, timeRow,
// togglesFlowBox,
togglesBox, togglesBox,
] ]
}), }),