diff --git a/src/components/Event/EventFormFields.tsx b/src/components/Event/EventFormFields.tsx index 284a77b..b945d43 100644 --- a/src/components/Event/EventFormFields.tsx +++ b/src/components/Event/EventFormFields.tsx @@ -14,6 +14,7 @@ import { Typography, ToggleButtonGroup, ToggleButton, + Autocomplete, } from "@mui/material"; import { Description as DescriptionIcon, @@ -22,6 +23,7 @@ import { CameraAlt as VideocamIcon, ContentCopy as CopyIcon, Close as DeleteIcon, + PublicOutlined as TimezoneIcon, } from "@mui/icons-material"; import AttendeeSelector from "../Attendees/AttendeeSearch"; import RepeatEvent from "./EventRepeat"; @@ -261,22 +263,23 @@ export default function EventFormFields({ /> - - - - - + {!showDescription && ( + + + + + + )} {showDescription && ( @@ -404,19 +407,47 @@ export default function EventFormFields({ } label="Repeat" /> - - - + + `(${timezoneList.getTimezoneOffset(option)}) ${option.replace(/_/g, " ")}` + } + onChange={(event, newValue) => { + if (newValue) { + setTimezone(newValue); + } + }} + renderInput={(params) => ( + + + {params.InputProps.startAdornment} + + ), + }, + }} + inputProps={{ + ...params.inputProps, + autoComplete: "new-password", + }} + /> + )} + /> diff --git a/src/features/Events/EventModal.tsx b/src/features/Events/EventModal.tsx index 54328d6..7fa1065 100644 --- a/src/features/Events/EventModal.tsx +++ b/src/features/Events/EventModal.tsx @@ -12,6 +12,7 @@ import { Typography, ToggleButtonGroup, ToggleButton, + Autocomplete, } from "@mui/material"; import { Description as DescriptionIcon, @@ -20,6 +21,7 @@ import { CameraAlt as VideocamIcon, ContentCopy as CopyIcon, Close as DeleteIcon, + PublicOutlined as TimezoneIcon, } from "@mui/icons-material"; import { Box, Button } from "@mui/material"; import AddIcon from "@mui/icons-material/Add"; @@ -184,7 +186,6 @@ function EventPopover({ const [alarm, setAlarm] = useState(event?.alarm?.trigger ?? ""); const [eventClass, setEventClass] = useState(event?.class ?? "PUBLIC"); const [busy, setBusy] = useState(event?.transp ?? "OPAQUE"); - const [important, setImportant] = useState(false); const [timezone, setTimezone] = useState( event?.timezone ? resolveTimezone(event.timezone) : calendarTimezone ); @@ -220,7 +221,6 @@ function EventPopover({ setAlarm(""); setEventClass("PUBLIC"); setBusy("OPAQUE"); - setImportant(false); setTimezone(calendarTimezone); setHasVideoConference(false); setMeetingLink(null); @@ -308,7 +308,6 @@ function EventPopover({ setAlarm(""); setEventClass("PUBLIC"); setBusy("OPAQUE"); - setImportant(false); setTimezone(timezoneList.browserTz); setHasVideoConference(false); setMeetingLink(null); @@ -454,22 +453,23 @@ function EventPopover({ /> - - - - - + {!showDescription && ( + + + + + + )} {showDescription && ( @@ -558,15 +558,6 @@ function EventPopover({ - setImportant(!important)} - /> - } - label="Mark as important" - /> - - - + + `(${getTimezoneOffset(option)}) ${option.replace(/_/g, " ")}` + } + onChange={(event, newValue) => { + if (newValue) { + setTimezone(newValue); + } + }} + renderInput={(params) => ( + + + {params.InputProps.startAdornment} + + ), + }, + }} + inputProps={{ + ...params.inputProps, + autoComplete: "new-password", + }} + /> + )} + />