From e6eb91d571b3e13e1f506c37ddd91239dea23a36 Mon Sep 17 00:00:00 2001 From: dyhj625 Date: Thu, 20 Mar 2025 14:51:26 +0900 Subject: [PATCH 01/20] =?UTF-8?q?=ED=8F=B0=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/font.css | 108 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 89 insertions(+), 19 deletions(-) diff --git a/public/css/font.css b/public/css/font.css index 3768acc..3654c2c 100644 --- a/public/css/font.css +++ b/public/css/font.css @@ -1,23 +1,10 @@ -/* @font-face { - font-family: 'GmarketSansMedium'; - src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff'); - font-weight: normal; - font-style: normal; -} -body { - font-family: 'GmarketSansMedium', sans-serif; - font-size: 16px; - line-height: 1.6; - color: #333; -} */ - +/* 1) */ /* @font-face { font-family: 'NanumSquareRound'; src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_two@1.0/NanumSquareRound.woff') format('woff'); font-weight: normal; font-style: normal; } - body { font-family: 'NanumSquareRound', sans-serif; font-size: 16px; @@ -25,13 +12,13 @@ body { color: #333; } */ +/* 2) */ /* @font-face { font-family: 'Pretendard-Regular'; src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Regular.woff') format('woff'); font-weight: 400; font-style: normal; } - body { font-family: 'Pretendard-Regular', sans-serif; font-size: 16px; @@ -39,20 +26,103 @@ body { color: #333; } */ +/* 3) */ /* @font-face { - font-family: 'S-CoreDream-3Light'; - src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/S-CoreDream-3Light.woff') format('woff'); + font-family: 'NEXON Lv1 Gothic OTF'; + src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/NEXON Lv1 Gothic OTF.woff') format('woff'); font-weight: normal; font-style: normal; } - body { - font-family: 'S-CoreDream-3Light', sans-serif; + font-family: 'NEXON Lv1 Gothic OTF', sans-serif; font-size: 16px; line-height: 1.6; color: #333; } */ +/* 4) */ +/* @font-face { + font-family: 'SUITE-Regular'; + src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2304-2@1.0/SUITE-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; +} +body { + font-family: 'SUITE-Regular', sans-serif; + font-size: 16px; + line-height: 1.6; + color: #333; +} */ + +/* 5) */ +/* @font-face { + font-family: 'GoyangIlsan'; + src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_one@1.0/GoyangIlsan.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +body { + font-family: 'GoyangIlsan', sans-serif; + font-size: 16px; + line-height: 1.6; + color: #333; +} */ + +/* 6) */ +/* @font-face { + font-family: 'GowunDodum-Regular'; + src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/GowunDodum-Regular.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +body { + font-family: 'GowunDodum-Regular', sans-serif; + font-size: 16px; + line-height: 1.6; + color: #333; +} */ + +/* 7) */ +/* @font-face { + font-family: 'EASTARJET-Medium'; + src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_231029@1.1/EASTARJET-Medium.woff2') format('woff2'); + font-weight: 500; + font-style: normal; +} +body { + font-family: 'EASTARJET-Medium', sans-serif; + font-size: 16px; + line-height: 1.6; + color: #333; +} */ + +/* 8) */ +/* @font-face { + font-family: 'HakgyoansimChulseokbuTTF-B'; + src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/2408-5@1.0/HakgyoansimChulseokbuTTF-B.woff2') format('woff2'); + font-weight: 400; + font-style: normal; +} +body { + font-family: 'HakgyoansimChulseokbuTTF-B', sans-serif; + font-size: 16px; + line-height: 1.6; + color: #333; +} */ + +/* 9) */ +/* @font-face { + font-family: 'GongGothicMedium'; + src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_20-10@1.0/GongGothicMedium.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +body { + font-family: 'GongGothicMedium', sans-serif; + font-size: 16px; + line-height: 1.6; + color: #333; +} */ /* 나눔고딕 */ @import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic&display=swap'); From 946ec28ec81a945cff9f5ea0e21284a368312b41 Mon Sep 17 00:00:00 2001 From: khj0414 Date: Thu, 20 Mar 2025 14:56:00 +0900 Subject: [PATCH 02/20] =?UTF-8?q?=ED=88=AC=ED=91=9C=EC=88=98=EC=A0=95?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/input/FormInput.vue | 3 +++ src/components/voteboard/voteCard.vue | 17 ++++++++++++++--- src/components/voteboard/voteResultCard.vue | 2 +- src/views/voteboard/voteBoardList.vue | 2 +- src/views/voteboard/voteboardWrite.vue | 18 ++++++++++-------- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/components/input/FormInput.vue b/src/components/input/FormInput.vue index 931ff2e..7c1da23 100644 --- a/src/components/input/FormInput.vue +++ b/src/components/input/FormInput.vue @@ -19,6 +19,9 @@ @focusout="$emit('focusout', modelValue)" @input="handleInput" /> +
+ +
{{ title }}을 확인해주세요.
카테고리 중복입니다.
diff --git a/src/components/voteboard/voteCard.vue b/src/components/voteboard/voteCard.vue index 060e771..5d518a0 100644 --- a/src/components/voteboard/voteCard.vue +++ b/src/components/voteboard/voteCard.vue @@ -28,7 +28,6 @@ -

