diff --git a/img/app.png b/img/app.png deleted file mode 100644 index 8efed047..00000000 Binary files a/img/app.png and /dev/null differ diff --git a/img/contacts.svg b/img/contacts.svg new file mode 100644 index 00000000..b3cf71b8 --- /dev/null +++ b/img/contacts.svg @@ -0,0 +1,4 @@ + + + + diff --git a/img/favicon-mask.svg b/img/favicon-mask.svg deleted file mode 100644 index dc63f91b..00000000 --- a/img/favicon-mask.svg +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/img/favicon-touch.png b/img/favicon-touch.png deleted file mode 100644 index 51dad72b..00000000 Binary files a/img/favicon-touch.png and /dev/null differ diff --git a/img/favicon-touch.svg b/img/favicon-touch.svg deleted file mode 100644 index ba2b004f..00000000 --- a/img/favicon-touch.svg +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/img/favicon.ico b/img/favicon.ico deleted file mode 100644 index 90b18c15..00000000 Binary files a/img/favicon.ico and /dev/null differ diff --git a/img/favicon.png b/img/favicon.png deleted file mode 100644 index c90bad40..00000000 Binary files a/img/favicon.png and /dev/null differ diff --git a/img/favicon.svg b/img/favicon.svg deleted file mode 100644 index 009bec74..00000000 --- a/img/favicon.svg +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index a2f3a396..67ef5121 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -23,6 +23,8 @@ namespace OCA\Contacts\AppInfo; use OCA\Contacts\Dav\PatchPlugin; +use OCA\Contacts\Listener\LoadContactsFilesActions; +use OCA\Files\Event\LoadAdditionalScriptsEvent; use OCP\AppFramework\App; use OCP\EventDispatcher\IEventDispatcher; use OCP\SabrePluginEvent; @@ -53,5 +55,8 @@ class Application extends App { $server->addPlugin($this->getContainer()->query(PatchPlugin::class)); } }); + + // Register files action + $eventDispatcher->addServiceListener(LoadAdditionalScriptsEvent::class, LoadContactsFilesActions::class); } } diff --git a/lib/Dav/PatchPlugin.php b/lib/Dav/PatchPlugin.php index 61f36b7a..6ef5fb4d 100644 --- a/lib/Dav/PatchPlugin.php +++ b/lib/Dav/PatchPlugin.php @@ -34,7 +34,6 @@ use Sabre\DAV\Server; use Sabre\DAV\ServerPlugin; use Sabre\HTTP\RequestInterface; use Sabre\HTTP\ResponseInterface; -use Sabre\VObject\Component\VCard; use Sabre\VObject\Reader; class PatchPlugin extends ServerPlugin { diff --git a/lib/Listener/LoadContactsFilesActions.php b/lib/Listener/LoadContactsFilesActions.php new file mode 100644 index 00000000..b60a525c --- /dev/null +++ b/lib/Listener/LoadContactsFilesActions.php @@ -0,0 +1,44 @@ + + * + * @author John Molakvoæ + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace OCA\Contacts\Listener; + +use OCA\Contacts\AppInfo\Application; +use OCA\Files\Event\LoadAdditionalScriptsEvent; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; +use OCP\Util; + +class LoadContactsFilesActions implements IEventListener { + public function handle(Event $event): void { + if (!($event instanceof LoadAdditionalScriptsEvent)) { + return; + } + + Util::addStyle(Application::APP_ID, 'icons'); + Util::addScript(Application::APP_ID, 'contacts-files-action'); + } +} diff --git a/src/components/ContactDetails.vue b/src/components/ContactDetails.vue index 0735a3d0..58d68ff6 100644 --- a/src/components/ContactDetails.vue +++ b/src/components/ContactDetails.vue @@ -23,7 +23,7 @@