게시물과 페이지 공개 상태 확장 v1.5.4

This commit is contained in:
2026-05-26 16:07:10 +09:00
parent b989193dab
commit 6333c4254f
20 changed files with 252 additions and 38 deletions

View File

@@ -78,9 +78,13 @@ const isPublicPost = (post) => post.status === 'published'
/**
* 게시물 상태 필터 키 생성
* @param {Object} post - 게시물
* @returns {'published' | 'scheduled' | 'draft'} 상태 키
* @returns {'published' | 'scheduled' | 'draft' | 'members' | 'private'} 상태 키
*/
const getPostStatusKey = (post) => {
if (post.status === 'members' || post.status === 'private') {
return post.status
}
if (post.status === 'published' && !isPublicPost(post)) {
return 'scheduled'
}
@@ -108,6 +112,14 @@ const getPostStatusLabel = (post) => {
return '발행'
}
if (statusKey === 'members') {
return '멤버십'
}
if (statusKey === 'private') {
return '비공개'
}
return '초안'
}
@@ -127,6 +139,14 @@ const getPostStatusClass = (post) => {
return 'font-bold text-[#fb2d8d]'
}
if (statusKey === 'members') {
return 'font-bold text-[#5a63d8]'
}
if (statusKey === 'private') {
return 'font-bold text-[#15171a]'
}
if (statusKey === 'published') {
return 'text-[#99A3AD]'
}
@@ -411,6 +431,8 @@ watch(openPostMenuId, async (postId) => {
<option value="published">발행</option>
<option value="draft">초안</option>
<option value="scheduled">예약</option>
<option value="members">멤버십</option>
<option value="private">비공개</option>
</select>
</label>
<label class="admin-posts__filter">