@@ -53,7 +52,7 @@ 투표 완료 : 종료시 투표 결과가 나타납니다.
- +
+ diff --git a/src/components/projectlist/ProjectList.vue b/src/components/projectlist/ProjectList.vue index 6742113..4aef41a 100644 --- a/src/components/projectlist/ProjectList.vue +++ b/src/components/projectlist/ProjectList.vue @@ -69,23 +69,29 @@ - +
+ + +
- +
+ + +
{ + nextTick(() => { + if (startDateInput.value) { + startDateInput.value.focus(); + setTimeout(() => { + startDateInput.value.showPicker?.(); + }, 50); + } + }); + }; + + const focusEndDateInput = () => { + nextTick(() => { + if (endDateInput.value) { + endDateInput.value.focus(); + setTimeout(() => { + endDateInput.value.showPicker?.(); + }, 50); + } + }); + }; + const addressData = ref({ postcode: '', address: '', diff --git a/src/views/voteboard/voteboardWrite.vue b/src/views/voteboard/voteboardWrite.vue index 65fba45..98c55cb 100644 --- a/src/views/voteboard/voteboardWrite.vue +++ b/src/views/voteboard/voteboardWrite.vue @@ -235,14 +235,9 @@ const goList = () => { .item-input { max-width: 200px; } -.date-picker-wrapper { - position: relative; - display: inline-block; - width: 100%; -} .hidden-date-input { position: absolute; - top: 31.5%; + top: 28.5%; left: 17%; width: 100%; opacity: 0; From ae9c8735b1400aa7e6ff766c9f3c51dadd506c7d Mon Sep 17 00:00:00 2001 From: dyhj625 Date: Thu, 20 Mar 2025 16:06:11 +0900 Subject: [PATCH 05/20] =?UTF-8?q?=EC=BB=A4=EC=8A=A4=ED=85=80=20css=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/custom.css | 10 ++++++++++ src/views/voteboard/voteboardWrite.vue | 8 -------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/public/css/custom.css b/public/css/custom.css index 8ac0b53..2f57ee5 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -702,6 +702,16 @@ /* BoardComment end */ +/* vote */ +.hidden-date-input { + position: absolute; + top: 28.5%; + left: 17%; + width: 100%; + opacity: 0; + pointer-events: none; +} + /* 권한부여 */ .user-card-container { display: flex; diff --git a/src/views/voteboard/voteboardWrite.vue b/src/views/voteboard/voteboardWrite.vue index 98c55cb..d1b3a03 100644 --- a/src/views/voteboard/voteboardWrite.vue +++ b/src/views/voteboard/voteboardWrite.vue @@ -235,12 +235,4 @@ const goList = () => { .item-input { max-width: 200px; } -.hidden-date-input { - position: absolute; - top: 28.5%; - left: 17%; - width: 100%; - opacity: 0; - pointer-events: none; -} From 93953aedcc0a0c83791a1b5e6b10d14f0af02881 Mon Sep 17 00:00:00 2001 From: nevermoregb Date: Thu, 20 Mar 2025 16:12:54 +0900 Subject: [PATCH 06/20] =?UTF-8?q?=EC=97=90=EB=94=94=ED=84=B0=20=EC=B2=A8?= =?UTF-8?q?=EB=B6=80=ED=8C=8C=EC=9D=BC=20=EC=9D=B8=EB=8D=B1=EC=8A=A4=20?= =?UTF-8?q?=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/editor/QEditor.vue | 85 +++++++++++++++----------- src/components/input/UserFormInput.vue | 2 - src/views/board/BoardEdit.vue | 12 +++- src/views/board/BoardWrite.vue | 12 +++- 4 files changed, 72 insertions(+), 39 deletions(-) diff --git a/src/components/editor/QEditor.vue b/src/components/editor/QEditor.vue index 4f4132e..86deeba 100644 --- a/src/components/editor/QEditor.vue +++ b/src/components/editor/QEditor.vue @@ -71,7 +71,8 @@ const editor = ref(null); // 에디터 DOM 참조 const font = ref('nanum-gothic'); // 기본 폰트 const fontSize = ref('16px'); // 기본 폰트 크기 - const emit = defineEmits(['update:data']); + const emit = defineEmits(['update:data', 'update:uploadedImgList']); + const uploadedImgList = ref([]); // 에디터에 이미지 첨부시 업데이트 된 파일 인덱스 번호 리스트 onMounted(() => { // 툴바에서 선택할 수 있는 폰트 목록 설정 @@ -112,6 +113,13 @@ quillInstance.format('size', fontSize.value); }); + // 이미지 첨부 리스트가 변경 되었을때 + watch(uploadedImgList, () => { + console.log(!23); + emit('update:uploadedImgList', uploadedImgList.value); + console.log('uploadedImgList.value: ', uploadedImgList.value); + }); + // 초기 데이터가 있을 경우, HTML 형식으로 삽입 if (props.initialData) { quillInstance.setContents(JSON.parse(props.initialData)); @@ -150,7 +158,15 @@ // 이미지 서버에 업로드 후 URL 받기 uploadImageToServer(formData) - .then(serverImageUrl => { + .then(data => { + const uploadImgIdx = data?.fileIndex; // 업로드 된 파일 DB 인덱스 + const serverImageUrl = data?.fileUrl; // 업로드 된 파일 url + + // 업로드 된 파일 인덱스 (게시글 저장 시 해당 인덱스 번호에 게시글 인덱스를 업데이트) + if (uploadImgIdx) { + uploadedImgList.value = [...uploadedImgList.value, uploadImgIdx]; + } + const baseUrl = $api.defaults.baseURL.replace(/api\/$/, ''); const fullImageUrl = `${baseUrl}${serverImageUrl.replace(/\\/g, '/')}`; @@ -168,40 +184,40 @@ // 이미지 서버 업로드 async function uploadImageToServer(formData) { - try { - // Make the POST request to upload the image - const response = await $api.post('quilleditor/upload', formData, { isFormData: true }); + try { + // Make the POST request to upload the image + const response = await $api.post('quilleditor/upload', formData, { isFormData: true }); - // Check if the response contains the expected data - if (response.data && response.data.data) { - const imageUrl = response.data.data; - return imageUrl; // Return the image URL received from the server - } else { - throw new Error('Image URL not returned from server'); + // Check if the response contains the expected data + if (response.data && response.data.data) { + const imageUrl = response.data.data; + return imageUrl; // Return the image URL received from the server + } else { + throw new Error('Image URL not returned from server'); + } + } catch (error) { + // Log detailed error information for debugging purposes + console.error('Image upload failed:', error); + + // Handle specific error cases (e.g., network issues, authorization issues) + if (error.response) { + // If the error is from the server (e.g., 4xx or 5xx error) + console.error('Error response:', error.response.data); + toastStore.onToast('서버 오류가 발생했습니다. 잠시 후 다시 시도해주세요.', 'e'); + } else if (error.request) { + // If no response is received from the server + console.error('No response received:', error.request); + toastStore.onToast('네트워크 오류가 발생했습니다. 잠시 후 다시 시도해주세요.', 'e'); + } else { + // If the error is due to something else (e.g., invalid request setup) + console.error('Error message:', error.message); + toastStore.onToast('파일 업로드 중 문제가 발생했습니다. 다시 시도해주세요.', 'e'); + } + + // Throw the error so the caller knows something went wrong + throw error; + } } - } catch (error) { - // Log detailed error information for debugging purposes - console.error('Image upload failed:', error); - - // Handle specific error cases (e.g., network issues, authorization issues) - if (error.response) { - // If the error is from the server (e.g., 4xx or 5xx error) - console.error('Error response:', error.response.data); - toastStore.onToast('서버 오류가 발생했습니다. 잠시 후 다시 시도해주세요.', 'e'); - } else if (error.request) { - // If no response is received from the server - console.error('No response received:', error.request); - toastStore.onToast('네트워크 오류가 발생했습니다. 잠시 후 다시 시도해주세요.', 'e'); - } else { - // If the error is due to something else (e.g., invalid request setup) - console.error('Error message:', error.message); - toastStore.onToast('파일 업로드 중 문제가 발생했습니다. 다시 시도해주세요.', 'e'); - } - - // Throw the error so the caller knows something went wrong - throw error; - } -} // 삭제된 이미지 확인 function checkForDeletedImages() { @@ -216,4 +232,3 @@ } }); - diff --git a/src/components/input/UserFormInput.vue b/src/components/input/UserFormInput.vue index f5517e8..5a61d6b 100644 --- a/src/components/input/UserFormInput.vue +++ b/src/components/input/UserFormInput.vue @@ -14,7 +14,6 @@ :value="computedValue" :disabled="disabled" :maxLength="maxlength" - :minLength="minlength" :placeholder="title" @blur="$emit('blur')" /> @@ -30,7 +29,6 @@ :value="computedValue" :disabled="disabled" :maxLength="maxlength" - :minLength="minlength" :placeholder="title" @blur="$emit('blur')" /> diff --git a/src/views/board/BoardEdit.vue b/src/views/board/BoardEdit.vue index c2d0d09..0c51296 100644 --- a/src/views/board/BoardEdit.vue +++ b/src/views/board/BoardEdit.vue @@ -57,6 +57,7 @@ v-if="contentLoaded" @update:data="content = $event" @update:imageUrls="imageUrls = $event" + @update:uploadedImgList="handleUpdateEditorImg" :initialData="content" /> @@ -115,7 +116,7 @@ const attachFilesAlert = ref(false); const isFileValid = ref(true); const delFileIdx = ref([]); // 제외할 기존 첨부파일 ID - const additionalFiles = ref([]); // 새로 추가할 첨부파일 + const editorUploadedImgList = ref([]); // 게시물 데이터 로드 const fetchBoardDetails = async () => { @@ -145,6 +146,10 @@ contentLoaded.value = true; }; + const handleUpdateEditorImg = item => { + editorUploadedImgList.value = item; + }; + // 기존 첨부파일명을 노출 const addDisplayFileName = fileInfos => fileInfos.map(file => ({ @@ -247,6 +252,11 @@ boardData.delFileIdx = [...delFileIdx.value]; } + // 에디터에 업로드 된 이미지 인덱스 목록 + if (editorUploadedImgList.value && editorUploadedImgList.value.length > 0) { + boardData.editorUploadedImgList = [...editorUploadedImgList.value]; + } + const fileArray = newFileFilter(attachFiles); const formData = new FormData(); diff --git a/src/views/board/BoardWrite.vue b/src/views/board/BoardWrite.vue index 95d8fbd..5814fc0 100644 --- a/src/views/board/BoardWrite.vue +++ b/src/views/board/BoardWrite.vue @@ -83,7 +83,7 @@
- +
내용을 입력해주세요.
@@ -127,6 +127,7 @@ const maxFiles = 5; const maxSize = 10 * 1024 * 1024; const fileError = ref(''); + const editorUploadedImgList = ref([]); const fetchCategories = async () => { const response = await axios.get('board/categories'); @@ -143,6 +144,10 @@ const fileCount = computed(() => attachFiles.value.length); + const handleUpdateEditorImg = item => { + editorUploadedImgList.value = item; + }; + const handleFileUpload = files => { const validFiles = files.filter(file => file.size <= maxSize); if (files.some(file => file.size > maxSize)) { @@ -215,6 +220,11 @@ LOCBRDTYP: categoryValue.value, }; + // 에디터에 업로드 된 이미지 인덱스 목록 + if (editorUploadedImgList.value && editorUploadedImgList.value.length > 0) { + boardData.editorUploadedImgList = [...editorUploadedImgList.value]; + } + const { data: boardResponse } = await axios.post('board', boardData); const boardId = boardResponse.data; // 첨부파일 업로드 (비동기 병렬 처리) From 724816eb82bab50cd52e5d8d6f6489be2a42831e Mon Sep 17 00:00:00 2001 From: dyhj625 Date: Fri, 21 Mar 2025 10:14:50 +0900 Subject: [PATCH 07/20] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EB=AC=BC=20=EB=8B=89?= =?UTF-8?q?=EB=84=A4=EC=9E=84=20=EC=88=98=EC=A0=95,=ED=9A=8C=EC=9B=90?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=EA=B2=BD=EA=B3=A0=EB=AC=B8=EA=B5=AC=20css?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/custom.css | 1 - src/components/board/BoardProfile.vue | 10 +++++++++- src/components/input/UserFormInput.vue | 2 +- src/views/board/BoardList.vue | 3 ++- src/views/board/BoardView.vue | 3 +++ src/views/board/BoardWrite.vue | 23 ++++++++++++++++++++++- src/views/vacation/VacationManagement.vue | 2 -- 7 files changed, 37 insertions(+), 7 deletions(-) diff --git a/public/css/custom.css b/public/css/custom.css index 2f57ee5..b7a37f5 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -7,7 +7,6 @@ /* board */ .board-content img { max-width: 100% !important; - width: 100% !important; height: auto !important; display: block; object-fit: contain; diff --git a/src/components/board/BoardProfile.vue b/src/components/board/BoardProfile.vue index 42e4b1f..abb6ced 100644 --- a/src/components/board/BoardProfile.vue +++ b/src/components/board/BoardProfile.vue @@ -12,7 +12,7 @@
-
{{ profileName }}
+
{{ displayName }}
{{ date }}