릴리스: v0.1.46 에디터 아이템 제거와 회원 정보 보강

This commit is contained in:
2026-03-27 10:54:31 +09:00
parent 282e89b738
commit e0eeaa01cd
7 changed files with 158 additions and 9 deletions

View File

@@ -115,6 +115,15 @@ function setIconSize(nextSize) {
iconSize.value = nextSize
}
function removeItemFromGroup(groupId, itemId) {
if (!canEdit.value || !groupId || !itemId) return
const targetGroup = groups.value.find((group) => group.id === groupId)
if (!targetGroup) return
if (!targetGroup.itemIds.includes(itemId)) return
targetGroup.itemIds = targetGroup.itemIds.filter((id) => id !== itemId)
pool.value = [itemId, ...pool.value.filter((id) => id !== itemId)]
}
function setGroupDropEl(groupId, el) {
if (!el) {
delete groupDropEls.value[groupId]
@@ -624,6 +633,16 @@ onUnmounted(() => {
<div v-if="!isExporting" class="row__empty" v-show="g.itemIds.length === 0">여기로 드래그해서 배치</div>
<div v-for="id in g.itemIds" :key="id" class="cell" :data-item-id="id">
<img :src="resolveItemSrc(itemsById[id])" class="thumb" :alt="itemsById[id]?.label || id" />
<button
v-if="canEdit && !isExporting"
class="cellRemoveBtn"
type="button"
title="아이템 빼내기"
@pointerdown.stop
@click.stop="removeItemFromGroup(g.id, id)"
>
×
</button>
</div>
</div>
</div>
@@ -1078,6 +1097,29 @@ onUnmounted(() => {
.cell {
display: inline-flex;
flex: 0 0 auto;
position: relative;
}
.cellRemoveBtn {
position: absolute;
top: -6px;
right: -6px;
width: 24px;
height: 24px;
display: grid;
place-items: center;
border-radius: 999px;
border: 1px solid rgba(239, 68, 68, 0.32);
background: rgba(11, 18, 32, 0.92);
color: rgba(255, 255, 255, 0.92);
font-size: 16px;
line-height: 1;
font-weight: 900;
cursor: pointer;
z-index: 2;
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}
.cellRemoveBtn:hover {
background: rgba(239, 68, 68, 0.9);
}
.thumb {
width: var(--thumb-size, 80px);