diff --git a/client/src/App.css b/client/src/App.css index b79dbe8..9f5c918 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -21,6 +21,7 @@ div { .Resizer { width: 0.5rem; + background-color: #ccc; border: 1px solid black; } @@ -36,6 +37,8 @@ div { .Identities { display: flex; + padding: 0.25rem; + gap: 0.25rem; overflow-y: scroll; flex-direction: column; border: 1px solid green; @@ -46,16 +49,13 @@ div { box-sizing: border-box; flex-direction: column; position: relative; + border: 2px solid #444; } .Face:hover { cursor: pointer; } -.Face .Image { - border: 0.25rem solid transparent; -} - .ClusterEditor { display: flex; flex-direction: column; @@ -82,12 +82,17 @@ div { background-position: 50% 50% !important; } -.Face:hover .Image { - border: 0.25rem solid yellow; +.Active { + filter: brightness(1.25); + border-color: orange !important; } -.Face.Selected .Image { - border: 0.25rem solid blue; +.Face:hover { + border-color: yellow; +} + +.Face.Selected { + border-color: blue; } .Face .Title { @@ -129,5 +134,6 @@ div { .Cluster .Faces { display: grid; + gap: 0.25rem; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); } \ No newline at end of file diff --git a/client/src/App.tsx b/client/src/App.tsx index 6e1314d..94d5f0c 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -12,7 +12,7 @@ import './App.css'; const base = process.env.PUBLIC_URL; /* /identities -- set in .env */ -const makeFaceBoxes = (photo: any, dimensions: any): any => { +const makeFaceBoxes = (photo: any, dimensions: any, onFaceClick: any): any => { const faces: FaceData[] = photo.faces; let width: number, height: number, offsetLeft = 0, offsetTop = 0; @@ -32,20 +32,29 @@ const makeFaceBoxes = (photo: any, dimensions: any): any => { offsetTop = 0; } - return faces.map((face: FaceData) => ( -
- )); + return faces.map((face: FaceData) => { + const faceId = face.faceId; + const identityId = face.identityId; + return ( +