Notifications in place
This commit is contained in:
@ -183,6 +183,13 @@ export function addTracksToPlaylist( playlist_uri, tracks_uris ){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Modal
|
||||
*
|
||||
* Immersive full-screen dialog
|
||||
**/
|
||||
|
||||
export function openModal( name, data ){
|
||||
return {
|
||||
type: 'OPEN_MODAL',
|
||||
@ -197,3 +204,30 @@ export function closeModal(){
|
||||
return { type: 'CLOSE_MODAL' }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Notifications
|
||||
*
|
||||
* Subtle info/tooltip messages
|
||||
**/
|
||||
|
||||
export function createNotification( content, type = 'default' ){
|
||||
return {
|
||||
type: 'CREATE_NOTIFICATION',
|
||||
notification: {
|
||||
id: helpers.generateGuid(),
|
||||
type: type,
|
||||
content: content
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function removeNotification( id ){
|
||||
return {
|
||||
type: 'REMOVE_NOTIFICATION',
|
||||
id: id
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user