Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/card/user/conferenceCard/ConferenceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const ConferenceCard: React.FC<ConferenceCardProps> = ({
imageUrl,
onClick,
}) => {
console.log('img:', imageUrl);
return (
<S.CardContainer onClick={onClick}>
{imageUrl && <Img size={100} imageUrl={imageUrl} />}
Expand Down
60 changes: 55 additions & 5 deletions src/pages/face-recognition/FaceRecognition.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,66 @@ export const ToastBox = styled.span`
left: 50%;
transform: translate(-50%, -50%);
`;
// export const Box = styled.div<BoxProps>`
// position: absolute;
// width: ${({ $boxWidth }) => `${$boxWidth}px`};
// height: ${({ $boxHeight }) => `${$boxHeight}px`};
// border: ${({ $isFaceInside }) =>
// $isFaceInside ? '3px solid blue' : '3px solid red'};
// top: 50%;
// left: 50%;
// display: flex;
// justify-content: center;
// align-items: center;
// transform: translate(-50%, -50%);
// `;

export const Box = styled.div<BoxProps>`
position: absolute;
width: ${({ $boxWidth }) => `${$boxWidth}px`};
height: ${({ $boxHeight }) => `${$boxHeight}px`};
border: ${({ $isFaceInside }) =>
$isFaceInside ? '3px solid blue' : '3px solid red'};
top: 50%;
left: 50%;
display: flex;
justify-content: center;
align-items: center;
transform: translate(-50%, -50%);
pointer-events: none;

&::before,
&::after,
> div::before,
> div::after {
content: '';
position: absolute;
width: 40px;
height: 40px;
border: ${({ $isFaceInside }) =>
$isFaceInside ? `3px solid #1466FF` : '3px solid white'};
}

&::before {
top: 0;
left: 0;
border-right: none;
border-bottom: none;
}

&::after {
top: 0;
right: 0;
border-left: none;
border-bottom: none;
}

> div::before {
bottom: 0;
left: 0;
border-right: none;
border-top: none;
}

> div::after {
bottom: 0;
right: 0;
border-left: none;
border-top: none;
}
`;
4 changes: 3 additions & 1 deletion src/pages/face-recognition/FaceRecognition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ const FaceRecognition = () => {
$boxWidth={boxSize}
$boxHeight={boxSize}
$isFaceInside={isFaceInside || faceState === 'success'}
></S.Box>
>
<div />
</S.Box>
)}
{isVideoLoaded && (
<S.ToastBox>
Expand Down
47 changes: 42 additions & 5 deletions src/pages/user/FaceRegistration.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,52 @@ export const Box = styled.div<BoxProps>`
position: absolute;
width: ${({ $boxWidth }) => `${$boxWidth}px`};
height: ${({ $boxHeight }) => `${$boxHeight}px`};
border: ${({ $isFaceInside }) =>
$isFaceInside ? '3px solid green' : '3px solid red'};
top: 50%;
left: 50%;
display: flex;
justify-content: center;
align-items: center;
transform: translate(-50%, -50%);
pointer-events: none;

&::before,
&::after,
> div::before,
> div::after {
content: '';
position: absolute;
width: 30px;
height: 30px;
border: ${({ $isFaceInside }) =>
$isFaceInside ? `3px solid #1466FF` : '3px solid white'};
}

&::before {
top: 0;
left: 0;
border-right: none;
border-bottom: none;
}

&::after {
top: 0;
right: 0;
border-left: none;
border-bottom: none;
}

> div::before {
bottom: 0;
left: 0;
border-right: none;
border-top: none;
}

> div::after {
bottom: 0;
right: 0;
border-left: none;
border-top: none;
}
`;

export const ToastBox = styled.span`
position: absolute;
bottom: 10%;
Expand Down
4 changes: 3 additions & 1 deletion src/pages/user/FaceRegistration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ const FaceRegistration = () => {
$boxWidth={230}
$boxHeight={230}
$isFaceInside={isFaceInside}
></S.Box>
>
<div />
</S.Box>
)}
{isCameraVisible && isVideoLoaded && (
<S.ToastBox>
Expand Down