From 473e9f8c905ca2ee1f839f353d98f02540aecb03 Mon Sep 17 00:00:00 2001
From: Patrizio Bekerle <patrizio@bekerle.com>
Date: Tue, 8 Jun 2021 09:00:53 +0200
Subject: [PATCH] Implement cloud logo as svg background-image

---
 packages/file-handling/src/dbp-nextcloud-file-picker.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/packages/file-handling/src/dbp-nextcloud-file-picker.js b/packages/file-handling/src/dbp-nextcloud-file-picker.js
index 495a1e36..b8be6ba0 100644
--- a/packages/file-handling/src/dbp-nextcloud-file-picker.js
+++ b/packages/file-handling/src/dbp-nextcloud-file-picker.js
@@ -1040,9 +1040,12 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
                 margin: auto;
             }
 
-            .nextcloud-logo-icon{
+            .nextcloud-logo-image{
                 height: 100%;
                 width: 100%;
+                background-image: var(--dbp-override-image-nextcloud, url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 100 100' style='enable-background:new 0 0 100 100;' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M69.3,86.1l-46.1,0C11,85.9,1.1,75.9,1.1,63.7c0-11.8,9.1-21.4,20.6-22.4c0.5-15.2,13-27.4,28.3-27.4 c3.4,0,6.6,0.5,9.2,1.6c6.2,2.1,11.4,6.4,14.8,12c6.5,1,12.7,4.3,16.9,9.1c5,5.5,7.8,12.6,7.8,19.9C98.8,72.8,85.6,86.1,69.3,86.1z M23.6,80.6h45.7c13.3,0,24-10.8,24-24c0-6-2.3-11.8-6.4-16.2c-3.7-4.2-9.1-6.9-14.9-7.5l-1.4-0.2L70,31.4 c-2.8-5.1-7.2-8.9-12.6-10.7l-0.1,0c-2-0.8-4.5-1.2-7.2-1.2c-12.6,0-22.9,10.3-22.9,22.9v4.5h-3.6c-9.3,0-17,7.6-17,17 C6.6,73,14.3,80.6,23.6,80.6z'/%3E%3C/g%3E%3C/svg%3E%0A"));
+                background-repeat: no-repeat;
+                background-position: center;
             }
 
             .nextcloud-logo-sm{
@@ -1433,7 +1436,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
                 <link rel="stylesheet" href="${tabulatorCss}">
                 <div class="nextcloud-intro ${classMap({hidden: this.isPickerActive})}">
                     <div class="nextcloud-logo ${classMap({"nextcloud-logo-sm": this.isPickerActive})}">
-                        <dbp-icon name="nextcloud" class="nextcloud-logo-icon"></dbp-icon>
+                        <div class="nextcloud-logo-image"></div>
                     </div>
                     <div class="block text-center ${classMap({hidden: this.isPickerActive})}">
                         <h2 class="m-inherit">
-- 
GitLab