mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-02 01:40:53 +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()}
|
class={klass()}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
<Show when={image()}>
|
<Show when={image() || props.preview.images[0]}>
|
||||||
<img
|
<img
|
||||||
class={styles.previewImage}
|
class={styles.previewImage}
|
||||||
src={image()?.media_url}
|
src={image()?.media_url || props.preview.images[0]}
|
||||||
style={`width: 100%; height: ${height()}`}
|
style={`width: 100%; height: ${height()}`}
|
||||||
onerror={onError}
|
onerror={onError}
|
||||||
/>
|
/>
|
||||||
|
@ -797,9 +797,9 @@ const ParsedNote: Component<{
|
|||||||
|
|
||||||
const preview = {
|
const preview = {
|
||||||
url,
|
url,
|
||||||
description: mention.post.content.slice(0, 100),
|
description: (mention.post.tags.find(t => t[0] === 'summary') || [])[1] || mention.post.content.slice(0, 100),
|
||||||
images: [mention.user.picture],
|
images: [(mention.post.tags.find(t => t[0] === 'image') || [])[1] || mention.user.picture],
|
||||||
title: authorName(mention.user),
|
title: (mention.post.tags.find(t => t[0] === 'title') || [])[1] || authorName(mention.user),
|
||||||
}
|
}
|
||||||
|
|
||||||
return <LinkPreview
|
return <LinkPreview
|
||||||
|
@ -995,7 +995,7 @@ export const placeholders = {
|
|||||||
missingNote: {
|
missingNote: {
|
||||||
firstLine: {
|
firstLine: {
|
||||||
id: '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',
|
description: 'Placeholder when the note is missing',
|
||||||
},
|
},
|
||||||
secondLine: {
|
secondLine: {
|
||||||
|
Loading…
Reference in New Issue
Block a user