diff --git a/app/javascript/dashboard/api/changelog.js b/app/javascript/dashboard/api/changelog.js new file mode 100644 index 000000000..8cf0cdea1 --- /dev/null +++ b/app/javascript/dashboard/api/changelog.js @@ -0,0 +1,16 @@ +import axios from 'axios'; +import ApiClient from './ApiClient'; +import { CHANGELOG_API_URL } from 'shared/constants/links'; + +class ChangelogApi extends ApiClient { + constructor() { + super('changelog', { apiVersion: 'v1' }); + } + + // eslint-disable-next-line class-methods-use-this + fetchFromHub() { + return axios.get(CHANGELOG_API_URL); + } +} + +export default new ChangelogApi(); diff --git a/app/javascript/dashboard/components-next/changelog-card/GroupedStackedChangelogCard.story.vue b/app/javascript/dashboard/components-next/changelog-card/GroupedStackedChangelogCard.story.vue new file mode 100644 index 000000000..0f3484e52 --- /dev/null +++ b/app/javascript/dashboard/components-next/changelog-card/GroupedStackedChangelogCard.story.vue @@ -0,0 +1,114 @@ + + + + + + + + + + + {{ 'Reset Cards' }} + + + + + diff --git a/app/javascript/dashboard/components-next/changelog-card/GroupedStackedChangelogCard.vue b/app/javascript/dashboard/components-next/changelog-card/GroupedStackedChangelogCard.vue new file mode 100644 index 000000000..617e5d0f8 --- /dev/null +++ b/app/javascript/dashboard/components-next/changelog-card/GroupedStackedChangelogCard.vue @@ -0,0 +1,74 @@ + + + + + + + + + + + diff --git a/app/javascript/dashboard/components-next/changelog-card/StackedChangelogCard.story.vue b/app/javascript/dashboard/components-next/changelog-card/StackedChangelogCard.story.vue new file mode 100644 index 000000000..26978b422 --- /dev/null +++ b/app/javascript/dashboard/components-next/changelog-card/StackedChangelogCard.story.vue @@ -0,0 +1,46 @@ + + + + + + + + + + + diff --git a/app/javascript/dashboard/components-next/changelog-card/StackedChangelogCard.vue b/app/javascript/dashboard/components-next/changelog-card/StackedChangelogCard.vue new file mode 100644 index 000000000..8b2d430a4 --- /dev/null +++ b/app/javascript/dashboard/components-next/changelog-card/StackedChangelogCard.vue @@ -0,0 +1,119 @@ + + + + + + + {{ card.meta_title }} + + + {{ card.meta_description }} + + + + + + + + + + + + + + + + + + diff --git a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue index cef4346e9..edcb4106e 100644 --- a/app/javascript/dashboard/components-next/sidebar/Sidebar.vue +++ b/app/javascript/dashboard/components-next/sidebar/Sidebar.vue @@ -13,6 +13,7 @@ import { vOnClickOutside } from '@vueuse/components'; import Button from 'dashboard/components-next/button/Button.vue'; import SidebarGroup from './SidebarGroup.vue'; import SidebarProfileMenu from './SidebarProfileMenu.vue'; +import SidebarChangelogCard from './SidebarChangelogCard.vue'; import ChannelLeaf from './ChannelLeaf.vue'; import SidebarAccountSwitcher from './SidebarAccountSwitcher.vue'; import Logo from 'next/icon/Logo.vue'; @@ -32,11 +33,15 @@ const emit = defineEmits([ 'closeMobileSidebar', ]); -const { accountScopedRoute } = useAccount(); +const { accountScopedRoute, isOnChatwootCloud } = useAccount(); const store = useStore(); const searchShortcut = useKbd([`$mod`, 'k']); const { t } = useI18n(); +const isACustomBrandedInstance = useMapGetter( + 'globalConfig/isACustomBrandedInstance' +); + const toggleShortcutModalFn = show => { if (show) { emit('openKeyShortcutModal'); @@ -532,20 +537,20 @@ const menuItems = computed(() => { ]" > - - + + @@ -570,7 +575,7 @@ const menuItems = computed(() => { - + { - + + + + diff --git a/app/javascript/dashboard/components-next/sidebar/SidebarChangelogCard.vue b/app/javascript/dashboard/components-next/sidebar/SidebarChangelogCard.vue new file mode 100644 index 000000000..8da24678d --- /dev/null +++ b/app/javascript/dashboard/components-next/sidebar/SidebarChangelogCard.vue @@ -0,0 +1,110 @@ + + + + + + diff --git a/app/javascript/shared/constants/links.js b/app/javascript/shared/constants/links.js index b9732c0a2..94d3de3f6 100644 --- a/app/javascript/shared/constants/links.js +++ b/app/javascript/shared/constants/links.js @@ -6,3 +6,5 @@ export const REPLY_POLICY = { WHATSAPP_CLOUD: 'https://business.whatsapp.com/policy#:~:text=You%20may%20reply%20to%20a,messages%20via%20approved%20Message%20Templates.', }; + +export const CHANGELOG_API_URL = 'https://hub.2.chatwoot.com/changelogs';
+ {{ card.meta_description }} +