mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-01 17:31:13 +00:00
Fix long-form note display
This commit is contained in:
parent
5d08eeb097
commit
1638029c93
@ -63,10 +63,10 @@ const LinkPreview: Component<{ preview: any, id?: string, bordered?: boolean, is
|
||||
class={klass()}
|
||||
target="_blank"
|
||||
>
|
||||
<Show when={image()}>
|
||||
<Show when={image() || props.preview.images[0]}>
|
||||
<img
|
||||
class={styles.previewImage}
|
||||
src={image()?.media_url}
|
||||
src={image()?.media_url || props.preview.images[0]}
|
||||
style={`width: 100%; height: ${height()}`}
|
||||
onerror={onError}
|
||||
/>
|
||||
|
@ -797,9 +797,9 @@ const ParsedNote: Component<{
|
||||
|
||||
const preview = {
|
||||
url,
|
||||
description: mention.post.content.slice(0, 100),
|
||||
images: [mention.user.picture],
|
||||
title: authorName(mention.user),
|
||||
description: (mention.post.tags.find(t => t[0] === 'summary') || [])[1] || mention.post.content.slice(0, 100),
|
||||
images: [(mention.post.tags.find(t => t[0] === 'image') || [])[1] || mention.user.picture],
|
||||
title: (mention.post.tags.find(t => t[0] === 'title') || [])[1] || authorName(mention.user),
|
||||
}
|
||||
|
||||
return <LinkPreview
|
||||
|
@ -995,7 +995,7 @@ export const placeholders = {
|
||||
missingNote: {
|
||||
firstLine: {
|
||||
id: 'placeholders.missingNote.firstLine',
|
||||
defaultMessage: 'Oups! We can\'t seem to find this note.',
|
||||
defaultMessage: 'We can\'t seem to find this note.',
|
||||
description: 'Placeholder when the note is missing',
|
||||
},
|
||||
secondLine: {
|
||||
|
Loading…
Reference in New Issue
Block a user