diff --git a/CHANGELOG.md b/CHANGELOG.md index c8cd7e208..7b6a59683 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,11 @@ * /report/ page * broadcast channel included in pin list * fix package-lock to use server update +* code app present mode fix +* sheets + * lock sheets faster when applying checkpoints + * guard against undefined checkpoints + * don't spam users with prompts to checkpoints when they can't # 4.4.0 diff --git a/customize.dist/images/logo_ngi_dapsi.png b/customize.dist/images/logo_ngi_dapsi.png new file mode 100644 index 000000000..efd52c482 Binary files /dev/null and b/customize.dist/images/logo_ngi_dapsi.png differ diff --git a/customize.dist/pages/what-is-cryptpad.js b/customize.dist/pages/what-is-cryptpad.js index 99e675c0f..b1c3de3d0 100644 --- a/customize.dist/pages/what-is-cryptpad.js +++ b/customize.dist/pages/what-is-cryptpad.js @@ -89,6 +89,8 @@ define([ 'https://www.mozilla.org/en-US/moss/'), logoLink('NGI Trust logo', '/customize/images/logo_ngi_trust.png', 'https://www.ngi.eu/ngi-projects/ngi-trust/'), + logoLink('NGI DAPSI LOGO', '/customize/images/logo_ngi_dapsi.png', + 'https://dapsi.ngi.eu/'), ]), ]), h('div.row.cp-page-section', [ diff --git a/www/calendar/app-calendar.less b/www/calendar/app-calendar.less index 1ec6c295b..d48914532 100644 --- a/www/calendar/app-calendar.less +++ b/www/calendar/app-calendar.less @@ -74,23 +74,23 @@ color: @cp_calendar-now-fg !important; } .tui-full-calendar-weekday-schedule-time .tui-full-calendar-weekday-schedule-title { - color: @cryptpad_text_col !important; // XXX + color: @cryptpad_text_col !important; } .tui-full-calendar-extra-date { .tui-full-calendar-weekday-grid-date { - color: @cp_sidebar-hint !important; // XXX + color: @cp_sidebar-hint !important; opacity: 0.5; } } .tui-full-calendar-weekday-grid-date { - color: @cryptpad_text_col !important; // XXX + color: @cryptpad_text_col !important; } .tui-full-calendar-month-dayname-item span { - color: @cryptpad_text_col !important; // XXX + color: @cryptpad_text_col !important; } } .tui-full-calendar-dayname * { - color: @cryptpad_text_col !important; // XXX + color: @cryptpad_text_col !important; } .tui-full-calendar-month-more { background-color: @cp_sidebar-right-bg !important; diff --git a/www/calendar/inner.js b/www/calendar/inner.js index 3cde25436..34e76fb16 100644 --- a/www/calendar/inner.js +++ b/www/calendar/inner.js @@ -58,41 +58,6 @@ define([ var metadataMgr; var sframeChan; -Messages.calendar = "BETA Calendar"; // XXX -Messages.calendar_default = "My calendar"; // XXX -Messages.calendar_new = "New calendar"; // XXX -Messages.calendar_day = "Day"; -Messages.calendar_week = "Week"; -Messages.calendar_month = "Month"; -Messages.calendar_today = "Today"; -Messages.calendar_more = "{0} more"; -Messages.calendar_deleteConfirm = "Are you sure you want to delete this calendar from your account?"; -Messages.calendar_deleteTeamConfirm = "Are you sure you want to delete this calendar from this team?"; -Messages.calendar_deleteOwned = " It will still be visible for the users it has been shared with."; -Messages.calendar_errorNoCalendar = "No editable calendar selected!"; -Messages.calendar_tempCalendar = "Viewing"; -Messages.calendar_import = "Import to my calendars"; -Messages.calendar_import_temp = "Import this calendar"; -Messages.calendar_newEvent = "New event"; -Messages.calendar_new = "New calendar"; -Messages.calendar_dateRange = "{0} - {1}"; -Messages.calendar_dateTimeRange = "{0} {1} - {2}"; -Messages.calendar_weekNumber = "Week {0}"; -Messages.calendar_update = "Update"; -Messages.calendar_title = "Title"; -Messages.calendar_loc = "Location"; -Messages.calendar_location = "Location: {0}"; -Messages.calendar_allDay = "All day"; - -Messages.calendar_minutes = "Minutes"; -Messages.calendar_hours = "Hours"; -Messages.calendar_days = "Days"; -Messages.calendar_before = "before"; - -Messages.calendar_notifications = "Reminders"; -Messages.calendar_addNotification = "Add reminder"; -Messages.calendar_noNotification = "None"; - var onCalendarsUpdate = Util.mkEvent(); var newCalendar = function (data, cb) { @@ -603,15 +568,15 @@ Messages.calendar_noNotification = "None"; action: function (e) { e.stopPropagation(); var cal = APP.calendars[id]; - var key = Messages.calendar_deleteConfirm; var teams = (cal && cal.teams) || []; + var text = [ Messages.calendar_deleteConfirm ]; if (teams.length === 1 && teams[0] !== 1) { - key = Messages.calendar_deleteTeamConfirm; + text[0] = Messages.calendar_deleteTeamConfirm; } if (cal.owned) { - key += Messages.calendar_deleteOwned; + text = text.concat([' ', Messages.calendar_deleteOwned]); } - UI.confirm(key, function (yes) { + UI.confirm(h('span', text), function (yes) { if (!yes) { return; } deleteCalendar({ id: id, @@ -663,7 +628,7 @@ Messages.calendar_noNotification = "None"; (isReadOnly(id, teamId) ? h('i.fa.fa-eye', {title: Messages.readonly}) : undefined), edit ]); - $(calendar).click(function () { + var $calendar = $(calendar).click(function () { if (teamId === 0) { return; } data.hidden = !data.hidden; if (APP.$calendars) { @@ -674,6 +639,12 @@ Messages.calendar_noNotification = "None"; renderCalendar(); }); + if (!data.loading) { + $calendar.contextmenu(function (ev) { + ev.preventDefault(); + $(edit).click(); + }); + } if (APP.$calendars) { APP.$calendars.append(calendar); } return calendar; }; diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 9711de3fa..dbcb089f3 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -1434,13 +1434,13 @@ define([ */ UI.createDrawer = function ($button, $content) { $button.click(function () { + var topPos = $button[0].getBoundingClientRect().bottom; $content.toggle(); $button.removeClass('cp-toolbar-button-active'); if ($content.is(':visible')) { $button.addClass('cp-toolbar-button-active'); $content.focus(); var wh = $(window).height(); - var topPos = $button[0].getBoundingClientRect().bottom; $content.css('max-height', Math.floor(wh - topPos - 1)+'px'); } }); diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 0f070595b..5ddc48641 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -788,6 +788,30 @@ define([ h('span.cp-toolbar-name.cp-toolbar-drawer-element', Messages.toolbar_savetodrive) ])).click(common.prepareFeedback(type)); break; + case 'storeindrive': + Messages.toolbar_storeInDrive = "Store in CryptDrive"; // XXX + button = $(h('button.cp-toolbar-storeindrive', { + style: 'display:none;' + }, [ + h('i.fa.fa-hdd-o'), + h('span.cp-toolbar-name.cp-toolbar-drawer-element', Messages.toolbar_storeInDrive) + ])).click(common.prepareFeedback(type)).click(function () { + $(button).hide(); + common.getSframeChannel().query("Q_AUTOSTORE_STORE", null, function (err, obj) { + waitingForStoringCb = false; + var error = err || (obj && obj.error); + if (error) { + $(button).show(); + if (error === 'E_OVER_LIMIT') { + return void UI.warn(Messages.pinLimitReached); + } + return void UI.warn(Messages.autostore_error); + } + $(document).trigger('cpPadStored'); + UI.log(Messages.autostore_saved); + }); + }); + break; case 'hashtag': button = $('