This commit introduces a new behavior for the desktop navbar, allowing it to remain open until the menu button is clicked again. This behavior is controlled by a new option in your settings.
Changes include:
- **Configuration Store (`useUi.js`):**
- Added a new boolean state `desktopNavbarPersistent` (default: `false`).
- Added an action `setDesktopNavbarPersistent` to modify this state.
- Ensured this setting is persisted to and loaded from local storage.
- **TopBar Component (`TopBar.vue`):**
- Verified that the hamburger menu button is visible on desktop screens to allow toggling the navbar.
- **NavBar Component (`NavBar.vue`):**
- Modified the navigation link click handler:
- If `desktopNavbarPersistent` is true and in desktop view (>=768px), clicking a link will no longer close the sidebar.
- In mobile view or when `desktopNavbarPersistent` is false, links will still close the sidebar.
- The '✕' close button in the NavBar continues to toggle the sidebar visibility.
- **Settings View (`SettingsView.vue`):**
- Added a new checkbox in the "General" settings section to allow you to enable or disable the "Persistent Desktop Navbar" feature.
This addresses the issue where you wanted the navbar to be less intrusive and only close upon an explicit second click of the menu button in desktop environments.
Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about IDE Support for Vue in the Vue Docs Scaling up Guide.