Appearance
Dashboard Page ​
File Information ​
- Path:
app/pages/[brand_name]/index.vue - Route:
/{brand_name}/ - Layout:
collage-layout - Middleware:
check-url(via global auth middleware)
Overview ​
The Dashboard page is the main home page of the application. It displays promotional banners, resource tiles, trending assets, and recently uploaded content. This page serves as the entry point for authenticated users and provides quick access to popular and recent content.
Features ​
- Banner Carousel: Promotional banners with clickable links
- Resource Tiles: Grid or slider view of resource tiles
- Trending Assets: Carousel of trending assets
- Recent Uploads: Grid view of recently uploaded assets
- Loading States: Skeleton loaders during data fetching
- Responsive Design: Adapts to different screen sizes
Page Structure ​
Banner Section ​
Displays promotional banners in a carousel format:
vue
<Carousel v-bind="bannerCarouselSettings">
<Slide v-for="banner in bannerData" :key="banner.id">
<v-img :src="banner.image" :alt="'Image of ' + banner.title" />
<nuxt-link :href="banner.url" external target="_blank">
<div v-if="banner.description" class="content">
<h2>{{ banner.description }}</h2>
</div>
</nuxt-link>
</Slide>
</Carousel>Tiles Section ​
Displays resource tiles in grid or slider format based on user preference:
- Grid View: Static grid layout
- Slider View: Carousel with navigation (if
user.is_slideris true)
Trending Section ​
Shows trending assets in a carousel:
vue
<Carousel v-bind="trendingCarouselSettings">
<Slide v-for="file in trendingSlides" :key="file.id">
<AssetCard
flag="home-page"
:file="file"
@download="downloadFile(file)"
/>
</Slide>
</Carousel>Recent Uploads Section ​
Displays recently uploaded assets in a grid:
vue
<v-row no-gutters class="gap-24">
<v-col v-for="file in recentUploads" :key="file.id" class="column-xl-4">
<AssetCard
flag="home-page"
:file="file"
@download="downloadFile(file)"
/>
</v-col>
</v-row>Composables Used ​
useDashboard() ​
Main composable for dashboard functionality:
typescript
const {
bannerData,
tileData,
trendingSlides,
recentUploads,
contentLoading,
trendingLoading,
recentLoading,
bannerCarouselSettings,
tilesCarouselSettings,
trendingCarouselSettings,
fetchDashboard,
handleHeroClick,
handleTileClick,
handleTrendingClick,
handleRecentClick,
downloadFile,
openShareDialog
} = useDashboard()Key Properties:
bannerData- Array of banner objectstileData- Array of tile objectstrendingSlides- Array of trending assetsrecentUploads- Array of recently uploaded assetscontentLoading- Loading state for main contenttrendingLoading- Loading state for trending sectionrecentLoading- Loading state for recent section
Key Methods:
fetchDashboard()- Fetches all dashboard datahandleHeroClick(banner)- Handles banner click with analyticshandleTileClick(tile)- Handles tile click with analyticshandleTrendingClick(file)- Handles trending asset clickhandleRecentClick(file)- Handles recent asset clickdownloadFile(file)- Downloads an assetopenShareDialog(file)- Opens share dialog for an asset
Data Fetching ​
The dashboard fetches data from multiple sources:
- Banner Data: From
appDataStore.bannerData - Tile Data: From
appDataStore.tileData - Trending Assets: From
appDataStore.trendingData - Recent Uploads: From
appDataStore.recentUploads
Data is fetched on component mount:
typescript
onMounted(async () => {
await fetchDashboard()
})Carousel Settings ​
Banner Carousel ​
typescript
const bannerCarouselSettings = {
itemsToShow: 1,
snapAlign: 'start',
wrapAround: true,
autoplay: 3000,
transition: 500
}Tiles Carousel ​
typescript
const tilesCarouselSettings = {
itemsToShow: 4,
snapAlign: 'start',
wrapAround: true
}Trending Carousel ​
typescript
const trendingCarouselSettings = {
itemsToShow: 4,
snapAlign: 'start',
wrapAround: true
}User Interactions ​
Banner Click ​
When a banner is clicked:
- Analytics event is dispatched
- User is navigated to banner URL (external link)
Tile Click ​
When a tile is clicked:
- Analytics event is dispatched
- User is navigated to tile URL
Asset Click ​
When an asset is clicked:
- Asset details page is opened
- Analytics event is dispatched
Download ​
When download is triggered:
- Download store handles the download
- Loading state is shown
- Analytics event is dispatched
Loading States ​
The page implements skeleton loaders for each section:
- Banner Skeleton: Image skeleton loader
- Tiles Skeleton: Card skeleton loaders
- Trending Skeleton: Heading + card skeleton loaders
- Recent Skeleton: Card skeleton loaders
Analytics Integration ​
The dashboard tracks user interactions:
- Banner clicks
- Tile clicks
- Trending asset clicks
- Recent asset clicks
- Download events
Related Documentation ​
- useDashboard Composable - Dashboard composable
- App Data Store - Application data store
- Asset Card Component - Asset card component
- Carousel Component - Carousel component