익명 닉네임 수정
All checks were successful
LocalNet_front/pipeline/head This commit looks good

This commit is contained in:
dyhj625 2025-03-21 10:46:58 +09:00
parent 57e3489af5
commit e8753588ca
4 changed files with 22 additions and 11 deletions

View File

@ -4,7 +4,7 @@
:unknown="comment.author === '익명'"
:isCommentAuthor="isCommentAuthor"
:boardId="comment.boardId"
:profileName="comment.nickname ? comment.nickname : comment.author"
:profileName="displayName"
:date="comment.createdAt"
:comment="comment"
:profileImg="comment.profileImg"
@ -76,10 +76,15 @@
type: Boolean,
default: false,
},
nickname: {
type: String,
default: '',
},
isCommentAuthor: {
type: Boolean,
default: false,
},
isPlusButton: {
type: Boolean,
default: true,
@ -113,6 +118,10 @@
editCommentAlert: String,
});
const displayName = computed(() => {
return props.nickname? props.nickname: props.comment.author;
});
// emits
const emit = defineEmits([
'submitComment',

View File

@ -7,6 +7,7 @@
:isCommentAuthor="comment.isCommentAuthor"
:isEditTextarea="comment.isEditTextarea"
:isDeleted="isDeleted"
:nickname="comment.nickname"
:isCommentPassword="isCommentPassword"
:passwordCommentAlert="passwordCommentAlert || ''"
:currentPasswordCommentId="currentPasswordCommentId"
@ -32,6 +33,7 @@
:isPlusButton="false"
:isLike="true"
:isCommentProfile="true"
:nickname="child.nickname"
:isCommentAuthor="child.isCommentAuthor"
:isCommentPassword="isCommentPassword"
:currentPasswordCommentId="currentPasswordCommentId"

View File

@ -12,7 +12,7 @@
</div>
<div class="me-2">
<h6 class="mb-0">{{ displayName }}</h6>
<h6 class="mb-0">{{ profileName ? profileName : nickname }}</h6>
<div class="profile-detail">
<span>{{ date }}</span>
<template v-if="showDetail">
@ -58,11 +58,11 @@
type: Number,
required: false,
},
nickname: {
profileName: {
type: String,
default: '',
},
profileName: {
nickname: {
type: String,
default: '',
},
@ -105,10 +105,6 @@
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;
});

View File

@ -8,7 +8,7 @@
<div class="pb-5 border-bottom">
<BoardProfile
:boardId="currentBoardId"
:profileName="profileName"
:profileName="displayName"
:unknown="unknown"
:profileImg="profileImg"
:views="views"
@ -176,6 +176,10 @@
const authorId = ref(''); // id
const editCommentAlert = ref({}); //,
const displayName = computed(() => {
return nickname.value && unknown.value ? nickname.value : profileName.value;
});
const isAuthor = computed(() => currentUserId.value === authorId.value);
const commentsWithAuthStatus = computed(() => {
const updatedComments = comments.value.map(comment => ({
@ -325,7 +329,7 @@
likeCount: comment.likeCount || 0,
dislikeCount: comment.dislikeCount || 0,
profileImg: comment.profileImg || '',
nickname: comment.LOCCMTNIC,
nickname: comment.LOCCMTNIC || '',
likeClicked: comment.likeClicked || false,
dislikeClicked: comment.dislikeClicked || false,
createdAtRaw: comment.LOCCMTRDT, //
@ -355,7 +359,7 @@
parentId: reply.LOCCMTPNT, // ID
content: reply.LOCCMTRPY || '내용 없음',
createdAtRaw: reply.LOCCMTRDT,
nickname: reply.LOCCMTNIC,
nickname: reply.LOCCMTNIC || '',
// createdAt: formattedDate(reply.LOCCMTRDT),
//createdAtRaw: new Date(reply.LOCCMTUDT),
createdAt: formattedDate(reply.LOCCMTUDT) + (reply.LOCCMTUDT !== reply.LOCCMTRDT ? ' (수정됨)' : ''),