From 39269d46fc606685531e8beb2cc060b8e58a33a0 Mon Sep 17 00:00:00 2001
From: Michael Kainz <michael.kainz@open-xchange.com>
Date: Tue, 14 Mar 2023 15:23:02 +0100
Subject: [PATCH] Custom Icons are possible

---
 spec/pwa_test.js           | 4 ++--
 src/plugins/webmanifest.js | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/spec/pwa_test.js b/spec/pwa_test.js
index a5405c4..e27d9c5 100644
--- a/spec/pwa_test.js
+++ b/spec/pwa_test.js
@@ -31,7 +31,7 @@ describe('Service delivers a generated web-manifest', function () {
               enabled: true,
               name: 'Valid App Suite',
               shortName: 'Valid App Suite',
-              icon: '/themes/default/logo_512.png',
+              icon: '/mycustomlogo.png',
               iconWidthHeight: 512,
               backgroundColor: 'white'
             }
@@ -46,7 +46,7 @@ describe('Service delivers a generated web-manifest', function () {
       short_name: 'Valid App Suite',
       icons: [
         {
-          src: '/themes/default/logo_512.png',
+          src: '/mycustomlogo.png',
           type: 'image/png',
           sizes: '512x512',
           purpose: 'any'
diff --git a/src/plugins/webmanifest.js b/src/plugins/webmanifest.js
index 9216a98..67fd5ad 100644
--- a/src/plugins/webmanifest.js
+++ b/src/plugins/webmanifest.js
@@ -69,7 +69,7 @@ async function fetchWebManifest (url) {
 function buildManifestFromData (userData) {
   const manifestData = {}
 
-  if (userData.icons) {
+  if (userData.icon) {
     manifestData.icons = [{
       src: userData.icon,
       type: getTypeFromPath(userData.icon),
-- 
GitLab