Merge branch 'boardmodify3'

This commit is contained in:
nevermoregb 2025-03-11 13:59:39 +09:00
commit 72f3622216

View File

@ -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 = '';