{memo.displayTime?.toLocaleString()}
{searchText ? getHighlightedContent(memo.content) : memo.snippet}
diff --git a/web/src/components/MemoEditor/ActionButton/LocationSelector.tsx b/web/src/components/MemoEditor/ActionButton/LocationSelector.tsx new file mode 100644 index 00000000..cf09ebcf --- /dev/null +++ b/web/src/components/MemoEditor/ActionButton/LocationSelector.tsx @@ -0,0 +1,116 @@ +import { Button, IconButton, Input } from "@mui/joy"; +import { LatLng } from "leaflet"; +import { MapPinIcon } from "lucide-react"; +import { useEffect, useState } from "react"; +import toast from "react-hot-toast"; +import LeafletMap from "@/components/LeafletMap"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/Popover"; +import { Location } from "@/types/proto/api/v1/memo_service"; +import { useTranslate } from "@/utils/i18n"; + +interface Props { + location?: Location; + onChange: (location: Location) => void; +} + +interface State { + placeholder: string; + position: LatLng; +} + +const LocationSelector = (props: Props) => { + const t = useTranslate(); + const [state, setState] = useState
+