]> source.dussan.org Git - nextcloud-server.git/commitdiff
feat(files_reminders): register file action
authorChristopher Ng <chrng8@gmail.com>
Thu, 3 Aug 2023 02:15:00 +0000 (19:15 -0700)
committerChristopher Ng <chrng8@gmail.com>
Wed, 9 Aug 2023 17:41:17 +0000 (10:41 -0700)
Signed-off-by: Christopher Ng <chrng8@gmail.com>
apps/files/js/fileactions.js
apps/files_reminders/img/remind.svg [new file with mode: 0644]

index e7994291f38f93baaf7beb56c1bb498cdee76f1e..ad4e599c98e5108b497f8eabcc46dbc6304480b4 100644 (file)
                                }
                        });
 
+                       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 (file)
index 0000000..23e2d45
--- /dev/null
@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
+       <path d="M0 0h24v24H0V0z" fill="none" />
+       <path
+               d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z" />
+</svg>