feat: require admin approval for new photos, show placeholder otherwise
This commit is contained in:
1 parent
611cd82763
commit
b1093b37cd
1 file changed
+7
-1
@@ -207,11 +207,15 @@ export default function AdminDashboard() {
|
||||
borderRadius: 'var(--radius)',
|
||||
overflow: 'hidden',
|
||||
border: '1px solid var(--color-border)',
|
||||
opacity: item.published ? 1 : 0.6,
|
||||
opacity: (!item.wasOncePublished && !item.published) ? 1 : (item.published ? 1 : 0.6),
|
||||
transition: 'opacity 0.2s'
|
||||
}}
|
||||
>
|
||||
<div style={{ position: 'relative', aspectRatio: '1/1', background: '#eee' }}>
|
||||
{(!item.wasOncePublished && !item.published) ? (
|
||||
<div style={{ width: '100%', height: '100%', background: '#fff' }} />
|
||||
) : (
|
||||
<>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
src={`/api/media/${item.relativePath}?type=thumb`}
|
||||
@@ -224,6 +228,8 @@ export default function AdminDashboard() {
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="white" stroke="none"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div style={{ padding: '10px' }}>
|
||||
|
||||
Reference in new issue
Block a user