Browse Source

fix: telemetry updates

pull/9588/head
DarkPhoenix2704 3 months ago
parent
commit
5a104101fe
  1. 2
      packages/nc-gui/components/dashboard/Sidebar/Feed.vue
  2. 11
      packages/nc-gui/components/feed/Recents/Card.vue
  3. 14
      packages/nc-gui/components/feed/Social.vue
  4. 2
      packages/nc-gui/components/feed/View.vue
  5. 12
      packages/nc-gui/components/feed/Youtube/Player.vue
  6. 4
      packages/nc-gui/components/feed/Youtube/index.vue

2
packages/nc-gui/components/dashboard/Sidebar/Feed.vue

@ -12,7 +12,7 @@ const gotoFeed = () => navigateToFeed()
<template>
<NcButton
v-e="['c:product-feed']"
v-e="['c:nocodb:feed']"
type="text"
full-width
size="xsmall"

11
packages/nc-gui/components/feed/Recents/Card.vue

@ -32,6 +32,16 @@ const expand = () => {
truncate.value = false
$e('c:nocodb:feed:recents:expand', {
title: Title,
type: 'github',
})
}
const watchVideo = () => {
$e('c:nocodb:feed:recents:watch', {
title: Title,
description: Description,
url: Url,
type: 'youtube',
})
}
@ -91,6 +101,7 @@ const { width } = useWindowSize()
:height="width < 1280 ? 330 : 392"
:width="width < 1280 ? 538 : 638"
:autoplay="0"
@played="watchVideo"
/>
<div class="p-5 flex flex-col text-nc-content-gray-emphasis gap-4">
<div class="text-2xl font-semibold truncate">

14
packages/nc-gui/components/feed/Social.vue

@ -6,36 +6,38 @@ const socialIcons = [
name: '@nocodb',
icon: iconMap.iconTwitter,
link: 'https://twitter.com/nocodb',
e: 'c:feed:twitter-open',
e: 'c:nocodb:twitter-open',
},
{
name: 'NocoDB',
icon: iconMap.youtube,
e: 'c:feed:youtube-open',
e: 'c:nocodb:youtube-open',
link: 'https://www.youtube.com/@nocodb',
},
{
name: 'NocoDB',
icon: iconMap.iconDiscord,
e: 'c:feed:discord-open',
e: 'c:nocodb:discord-open',
link: 'http://discord.nocodb.com',
},
{
name: 'r/NocoDB',
icon: iconMap.iconReddit,
e: 'c:feed:reddit-open',
e: 'c:nocodb:reddit-open',
link: 'https://www.reddit.com/r/NocoDB/',
},
{
name: 'Forum',
icon: iconMap.nocodb,
e: 'c:feed:forum-open',
e: 'c:nocodb:forum-open',
link: 'https://community.nocodb.com/',
},
]
const openUrl = (url: string, e: string) => {
$e(e)
$e(e, {
trigger: 'feed',
})
window.open(url, '_blank')
}
</script>

2
packages/nc-gui/components/feed/View.vue

@ -49,7 +49,7 @@ const tabs: Array<{
const router = useRouter()
watch(activeTab, (val) => {
$e('c:nocodb:feed', { tab: val })
$e(`c:nocodb:feed:${val}`)
router.push({ query: { tab: val } })
})

12
packages/nc-gui/components/feed/Youtube/Player.vue

@ -5,7 +5,6 @@ import { extractYoutubeVideoId } from '../../../utils/urlUtils'
const props = defineProps<{
item: ProductFeedItem
isRecent?: boolean
}>()
const {
@ -13,6 +12,16 @@ const {
} = props
const { width } = useWindowSize()
const { $e } = useNuxtApp()
const watchVideo = () => {
$e('c:nocodb:feed:youtube:watch', {
title: Title,
description: Description,
url: Url,
})
}
</script>
<template>
@ -24,6 +33,7 @@ const { width } = useWindowSize()
:width="width < 1280 ? 538 : 638"
:autoplay="0"
:controls="1"
@played="watchVideo"
/>
<div class="text-nc-content-gray-emphasis flex flex-col p-5 gap-4">

4
packages/nc-gui/components/feed/Youtube/index.vue

@ -14,10 +14,6 @@ const { isLoading } = useInfiniteScroll(
},
{ distance: 1, interval: 2000 },
)
const gotoChannel = () => {
window.open('https://www.youtube.com/@nocodb?ref=product_feed', '_blank')
}
</script>
<template>

Loading…
Cancel
Save