diff --git a/packages/nc-gui/assets/nc-icons/star.svg b/packages/nc-gui/assets/nc-icons/star.svg index 56aee8f633..9656c5c8c8 100644 --- a/packages/nc-gui/assets/nc-icons/star.svg +++ b/packages/nc-gui/assets/nc-icons/star.svg @@ -1,5 +1,5 @@ - + diff --git a/packages/nc-gui/components/feed/Changelog/Item.vue b/packages/nc-gui/components/feed/Changelog/Item.vue index 34913ea57d..985feeb0cd 100644 --- a/packages/nc-gui/components/feed/Changelog/Item.vue +++ b/packages/nc-gui/components/feed/Changelog/Item.vue @@ -5,18 +5,45 @@ import remarkParse from 'remark-parse' import remarkRehype from 'remark-rehype' import { unified } from 'unified' import dayjs from 'dayjs' +import type { ProductFeedItem } from '../../../lib/types' const props = defineProps<{ - body: string - date: string + item: ProductFeedItem }>() +const { + item: { CreatedAt, Description, Url, Title, Tags }, +} = props + +const iconColorMap = { + 'Hotfix': { + icon: iconMap.ncTool, + color: 'red', + }, + 'Feature': { + icon: iconMap.star, + color: 'purple', + }, + 'Bug fixes': { + icon: iconMap.ncTool, + color: 'green', + }, +} + +const tags = computed(() => { + return Tags?.split(',').map((tag) => ({ + text: tag, + href: `/tags/${tag}`, + ...(iconColorMap[tag as any] || {}), + })) +}) + const renderMarkdown = async (markdown: string) => { return await unified().use(remarkParse).use(remarkRehype).use(rehypeSanitize).use(rehypeStringify).process(markdown) } const renderedText = computedAsync(async () => { - return await renderMarkdown(props.body) + return await renderMarkdown(Description) }) @@ -29,14 +56,52 @@ const renderedText = computedAsync(async () => {
- {{ dayjs(date).format('MMMM D, YYYY') }} + {{ dayjs(CreatedAt).format('MMMM D, YYYY') }}
-
+
+
+ + + {{ tag.text }} + +
+
+
+ + {{ Title }} + +
+
@@ -44,6 +109,10 @@ const renderedText = computedAsync(async () => { diff --git a/packages/nc-gui/components/feed/View.vue b/packages/nc-gui/components/feed/View.vue index 96f341fb79..85c0ae5f35 100644 --- a/packages/nc-gui/components/feed/View.vue +++ b/packages/nc-gui/components/feed/View.vue @@ -1,6 +1,7 @@ diff --git a/packages/nc-gui/components/feed/Youtube/Player.vue b/packages/nc-gui/components/feed/Youtube/Player.vue index bdea9d1344..6e0c62b1a0 100644 --- a/packages/nc-gui/components/feed/Youtube/Player.vue +++ b/packages/nc-gui/components/feed/Youtube/Player.vue @@ -1,15 +1,16 @@