Merge branch 'boardmodify3'
This commit is contained in:
commit
72f3622216
@ -473,25 +473,26 @@
|
|||||||
password.value = '';
|
password.value = '';
|
||||||
passwordCommentAlert.value = '';
|
passwordCommentAlert.value = '';
|
||||||
//currentPasswordCommentId.value = null;
|
//currentPasswordCommentId.value = null;
|
||||||
|
isPassword.value = false; // 상단 프로필 비밀번호
|
||||||
|
|
||||||
const targetComment = findCommentById(comment.commentId, comments.value);
|
const targetComment = findCommentById(comment.commentId, comments.value);
|
||||||
|
|
||||||
if (!targetComment) {
|
if (!targetComment) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isMyComment = comment.authorId === currentUserId.value;
|
const isMyComment = comment.authorId === currentUserId.value;
|
||||||
const isAnonymous = comment.author === '익명';
|
const isAnonymous = comment.author === '익명';
|
||||||
|
|
||||||
if (isMyComment) {
|
if (isMyComment) {
|
||||||
if (targetComment.isEditTextarea) {
|
if (targetComment.isEditTextarea) {
|
||||||
// 수정창이 열려 있는 상태에서 다시 수정 버튼을 누르면 초기화
|
// 수정창이 열려 있는 상태에서 다시 수정 버튼을 누르면 초기화
|
||||||
|
|
||||||
targetComment.isEditTextarea = false;
|
targetComment.isEditTextarea = false;
|
||||||
|
|
||||||
currentPasswordCommentId.value = comment.commentId;
|
currentPasswordCommentId.value = comment.commentId;
|
||||||
} else {
|
} else {
|
||||||
// 다른 모든 댓글의 수정창 닫기
|
// 다른 모든 댓글의 수정창 닫기
|
||||||
closeAllEditTextareas();
|
closeAllEditTextareas();
|
||||||
|
currentPasswordCommentId.value = null;
|
||||||
// 현재 댓글만 수정 모드 활성화
|
// 현재 댓글만 수정 모드 활성화
|
||||||
targetComment.isEditTextarea = true;
|
targetComment.isEditTextarea = true;
|
||||||
}
|
}
|
||||||
@ -541,9 +542,6 @@
|
|||||||
|
|
||||||
// 익명 댓글 비밀번호 창 토글
|
// 익명 댓글 비밀번호 창 토글
|
||||||
const toggleCommentPassword = (comment, button) => {
|
const toggleCommentPassword = (comment, button) => {
|
||||||
console.log('comment.commentId: ', comment.commentId);
|
|
||||||
console.log('currentPasswordCommentId.value: ', currentPasswordCommentId.value);
|
|
||||||
console.log('lastCommentClickedButton.value : ', lastCommentClickedButton.value);
|
|
||||||
if (lastCommentClickedButton.value === button && currentPasswordCommentId.value === comment.commentId) {
|
if (lastCommentClickedButton.value === button && currentPasswordCommentId.value === comment.commentId) {
|
||||||
currentPasswordCommentId.value = null; // 비밀번호 창 닫기
|
currentPasswordCommentId.value = null; // 비밀번호 창 닫기
|
||||||
password.value = '';
|
password.value = '';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user