Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #214

Merged
merged 22 commits into from
Dec 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
90fe0dd
[Midified] seed data 변경
jominjimail Dec 21, 2019
23bd63c
[hotfix] workMusic ObjectId miss
jominjimail Dec 21, 2019
52ff20a
[Hotfix] 파일 다운로드 방식 변경
Junow Dec 21, 2019
b291011
[Hotfix] 배경화면 이미지 base64 -> blob 데이터로 변경
Junow Dec 21, 2019
ef37ae3
[Hotfix] 카드에 걸린 링크 수정
Junow Dec 21, 2019
9eb844b
[Hotfix] 카드에 hover 시 css 추가
Junow Dec 21, 2019
a76cf01
[Hotfix] 음악 카드 link 위치 조정
Junow Dec 21, 2019
0e79da6
[Feat] 프로필 사진 수정
jominjimail Dec 21, 2019
40092ed
[Modified] 프로필 이미지 수정
jominjimail Dec 21, 2019
7020914
[Modified] redux global dispatch로 이미지 변경 반영
jominjimail Dec 21, 2019
e60f65e
[Modified] 이미지 변경 완료후 redirect 추가
jominjimail Dec 21, 2019
3377b5a
[Hotfix] 중복 데이터 삭제
Junow Dec 21, 2019
8b8f188
[Refacotor] 삼항 연산자를 사용함
jominjimail Dec 21, 2019
bad6d97
[Hotfix] 크롬에서 지원되지 않는 image 태그 삭제
Junow Dec 21, 2019
cb9c3fa
[Hotfix] 음악 업로드 소켓 알림 추가
Junow Dec 22, 2019
540fd73
Merge pull request #208 from connect-foundation/hotfix/junow/wallpape…
Dec 22, 2019
f592cf2
Merge pull request #210 from connect-foundation/hotfix/junow/card-lin…
Dec 22, 2019
e74a8ba
Merge pull request #212 from connect-foundation/hotfix/junow/notifica…
Dec 22, 2019
8a00888
Merge pull request #211 from connect-foundation/reviewed/jmj/week5
Dec 22, 2019
0dedd4f
Merge pull request #207 from connect-foundation/hotfix/jmj/seed-data
Dec 22, 2019
ba6ef54
[Hotfix] credential 문제 해결
jominjimail Dec 22, 2019
3bd5906
Merge pull request #213 from connect-foundation/hotfix/withCredential…
Dec 22, 2019
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
30,818 changes: 15,412 additions & 15,406 deletions client/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"@types/socket.io-client": "^1.4.32",
"@types/styled-components": "^4.4.0",
"@types/uuid": "^3.4.6",
"eslint": "^6.1.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
Expand Down
1 change: 1 addition & 0 deletions client/src/commons/TextWithImg/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const SmallImg = styled(Img)`
return '1.5rem';
}};
height: auto;
border-radius: 100%;
`;

