fix: store isSidebarCollapsed in localStorage
This commit is contained in:
parent
262f8fc362
commit
aeae16d599
@ -42,7 +42,7 @@ import NoteIcon from '@/components/Icons/NoteIcon.vue'
|
|||||||
import PhoneIcon from '@/components/Icons/PhoneIcon.vue'
|
import PhoneIcon from '@/components/Icons/PhoneIcon.vue'
|
||||||
import CollapseSidebar from '@/components/Icons/CollapseSidebar.vue'
|
import CollapseSidebar from '@/components/Icons/CollapseSidebar.vue'
|
||||||
import SidebarLink from '@/components/SidebarLink.vue'
|
import SidebarLink from '@/components/SidebarLink.vue'
|
||||||
import { ref } from 'vue'
|
import { useStorage } from "@vueuse/core";
|
||||||
|
|
||||||
const links = [
|
const links = [
|
||||||
{
|
{
|
||||||
@ -72,5 +72,5 @@ const links = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const isSidebarCollapsed = ref(false)
|
const isSidebarCollapsed = useStorage("sidebar_is_collapsed", false);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -27,16 +27,16 @@
|
|||||||
{{ user.full_name }}
|
{{ user.full_name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<FeatherIcon
|
<div
|
||||||
name="chevron-down"
|
class="duration-300 ease-in-out"
|
||||||
class="h-4 w-4 duration-300 ease-in-out"
|
|
||||||
:class="
|
:class="
|
||||||
isCollapsed
|
isCollapsed
|
||||||
? 'opacity-0 ml-0 w-0 overflow-hidden'
|
? 'opacity-0 ml-0 w-0 overflow-hidden'
|
||||||
: 'opacity-100 ml-2 w-auto'
|
: 'opacity-100 ml-2 w-auto'
|
||||||
"
|
"
|
||||||
aria-hidden="true"
|
>
|
||||||
/>
|
<FeatherIcon name="chevron-down" class="h-4 w-4" aria-hidden="true" />
|
||||||
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user