[nodebb-plugin-desktop-notifications] Desktop Notifications (like GMail)
-
Am I missing something here?
-
Looks like @psychobunny used the wrong paths for the js scripts. For now you can run NodeBB in development mode with
./nodebb watch
or you can update to this https://github.com/designcreateplay/NodeBB/commit/c8e423e9cf86b74c15aa87d334f8dffc2c6e6074nodebb-plugin-desktop-notifications/library.js at master · psychobunny/nodebb-plugin-desktop-notifications
This NodeBB plugin uses the HTML5 Notifications API to display desktop alerts upon new incoming notifications. - nodebb-plugin-desktop-notifications/library.js at master · psychobunny/nodebb-plugin-desktop-notifications
GitHub (github.com)
Those paths are not existing and when NodeBB tries to minimize them it crashes.
Full list of scripts that went into the minify code
[ '/home/baris/node-forum/public/vendor/jquery/js/jquery.js', '/home/baris/node-forum/public/vendor/jquery/js/jquery-ui-1.10.3.custom.min.js', '/home/baris/node-forum/public/vendor/jquery/js/jquery.timeago.js', '/home/baris/node-forum/public/vendor/jquery/js/jquery.form.js', '/home/baris/node-forum/public/vendor/bootstrap/js/bootstrap.min.js', '/home/baris/node-forum/public/vendor/requirejs/require.js', '/home/baris/node-forum/public/vendor/bootbox/bootbox.min.js', '/home/baris/node-forum/public/vendor/tinycon/tinycon.js', '/home/baris/node-forum/public/src/app.js', '/home/baris/node-forum/public/src/templates.js', '/home/baris/node-forum/public/src/ajaxify.js', '/home/baris/node-forum/public/src/translator.js', '/home/baris/node-forum/public/src/utils.js', '/home/baris/node-forum/public/plugins/nodebb-plugin-desktop-notifications/vendor/notify/notify.js', '/home/baris/node-forum/public/plugins/nodebb-plugin-desktop-notifications/lib/main.js' ]
-
hey, good catch. there was an bug with minification that used the plugin's virtual static directory and not its physical directory in node_modules.
Updating to this commit will solve your issue
fix for minification of plugins static directories · NodeBB/NodeBB@5db27a8
Node.js based forum software built for the modern web - fix for minification of plugins static directories · NodeBB/NodeBB@5db27a8
GitHub (github.com)
-
-
do you know what notification specifically that was? in any case run
npm update
, I just added a catch to make sure that we don't show notifications that didn't have any text (for whatever reason) -
try
npm update
and lemme know if it works (version 0.0.6)push notifications in mobile works only on firefox mobile, haven't tested chrome mobile.
-
oh I get it. you need to update nodebb to this commit at minimum:
fix for minification of plugins static directories · NodeBB/NodeBB@5db27a8
Node.js based forum software built for the modern web - fix for minification of plugins static directories · NodeBB/NodeBB@5db27a8
GitHub (github.com)
here's what's blocking you:
also send notification data along with event:new_notification socket … · NodeBB/NodeBB@dc4aeca
Node.js based forum software built for the modern web - also send notification data along with event:new_notification socket … · NodeBB/NodeBB@dc4aeca
GitHub (github.com)
that's why data is undefined
-
np, I should have realized. you might have noticed its been activated on the community forum as well
-
i see.
-
@psychobunny I wanna ask something on mobile. Does it work with safari on iOS? also, i just tried on chrome does not seems to work.
-
var logo = $('.forum-logo').attr('src');
I don't want to use the forum logo, can I use a custom image for this?
-
maybe in the future I could add a way to upload a new picture. for now you could just take that line and replace it with any valid url ex.
var logo = 'http://domain.com/image.png';
-
Ooo yeah that works.
-
damn desktop notifications! haha. this is going to get annoying eventually