const SmallH4 = styled(H4)`
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Alarm/Notifications/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useEffect } from 'react';
import * as S from './styles';
import { getShortId } from '../../../utils';
import { INoti } from '../../../modules/notification';
Expand Down Expand Up @@ -26,7 +26,7 @@ const Notifications: React.FC<NotificationsProp> = ({
refPost={noti.ref}
/>
))
}
}
</S.Container>
);
export default Notifications;
41 changes: 29 additions & 12 deletions client/src/components/Card/MusicCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useState, useRef } from 'react';
import React, { useState, useEffect, useRef } from 'react';
import * as S from './styles';
import StyledLink from '../../../basics/StyledLink';
import { TextWithImg } from '../CardFooter/styles';
import CardFooter from '../CardFooter';
import MusicCardProp from './types';
Expand All @@ -18,33 +17,51 @@ const MusicCard: React.FC<MusicCardProp> = ({

return (
<S.Container>
<StyledLink to={`/home/detail-music/${ownerId}`}>
<S.CardImgContainer>
<S.CardImgContainer>
<S.StyledLink to={`/home/detail-music/${ownerId}`}>
<S.CardImg src={imageUrl} />
<S.CroppedCardImg src={imageUrl} />
</S.StyledLink>

</S.CardImgContainer>
<S.InnerPlayButton
type="button"
onClick={playToggle}
>
{
isPlaying
? <S.Pause />
: <S.PlayArrow />
}
</S.InnerPlayButton>
</S.CardImgContainer>
<S.StyledLink to={`/home/detail-music/${ownerId}`}>

<S.CardHeader>
<S.Title>{title}</S.Title>
</S.CardHeader>
</S.StyledLink>

<S.StyledLink to={`/creator/${creator._id}`}>
<S.CardBody id={creator._id}>
<TextWithImg
src={creator.thumbnailUrl}
text={creator.name}
/>
</S.CardBody>

</S.StyledLink>
<S.StyledLink to={`/home/detail-music/${ownerId}`}>
<CardFooter
comments={numOfComments.toString()}
views={views.toString()}
/>
</StyledLink>
<S.CroppedCardImg src={imageUrl} />
<S.PlayButton htmlFor={_id}>
<button type="button" id={_id} onClick={playToggle}><S.PlayIcon /></button>
</S.PlayButton>
<MusicFeedPlayerMini url={musicUrl} isPlaying={isPlaying} playToggle={playToggle} audioRef={audioRef} />
</S.StyledLink>

<MusicFeedPlayerMini
url={musicUrl}
isPlaying={isPlaying}
playToggle={playToggle}
audioRef={audioRef}
/>
</S.Container>
);
};
Expand Down
62 changes: 42 additions & 20 deletions client/src/components/Card/MusicCard/styles.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import styled from 'styled-components';
import PlayArrowIcon from '@material-ui/icons/PlayArrow';
import { PlayArrow, Pause } from '@material-ui/icons';
import Img from '../../../basics/Img';
import { theme } from '../../../style/theme';
import H3 from '../../../basics/H3';
import Link from '../../../basics/StyledLink';

export const Container = styled.div`
display: flex;
Expand All @@ -15,9 +16,15 @@ export const Container = styled.div`
box-shadow: ${theme.BOX_SHADOW};
position: relative;
overflow: hidden;
transition: all 0.3s ease-in-out;
&:hover {
transition: all 0.3s ease-in-out;
transform: scale(1.1);
}
`;

export const CardImgContainer = styled.div`
position: relative;
display: flex;
width: 100%;
height: 13rem;
Expand All @@ -33,7 +40,7 @@ export const CardImg = styled(Img)`
border-top-left-radius:10px;
border-top-right-radius: 10px;
background: no-repeat;
filter: blur(30px) grayscale(30%);
filter: blur(10px) grayscale(30%);

`;

Expand All @@ -52,8 +59,6 @@ export const CardBody = styled.div`
border-bottom: 1px ${theme.BORDER_GRAY} solid;
`;

export const PlayIcon = PlayArrowIcon;

export const CroppedCardImg = styled(Img)`
position: absolute;
top: 55px;
Expand All @@ -66,20 +71,37 @@ export const CroppedCardImg = styled(Img)`
`;

export const PlayButton = styled.label`
position: absolute;
top: 80px;
right: 116px;
button{
width: 90px;
border: none;
background: none;
text-decoration: none;
color: white;
.MuiSvgIcon-root {
font-size: 3rem;
}
}
button:focus {
outline: none; }

position: absolute;
top: 80px;
right: 116px;
cursor: pointer;
`;

export const InnerPlayButton = styled.button`
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
width: 90px;
border: none;
background: none;
text-decoration: none;
color: white;
cursor: pointer;
.MuiSvgIcon-root {
font-size: 3rem;
}
&:focus {
outline: none;
};
`;

export const StyledLink = styled(Link)`
width: 100%;
height: 100%;
`;

export {
PlayArrow,
Pause,
};
15 changes: 9 additions & 6 deletions client/src/components/Card/WorksCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
import React from 'react';

import TextWithImg from '../../../commons/TextWithImg';
import * as S from './styles';

import StyledLink from '../../../basics/StyledLink';
import CardFooter from '../CardFooter';
import WorksCardProp from './types';

