From 5c6925dd8eba5159d35c73aaa29879fbd0909b90 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Wed, 2 Aug 2023 19:15:00 -0700 Subject: [PATCH] feat(files_reminders): register file action Signed-off-by: Christopher Ng (cherry picked from commit d6bf9e3c10846d403468e70b39ef34af61458094) --- apps/files/js/fileactions.js | 16 ++++++++++++++++ apps/files_reminders/img/remind.svg | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 apps/files_reminders/img/remind.svg diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index e7994291f38..ad4e599c98e 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -710,6 +710,22 @@ } }); + if (Boolean(OC.appswebroots.files_reminders) && Boolean(OC.appswebroots.notifications)) { + this.registerAction({ + name: 'SetReminder', + displayName: function(_context) { + return t('files', 'Set reminder'); + }, + mime: 'all', + order: -24, + icon: function(_filename, _context) { + return OC.imagePath('files_reminders', 'remind.svg') + }, + permissions: OC.PERMISSION_READ, + actionHandler: function(_filename, _context) {}, + }); + } + if (!/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)) { this.registerAction({ name: 'EditLocally', diff --git a/apps/files_reminders/img/remind.svg b/apps/files_reminders/img/remind.svg new file mode 100644 index 00000000000..23e2d456813 --- /dev/null +++ b/apps/files_reminders/img/remind.svg @@ -0,0 +1,5 @@ + + + + -- 2.39.5