feat: improve mobile responsiveness across UI
Sidenav becomes a full-screen overlay on mobile with slide-in animation. Dialog goes full-screen on small screens. Settings dialog gets a mobile nav with hamburger menu. Touch targets and text sizes scaled up for mobile. Slider gets visual checked/unchecked colors. Sidebar auto-closes on mobile route navigation. Resize handle hidden on mobile.
This commit is contained in:
@@ -37,6 +37,18 @@ export const useSidebar = () => {
|
||||
useCookie('sidebar:width').value = sidebarWidth.value.toString();
|
||||
};
|
||||
|
||||
// Auto-close sidebar on mobile when navigating
|
||||
if (import.meta.client) {
|
||||
const mobileQuery = window.matchMedia('(max-width: 767px)');
|
||||
const route = useRoute();
|
||||
|
||||
watch(() => route.path, () => {
|
||||
if (mobileQuery.matches && open.value) {
|
||||
open.value = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
open: readonly(open),
|
||||
toggle,
|
||||
|
||||
Reference in New Issue
Block a user