admin: streamline item modal actions
This commit is contained in:
@@ -891,6 +891,7 @@ async function refreshCustomItems() {
|
||||
page: customItemPage.value,
|
||||
limit: customItemLimit.value,
|
||||
filter: customItemFilter.value,
|
||||
collapseShared: !['user', 'template', 'unused-user', 'replaced-user'].includes(customItemFilter.value),
|
||||
})
|
||||
customItems.value = data.items || []
|
||||
customItemTotal.value = data.total || 0
|
||||
@@ -1096,12 +1097,12 @@ const {
|
||||
closeCustomItemModal,
|
||||
openCustomItemDeleteModal,
|
||||
closeCustomItemDeleteModal,
|
||||
jumpToTemplateAdmin,
|
||||
removeCustomItem,
|
||||
removeUnusedCustomItems,
|
||||
showUnusedCustomItems,
|
||||
saveCustomItemModalLabel,
|
||||
promoteCustomItem,
|
||||
unlinkCustomItemTemplate,
|
||||
refreshReplacementCandidates,
|
||||
replaceCustomItem,
|
||||
restoreCustomItem,
|
||||
@@ -1131,8 +1132,6 @@ const {
|
||||
selectedTemplateId,
|
||||
refreshCustomItems,
|
||||
loadTemplate,
|
||||
setTab,
|
||||
selectAdminTemplate,
|
||||
resetMessages,
|
||||
success,
|
||||
error,
|
||||
@@ -1826,6 +1825,7 @@ async function searchTemplateLibraryItems() {
|
||||
page: 1,
|
||||
limit: 50,
|
||||
filter: 'library',
|
||||
collapseShared: true,
|
||||
})
|
||||
templateLibraryItemResults.value = (data.items || []).filter((item) => item?.id)
|
||||
templateLibraryItemSelectedIds.value = templateLibraryItemSelectedIds.value.filter((id) =>
|
||||
@@ -2377,7 +2377,6 @@ function openUserProfile(user) {
|
||||
</div>
|
||||
<div class="customItemModal__pickerActions">
|
||||
<button class="btn btn--ghost" type="button" @click="openTemplatePickerModal('custom-item-target')">템플릿 선택</button>
|
||||
<button class="btn btn--ghost btn--small customItemModal__createTemplateButton" type="button" @click="openTemplateCreateModal">새 템플릿 만들기</button>
|
||||
</div>
|
||||
<template v-if="canReplaceModalTarget">
|
||||
<div class="customItemModal__pickerHead">
|
||||
@@ -2463,7 +2462,10 @@ function openUserProfile(user) {
|
||||
<div class="customItemModal__linked">
|
||||
<span class="customItemModal__label">이 이미지를 사용하는 템플릿</span>
|
||||
<div v-if="visibleLinkedTemplates.length" class="customItemModal__chips">
|
||||
<button v-for="template in visibleLinkedTemplates" :key="template.id" type="button" class="pill pill--link" @click="jumpToTemplateAdmin(template.id)">{{ template.name }}</button>
|
||||
<span v-for="template in visibleLinkedTemplates" :key="template.id" class="customItemModal__templateChip">
|
||||
<span>{{ template.name }}</span>
|
||||
<button class="customItemModal__templateChipRemove" type="button" @click="unlinkCustomItemTemplate(modalTargetCustomItem, template)">X</button>
|
||||
</span>
|
||||
</div>
|
||||
<div v-else class="hint hint--tight">아직 템플릿에 연결된 항목이 없어요.</div>
|
||||
</div>
|
||||
@@ -4034,9 +4036,6 @@ function openUserProfile(user) {
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
}
|
||||
.adminUiScope .customItemModal__createTemplateButton {
|
||||
justify-self: start;
|
||||
}
|
||||
.adminUiScope .customItemModal__body {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
@@ -4121,6 +4120,26 @@ function openUserProfile(user) {
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
.adminUiScope .customItemModal__templateChip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 11px;
|
||||
border-radius: 999px;
|
||||
background: var(--theme-pill-bg);
|
||||
border: 1px solid var(--theme-border);
|
||||
font-size: 12px;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
.adminUiScope .customItemModal__templateChipRemove {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--theme-text-soft);
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
}
|
||||
.adminUiScope .customItemModal__title {
|
||||
font-size: 19px;
|
||||
font-weight: 900;
|
||||
|
||||
Reference in New Issue
Block a user