관리자 목록 선택 입력 공통화
This commit is contained in:
@@ -94,6 +94,28 @@ const analyticsMetricOptions = [
|
||||
{ label: '방문자', value: 'visitors' }
|
||||
]
|
||||
|
||||
/** 게시글 상태 필터 옵션 */
|
||||
const postStatusFilterOptions = [
|
||||
{ value: 'all', label: '전체 상태' },
|
||||
{ value: 'published', label: '공개' },
|
||||
{ value: 'draft', label: '초안' },
|
||||
{ value: 'scheduled', label: '예약' },
|
||||
{ value: 'members', label: '멤버십' },
|
||||
{ value: 'private', label: '비공개' }
|
||||
]
|
||||
|
||||
/** 게시글 추천 필터 옵션 */
|
||||
const postFeaturedFilterOptions = [
|
||||
{ value: 'all', label: '전체 글' },
|
||||
{ value: 'featured', label: '추천만' }
|
||||
]
|
||||
|
||||
/** 게시글 목록 정렬 옵션 */
|
||||
const postSortOptions = [
|
||||
{ value: 'newest', label: '최신순' },
|
||||
{ value: 'oldest', label: '오래된순' }
|
||||
]
|
||||
|
||||
/**
|
||||
* 게시물별 통계 기본값을 생성한다.
|
||||
* @returns {Object} 게시물별 통계 기본값
|
||||
@@ -1000,20 +1022,13 @@ watch(postPageCount, (pageCount) => {
|
||||
@compositionupdate="onSearchInput"
|
||||
@compositionend="onSearchCompositionEnd"
|
||||
/>
|
||||
<label class="admin-posts__filter">
|
||||
<span class="sr-only">상태 필터</span>
|
||||
<span class="admin-posts__filter-select-wrap relative block">
|
||||
<select v-model="statusFilter" class="admin-posts__filter-select h-10 appearance-none rounded border border-line bg-white pl-3 pr-9 text-sm text-[#394047] outline-none transition-colors hover:border-[#c8ced3] focus:border-[#8e9cac]">
|
||||
<option value="all">전체 상태</option>
|
||||
<option value="published">공개</option>
|
||||
<option value="draft">초안</option>
|
||||
<option value="scheduled">예약</option>
|
||||
<option value="members">멤버십</option>
|
||||
<option value="private">비공개</option>
|
||||
</select>
|
||||
<svg class="pointer-events-none absolute right-3 top-1/2 size-4 -translate-y-1/2 text-[#394047]" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6" /></svg>
|
||||
</span>
|
||||
</label>
|
||||
<AdminSelectInput
|
||||
v-model="statusFilter"
|
||||
:options="postStatusFilterOptions"
|
||||
label="상태 필터"
|
||||
root-class="admin-posts__filter"
|
||||
select-class="admin-posts__filter-select"
|
||||
/>
|
||||
<div
|
||||
ref="tagFilterRef"
|
||||
class="admin-posts__tag-filter relative w-52"
|
||||
@@ -1087,26 +1102,20 @@ watch(postPageCount, (pageCount) => {
|
||||
일치하는 태그가 없습니다.
|
||||
</p>
|
||||
</div>
|
||||
<label class="admin-posts__filter">
|
||||
<span class="sr-only">추천 필터</span>
|
||||
<span class="admin-posts__filter-select-wrap relative block">
|
||||
<select v-model="featuredFilter" class="admin-posts__filter-select h-10 appearance-none rounded border border-line bg-white pl-3 pr-9 text-sm text-[#394047] outline-none transition-colors hover:border-[#c8ced3] focus:border-[#8e9cac]">
|
||||
<option value="all">전체 글</option>
|
||||
<option value="featured">추천만</option>
|
||||
</select>
|
||||
<svg class="pointer-events-none absolute right-3 top-1/2 size-4 -translate-y-1/2 text-[#394047]" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6" /></svg>
|
||||
</span>
|
||||
</label>
|
||||
<label class="admin-posts__filter">
|
||||
<span class="sr-only">정렬</span>
|
||||
<span class="admin-posts__filter-select-wrap relative block">
|
||||
<select v-model="sortOrder" class="admin-posts__filter-select h-10 appearance-none rounded border border-line bg-white pl-3 pr-9 text-sm text-[#394047] outline-none transition-colors hover:border-[#c8ced3] focus:border-[#8e9cac]">
|
||||
<option value="newest">최신순</option>
|
||||
<option value="oldest">오래된순</option>
|
||||
</select>
|
||||
<svg class="pointer-events-none absolute right-3 top-1/2 size-4 -translate-y-1/2 text-[#394047]" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6" /></svg>
|
||||
</span>
|
||||
</label>
|
||||
<AdminSelectInput
|
||||
v-model="featuredFilter"
|
||||
:options="postFeaturedFilterOptions"
|
||||
label="추천 필터"
|
||||
root-class="admin-posts__filter"
|
||||
select-class="admin-posts__filter-select"
|
||||
/>
|
||||
<AdminSelectInput
|
||||
v-model="sortOrder"
|
||||
:options="postSortOptions"
|
||||
label="정렬"
|
||||
root-class="admin-posts__filter"
|
||||
select-class="admin-posts__filter-select"
|
||||
/>
|
||||
</div>
|
||||
<NuxtLink class="admin-posts__new shrink-0 rounded bg-[#15171a] px-4 py-2 text-sm font-semibold text-white" to="/admin/posts/new">
|
||||
새 글
|
||||
|
||||
Reference in New Issue
Block a user