Files
vue-chat-layer/app/components/Chat/LinkEmbed.vue
Jakub Zych 269c75b5dd feat: threads, pins, reactions, attachments, link embeds and the command picker
- threads: reply counts, ChatThreadPane with replies, live replies and thread mute
- channel pins in ChatPinsPanel; a refused pin hides the action for the session
- reactions, attachments with upload progress and bearer downloads, inline edits, the delete dialog (moderators also in channels)
- link cards with the registerEmbedRenderer registry; linkify for escaped text
- slash commands: the command picker over chatbots, dispatch with sender-only answers
- slots conversation-actions (DMs only) and sidebar-footer
- chat-tokens.css and chat-base.css, EN and PL copy, README
2026-10-31 14:04:54 +01:00

22 lines
726 B
Vue

<script setup lang="ts">
// The generic link card: the URL's host and path, nothing fetched. It opens
// in a new tab without an opener or referrer.
const props = defineProps<{ url: URL }>()
const { t } = useI18n()
const path = computed(() => {
const p = `${props.url.pathname}${props.url.search}`
return p === '/' ? '' : p
})
</script>
<template>
<a class="chat-embed" :href="url.href" target="_blank" rel="noopener noreferrer nofollow">
<ChatIcon name="link" />
<span class="chat-embed-main">
<span class="chat-embed-host">{{ url.host }}</span>
<span v-if="path" class="chat-embed-path">{{ path }}</span>
</span>
<span class="chat-sr">{{ t('chat.embed.opens') }}</span>
</a>
</template>