Notification Center Composable
Provides a centralized notification system similar to Visual Studio Code.
import { useNotificationCenter } from '@mlightcad/cad-viewer'const { info, warning, error, success, notifications, unreadCount } = useNotificationCenter()// Add different types of notificationsinfo('Information', 'This is an info message')warning('Warning', 'This is a warning message')error('Error', 'This is an error message')success('Success', 'This is a success message')// Add notification with actionserror('File Error', 'Failed to load file', { actions: [ { label: 'Retry', action: () => retryLoad(), primary: true }, { label: 'Cancel', action: () => cancel() } ], persistent: true})// Check notification countconsole.log(`You have ${unreadCount.value} notifications`) Copy
import { useNotificationCenter } from '@mlightcad/cad-viewer'const { info, warning, error, success, notifications, unreadCount } = useNotificationCenter()// Add different types of notificationsinfo('Information', 'This is an info message')warning('Warning', 'This is a warning message')error('Error', 'This is an error message')success('Success', 'This is a success message')// Add notification with actionserror('File Error', 'Failed to load file', { actions: [ { label: 'Retry', action: () => retryLoad(), primary: true }, { label: 'Cancel', action: () => cancel() } ], persistent: true})// Check notification countconsole.log(`You have ${unreadCount.value} notifications`)
Optional
Notification Center Composable
Provides a centralized notification system similar to Visual Studio Code.
Example