chore: Remove year in review from sidebar UI (#13292)
Remove the Year In review from the UI Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,6 @@ import Button from 'dashboard/components-next/button/Button.vue';
|
|||||||
import SidebarGroup from './SidebarGroup.vue';
|
import SidebarGroup from './SidebarGroup.vue';
|
||||||
import SidebarProfileMenu from './SidebarProfileMenu.vue';
|
import SidebarProfileMenu from './SidebarProfileMenu.vue';
|
||||||
import SidebarChangelogCard from './SidebarChangelogCard.vue';
|
import SidebarChangelogCard from './SidebarChangelogCard.vue';
|
||||||
import YearInReviewBanner from '../year-in-review/YearInReviewBanner.vue';
|
|
||||||
import ChannelLeaf from './ChannelLeaf.vue';
|
import ChannelLeaf from './ChannelLeaf.vue';
|
||||||
import SidebarAccountSwitcher from './SidebarAccountSwitcher.vue';
|
import SidebarAccountSwitcher from './SidebarAccountSwitcher.vue';
|
||||||
import Logo from 'next/icon/Logo.vue';
|
import Logo from 'next/icon/Logo.vue';
|
||||||
@@ -661,7 +660,6 @@ const menuItems = computed(() => {
|
|||||||
<div
|
<div
|
||||||
class="pointer-events-none absolute inset-x-0 -top-[31px] h-8 bg-gradient-to-t from-n-solid-2 to-transparent"
|
class="pointer-events-none absolute inset-x-0 -top-[31px] h-8 bg-gradient-to-t from-n-solid-2 to-transparent"
|
||||||
/>
|
/>
|
||||||
<YearInReviewBanner />
|
|
||||||
<SidebarChangelogCard
|
<SidebarChangelogCard
|
||||||
v-if="isOnChatwootCloud && !isACustomBrandedInstance"
|
v-if="isOnChatwootCloud && !isACustomBrandedInstance"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import Auth from 'dashboard/api/auth';
|
import Auth from 'dashboard/api/auth';
|
||||||
import { useMapGetter } from 'dashboard/composables/store';
|
import { useMapGetter } from 'dashboard/composables/store';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useUISettings } from 'dashboard/composables/useUISettings';
|
|
||||||
import Avatar from 'next/avatar/Avatar.vue';
|
import Avatar from 'next/avatar/Avatar.vue';
|
||||||
import SidebarProfileMenuStatus from './SidebarProfileMenuStatus.vue';
|
import SidebarProfileMenuStatus from './SidebarProfileMenuStatus.vue';
|
||||||
import { FEATURE_FLAGS } from 'dashboard/featureFlags';
|
import { FEATURE_FLAGS } from 'dashboard/featureFlags';
|
||||||
import YearInReviewModal from 'dashboard/components-next/year-in-review/YearInReviewModal.vue';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DropdownContainer,
|
DropdownContainer,
|
||||||
@@ -24,7 +22,6 @@ defineOptions({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { uiSettings } = useUISettings();
|
|
||||||
|
|
||||||
const currentUser = useMapGetter('getCurrentUser');
|
const currentUser = useMapGetter('getCurrentUser');
|
||||||
const currentUserAvailability = useMapGetter('getCurrentUserAvailability');
|
const currentUserAvailability = useMapGetter('getCurrentUserAvailability');
|
||||||
@@ -34,29 +31,6 @@ const isFeatureEnabledonAccount = useMapGetter(
|
|||||||
'accounts/isFeatureEnabledonAccount'
|
'accounts/isFeatureEnabledonAccount'
|
||||||
);
|
);
|
||||||
|
|
||||||
const showYearInReviewModal = ref(false);
|
|
||||||
|
|
||||||
const bannerClosedKey = computed(() => {
|
|
||||||
return `yir_closed_${accountId.value}_2025`;
|
|
||||||
});
|
|
||||||
|
|
||||||
const isBannerClosed = computed(() => {
|
|
||||||
return uiSettings.value?.[bannerClosedKey.value] === true;
|
|
||||||
});
|
|
||||||
|
|
||||||
const showYearInReviewMenuItem = computed(() => {
|
|
||||||
return isBannerClosed.value;
|
|
||||||
});
|
|
||||||
|
|
||||||
const openYearInReviewModal = () => {
|
|
||||||
showYearInReviewModal.value = true;
|
|
||||||
emit('close');
|
|
||||||
};
|
|
||||||
|
|
||||||
const closeYearInReviewModal = () => {
|
|
||||||
showYearInReviewModal.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
const showChatSupport = computed(() => {
|
const showChatSupport = computed(() => {
|
||||||
return (
|
return (
|
||||||
isFeatureEnabledonAccount.value(
|
isFeatureEnabledonAccount.value(
|
||||||
@@ -68,13 +42,6 @@ const showChatSupport = computed(() => {
|
|||||||
|
|
||||||
const menuItems = computed(() => {
|
const menuItems = computed(() => {
|
||||||
return [
|
return [
|
||||||
{
|
|
||||||
show: showYearInReviewMenuItem.value,
|
|
||||||
showOnCustomBrandedInstance: false,
|
|
||||||
label: t('SIDEBAR_ITEMS.YEAR_IN_REVIEW'),
|
|
||||||
icon: 'i-lucide-gift',
|
|
||||||
click: openYearInReviewModal,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
show: showChatSupport.value,
|
show: showChatSupport.value,
|
||||||
showOnCustomBrandedInstance: false,
|
showOnCustomBrandedInstance: false,
|
||||||
@@ -190,9 +157,4 @@ const allowedMenuItems = computed(() => {
|
|||||||
</template>
|
</template>
|
||||||
</DropdownBody>
|
</DropdownBody>
|
||||||
</DropdownContainer>
|
</DropdownContainer>
|
||||||
|
|
||||||
<YearInReviewModal
|
|
||||||
:show="showYearInReviewModal"
|
|
||||||
@close="closeYearInReviewModal"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user