|
|
|
@ -22,6 +22,7 @@ const feedIcon = {
|
|
|
|
|
Twitter: iconMap.twitter, |
|
|
|
|
Youtube: iconMap.youtube, |
|
|
|
|
Github: iconMap.githubSolid, |
|
|
|
|
Cloud: iconMap.ncCloud, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const truncate = ref(true) |
|
|
|
@ -32,7 +33,7 @@ const expand = () => {
|
|
|
|
|
truncate.value = false |
|
|
|
|
$e('c:nocodb:feed:recents:expand', { |
|
|
|
|
title: Title, |
|
|
|
|
type: 'github', |
|
|
|
|
type: source, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -61,14 +62,20 @@ const renderedText = computedAsync(async () => {
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const { width } = useWindowSize() |
|
|
|
|
|
|
|
|
|
const handleOpenUrl = (url: string) => { |
|
|
|
|
if (source === 'Cloud') return |
|
|
|
|
|
|
|
|
|
openLink(url) |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<div class="bg-white recent-card border-gray-200 border-1 rounded-2xl max-w-[540px] xl:max-w-[640px]"> |
|
|
|
|
<div class="flex items-center justify-between px-5 py-4"> |
|
|
|
|
<div class="flex items-center gap-3"> |
|
|
|
|
<component :is="feedIcon[source as any]" class="w-4 h-4 stroke-transparent" /> |
|
|
|
|
<span class="font-weight-medium text-nc-content-gray leading-5 cursor-pointer" @click="openLink(Url)"> |
|
|
|
|
<component :is="feedIcon[source]" class="w-4 h-4 stroke-transparent" /> |
|
|
|
|
<span class="font-weight-medium text-nc-content-gray leading-5 cursor-pointer" @click="handleOpenUrl"> |
|
|
|
|
{{ source }} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
@ -76,7 +83,7 @@ const { width } = useWindowSize()
|
|
|
|
|
{{ timeAgo(CreatedAt) }} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<template v-if="source === 'Github'"> |
|
|
|
|
<template v-if="['Github', 'Cloud'].includes(source)"> |
|
|
|
|
<div class="pb-5"> |
|
|
|
|
<LazyCellAttachmentPreviewImage |
|
|
|
|
v-if="Images?.length" |
|
|
|
|