diff --git a/ui/src/components/sidebar/MediaSidebar/MediaSidebarPeople.tsx b/ui/src/components/sidebar/MediaSidebar/MediaSidebarPeople.tsx index 3c44d42c..8b87488f 100644 --- a/ui/src/components/sidebar/MediaSidebar/MediaSidebarPeople.tsx +++ b/ui/src/components/sidebar/MediaSidebar/MediaSidebarPeople.tsx @@ -50,9 +50,11 @@ type PersonMoreMenuProps = { face: sidebarMediaQuery_media_faces setChangeLabel: React.Dispatch> className?: string + menuFlipped: boolean } const PersonMoreMenu = ({ + menuFlipped, face, setChangeLabel, className, @@ -119,7 +121,7 @@ const PersonMoreMenu = ({ - + setChangeLabel(true)} className="border-b" @@ -152,9 +154,10 @@ const PersonMoreMenu = ({ type MediaSidebarFaceProps = { face: sidebarMediaQuery_media_faces + menuFlipped: boolean } -const MediaSidebarPerson = ({ face }: MediaSidebarFaceProps) => { +const MediaSidebarPerson = ({ face, menuFlipped }: MediaSidebarFaceProps) => { const [changeLabel, setChangeLabel] = useState(false) return ( @@ -172,6 +175,7 @@ const MediaSidebarPerson = ({ face }: MediaSidebarFaceProps) => { /> {!changeLabel && ( { const { t } = useTranslation() - const faceElms = (media.faces ?? []).map(face => ( - + const faceElms = (media.faces ?? []).map((face, i) => ( + )) if (faceElms.length == 0) return null diff --git a/ui/src/components/sidebar/Sharing.tsx b/ui/src/components/sidebar/Sharing.tsx index e0100f3c..04d3a29c 100644 --- a/ui/src/components/sidebar/Sharing.tsx +++ b/ui/src/components/sidebar/Sharing.tsx @@ -108,18 +108,36 @@ const DELETE_SHARE_MUTATION = gql` export const ArrowPopoverPanel = styled.div.attrs({ className: - 'absolute right-6 -top-3 bg-white rounded shadow-md border border-gray-200', -})<{ width: number }>` + 'absolute -top-3 bg-white rounded shadow-md border border-gray-200 z-10', +})<{ width: number; flipped?: boolean }>` width: ${({ width }) => width}px; + ${({ flipped }) => + flipped + ? ` + left: 32px; + ` + : ` + right: 24px; + `} + &::after { content: ''; position: absolute; top: 18px; - right: -7px; width: 8px; height: 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 14'%3E%3Cpolyline stroke-width='1' stroke='%23E2E2E2' fill='%23FFFFFF' points='1 0 7 7 1 14'%3E%3C/polyline%3E%3C/svg%3E"); + + ${({ flipped }) => + flipped + ? ` + left: -7px; + transform: rotate(180deg); + ` + : ` + right: -7px; + `} } `