* feat: show battery on bluetooth device list * feat: show battery on bluetooth device list * fix: handle case when battery is not defined * fix: handle case when battery is not defined * feat: add bluetooth menu * feat: add bluetooth menu * fix: separate icon and percentage * fix: group battery stuffs * Update options.ts * Update modules/menus/bluetooth/devices/devicelist.ts * Update modules/menus/bluetooth/devices/devicelist.ts * Update modules/menus/bluetooth/devices/devicelist.ts --------- Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
30 lines
1019 B
TypeScript
30 lines
1019 B
TypeScript
import { Option } from 'widget/settings/shared/Option';
|
|
import { Header } from 'widget/settings/shared/Header';
|
|
|
|
import options from 'options';
|
|
import Scrollable from 'types/widgets/scrollable';
|
|
import { Attribute, Child } from 'lib/types/widget';
|
|
|
|
export const BluetoothMenuSettings = (): Scrollable<Child, Attribute> => {
|
|
return Widget.Scrollable({
|
|
vscroll: 'automatic',
|
|
child: Widget.Box({
|
|
class_name: 'bar-theme-page paged-container',
|
|
vertical: true,
|
|
children: [
|
|
Header('Bluetooth'),
|
|
Option({
|
|
opt: options.menus.bluetooth.showBattery,
|
|
title: 'Show Battery Percentage for Connected Devices (If Supported)',
|
|
type: 'boolean',
|
|
}),
|
|
Option({
|
|
opt: options.menus.bluetooth.batteryIcon,
|
|
title: 'Battery Icon',
|
|
type: 'string',
|
|
}),
|
|
],
|
|
}),
|
|
});
|
|
};
|