Drop duplicated card name from the slab inside the history modal
This commit is contained in:
parent
cc104e7e35
commit
5ef97ad4ad
1 changed files with 4 additions and 4 deletions
|
|
@ -124,7 +124,7 @@ const SEVERITY_LABEL = {
|
|||
|
||||
const gradeState = { files: [], result: null, busy: false };
|
||||
|
||||
function renderGradeBlock(g) {
|
||||
function renderGradeBlock(g, opts = {}) {
|
||||
if (!g) return '';
|
||||
const m = g.edge_measurements || null;
|
||||
let measuredLine = '';
|
||||
|
|
@ -160,7 +160,7 @@ function renderGradeBlock(g) {
|
|||
<div class="note">A photo can't show surface scratches, print lines, or light edge wear the
|
||||
way a grader's raking light does — and a seller's listing photo is often lit to hide them.
|
||||
Treat this as a rough screen, not a prediction of what it comes back as.</div>
|
||||
<div style="margin:14px 0">${renderSlab(g)}</div>
|
||||
<div style="margin:14px 0">${renderSlab(g, opts)}</div>
|
||||
<div class="table-scroll"><table class="grid"><tbody>${rows}</tbody></table></div>
|
||||
${(g.limitations || []).length ? `<div style="margin-top:10px"><strong>Couldn't check:</strong>
|
||||
<ul>${g.limitations.map((l) => `<li>${esc(l)}</li>`).join('')}</ul></div>` : ''}
|
||||
|
|
@ -194,7 +194,7 @@ function renderSlab(g, opts = {}) {
|
|||
<div class="slab ${slabClass(grade)}">
|
||||
<div class="slab-main">
|
||||
${g.card_type ? `<div><span class="card-type-tag">${esc(TYPE_LABEL[g.card_type] || 'Card')}</span></div>` : ''}
|
||||
<div class="slab-title">${esc(title)}</div>
|
||||
${opts.hideTitle ? '' : `<div class="slab-title">${esc(title)}</div>`}
|
||||
<div class="slab-sub">${esc(bits)}</div>
|
||||
</div>
|
||||
<div class="slab-grade">
|
||||
|
|
@ -361,7 +361,7 @@ function renderEntryModal(g) {
|
|||
</div>
|
||||
<div class="cardcell-meta" style="margin-bottom:10px">${esc(fmtWhen(g.created_at))} ·
|
||||
${g.usage && g.usage.model ? esc(g.usage.model) : ''}</div>
|
||||
${renderGradeBlock(g)}
|
||||
${renderGradeBlock(g, { hideTitle: true })}
|
||||
<div class="drawer-actions">
|
||||
<input class="input" id="entry-label" placeholder="Rename this card…" value="${esc(g.label || '')}" style="flex:1 1 200px">
|
||||
<button class="btn btn-quiet btn-sm" id="entry-save-label">Save name</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue