Browse Source

refactor: enable calendar view

nc-enable-calendar-view
Pranav C 8 months ago
parent
commit
3b92406c77
  1. 10
      packages/nc-gui/components/dashboard/TreeView/CreateViewBtn.vue

10
packages/nc-gui/components/dashboard/TreeView/CreateViewBtn.vue

@ -104,20 +104,13 @@ async function onOpenModal({
} }
} }
const isEasterEggEnabled = ref(false)
watch(isOpen, (val) => {
if (!val) {
isEasterEggEnabled.value = false
}
})
</script> </script>
<template> <template>
<NcDropdown v-model:visible="isOpen" :overlay-class-name="overlayClassName" destroy-popup-on-hide @click.stop="isOpen = true"> <NcDropdown v-model:visible="isOpen" :overlay-class-name="overlayClassName" destroy-popup-on-hide @click.stop="isOpen = true">
<slot /> <slot />
<template #overlay> <template #overlay>
<NcMenu class="max-w-48" @dblclick.stop="isEasterEggEnabled = true"> <NcMenu class="max-w-48">
<NcMenuItem @click.stop="onOpenModal({ type: ViewTypes.GRID })"> <NcMenuItem @click.stop="onOpenModal({ type: ViewTypes.GRID })">
<div class="item" data-testid="sidebar-view-create-grid"> <div class="item" data-testid="sidebar-view-create-grid">
<div class="item-inner"> <div class="item-inner">
@ -164,7 +157,6 @@ watch(isOpen, (val) => {
</div> </div>
</NcMenuItem> </NcMenuItem>
<NcMenuItem <NcMenuItem
v-if="isEasterEggEnabled"
data-testid="sidebar-view-create-calendar" data-testid="sidebar-view-create-calendar"
@click="onOpenModal({ type: ViewTypes.CALENDAR })" @click="onOpenModal({ type: ViewTypes.CALENDAR })"
> >

Loading…
Cancel
Save