Move DB version/import to top bar, increase row spacing
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,7 @@ function CardRow({ card }) {
|
|||||||
onClick={() => setExpandedCardId(isExpanded ? null : card.id)}
|
onClick={() => setExpandedCardId(isExpanded ? null : card.id)}
|
||||||
style={{
|
style={{
|
||||||
display: 'flex', alignItems: 'center', gap: '12px',
|
display: 'flex', alignItems: 'center', gap: '12px',
|
||||||
padding: '9px 16px',
|
padding: '11px 16px',
|
||||||
background: isExpanded ? '#1c1c1c' : 'transparent',
|
background: isExpanded ? '#1c1c1c' : 'transparent',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -32,20 +32,14 @@ function Footer({ onImportComplete }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div style={{
|
<div style={{ display: 'flex', alignItems: 'center', gap: '12px', fontSize: '12px', color: '#555' }}>
|
||||||
display: 'flex', alignItems: 'center', gap: '16px',
|
<span>DB: {dbVersion ?? '…'}</span>
|
||||||
background: '#1c1c1c', border: '1px solid #2a2a2a',
|
|
||||||
borderBottom: 'none', borderRadius: '8px 8px 0 0',
|
|
||||||
padding: '7px 16px', marginRight: '20px',
|
|
||||||
fontSize: '12px', color: '#666',
|
|
||||||
}}>
|
|
||||||
<span>DB Version: {dbVersion ?? 'Loading…'}</span>
|
|
||||||
<button
|
<button
|
||||||
onClick={handleImport}
|
onClick={handleImport}
|
||||||
disabled={importing}
|
disabled={importing}
|
||||||
style={{
|
style={{
|
||||||
background: '#2a2a2a', color: '#ccc', border: '1px solid #3a3a3a',
|
background: '#2a2a2a', color: '#ccc', border: '1px solid #3a3a3a',
|
||||||
borderRadius: '5px', padding: '4px 12px', fontSize: '12px',
|
borderRadius: '5px', padding: '3px 10px', fontSize: '12px',
|
||||||
cursor: importing ? 'not-allowed' : 'pointer',
|
cursor: importing ? 'not-allowed' : 'pointer',
|
||||||
opacity: importing ? 0.5 : 1,
|
opacity: importing ? 0.5 : 1,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ function PrintingRow({ card_id, printing, cols }) {
|
|||||||
return (
|
return (
|
||||||
<div style={{
|
<div style={{
|
||||||
display: 'grid', gridTemplateColumns: cols,
|
display: 'grid', gridTemplateColumns: cols,
|
||||||
gap: '8px', padding: '5px 16px 5px 32px',
|
gap: '8px', padding: '7px 16px 7px 32px',
|
||||||
alignItems: 'center', opacity: loading ? 0.5 : 1,
|
alignItems: 'center', opacity: loading ? 0.5 : 1,
|
||||||
}}>
|
}}>
|
||||||
<span style={{ fontFamily: 'monospace', fontSize: '11px', color: '#555' }}>
|
<span style={{ fontFamily: 'monospace', fontSize: '11px', color: '#555' }}>
|
||||||
|
|||||||
@@ -88,13 +88,16 @@ function HomePage() {
|
|||||||
|
|
||||||
{/* Stats bar */}
|
{/* Stats bar */}
|
||||||
<div style={{
|
<div style={{
|
||||||
display: 'flex', gap: '2rem', padding: '6px 16px', flexShrink: 0,
|
display: 'flex', alignItems: 'center', gap: '2rem', padding: '6px 16px', flexShrink: 0,
|
||||||
background: '#1c1c1c', borderBottom: '1px solid #2a2a2a',
|
background: '#1c1c1c', borderBottom: '1px solid #2a2a2a',
|
||||||
fontSize: '12px', color: '#666',
|
fontSize: '12px', color: '#666',
|
||||||
}}>
|
}}>
|
||||||
<span><strong style={{ color: '#e0e0e0' }}>{stats.total.toLocaleString()}</strong> cards in DB</span>
|
<span><strong style={{ color: '#e0e0e0' }}>{stats.total.toLocaleString()}</strong> cards in DB</span>
|
||||||
<span><strong style={{ color: '#e0e0e0' }}>{stats.uniqueOwned.toLocaleString()}</strong> unique owned</span>
|
<span><strong style={{ color: '#e0e0e0' }}>{stats.uniqueOwned.toLocaleString()}</strong> unique owned</span>
|
||||||
<span><strong style={{ color: '#e0e0e0' }}>{stats.totalCopies.toLocaleString()}</strong> total copies</span>
|
<span><strong style={{ color: '#e0e0e0' }}>{stats.totalCopies.toLocaleString()}</strong> total copies</span>
|
||||||
|
<div style={{ marginLeft: 'auto' }}>
|
||||||
|
<Footer onImportComplete={loadCards} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Main panels */}
|
{/* Main panels */}
|
||||||
@@ -162,10 +165,6 @@ function HomePage() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Footer */}
|
|
||||||
<div style={{ display: 'flex', justifyContent: 'flex-end', flexShrink: 0 }}>
|
|
||||||
<Footer onImportComplete={loadCards} />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user