mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 00:10:52 +00:00
Detect coracle links and open them inline
This commit is contained in:
parent
b132867967
commit
e9b24d5f1d
@ -323,9 +323,9 @@
|
||||
<Popover theme="transparent" opts={{hideOnClick: true}}>
|
||||
<button
|
||||
slot="trigger"
|
||||
class="relative flex items-center gap-1 pt-1 transition-all hover:pb-1 hover:pt-0"
|
||||
class="relative flex items-center gap-1 pt-1 transition-all hover:pb-1 hover:pt-0 h-6"
|
||||
on:click={showHandlersPopover}>
|
||||
<i class="fa fa-up-right-from-square" />
|
||||
<i class="fa fa-up-right-from-square fa-sm" />
|
||||
</button>
|
||||
<div slot="tooltip" class="max-h-[300px] min-w-[180px] overflow-auto">
|
||||
<Menu>
|
||||
|
@ -17,7 +17,15 @@
|
||||
let hidden = false
|
||||
</script>
|
||||
|
||||
{#if showMedia && value.isMedia && !hidden}
|
||||
{#if url.includes('coracle.social/')}
|
||||
<Anchor
|
||||
modal
|
||||
stopPropagation
|
||||
class="overflow-hidden text-ellipsis whitespace-nowrap underline"
|
||||
href={url.replace(/(https?:\/\/)?(app\.)?coracle.social/, '')}>
|
||||
{displayUrl(url)}
|
||||
</Anchor>
|
||||
{:else if showMedia && value.isMedia && !hidden}
|
||||
<div class="py-2">
|
||||
<Media url={url} onClose={close} />
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user