Skip to content

Commit

Permalink
Add back in screen blur on sidebar open for certain bps
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed May 4, 2024
1 parent 96fa98e commit 88da263
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions frontend/layouts/sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@ const handleWindowSizeChange = () => {
const sidebarContentScrollable = useState<boolean>("sidebarContentScrollable");
const sidebarFooterDynamicClass = getSidebarFooterDynamicClass(
sidebarHover.value
);
const sidebarContentDynamicClass = getSidebarContentDynamicClass(
sidebarContentScrollable.value,
sidebarHover.value
sidebarHover
);
const sidebarFooterDynamicClass = getSidebarFooterDynamicClass(sidebarHover);
</script>
8 changes: 4 additions & 4 deletions frontend/utils/sidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const sidebar = useSidebar();

export function getSidebarContentDynamicClass(
sidebarContentScrollable: boolean,
sidebarHover: boolean
sidebarHover: Ref<boolean>
) {
return computed(() => ({
"md:pl-16 xl:pl-56":
Expand All @@ -19,11 +19,11 @@ export function getSidebarContentDynamicClass(
"blur-sm xl:blur-none":
sidebar.collapsedSwitch == true &&
sidebar.collapsed == false &&
sidebarHover == true,
sidebarHover.value == true,
}));
}

export function getSidebarFooterDynamicClass(sidebarHover: boolean) {
export function getSidebarFooterDynamicClass(sidebarHover: Ref<boolean>) {
return computed(() => ({
"md:pl-24 xl:pl-64":
sidebar.collapsed == false || sidebar.collapsedSwitch == false,
Expand All @@ -32,6 +32,6 @@ export function getSidebarFooterDynamicClass(sidebarHover: boolean) {
"blur-sm xl:blur-none":
sidebar.collapsedSwitch == true &&
sidebar.collapsed == false &&
sidebarHover == true,
sidebarHover.value == true,
}));
}

0 comments on commit 88da263

Please sign in to comment.