From 20ded3b23bf8d4d5441e7ff758c5cb617c6e2426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=98=81=EA=B8=B8/KIM=20YOUNG=20GIL?= <80146176+Gilpop8663@users.noreply.github.com> Date: Thu, 17 Aug 2023 19:48:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B8=ED=84=B0=EB=84=B7=20=EC=9D=B5?= =?UTF-8?q?=EC=8A=A4=ED=94=8C=EB=A1=9C=EC=96=B4=EB=A1=9C=20=EC=A0=91?= =?UTF-8?q?=EC=86=8D=20=EC=8B=9C=20=EB=B8=8C=EB=9D=BC=EC=9A=B0=EC=A0=80?= =?UTF-8?q?=EB=A5=BC=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=ED=95=B4?= =?UTF-8?q?=EB=8B=AC=EB=9D=BC=EB=8A=94=20=EA=B8=B0=EB=8A=A5=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84=20(#452)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: (#447) 인터넷 익스플로어로 접속 시 브라우저를 업데이트 해달라는 기능 구현 * chore: (#447) 사진 정책 변경 * chore: (#447) 사진 이미지를 프론트에서 1.5MB로 제한하도록 수정 * fix: (#447) 존재하지 않는 role 삭제 --- frontend/src/components/PostForm/constants.ts | 2 +- frontend/src/components/post/PostList/index.tsx | 2 -- frontend/src/constants/policyMessage.ts | 4 ++-- frontend/src/constants/post.ts | 2 +- frontend/src/hooks/useContentImage.ts | 2 +- frontend/src/hooks/useWritingOption.tsx | 2 +- frontend/src/index.tsx | 7 +++++++ 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/PostForm/constants.ts b/frontend/src/components/PostForm/constants.ts index 0249bec18..595ecad57 100644 --- a/frontend/src/components/PostForm/constants.ts +++ b/frontend/src/components/PostForm/constants.ts @@ -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; diff --git a/frontend/src/components/post/PostList/index.tsx b/frontend/src/components/post/PostList/index.tsx index 02814c139..9eb1b1218 100644 --- a/frontend/src/components/post/PostList/index.tsx +++ b/frontend/src/components/post/PostList/index.tsx @@ -54,7 +54,6 @@ export default function PostList() { - role="select" aria-label={`마감 여부로 게시글 정렬 선택, 현재 옵션은 ${STATUS_OPTION[selectedStatusOption]}`} handleOptionChange={(value: PostStatus) => { setPostOption({ @@ -69,7 +68,6 @@ export default function PostList() { - role="select" aria-label={`인기순/최신순으로 게시글 정렬 선택, 현재 옵션은 ${SORTING_OPTION[selectedSortingOption]}`} handleOptionChange={(value: PostSorting) => { setPostOption({ diff --git a/frontend/src/constants/policyMessage.ts b/frontend/src/constants/policyMessage.ts index 65bb0f4aa..2565e0ba5 100644 --- a/frontend/src/constants/policyMessage.ts +++ b/frontend/src/constants/policyMessage.ts @@ -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 = { @@ -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 = { diff --git a/frontend/src/constants/post.ts b/frontend/src/constants/post.ts index e61510f97..cca99a1bc 100644 --- a/frontend/src/constants/post.ts +++ b/frontend/src/constants/post.ts @@ -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, diff --git a/frontend/src/hooks/useContentImage.ts b/frontend/src/hooks/useContentImage.ts index c0a56d9a7..85dfd196e 100644 --- a/frontend/src/hooks/useContentImage.ts +++ b/frontend/src/hooks/useContentImage.ts @@ -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; diff --git a/frontend/src/hooks/useWritingOption.tsx b/frontend/src/hooks/useWritingOption.tsx index c3d88796e..7211b24ce 100644 --- a/frontend/src/hooks/useWritingOption.tsx +++ b/frontend/src/hooks/useWritingOption.tsx @@ -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; diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index e494a44a0..1f82649fb 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -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(