Skip to content

Commit

Permalink
인터넷 익스플로어로 접속 시 브라우저를 업데이트 해달라는 기능 구현 (#452)
Browse files Browse the repository at this point in the history
* feat: (#447) 인터넷 익스플로어로 접속 시 브라우저를 업데이트 해달라는 기능 구현

* chore: (#447) 사진 정책 변경

* chore: (#447) 사진 이미지를 프론트에서 1.5MB로 제한하도록 수정

* fix: (#447) 존재하지 않는 role 삭제
  • Loading branch information
Gilpop8663 authored Aug 17, 2023
1 parent 968a4eb commit 20ded3b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/PostForm/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export type DeadlineOption = '10분' | '30분' | '1시간' | '6시간' | '1일';

export const DEADLINE_OPTION: DeadlineOption[] = ['10분', '30분', '1시간', '6시간', '1일'];

export const MAX_FILE_SIZE = 5000000;
export const MAX_FILE_SIZE = 1500000;
2 changes: 0 additions & 2 deletions frontend/src/components/post/PostList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export default function PostList() {
<S.SelectContainer>
<S.SelectWrapper>
<Select<PostStatus>
role="select"
aria-label={`마감 여부로 게시글 정렬 선택, 현재 옵션은 ${STATUS_OPTION[selectedStatusOption]}`}
handleOptionChange={(value: PostStatus) => {
setPostOption({
Expand All @@ -69,7 +68,6 @@ export default function PostList() {
</S.SelectWrapper>
<S.SelectWrapper>
<Select<PostSorting>
role="select"
aria-label={`인기순/최신순으로 게시글 정렬 선택, 현재 옵션은 ${SORTING_OPTION[selectedSortingOption]}`}
handleOptionChange={(value: PostSorting) => {
setPostOption({
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/constants/policyMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const POST_CONTENT_POLICY = {
LETTER_AMOUNT: '1000자 이내로 입력해주세요.',
PHOTO_COUNT: '1장의 사진을 업로드 할 수 있습니다.',
PHOTO_SHAPE: '사진은 정사각형으로 잘라져 업로드됩니다.',
PHOTO_CAPACITY: '용량은 5MB으로 제한됩니다.',
PHOTO_CAPACITY: '용량은 1.5MB으로 제한됩니다.',
};

export const POST_OPTION_POLICY = {
Expand All @@ -28,7 +28,7 @@ export const POST_OPTION_POLICY = {
AMOUNT: '2개 ~ 5개 선택지를 작성해주세요.',
PHOTO_COUNT: '1장의 사진을 업로드 할 수 있습니다.',
PHOTO_SHAPE: '사진은 정사각형으로 잘라져 업로드됩니다.',
PHOTO_CAPACITY: '용량은 5MB으로 제한됩니다.',
PHOTO_CAPACITY: '용량은 1.5MB으로 제한됩니다.',
};

export const POST_DEADLINE_POLICY = {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/constants/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const REQUEST_POST_KIND_URL = {

export const SEARCH_KEYWORD = 'keyword';

export const MAX_FILE_SIZE = 5000000;
export const MAX_FILE_SIZE = 1500000;

export const POST_TITLE = {
MAX_LENGTH: 100,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useContentImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const useContentImage = (imageUrl: string = '') => {
event.target.setCustomValidity('');

if (file.size > MAX_FILE_SIZE) {
event.target.setCustomValidity('사진의 용량은 5MB 이하만 가능합니다.');
event.target.setCustomValidity('사진의 용량은 1.5MB 이하만 가능합니다.');
event.target.reportValidity();

return;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useWritingOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const useWritingOption = (initialOptionList: WritingVoteOptionType[] = IN
event.target.setCustomValidity('');

if (file.size > MAX_FILE_SIZE) {
event.target.setCustomValidity('사진의 용량은 5MB 이하만 가능합니다.');
event.target.setCustomValidity('사진의 용량은 1.5MB 이하만 가능합니다.');
event.target.reportValidity();

return;
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ if (process.env.NODE_ENV === 'development') {
worker.start();
}

if (
(navigator.appName === 'Netscape' && navigator.userAgent.search('Trident') !== -1) ||
navigator.userAgent.toLowerCase().indexOf('msie') !== -1
) {
alert('이 브라우저는 지원 중단 되었습니다. 최적의 환경을 위해 브라우저를 업데이트 하세요.');
}

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
root.render(
<React.StrictMode>
Expand Down

0 comments on commit 20ded3b

Please sign in to comment.