Better subscription pattern for a sync button in the app layout?

I’m building an app which will schedule todos into your google calendar. I’ve got a global sync button that shows in all task views and on the settings page which you can use to sync the tasks with the calendar (for instance if you reschedule an event, it reschedules your todos).

I have made a global client-side module to handle the sync using the Google calendar api, since this sync function is used in many places.

How should I be creating subscriptions for syncing? For instance, to sync, I need to know which of the user’s calendars are “active”, and which tasks are still to do (i.e. not done or removed). So, should I put the subscription in the sync module? Or just sprinkle it around in every view that calls the sync function?

Why not just handle the logic on server side?

I’m already doing everything client-side and the client-side api is done a bit differently. I will probably move it to the server eventually, but for now I’d like to focus on building other features.

I ended up putting the subscription in my layout view onCreated event. Since every layout view needs sync capabilities at the moment, and no non-layout views need it, this maps well, even though it’s not optimal. I plan on moving the sync module to the server at some point as @shock suggested, because the sync function is rather request heavy.