Fix download link styling and raise download description limits
This commit is contained in:
+2
-2
@@ -171,7 +171,7 @@ function sanitizeCustomLinks(value) {
|
|||||||
label: typeof item.label === 'string' ? item.label.trim().slice(0, 140) : '',
|
label: typeof item.label === 'string' ? item.label.trim().slice(0, 140) : '',
|
||||||
url: sanitizeUrl(item.url),
|
url: sanitizeUrl(item.url),
|
||||||
imageUrl: sanitizeUrl(item.imageUrl),
|
imageUrl: sanitizeUrl(item.imageUrl),
|
||||||
description: typeof item.description === 'string' ? item.description.trim().slice(0, 400) : '',
|
description: typeof item.description === 'string' ? item.description.trim().slice(0, 4000) : '',
|
||||||
placement,
|
placement,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -197,7 +197,7 @@ function sanitizeArchivedSeriesResourceLinks(value) {
|
|||||||
.map(item => ({
|
.map(item => ({
|
||||||
id: typeof item.id === 'string' && item.id.trim() ? item.id.trim() : randomUUID(),
|
id: typeof item.id === 'string' && item.id.trim() ? item.id.trim() : randomUUID(),
|
||||||
label: typeof item.label === 'string' ? item.label.trim().slice(0, 120) : '',
|
label: typeof item.label === 'string' ? item.label.trim().slice(0, 120) : '',
|
||||||
description: typeof item.description === 'string' ? item.description.trim().slice(0, 400) : '',
|
description: typeof item.description === 'string' ? item.description.trim().slice(0, 4000) : '',
|
||||||
url: sanitizeUrl(item.url),
|
url: sanitizeUrl(item.url),
|
||||||
}))
|
}))
|
||||||
.filter(item => item.label && item.url)
|
.filter(item => item.label && item.url)
|
||||||
|
|||||||
+2
-2
@@ -2225,7 +2225,7 @@ export default function AdminPage({ content, onSave, onLogout }: Props) {
|
|||||||
id={`resource-description-${link.id}`}
|
id={`resource-description-${link.id}`}
|
||||||
rows={3}
|
rows={3}
|
||||||
value={link.description ?? ''}
|
value={link.description ?? ''}
|
||||||
placeholder="Short description shown on the download page"
|
placeholder="Description shown on the download page"
|
||||||
onChange={e => updateLink(link.id, 'description', e.target.value)}
|
onChange={e => updateLink(link.id, 'description', e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -2328,7 +2328,7 @@ export default function AdminPage({ content, onSave, onLogout }: Props) {
|
|||||||
id={`resources-archive-link-description-${link.id}`}
|
id={`resources-archive-link-description-${link.id}`}
|
||||||
rows={3}
|
rows={3}
|
||||||
value={link.description ?? ''}
|
value={link.description ?? ''}
|
||||||
placeholder="Short description shown on the download page"
|
placeholder="Description shown on the download page"
|
||||||
onChange={e => updateArchivedSeriesLink(series.id, link.id, 'description', e.target.value)}
|
onChange={e => updateArchivedSeriesLink(series.id, link.id, 'description', e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1409,6 +1409,8 @@
|
|||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.resource-download-header {
|
.resource-download-header {
|
||||||
|
|||||||
Reference in New Issue
Block a user