Fix grid cell label and count: label below image, count as green text beside it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-22 01:23:27 +00:00
parent e1c517c023
commit 258f9b6491
2 changed files with 9 additions and 22 deletions

View File

@@ -1293,7 +1293,8 @@ function render_grid_viewer() {
} else {
cell.classList.add('empty');
}
set_text(cell, '.grid-cell-label', `R${row + 1}C${col + 1}`);
const label_el = qs(cell, '.grid-cell-label');
label_el.textContent = `R${row + 1}C${col + 1}`;
const count = all_inventory.filter(inv =>
inv.location_type === 'grid' && inv.grid_id === grid.id &&
@@ -1303,7 +1304,7 @@ function render_grid_viewer() {
const badge = document.createElement('span');
badge.className = 'grid-cell-count';
badge.textContent = count;
qs(cell, '.grid-cell-img-wrap').appendChild(badge);
label_el.appendChild(badge);
}
cell.addEventListener('click', (e) => open_cell_inventory(grid, row, col, e));