feat: add 12 hour time as an option for timetable

This commit is contained in:
sethburkart123
2024-06-09 20:18:41 +10:00
parent a2a1310402
commit 67a6c8ae66
5 changed files with 56 additions and 15 deletions
@@ -11,10 +11,10 @@ import { memo } from 'react';
const Settings: React.FC = () => {
const { settingsState, setSettingsState } = useSettingsContext();
const switchChange = (key: string, isOn: boolean) => {
const switchChange = (key: string, value: boolean | string) => {
setSettingsState({
...settingsState,
[key]: isOn,
[key]: value,
});
};
@@ -61,6 +61,11 @@ const Settings: React.FC = () => {
description: "Sends a native browser notification ~5 minutes prior to lessons.",
modifyElement: <Switch state={settingsState.lessonAlerts} onChange={(isOn: boolean) => switchChange('lessonAlerts', isOn)} />
},
{
title: "12 Hour Time",
description: "Prefer 12 hour time format for SEQTA",
modifyElement: <Switch state={settingsState.timeFormat == "12"} onChange={(isOn: boolean) => switchChange('timeFormat', isOn ? "12" : "24")} />
},
{
title: "BetterSEQTA+",
description: "Enables BetterSEQTA+ features",