UBERF-5595: hide link preview for chat (#4752)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-02-22 22:02:54 +04:00 committed by GitHub
parent 6f89f2fd2b
commit 495327a272
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 2 deletions

View File

@ -35,6 +35,7 @@
export let hoverable = true
export let hoverStyles: 'borderedHover' | 'filledHover' = 'borderedHover'
export let withShowMore: boolean = true
export let showLinksPreview = true
export let onClick: (() => void) | undefined = undefined
export let onReply: (() => void) | undefined = undefined
@ -64,6 +65,7 @@
hoverable,
hoverStyles,
withShowMore,
showLinksPreview,
onClick,
onReply
}}

View File

@ -510,6 +510,7 @@
isHighlighted={isSelected}
shouldScroll={isSelected}
withShowMore={false}
showLinksPreview={false}
/>
</div>
{/each}

View File

@ -47,6 +47,7 @@
export let inline = false
export let hoverStyles: 'borderedHover' | 'filledHover' = 'borderedHover'
export let withShowMore: boolean = true
export let showLinksPreview = true
export let onClick: (() => void) | undefined = undefined
export let onReply: (() => void) | undefined = undefined
@ -95,7 +96,7 @@
parentObject = result
})
$: links = getLinks(value?.message)
$: links = showLinksPreview ? getLinks(value?.message) : []
function getLinks (content?: string): HTMLLinkElement[] {
if (!content) {

View File

@ -73,6 +73,7 @@
{hoverable}
{hoverStyles}
{withShowMore}
showLinksPreview={false}
{onClick}
{onReply}
/>

View File

@ -19,4 +19,11 @@
export let message: ActivityMessage
</script>
<ActivityMessagePresenter value={message} hideFooter hoverStyles="filledHover" withShowMore={false} skipLabel />
<ActivityMessagePresenter
value={message}
hideFooter
hoverStyles="filledHover"
withShowMore={false}
skipLabel
showLinksPreview={false}
/>