From 1a189640f10c91eb3c519837e4228d5eb955517a Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Thu, 9 Feb 2023 13:24:43 +0000 Subject: [PATCH] Integrated favicon handler with correct files & actions Format does not look 100% correct though, won't show in Firefox/gimp. --- app/Settings/AppSettingsStore.php | 2 ++ app/Uploads/FaviconHandler.php | 25 +++++++++++++++++++------ public/favicon.ico | Bin 10933 -> 3134 bytes public/icon.ico | Bin 0 -> 10933 bytes tests/Settings/SettingsTest.php | 14 ++++++++++++++ 5 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 public/icon.ico diff --git a/app/Settings/AppSettingsStore.php b/app/Settings/AppSettingsStore.php index d830df639..e6fc466ba 100644 --- a/app/Settings/AppSettingsStore.php +++ b/app/Settings/AppSettingsStore.php @@ -51,6 +51,8 @@ class AppSettingsStore $this->destroyExistingSettingImage('app-icon-' . $size); setting()->remove('app-icon-' . $size); } + + $this->faviconHandler->restoreOriginal(); } } diff --git a/app/Uploads/FaviconHandler.php b/app/Uploads/FaviconHandler.php index 78c9a899b..f61e7ae64 100644 --- a/app/Uploads/FaviconHandler.php +++ b/app/Uploads/FaviconHandler.php @@ -17,19 +17,32 @@ class FaviconHandler */ public function saveForUploadedImage(UploadedFile $file): void { + $targetPath = public_path('favicon.ico'); + if (!is_writeable($targetPath)) { + return; + } + $imageData = file_get_contents($file->getRealPath()); $image = $this->imageTool->make($imageData); $image->resize(32, 32); $bmpData = $image->encode('bmp'); $icoData = $this->bmpToIco($bmpData, 32, 32); - // TODO - Below are test paths - file_put_contents(public_path('uploads/test.ico'), $icoData); - file_put_contents(public_path('uploads/test.bmp'), $bmpData); + file_put_contents($targetPath, $icoData); + } - // TODO - Permission check for icon overwrite - // TODO - Write to correct location - // TODO - Handle deletion and restore of original icon on user icon clear + /** + * Restore the original favicon image. + */ + public function restoreOriginal(): void + { + $targetPath = public_path('favicon.ico'); + $original = public_path('icon.ico'); + if (!is_writeable($targetPath)) { + return; + } + + copy($original, $targetPath); } /** diff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pjk&N@jduYH?_0PcHZx{)p*?2 zN%ontE!W?)-rlOEI;PI^)Djm(?A9ue;tL0g-wJM2eCk+28%LpZmq&m|wvq^{bBgBT zA-LzMt0)Sf#pr+wZZ}|Z@5ViSK8DtFs<(052T5NQZ?iaIb?f`~g1vCRG<#A-L+H07 zY_r}9<5o8;@k)c>=labqv*C2&%b2pCV9U_QzQuY-IbPDoDxkQVS=f_77V`rsAa*m5 zKoF&3j%YwdZGW#Im&UkG8rA5U&sbYYbbQ!1`m0V+KKKUmL+fQVr*Z(k?q$1v_7R? z`SLQ`fT>x@MaAjXQU0s8{Tf%L$V)ZojPYeq*=gP?J!ih?>@9OA*9Aplc zt9~xq%6B>1ytn}+hyL(>#n znT!B#iphKpwB;S{gL|S&hGGOX53ZK%+5_4o)oAbD8Jd>)FLeC`E?-OETz(&}Z_Ugz zWltcob@@D)V5#$*?4S0=zZ0-dCPeD-4SN9Nc=Z010758SPQ^_~~toGD@P=khYN+pLUS8|78C7)T^I_~sc z7nhkAX1?BW$ki`00*pqVrN_4>MV0Mj)q{sQ@0%tv*ZIJ?jWxhUA(#&0v2RB2g$FG6z;MnQ>sSp8P-KZKz;QW4js^D~>Y)m6Xx^*(5cd`^w7jmx z(~q#05dn5LO8lDm`X_6b9PxE&sQf_mIA2p{uph2`uZUteThnc`@;BKheA& zKy_HU}@zJvTh< z`YiYtUC6CEnlBaQqQ}J@e9tZXj#md-Lb7LNnD&l;bR+gZsYy?J)bT`Kg)U}gL(vfi zt1=E5y4p(GUq18jx&qd-pitxdwHLYrlBdi#au-+uJX&Ev+LJB zZzZ!k4ct>Fd9Re;kGZ`uFV(UqIix7oawu(Laz$IdNp~*jKrc70ar1evpxKvSPS?N6(WX2Xx`Z zSs}ij4P2@xyp*p=q{Gho8l`fjm~`Y><dh XHrNJO5L3!r00000NkvXXu0mjfR=v%1 diff --git a/public/icon.ico b/public/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..41655ccba55f8dd5f250471eb2e8928b21a85992 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?-OETz(&}Z_Ugz zWltcob@@D)V5#$*?4S0=zZ0-dCPeD-4SN9Nc=Z010758SPQ^_~~toGD@P=khYN+pLUS8|78C7)T^I_~sc z7nhkAX1?BW$ki`00*pqVrN_4>MV0Mj)q{sQ@0%tv*ZIJ?jWxhUA(#&0v2RB2g$FG6z;MnQ>sSp8P-KZKz;QW4js^D~>Y)m6Xx^*(5cd`^w7jmx z(~q#05dn5LO8lDm`X_6b9PxE&sQf_mIA2p{uph2`uZUteThnc`@;BKheA& zKy_HU}@zJvTh< z`YiYtUC6CEnlBaQqQ}J@e9tZXj#md-Lb7LNnD&l;bR+gZsYy?J)bT`Kg)U}gL(vfi zt1=E5y4p(GUq18jx&qd-pitxdwHLYrlBdi#au-+uJX&Ev+LJB zZzZ!k4ct>Fd9Re;kGZ`uFV(UqIix7oawu(Laz$IdNp~*jKrc70ar1evpxKvSPS?N6(WX2Xx`Z zSs}ij4P2@xyp*p=q{Gho8l`fjm~`Y><dh XHrNJO5L3!r00000NkvXXu0mjfR=v%1 literal 0 HcmV?d00001 diff --git a/tests/Settings/SettingsTest.php b/tests/Settings/SettingsTest.php index 30bb50f7c..fb952585a 100644 --- a/tests/Settings/SettingsTest.php +++ b/tests/Settings/SettingsTest.php @@ -52,6 +52,10 @@ class SettingsTest extends TestCase $this->assertFalse(setting()->get('app-icon-128')); $this->assertFalse(setting()->get('app-icon-64')); $this->assertFalse(setting()->get('app-icon-32')); + $this->assertEquals( + file_get_contents(public_path('icon.ico')), + file_get_contents(public_path('favicon.ico')), + ); $prevFileCount = count(glob(dirname($expectedPath) . DIRECTORY_SEPARATOR . '*.png')); @@ -71,6 +75,11 @@ class SettingsTest extends TestCase $resp = $this->get('/'); $this->withHtml($resp)->assertElementCount('link[sizes][href*="my-app-icon"]', 6); + $this->assertNotEquals( + file_get_contents(public_path('icon.ico')), + file_get_contents(public_path('favicon.ico')), + ); + $reset = $this->post('/settings/customization', ['app_icon_reset' => 'true']); $reset->assertRedirect('/settings/customization'); @@ -81,5 +90,10 @@ class SettingsTest extends TestCase $this->assertFalse(setting()->get('app-icon-128')); $this->assertFalse(setting()->get('app-icon-64')); $this->assertFalse(setting()->get('app-icon-32')); + + $this->assertEquals( + file_get_contents(public_path('icon.ico')), + file_get_contents(public_path('favicon.ico')), + ); } }