Added configuration options for notifications.

This commit is contained in:
Jas Singh
2024-07-27 00:54:56 -07:00
parent 77c79a2d99
commit d8e58546ad
4 changed files with 14 additions and 3 deletions

View File

@@ -2,13 +2,15 @@ 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";
type Page = "General" | "Bar" | "Clock Menu" | "Dashboard Menu"
type Page = "General" | "Bar" | "Clock Menu" | "Dashboard Menu" | "Notifications";
const CurrentPage = Variable<Page>("General");
const pagerMap: Page[] = [
"General",
"Bar",
"Notifications",
"Clock Menu",
"Dashboard Menu",
]
@@ -37,6 +39,7 @@ export const SettingsMenu = () => {
children: {
"General": BarGeneral(),
"Bar": BarSettings(),
"Notifications": NotificationSettings(),
"Clock Menu": ClockMenuSettings(),
"Dashboard Menu": DashboardMenuSettings(),
},

View File

@@ -10,6 +10,8 @@ export const NotificationSettings = () => {
children: [
Header('Notification Settings'),
Option({ opt: options.notifications.position, title: 'Notification Location', type: 'enum', enums: ['top left', 'top', 'top right', 'bottom right', 'bottom', 'bottom left'] }),
Option({ opt: options.notifications.timeout, title: 'Notification Timeout', subtitle: 'How long notification popups will last (in milliseconds).', type: 'number' }),
Option({ opt: options.notifications.cache_actions, title: 'Preserve Actions', subtitle: 'This will persist the action buttons of a notification after rebooting.', type: 'boolean' }),
]
})
}