Appearance
Shared Assets Page ​
File Information ​
- Path:
app/pages/shared-assets/[type].vue - Route:
/shared-assets/{type} - Purpose: Public shared assets page accessible via share links
- Layout:
default - Middleware: None (public page)
Overview ​
The Shared Assets page displays assets that have been shared via share links. This is a public page that doesn't require authentication, allowing external users to view and download shared assets. It supports both grid and list views with sorting, selection, and download functionality.
Key Features ​
Public Access
- No authentication required
- Accessible via share link URLs
- Brand-agnostic (works across brands)
Asset Display
- Grid view with asset/folder cards
- List view with sortable columns
- View mode toggle
- View mode preference caching
Share Information
- Share title display
- Share description (truncated with expand)
- Share page owner information
- Breadcrumb navigation (if nested)
Sorting
- Sort by Name, Date Modified, Date Added, File Size, File Type
- Ascending/descending toggle
- Visual sort indicators
- Client-side sorting
Selection & Download
- Single and multi-select
- Select all functionality
- Bulk download
- Selection count display
Folder Navigation
- Navigate to shared folders
- Breadcrumb navigation
- Back navigation
Powered by Collage Footer
- Branding footer
- Link to Collage website
Components Used ​
FolderCard- Folder card componentAssetCard- Asset card componentShareLinkListTable- List view table componentBreadCrumbs- Breadcrumb navigation componentAsyncIcon- Async icon componentGridViewSkeleton- Grid view skeleton loaderListViewSkeleton- List view skeleton loaderv-tooltip- Tooltip component
Composables Used ​
useExternalShare()- External share functionality (app/composables/core/pages/useExternalShare.ts)useDownloadStore()- Download storeuseSnackbar()- Snackbar notificationsuseFileType()- File type utilities
Data Properties ​
Reactive Data (from useExternalShare composable) ​
typescript
{
contentLoading: boolean, // Initial content loading
download_items: any[], // Items to download
pageScrolling: boolean, // Page scrolling state
scrollContainer: HTMLElement | null, // Scroll container ref
shareTitle: string, // Share title
sharePageOwner: string, // Share page owner name
truncatedDescription: string, // Truncated description
showMoreDetails: boolean, // Description expand state
shareDescp: string, // Full share description
selectedCount: number, // Selected items count
select_all: boolean, // Select all state
downloading: boolean, // Download in progress
mode: 'grid' | 'list', // View mode
enableBackBtn: boolean, // Back button visibility
breadcrumbChildLnk: any[], // Breadcrumb links
loading: boolean, // Loading state
shareAssets: any[], // Shared assets array
isSmallScreen: boolean, // Small screen flag
folderCardKey: number, // Folder card key
fileCardKey: number, // File card key
loadMore: boolean, // Load more state
sort_loader: string, // Active sort column loader
showArrowSort: Record<string, boolean>, // Sort arrow visibility
page_sort_by: 'ASC' | 'DESC' // Sort direction
}Computed Properties ​
truncatedDescription ​
Returns truncated share description.
typescript
computed(() => {
if (showMoreDetails.value && shareDescp.value.length > 250) {
return shareDescp.value.slice(0, 250)
}
return shareDescp.value
})Methods ​
toggleSelectAll(select: boolean) ​
Toggles select all state.
typescript
function toggleSelectAll(select: boolean) {
select_all.value = select
// Updates all items selection state
}changeView(mode: 'grid' | 'list') ​
Changes view mode and caches preference.
typescript
function changeView(mode: 'grid' | 'list') {
mode.value = mode
// Caches preference in localStorage
}handleSort(field: string) ​
Handles column sorting.
typescript
function handleSort(field: string) {
// Updates sort state
// Performs client-side sorting
}fileSelect(payload: any) ​
Handles file/folder selection.
typescript
function fileSelect(payload: any) {
// Handles selection logic with Shift+Click support
}handleDownload(file: any) ​
Handles file download.
typescript
function handleDownload(file: any) {
download_items.value = [file]
downloadFile()
}downloadFile(flag: string) ​
Downloads selected items.
typescript
async function downloadFile(flag: string = "selected") {
// Downloads selected files/folders
}openFolder(folder: any) ​
Opens shared folder.
typescript
function openFolder(folder: any) {
// Navigates to shared folder contents
}goBack() ​
Navigates back in breadcrumb hierarchy.
typescript
function goBack() {
// Navigates to parent folder or share root
}onAssetView(asset: any) ​
Handles asset view action.
typescript
function onAssetView(asset: any) {
// Opens asset in viewer or navigates to asset details
}User Interactions ​
View Modes
- Toggle grid/list view
- View mode preference cached
- Smooth transitions
Sorting
- Sort by Name, Date Modified, Date Added, File Size, File Type
- Click column headers to sort
- Visual sort indicators
Selection
- Single click to select
- Shift+Click for range selection
- Select all functionality
- Selection count display
Download
- Download single files/folders
- Bulk download selected items
- Download progress indication
Folder Navigation
- Click folders to navigate
- Use breadcrumbs to navigate up
- Back button navigation
Description
- Expand/collapse description
- "Show more/less" toggle
Styling ​
- Uses custom CSS from
assets/scss/custom.scss - Responsive breakpoints for mobile/tablet/desktop
- Grid/list view styling
- Skeleton loaders for loading states
- Custom scrollbar styling
- "Powered by Collage" footer styling
Lifecycle Hooks ​
onMounted ​
Initializes shared assets data.
typescript
onMounted(async () => {
// Fetches shared assets based on type parameter
// Sets up view mode from cache
})API Endpoints ​
Get Shared Assets ​
- Endpoint:
GET /shared-assets/{type}(viauseExternalSharecomposable) - Parameters:typescript
{ type: string, // Share type from route query?: string // Share query parameters } - Response: Shared assets array with metadata
User Flow ​
- User clicks share link (e.g.,
/shared-assets/{type}?{query}) - Page loads shared assets (no authentication required)
- User can:
- View share title and description
- Toggle grid/list view
- Sort by columns
- Select assets/folders
- Download selected items
- Navigate to shared folders
- Use breadcrumbs to navigate
- Empty state shown when no assets shared
Performance Optimizations ​
- View Mode Caching: User preference cached in localStorage
- Client-Side Sorting: Sorts loaded assets without API call
- Scroll Throttling: Scroll events handled efficiently
- Lazy Loading: Assets loaded on demand
- Skeleton Loaders: Show loading states during fetch
Notes for Development ​
- Page is public (no authentication required)
- Share type from route parameter
- Share query parameters in URL
- View mode preference cached in localStorage
- Client-side sorting only affects loaded assets
- Breadcrumbs shown for nested folders
- Back button shown when in nested folder
- "Powered by Collage" footer always visible
- Download works without authentication
- Selection supports Shift+Click for range
Related Documentation ​
- useExternalShare Composable - External share composable
- ShareAssetDialog Component - Share dialog component
- FolderCard Component - Folder card component
- AssetCard Component - Asset card component