feat(ui): add centered 'Add Item' button to all storage locations
- Added persistent '+ Add Item' button at bottom of each storage location - Button is centered and always visible (whether location has 0 or many items) - Removed redundant '+ Add' button from storage location header (kept trash button) - Reverted empty state to simple message instead of special button - Added CSS for .rpg-storage-add-item-container to center button with margin - Matches UI pattern from On Person and Assets tabs - Removed debug logging from inventoryActions.js
This commit is contained in:
@@ -199,9 +199,6 @@ export function renderStoredView(stored, collapsedLocations = [], viewMode = 'li
|
|||||||
</button>
|
</button>
|
||||||
<h5 class="rpg-storage-name">${escapeHtml(location)}</h5>
|
<h5 class="rpg-storage-name">${escapeHtml(location)}</h5>
|
||||||
<div class="rpg-storage-actions">
|
<div class="rpg-storage-actions">
|
||||||
<button class="rpg-inventory-add-btn" data-action="add-item" data-field="stored" data-location="${escapeHtml(location)}" title="Add item to this location">
|
|
||||||
<i class="fa-solid fa-plus"></i>
|
|
||||||
</button>
|
|
||||||
<button class="rpg-inventory-remove-btn" data-action="remove-location" data-location="${escapeHtml(location)}" title="Remove this storage location">
|
<button class="rpg-inventory-remove-btn" data-action="remove-location" data-location="${escapeHtml(location)}" title="Remove this storage location">
|
||||||
<i class="fa-solid fa-trash"></i>
|
<i class="fa-solid fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -222,6 +219,11 @@ export function renderStoredView(stored, collapsedLocations = [], viewMode = 'li
|
|||||||
<div class="rpg-item-list ${listViewClass}">
|
<div class="rpg-item-list ${listViewClass}">
|
||||||
${itemsHtml}
|
${itemsHtml}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="rpg-storage-add-item-container">
|
||||||
|
<button class="rpg-inventory-add-btn" data-action="add-item" data-field="stored" data-location="${escapeHtml(location)}" title="Add item to this location">
|
||||||
|
<i class="fa-solid fa-plus"></i> Add Item
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rpg-inline-confirmation" id="rpg-remove-confirm-${locationId}" style="display: none;">
|
<div class="rpg-inline-confirmation" id="rpg-remove-confirm-${locationId}" style="display: none;">
|
||||||
<p>Remove "${escapeHtml(location)}"? This will delete all items stored there.</p>
|
<p>Remove "${escapeHtml(location)}"? This will delete all items stored there.</p>
|
||||||
|
|||||||
@@ -4080,6 +4080,12 @@ body:has(.rpg-panel.rpg-position-left) #sheld {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rpg-storage-add-item-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
/* Buttons */
|
/* Buttons */
|
||||||
.rpg-inventory-edit-btn,
|
.rpg-inventory-edit-btn,
|
||||||
.rpg-inventory-add-btn,
|
.rpg-inventory-add-btn,
|
||||||
|
|||||||
Reference in New Issue
Block a user