Appearance
Left Menu Component
File Information
- Path:
components/theme/global/LeftMenu.vue - Purpose: Left sidebar navigation menu with logo, menu items, and create actions
- Type: Global Theme Component
Overview
The Left Menu component provides the main navigation sidebar for the application, including logo, workspace navigation, create actions menu, menu links, and bottom logo. It supports collapsed/mini mode and drag-and-drop functionality.
Key Features
Logo and Branding
- Application logo with favicon
- Logo text
- Link to dashboard
- Collapsible logo area
Create Actions Menu
- "New" button with dropdown
- Permission-based menu items
- Create asset, folder, collage options
- Storage full indicator
Navigation Menu
- Menu links based on permissions
- Active route highlighting
- Icon support
- Nested menu support
Collapsed/Mini Mode
- Toggle between full and mini sidebar
- Icon-only display in mini mode
- Smooth transitions
Drag and Drop
- Supports file drop on sidebar
- Drag over/enter/leave handlers
Props
This component does not accept props. It uses Vuex store and authentication for data.
Data Properties
javascript
{
drawer: boolean, // Sidebar open/close state
mini: boolean, // Mini/collapsed state
contentLoading: boolean, // Initial content loading
isHovered: boolean, // Logo hover state
visibleCreateNewRoutes: array, // Create menu items
storageFull: boolean // Storage full indicator
}Computed Properties
auth
Access to authentication state:
- User information
- Workspace access
- Permissions
visibleCreateNewRoutes
Filtered create menu items based on permissions:
- Checks user access for each route
- Filters out inaccessible items
- Returns array of menu items with icons and routes
Methods
toggleDrawer()
Toggles sidebar open/close state:
- Updates
drawerstate - Persists state if needed
onSidebarDrop(event)
Handles file drop on sidebar:
- Prevents default behavior
- Processes dropped files
- Triggers appropriate action
navigateRoute(item)
Navigates to create route:
- Checks storage limits
- Navigates to route
- Closes search bar if open
closeSearchBar()
Closes search bar if open:
- Emits close event
- Updates search state
Components Used
FaviconIcon- Favicon SVG componentLogoTextIcon- Logo text SVG componentToggleIcon- Toggle icon SVG componentPlusIcon- Plus icon SVG componentv-navigation-drawer- Vuetify navigation drawerv-list- Vuetify list componentv-menu- Vuetify menu componentv-skeleton-loader- Vuetify skeleton loader
Menu Item Structure
javascript
{
title: string, // Menu item title
routeName: string, // Route name
icon: Component, // Icon component
replace: boolean, // Replace route
access: boolean // Permission check
}Usage Examples
Basic Usage
vue
<template>
<LeftMenu />
</template>
<script>
import LeftMenu from '~/components/theme/global/LeftMenu.vue'
export default {
components: {
LeftMenu
}
}
</script>In Layout
vue
<template>
<v-app>
<LeftMenu />
<v-main>
<!-- Page content -->
</v-main>
</v-app>
</template>Styling
Uses CSS classes:
.leftSidebar- Main sidebar container.leftSidebarMini- Mini/collapsed state.logo-container- Logo area.leftSidebarLink- Menu links container.addBtn- Create button.optionMenuList- Dropdown menu list
Integration Points
- Layout Components: Used in main application layout
- Vuex Store: Accesses user and workspace state
- Auth: Checks permissions
- Router: Navigation handling
- EventBus: Search bar events
Notes for Development
- Permission-based menu items
- Supports drag and drop
- Collapsible sidebar
- Storage limit checking
- Skeleton loaders for loading states
Related Documentation
- Styles - Left Menu - Menu styles
- Collage Header Component - Header component