const WorksCard: React.FC<WorksCardProp> = ({
_id, ownerId, imgUrl, creator, title, numOfComments, views,
}) => (
<S.Container>
<StyledLink to={`/home/detail-image/${ownerId}`}>
<S.StyledLink to={`/home/detail-image/${ownerId}`}>
<S.CardImgContainer>
<S.CardImg src={imgUrl} />
</S.CardImgContainer>

<S.CardHeader>
<S.Title>{title}</S.Title>
</S.CardHeader>
</S.StyledLink>

<S.StyledLink to={`/creator/${creator._id}`}>
<S.CardBody id={creator._id}>
<TextWithImg
src="https://kr.object.ncloudstorage.com/crafolio/user/thumbnail/user-profile-thumbnail.png"
src={creator.thumbnailUrl}
text={creator.name}
/>
</S.CardBody>
</S.StyledLink>

<S.StyledLink to={`/home/detail-image/${ownerId}`}>
<CardFooter
comments={numOfComments}
views={views}
/>
</StyledLink>
</S.StyledLink>
</S.Container>
);

Expand Down
10 changes: 10 additions & 0 deletions client/src/components/Card/WorksCard/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styled from 'styled-components';
import Img from '../../../basics/Img';
import { theme } from '../../../style/theme';
import H3 from '../../../basics/H3';
import StyledLink from '../../../basics/StyledLink';

export const Container = styled.div`
display: flex;
Expand All @@ -12,6 +13,11 @@ export const Container = styled.div`
border-radius: 10px;
border: 0px solid black;
box-shadow: ${theme.BOX_SHADOW};
transition: all 0.3s ease-in-out;
&:hover {
transition: all 0.3s ease-in-out;
transform: scale(1.1);
}
`;

export const CardImgContainer = styled.div`
Expand Down Expand Up @@ -43,3 +49,7 @@ export const CardBody = styled.div`
padding: 0 1rem;
border-bottom: 1px ${theme.BORDER_GRAY} solid;
`;

export {
StyledLink,
};
1 change: 1 addition & 0 deletions client/src/components/Card/WorksCard/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default interface WorksCardProp{
_id: string,
email: string,
name: string,
thumbnailUrl: string,
};
createdAt: number;
updatedAt: number;
Expand Down
2 changes: 0 additions & 2 deletions client/src/components/Comment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ const Comment: React.FC<CommentProp> = ({
}

<S.CommentFooter>
<S.Mention>멘션</S.Mention>
<S.Mention>비밀 댓글</S.Mention>
{
commentsAllow
? <S.SubmitButton onClick={addNewComment}>등록</S.SubmitButton>
Expand Down
1 change: 1 addition & 0 deletions client/src/components/FeedMusics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ const FeedMusics: React.FC<FeedMusicsProps> = ({
</S.Container>
);


export default FeedMusics;
1 change: 1 addition & 0 deletions client/src/components/FeedWorks/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface IImage{
_id: string,
name: string,
email: string,
thumbnailUrl: string,
};
url: string;
title:string;
Expand Down
1 change: 1 addition & 0 deletions client/src/components/FeedWorks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default interface IImage{
_id: string,
name: string,
email: string,
thumbnailUrl: string,
};
url: string;
title:string;
Expand Down
21 changes: 13 additions & 8 deletions client/src/components/Header/HeaderRight/HeaderGreeting/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react';
import styled from 'styled-components';
import { Link } from 'react-router-dom';
import { useSelector } from 'react-redux';
import Img from '../../../../basics/Img';
import { RootState } from '../../../../modules';

const ProfileLink = styled(Link)`
text-decoration : none;
Expand All @@ -11,19 +13,22 @@ const ProfileLink = styled(Link)`
const ProfileImg = styled(Img)`
height: 2.5rem;
width: 2.5rem;
border-radius: 100%;
`;
const HeaderGreetingContainer = styled.div`
display:flex;
height: 100%;
`;

const LOGIN_PROFILE_THUMBNAIL = 'https://kr.object.ncloudstorage.com/crafolio/user/origin/iu-profile-origin.png';
const HeaderGreeting: React.FC = () => (
<HeaderGreetingContainer>
<ProfileLink to="/creator">
<ProfileImg src={LOGIN_PROFILE_THUMBNAIL} />
</ProfileLink>
</HeaderGreetingContainer>
);
const HeaderGreeting: React.FC = () => {
const thumbnailUrl = useSelector((state: RootState) => state.login.thumbnailUrl);
return (
<HeaderGreetingContainer>
<ProfileLink to="/creator">
<ProfileImg src={thumbnailUrl} />
</ProfileLink>
</HeaderGreetingContainer>
);
};

export default HeaderGreeting;
Loading