게시물 닉네임 수정,회원등록 경고문구 css 수정
This commit is contained in:
parent
ae9c8735b1
commit
724816eb82
@ -7,7 +7,6 @@
|
||||
/* board */
|
||||
.board-content img {
|
||||
max-width: 100% !important;
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
display: block;
|
||||
object-fit: contain;
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
</div>
|
||||
|
||||
<div class="me-2">
|
||||
<h6 class="mb-0">{{ profileName }}</h6>
|
||||
<h6 class="mb-0">{{ displayName }}</h6>
|
||||
<div class="profile-detail">
|
||||
<span>{{ date }}</span>
|
||||
<template v-if="showDetail">
|
||||
@ -58,6 +58,10 @@
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
nickname: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
profileName: {
|
||||
type: String,
|
||||
default: '',
|
||||
@ -101,6 +105,10 @@
|
||||
const emit = defineEmits(['updateReaction', 'editClick', 'deleteClick']);
|
||||
const $common = inject('common');
|
||||
|
||||
const displayName = computed(() => {
|
||||
return props.nickname?props.nickname : props.name;
|
||||
});
|
||||
|
||||
const isDeletedComment = computed(() => {
|
||||
return props.comment?.content === '삭제된 댓글입니다' && props.comment?.updateAtRaw !== props.comment?.createdAtRaw;
|
||||
});
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<span :class="isEssential ? 'link-danger' : 'd-none'">*</span>
|
||||
</label>
|
||||
<div class="col-md-12">
|
||||
<div v-if="useInputGroup" class="input-group mb-3">
|
||||
<div v-if="useInputGroup" class="input-group mb-1">
|
||||
<input
|
||||
:id="name"
|
||||
class="form-control"
|
||||
|
||||
@ -101,7 +101,7 @@
|
||||
<span v-if="isNewPost(post.rawDate)" class="box-new badge text-white ms-2 fs-tiny">N</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">{{ post.author }}</td>
|
||||
<td class="text-center">{{ post.nickname ? post.nickname : post.author }}</td>
|
||||
<td class="text-center">{{ post.date }}</td>
|
||||
<td class="text-center">{{ post.views }}</td>
|
||||
</tr>
|
||||
@ -219,6 +219,7 @@
|
||||
date: formatDate(post.date), // 날짜 변환 적용
|
||||
views: post.cnt || 0,
|
||||
hasAttachment: post.hasAttachment,
|
||||
nickname: post.nickname || null,
|
||||
img: post.firstImageUrl || null,
|
||||
commentCount: post.commentCount,
|
||||
}));
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
:unknown="unknown"
|
||||
:profileImg="profileImg"
|
||||
:views="views"
|
||||
:nickname="nickname"
|
||||
:commentNum="commentNum"
|
||||
:date="formattedBoardDate"
|
||||
:isLike="false"
|
||||
@ -151,6 +152,7 @@
|
||||
const profileName = ref('');
|
||||
const boardTitle = ref('제목 없음');
|
||||
const boardContent = ref('');
|
||||
const nickname = ref('');
|
||||
const date = ref('');
|
||||
const views = ref(0);
|
||||
const likes = ref(0);
|
||||
@ -257,6 +259,7 @@
|
||||
boardContent.value = boardData.content || '';
|
||||
profileImg.value = boardData.profileImg || '';
|
||||
date.value = boardData.date || '';
|
||||
nickname.value = boardData.nickname || '';
|
||||
views.value = boardData.cnt || 0;
|
||||
likes.value = boardData.likeCount || 0;
|
||||
dislikes.value = boardData.dislikeCount || 0;
|
||||
|
||||
@ -42,6 +42,15 @@
|
||||
|
||||
<!-- 비밀번호 필드 (익명게시판 선택 시 활성화) -->
|
||||
<div v-if="categoryValue === 300102" class="mb-4">
|
||||
<FormInput
|
||||
title="닉네임"
|
||||
name="nickname"
|
||||
:is-essential="true"
|
||||
:is-alert="nicknameAlert"
|
||||
v-model="nickname"
|
||||
@update:alert="nicknameAlert = $event"
|
||||
@input="validateNickname"
|
||||
/>
|
||||
<FormInput
|
||||
title="비밀번호"
|
||||
name="pw"
|
||||
@ -112,12 +121,14 @@
|
||||
const toastStore = useToastStore();
|
||||
const categoryList = ref([]);
|
||||
const title = ref('');
|
||||
const nickname = ref("");
|
||||
const password = ref('');
|
||||
const categoryValue = ref(null);
|
||||
const content = ref({ ops: [] });
|
||||
const isFileValid = ref(true);
|
||||
|
||||
const titleAlert = ref(false);
|
||||
const nicknameAlert = ref(false);
|
||||
const passwordAlert = ref(false);
|
||||
const contentAlert = ref(false);
|
||||
const categoryAlert = ref(false);
|
||||
@ -172,6 +183,14 @@
|
||||
titleAlert.value = title.value.trim().length === 0;
|
||||
};
|
||||
|
||||
const validateNickname = () => {
|
||||
if (categoryValue.value === 300102) {
|
||||
nicknameAlert.value = nickname.value.trim().length === 0;
|
||||
} else {
|
||||
nicknameAlert.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const validatePassword = () => {
|
||||
if (categoryValue.value === 300102) {
|
||||
password.value = password.value.replace(/\s/g, ''); // 공백 제거
|
||||
@ -199,11 +218,12 @@
|
||||
/** 글쓰기 */
|
||||
const write = async () => {
|
||||
validateTitle();
|
||||
validateNickname();
|
||||
validatePassword();
|
||||
validateContent();
|
||||
categoryAlert.value = categoryValue.value == null;
|
||||
|
||||
if (titleAlert.value || passwordAlert.value || contentAlert.value || categoryAlert.value || !isFileValid.value) {
|
||||
if (titleAlert.value || nicknameAlert.value || passwordAlert.value || contentAlert.value || categoryAlert.value || !isFileValid.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -211,6 +231,7 @@
|
||||
const boardData = {
|
||||
LOCBRDTTL: title.value,
|
||||
LOCBRDCON: JSON.stringify(content.value), // Delta 포맷을 JSON으로 변환
|
||||
LOCBRDNIC: categoryValue.value === 300102 ? nickname.value : null,
|
||||
LOCBRDPWD: categoryValue.value === 300102 ? password.value : null,
|
||||
LOCBRDTYP: categoryValue.value,
|
||||
};
|
||||
|
||||
@ -180,7 +180,6 @@ function handleDateClick(info) {
|
||||
|
||||
// 이미 활성화된 날짜를 한 번 더 클릭하면 비활성화
|
||||
if (currentValue && currentValue !== "delete") {
|
||||
console.log("🛑 활성화된 날짜 비활성화:", clickedDateStr);
|
||||
selectedDates.value.delete(clickedDateStr);
|
||||
updateCalendarEvents();
|
||||
return;
|
||||
@ -203,7 +202,6 @@ function handleDateClick(info) {
|
||||
|
||||
// 버튼을 눌렀을 때 - 기존 휴가 삭제 후 새로운 값 추가
|
||||
if (isMyVacation) {
|
||||
console.log("🗑 기존 휴가 삭제 후 새로운 상태 추가:", clickedDateStr);
|
||||
selectedDates.value.set(clickedDateStr, "delete");
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user