Browse Source

refactor: enable calendar view (#8003)

pull/7996/head
Pranav C 7 months ago committed by GitHub
parent
commit
2f42eb25fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      packages/nc-gui/components/dashboard/TreeView/CreateViewBtn.vue

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

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

Loading…
Cancel
Save