Implemented strict linting standards and prettier formatting config. (#248)
* Implemented strict linting standards and prettier formatting config. * More linter fixes and type updates. * More linter updates and type fixes * Remove noisy comments * Linter and type updates * Linter, formatting and type updates. * Linter updates * Type updates * Type updates * fixed all linter errors * Fixed all linting, formatting and type issues. * Resolve merge conflicts.
This commit is contained in:
@@ -1,68 +1,70 @@
|
||||
import { BarGeneral } from "./general/index";
|
||||
import { BarSettings } from "./bar/index";
|
||||
import { ClockMenuSettings } from "./menus/clock";
|
||||
import { DashboardMenuSettings } from "./menus/dashboard";
|
||||
import { NotificationSettings } from "./notifications/index";
|
||||
import { OSDSettings } from "./osd/index";
|
||||
import { CustomModuleSettings } from "customModules/config";
|
||||
import { PowerMenuSettings } from "./menus/power";
|
||||
import { BarGeneral } from './general/index';
|
||||
import { BarSettings } from './bar/index';
|
||||
import { ClockMenuSettings } from './menus/clock';
|
||||
import { DashboardMenuSettings } from './menus/dashboard';
|
||||
import { NotificationSettings } from './notifications/index';
|
||||
import { OSDSettings } from './osd/index';
|
||||
import { CustomModuleSettings } from 'customModules/config';
|
||||
import { PowerMenuSettings } from './menus/power';
|
||||
import { GBox } from 'lib/types/widget';
|
||||
|
||||
type Page = "General"
|
||||
| "Bar"
|
||||
| "Clock Menu"
|
||||
| "Dashboard Menu"
|
||||
| "Power Menu"
|
||||
| "Notifications"
|
||||
| "OSD"
|
||||
| "Custom Modules";
|
||||
type Page =
|
||||
| 'General'
|
||||
| 'Bar'
|
||||
| 'Clock Menu'
|
||||
| 'Dashboard Menu'
|
||||
| 'Power Menu'
|
||||
| 'Notifications'
|
||||
| 'OSD'
|
||||
| 'Custom Modules';
|
||||
|
||||
const CurrentPage = Variable<Page>("General");
|
||||
const CurrentPage = Variable<Page>('General');
|
||||
|
||||
const pagerMap: Page[] = [
|
||||
"General",
|
||||
"Bar",
|
||||
"Notifications",
|
||||
"OSD",
|
||||
"Power Menu",
|
||||
"Clock Menu",
|
||||
"Dashboard Menu",
|
||||
"Custom Modules",
|
||||
]
|
||||
'General',
|
||||
'Bar',
|
||||
'Notifications',
|
||||
'OSD',
|
||||
'Power Menu',
|
||||
'Clock Menu',
|
||||
'Dashboard Menu',
|
||||
'Custom Modules',
|
||||
];
|
||||
|
||||
export const SettingsMenu = () => {
|
||||
export const SettingsMenu = (): GBox => {
|
||||
return Widget.Box({
|
||||
vertical: true,
|
||||
children: CurrentPage.bind("value").as(v => {
|
||||
children: CurrentPage.bind('value').as((v) => {
|
||||
return [
|
||||
Widget.Box({
|
||||
class_name: "option-pages-container",
|
||||
hpack: "center",
|
||||
class_name: 'option-pages-container',
|
||||
hpack: 'center',
|
||||
hexpand: true,
|
||||
children: pagerMap.map((page) => {
|
||||
return Widget.Button({
|
||||
hpack: "center",
|
||||
hpack: 'center',
|
||||
class_name: `pager-button ${v === page ? 'active' : ''}`,
|
||||
label: page,
|
||||
on_primary_click: () => CurrentPage.value = page
|
||||
})
|
||||
})
|
||||
on_primary_click: () => (CurrentPage.value = page),
|
||||
});
|
||||
}),
|
||||
}),
|
||||
Widget.Stack({
|
||||
vexpand: true,
|
||||
class_name: "themes-menu-stack",
|
||||
class_name: 'themes-menu-stack',
|
||||
children: {
|
||||
"General": BarGeneral(),
|
||||
"Bar": BarSettings(),
|
||||
"Notifications": NotificationSettings(),
|
||||
"OSD": OSDSettings(),
|
||||
"Clock Menu": ClockMenuSettings(),
|
||||
"Dashboard Menu": DashboardMenuSettings(),
|
||||
"Custom Modules": CustomModuleSettings(),
|
||||
"Power Menu": PowerMenuSettings(),
|
||||
General: BarGeneral(),
|
||||
Bar: BarSettings(),
|
||||
Notifications: NotificationSettings(),
|
||||
OSD: OSDSettings(),
|
||||
'Clock Menu': ClockMenuSettings(),
|
||||
'Dashboard Menu': DashboardMenuSettings(),
|
||||
'Custom Modules': CustomModuleSettings(),
|
||||
'Power Menu': PowerMenuSettings(),
|
||||
},
|
||||
shown: CurrentPage.bind("value")
|
||||
})
|
||||
]
|
||||
})
|
||||
})
|
||||
}
|
||||
shown: CurrentPage.bind('value'),
|
||||
}),
|
||||
];
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user