From c54f5756a9b90aab01dfdf9f417dcfebeb9a6a4d Mon Sep 17 00:00:00 2001 From: Pranay Ankit Date: Fri, 22 Dec 2017 02:20:37 +0530 Subject: [PATCH] Feature: Browser based notifications Added browser based notifications on successful file upload Fixes issue https://github.com/NITDgpOS/PiZilla/issues/38 --- app/components/DropZone.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/components/DropZone.jsx b/app/components/DropZone.jsx index 0bf15c5..67953db 100644 --- a/app/components/DropZone.jsx +++ b/app/components/DropZone.jsx @@ -10,6 +10,7 @@ class DropZone extends Component { constructor(props) { super(props); + Notification.requestPermission(); // For a full list of possible configurations, // please consult http://www.dropzonejs.com/#configuration @@ -29,6 +30,9 @@ class DropZone extends Component { success = (file, path) => { FilesActions.updateFileList(path); + if(Notification.permission === 'granted') { + new Notification('File uploaded successfully'); + } } render = () => {