How to make readonly an application in offline mode

Hi!
I am going to use this package (https://github.com/francocatena/meteor-status) to show when a user is going offline. I want him to be able to browse the content he already loads but I don’t want him to add any content (to avoid conflicts when he is going online again).

How can I do that? I want in fact to disable some buttons and the add comment form. Can I fire some JS function on online/offline toggle?

Thanks :wink:

try: https://docs.meteor.com/api/connections.html#Meteor-status

2 Likes

Thanks! Then I can add a global helpers and use it in my templates!

Template.registerHelper("connected", function () {
	return Meteor.status().connected;
});
1 Like