fix(web): increase sidebar breakpoint ()

This commit is contained in:
Ben 2025-04-10 13:00:30 -04:00 committed by GitHub
parent 6d3f3d8616
commit e3995fb5f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 145 additions and 49 deletions
web/src/lib/stores

View file

@ -0,0 +1,21 @@
import { mobileDevice } from '$lib/stores/mobile-device.svelte';
class SidebarStore {
isOpen = $derived.by(() => mobileDevice.isFullSidebar);
/**
* Reset the sidebar visibility to the default, based on the current screen width.
*/
reset() {
this.isOpen = mobileDevice.isFullSidebar;
}
/**
* Toggles the sidebar visibility, if available at the current screen width.
*/
toggle() {
this.isOpen = mobileDevice.isFullSidebar ? true : !this.isOpen;
}
}
export const sidebarStore = new SidebarStore();