]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: add notification icon for transfer ownership
authorMaksim Sukharev <antreesy.web@gmail.com>
Wed, 16 Oct 2024 12:58:41 +0000 (14:58 +0200)
committerMaksim Sukharev <antreesy.web@gmail.com>
Thu, 17 Oct 2024 07:24:23 +0000 (09:24 +0200)
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
apps/files/img/folder-move.svg [new file with mode: 0644]
apps/files/lib/Notification/Notifier.php

diff --git a/apps/files/img/folder-move.svg b/apps/files/img/folder-move.svg
new file mode 100644 (file)
index 0000000..349106f
--- /dev/null
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-move" viewBox="0 0 24 24"><path d="M14,18V15H10V11H14V8L19,13M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z" /></svg>
\ No newline at end of file
index 10954ac9c6492a4b93dd9a278ed72ac623873244..caf707cc6e38e8a42421e3997fb204fb8c68c267 100644 (file)
@@ -88,6 +88,10 @@ class Notifier implements INotifier, IDismissableNotifier {
                        throw new \InvalidArgumentException('Unhandled app');
                }
 
+               $imagePath = $this->urlGenerator->imagePath('files', 'folder-move.svg');
+               $iconUrl = $this->urlGenerator->getAbsoluteURL($imagePath);
+               $notification->setIcon($iconUrl);
+
                return match($notification->getSubject()) {
                        'transferownershipRequest' => $this->handleTransferownershipRequest($notification, $languageCode),
                        'transferownershipRequestDenied' => $this->handleTransferOwnershipRequestDenied($notification, $languageCode),