Browse Source

fix: Smoothened select mode animation

pull/6490/head
Muhammed Mustafa 12 months ago
parent
commit
d9fcb5aad8
  1. 17
      packages/nc-gui/components/general/OpenLeftSidebarBtn.vue

17
packages/nc-gui/components/general/OpenLeftSidebarBtn.vue

@ -1,23 +1,12 @@
<script lang="ts" setup>
const { isLeftSidebarOpen: _isLeftSidebarOpen } = storeToRefs(useSidebarStore())
const isLeftSidebarOpen = ref(_isLeftSidebarOpen.value)
const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
const { isMobileMode } = useGlobal()
watch(_isLeftSidebarOpen, (val) => {
if (val) {
isLeftSidebarOpen.value = true
} else {
setTimeout(() => {
isLeftSidebarOpen.value = false
}, 300)
}
})
const onClick = () => {
if (_isLeftSidebarOpen.value) return
if (isLeftSidebarOpen.value) return
_isLeftSidebarOpen.value = !_isLeftSidebarOpen.value
isLeftSidebarOpen.value = !isLeftSidebarOpen.value
}
</script>

Loading…
Cancel
Save