Modals, including sharing auth

This commit is contained in:
James Barnsley
2018-07-13 16:48:41 +12:00
parent 2f6e8c2a74
commit 5f8956b376
26 changed files with 720 additions and 353 deletions

View File

@ -150,8 +150,6 @@ export function createBrowserNotification(data){
}
}
// content, type = 'default', key = null, title = null, description = null, sticky = false
export function createNotification(data){
return {
type: 'CREATE_NOTIFICATION',
@ -164,7 +162,8 @@ export function createNotification(data){
content: null,
description: null,
sticky: false,
closing: false
closing: false,
render_content: false
},
data
)

View File

@ -147,7 +147,7 @@ const UIMiddleware = (function(){
case 'BROADCASTS_LOADED':
var suppressed_broadcasts = []
if (typeof(store.getState().ui.suppressed_broadcasts) !== 'undefined'){
if (store.getState().ui.suppressed_broadcasts !== undefined){
suppressed_broadcasts = store.getState().ui.suppressed_broadcasts
}
@ -160,7 +160,7 @@ const UIMiddleware = (function(){
key: (broadcast.key ? broadcast.key : null),
title: (broadcast.title ? broadcast.title : null),
content: broadcast.message,
type: 'broadcast',
type: 'info',
sticky: true
}
store.dispatch(uiActions.createNotification(data));