Appearance
Sharing System ​
File Information ​
- Path:
app/pages/[brand_name]/sharing.vue,app/components/sharing/,app/composables/core/pages/useSharing.ts - Purpose: Comprehensive sharing system for assets, folders, and collages
Overview ​
The Sharing System provides comprehensive sharing functionality for digital assets, folders, and collages. It enables users to create share links and embed codes with advanced settings including password protection, expiration dates, download restrictions, and access controls. The system supports both public sharing and brand-specific shared links.
Architecture ​
System Components ​
- Share Dialog: Create and manage share links with settings
- Share Management Page: List, update, and revoke share links
- Embed Codes: Generate and manage embed codes for assets
- Public Share View: Display shared assets to external users
- Share Integration: Share functionality integrated into asset/folder components
Key Features ​
1. Share Link Generation ​
- Create share links for assets, folders, and collages
- Custom share titles and descriptions
- Share link URL generation
- Copy link to clipboard
- Share link preview
2. Share Settings ​
- Password Protection: Optional password for share links
- Expiration Dates: Set expiration date for share links
- Download Restrictions: Control download permissions
- Access Controls: View-only or download access
- Public/Private: Public or private share links
3. Share Link Management ​
- List all share links (active and revoked)
- Filter by Active/Revoked URLs
- Sort by Created Date, Created By, Created Source
- Bulk operations (revoke, delete)
- Share link details display
4. Embed Codes ​
- Generate embed codes for assets
- Embed code preview
- Copy embed code
- Embed code management
5. Public Share View ​
- Display shared assets to external users
- Password-protected share access
- Download shared assets
- Brand-specific shared links
- Custom domain support
File Structure ​
Core Files ​
Vue Page Files (.vue) ​
app/pages/[brand_name]/sharing.vue- Share link management page- Share link list
- Filtering and sorting
- Bulk operations
- Share link actions
Route: /{brand_name}/sharing
app/pages/shared-assets/[type].vue- Public shared assets page- Public-facing shared link view
- Display shared assets
- Download shared assets
- Password protection interface
Route: /shared-assets/{type}
Components ​
app/components/dialogs/ShareAssetDialog.vue- Share dialog component- Share link generation
- Permission settings
- Expiration settings
- Copy link functionality
app/components/sharing/ShareLinkListTable.vue- Share link list table- Display share links
- Share link management
- Sorting and filtering
- Bulk actions
app/components/sharing/ShareTableHeader.vue- Share table header- Sortable columns
- Filter controls
- Action buttons
app/components/sharing/ShareTableListItem.vue- Share link row component- Individual share link display
- Share link actions (edit, delete, copy)
Composables ​
app/composables/core/pages/useSharing.ts- Sharing page composable- Share link management
- Share link operations
- Share link filtering
- Share link table state
app/composables/core/components/dialogs/useShareDialog.ts- Share dialog composable- Share dialog state
- Share link generation
- Share settings management
app/composables/core/components/sharing/useShareLinkListTable.ts- Share link list composable- Share link list management
- Filtering and sorting
- Bulk operations
API ​
app/composables/api/useSharingApi.ts- Sharing API operations- Get share links
- Create share link
- Update share link
- Delete share link
- Revoke share link
- Get shared asset
Data Flow ​
Creating Share Link ​
- User selects asset/folder/collage
- Opens share dialog
- Configures share settings (title, description, password, expiration)
- Share link generated via API
- Share link displayed and can be copied
- Share link added to share management list
Managing Share Links ​
- User navigates to sharing page
- Share links fetched from API
- Links displayed in table
- User can filter, sort, revoke, or delete links
- Changes reflected immediately
User Interactions ​
Share Link Creation
- Select asset/folder/collage
- Open share dialog
- Configure settings
- Generate and copy link
Share Link Management
- View all share links
- Filter by Active/Revoked
- Sort by columns
- Revoke active links
- Delete revoked links
Bulk Operations
- Select multiple share links
- Bulk revoke active links
- Bulk delete revoked links
Public Share Access
- Access shared link URL
- Enter password (if protected)
- View and download shared assets
Security Features ​
- Password Protection: Optional passwords for share links
- Expiration Dates: Automatic expiration of share links
- Access Controls: Fine-grained permission settings
- Secure URLs: Encrypted share link tokens
- Custom Domains: Brand-specific share URLs
API Endpoints ​
Create Share Link ​
- Endpoint:
POST /share-urls(viacreateShareLink()) - Request: Asset/folder/collage IDs, share settings
- Response: Share link URL and details
Get Share Links ​
- Endpoint:
GET /share-urls(viagetShareLinks()) - Parameters: workspace_id, page, filter_by
- Response: List of share links with pagination
Revoke Share Link ​
- Endpoint:
POST /share-urls/revoke(viarevokeShareLink()) - Request: Share URL ID(s)
- Response: Success message
Delete Share Link ​
- Endpoint:
DELETE /share-urls(viadeleteShareLink()) - Request: Share URL ID(s)
- Response: Success message
Related Documentation ​
- Sharing Page - Sharing page documentation
- useSharing Composable - Sharing composable
- ShareAssetDialog Component - Share dialog component
- ShareLinkListTable Component - Share link table component
- Sharing API - Sharing API endpoints