feat: add alternate link sources

This commit is contained in:
Xylight committed 2024-08-03 10:56:39 -07:00
1 parent db9c6e6fa8
commit 462f910ac3
7 files changed
+154 -52

No files matched your search

@@ -71,11 +71,6 @@
let localShare = false
let mediaBias = false
const stripSubdomain = (url: string) =>
new URL(url).hostname.split('.').slice(-2).join('.')
$: buttonHeight = view == 'compact' ? 'h-[30px]' : 'h-8'
$: buttonSquare = view == 'compact' ? 'w-[30px] h-[30px]' : 'w-8 h-8'
</script>
@@ -118,12 +113,6 @@
{/await}
{/if}
{#if mediaBias && post.post.url}
{#await import('$lib/components/mbfc/MBFCModal.svelte') then { default: MbfcModal }}
<MbfcModal domain={stripSubdomain(post.post.url)} bind:open={mediaBias} />
{/await}
{/if}
<div
class="flex flex-row gap-2 items-center flex-shrink-0 {buttonHeight}"
style={$$props.style ?? ''}
@@ -282,12 +271,6 @@
: $t('post.actions.more.markRead')}
</MenuButton>
{/if}
{#if post.post.url && type == 'embed'}
<MenuButton on:click={() => (mediaBias = !mediaBias)}>
<Icon src={CheckBadge} micro size="16" slot="prefix" />
{$t('post.actions.more.mediaBias')}
</MenuButton>
{/if}
<MenuButton
on:click={() => {
navigator.share?.({