diff --git a/www/calendar/app-calendar.less b/www/calendar/app-calendar.less index 71c00e8df..867c9b005 100644 --- a/www/calendar/app-calendar.less +++ b/www/calendar/app-calendar.less @@ -22,6 +22,9 @@ .tui-full-calendar-month * { color: @cryptpad_text_col !important; // XXX } + .tui-full-calendar-dayname * { + color: @cryptpad_text_col !important; // XXX + } } .tui-full-calendar-timegrid-timezone { background-color: @cp_sidebar-right-bg !important; diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 39974f59c..508e372e3 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -212,6 +212,13 @@ define([ list = list.concat(mList); } + if (store.proxy.calendars) { + var cList = Object.keys(store.proxy.calendars).map(function (c) { + return store.proxy.calendars[c].channel; + }); + list = list.concat(cList); + } + list.push(userChannel); list.sort(); diff --git a/www/common/outer/calendar.js b/www/common/outer/calendar.js index 97ee9c49c..d468c6e10 100644 --- a/www/common/outer/calendar.js +++ b/www/common/outer/calendar.js @@ -264,7 +264,12 @@ ctx.calendars[channel] = { } // Add the calendar and call back c[cal.channel] = cal; - // XXX PIN (also make sure it's included in the reset) + var pin = store.pin || ctx.pinPads; + pin([cal.channel], function (res) { + if (res && res.error) { + console.error(res.error); + } + }); ctx.Store.onSync(store.id, cb); }); }; @@ -292,6 +297,12 @@ ctx.calendars[channel] = { if (!cal) { return void cb(); } // Already deleted delete store.proxy.calendars[id]; + var unpin = store.unpin || ctx.unpinPads; + unpin([id], function (res) { + if (res && res.error) { + console.error(res.error); + } + }); ctx.Store.onSync(store.id, cb); // XXX broadcast to inner }; diff --git a/www/common/outer/team.js b/www/common/outer/team.js index ce164b01b..49368fee6 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -154,6 +154,13 @@ define([ if (membersChannel) { list.push(membersChannel); } if (mailboxChannel) { list.push(mailboxChannel); } + if (store.proxy.calendars) { + var cList = Object.keys(store.proxy.calendars).map(function (c) { + return store.proxy.calendars[c].channel; + }); + list = list.concat(cList); + } + var state = store.roster.getState(); if (state.members) { Object.keys(state.members).forEach(function (curve) {