mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02:00
fix(web): increase sidebar breakpoint (#17436)
This commit is contained in:
parent
6d3f3d8616
commit
e3995fb5f4
9 changed files with 145 additions and 49 deletions
web/src/lib/stores
21
web/src/lib/stores/sidebar.svelte.ts
Normal file
21
web/src/lib/stores/sidebar.svelte.ts
Normal 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();
|
Loading…
Add table
Add a link
Reference in a new issue