From f6fea928b23cb4d72b44dbc8fd51c7ac18da58e9 Mon Sep 17 00:00:00 2001 From: trendschau Date: Wed, 10 Jul 2024 13:03:24 +0200 Subject: [PATCH] V2.7.0 fix favicon upload and prevent form webp-conversion --- media/custom/favicon-114x114.png | Bin 518 -> 0 bytes media/custom/favicon-144x144.png | Bin 602 -> 0 bytes media/custom/favicon-16x16.png | Bin 238 -> 0 bytes media/custom/favicon-180x180.png | Bin 723 -> 0 bytes media/custom/favicon-32x32.png | Bin 288 -> 0 bytes media/custom/favicon-72x72.png | Bin 430 -> 0 bytes .../typemill/Controllers/ControllerApiImage.php | 5 ++++- system/typemill/Models/Storage.php | 2 +- system/typemill/author/css/custom.css | 11 ++++++++++- system/typemill/author/js/vue-forms.js | 4 +++- system/typemill/settings/system.yaml | 1 + themes/cyanine/landingpage.twig | 2 +- 12 files changed, 20 insertions(+), 5 deletions(-) delete mode 100644 media/custom/favicon-114x114.png delete mode 100644 media/custom/favicon-144x144.png delete mode 100644 media/custom/favicon-16x16.png delete mode 100644 media/custom/favicon-180x180.png delete mode 100644 media/custom/favicon-32x32.png delete mode 100644 media/custom/favicon-72x72.png diff --git a/media/custom/favicon-114x114.png b/media/custom/favicon-114x114.png deleted file mode 100644 index dc2e17a496867a8921d7a7d78887ef16eccdd406..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 518 zcmeAS@N?(olHy`uVBq!ia0vp^MIg+<1|<9Mw$=hE&H|6fVg?4jBOuH;Rhv(mfq`*{ zr;B4q#jUq@4852gMH(J%cT*K)TGSiW@q~%1iG9OY2D7;1hpuI3Oucu>EHo!rCnI~x zi&ZywTq~O-*>mXo_uG5=Z#JGx>8@LUz2#r6w;Mx{0&9?hBi9lKE)|bP5fGZdq&b0! z6Cu82-_|*wKAb!0xn=t{A4BJ_pNpr2hj%yLv9|6$yI7e^vP$=~#`^Wjvwr^TdVDpj zA8y94t;~&)p{}+wXC$?~nm&EW^X@6@tG3*Ft1(UIm5iyc@a9!f7rJVyl@mZ(Sb%nF zP5`-uHK;RvZT9Zn8}GaXYP4H^c}9<0ccaaY9R=%6gV(1@njb&@ZtE>&uu8DQUp-fy z`{vHv`NzGsXLm`?+PnXJ?W)N+m|oz>~BzUT$h*Ql3qRAsqd=AT%a{Vz>rzu&?MsVH_DTp>HFV08$PyWGZyxL vw0IepeW|_t=~XS%&;qGN4Mm_C|FYt*Cx$V~PMLfa7_khVu6{1-oD!M<85z@) diff --git a/media/custom/favicon-144x144.png b/media/custom/favicon-144x144.png deleted file mode 100644 index 9f4ebaeb10ba59744fde9c9669854b76a214cb19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 602 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q4M;wBd$a>caTa()7BevL9RXp+soH$f3=B*> zo-U3d6}R5rHS}V36lr+4Jx$Pa7DrP;;t^&KFKhh?+$!HU3cj&z-ops?&!LpKp-AWx&MJ(jXwf#Kfqm0Ax8haBu)wKmjKp z3n&0)DS)H|1i(@(EFh_l|4a3DMm&F@@XGIah;X#Iug<%7MQkM{RZ`Z+kC$m~e3~K@ zuC6XPKQ+(n3x_khp&n~qMBey)IoRa$&XsD{bi`b*ulD*EAF=vw->R#dyl1Yx{_)?R zIiJN}JbrqVt&$y=(|*{x?q`3++kWxheeyMd^wBj|=zsEnhb4#_gQ2lD&(r?|vZ22J#sPVg3wlYUvJtH*dc2?)%$-q}4A?*10d9bA5Nt+jnluuW$CAc|Y>it~XU~UFe2P z48Pbs@%HD>H{O)_nr`gBy6T2w*2ji4bMvwj$~@rU#U2Nk&H+XgBo6k!;f@aps6D$! RUyK0=JYD@<);T3K0RZ_6*<}C# diff --git a/media/custom/favicon-16x16.png b/media/custom/favicon-16x16.png deleted file mode 100644 index 04b4932a7f0f356be113f8abd99668efb4ae2157..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 238 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP;h~# zi(`nz>Et_0mVBAt$aLU{gW`f43}O<^!9kN6C$_d~`2PR@FZIX2Hk{vQ{lw4SC7RsTV7h%%(L?oH}(!%a`Z; i%f$ED)>^q33o|6$(l0pF#kdyeRt8U3KbLh*2~7Z$%v*5) diff --git a/media/custom/favicon-180x180.png b/media/custom/favicon-180x180.png deleted file mode 100644 index ddca05075de94336dd728eeb045d296e1912b461..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 723 zcmeAS@N?(olHy`uVBq!ia0vp^TR@nD4M^IaWitX&oCO|{#S9F5M?jcysy3fA0|Qg5 zr;B4q#jUq@ZM|XwC5}J*zxN#b^ppd~j;R%GZgV&=H{!+)&gn_&*UHSqR<>@rc|b(7 zNgy#nqTo@@9FZnX--*pW74ul{JhI)Nc(2iV&a-9jy&u?LlwxdRb8KGVc!5KTg%`{e zG=VaeGXx+^w+jjoW-m}3gbCIHVj}BqJH-}iue&(VZqA$(i$qIUSCitp?0hV<1x_hemZ-X(v0($$)GA{(8X7YJ?<#Oun#w^#p~e`s0m z=XWnO&L$*WQt=eKoO!Bh?`+5SrLlJLu{&A2#pC<>H}BcMy{KUUu0Z(19eTh0p3d~2 zWp(qmz4n=X=dj1L$hW=wcPvZDIx`sG>f%E8Z$mTmR&x_NfN z_g#AP_4JJFED9#6cv{@DM&-SO4e4hmWU3|L|SV z(M=WDx_NOY^SyaCCku46vL?76ynT7OWL^DFC*jj}_xJTG9W z_vf3f=YHJjmdrltGEr~AF0t_I59cYATNyTUK+ONe*A@PD+nsM!ukJlty@`jp#9rpq z=bCj~FG|fO=j>c^bcQ3)85dNKzb-yrI?L1lDAJjZ^OU&Y`CjpXyAn;7O>+M zba&m4?K4bTqvw6yMCn{BqnEpKbP0l+XkK Dv`D7> diff --git a/system/typemill/Controllers/ControllerApiImage.php b/system/typemill/Controllers/ControllerApiImage.php index a545470..4498765 100644 --- a/system/typemill/Controllers/ControllerApiImage.php +++ b/system/typemill/Controllers/ControllerApiImage.php @@ -189,8 +189,11 @@ class ControllerApiImage extends Controller } # for all other image types, check if they should be transformed to webp - if($this->settingActive('convertwebp')) + if(!isset($params['keepformat']) && $this->settingActive('convertwebp')) { + echo '
';
+			var_dump($params);
+			die('set wp');
 			$media->setExtension('webp');
 		}
 
diff --git a/system/typemill/Models/Storage.php b/system/typemill/Models/Storage.php
index 1bea062..40f36cc 100644
--- a/system/typemill/Models/Storage.php
+++ b/system/typemill/Models/Storage.php
@@ -741,7 +741,7 @@ class Storage
 
 		if(!$storedImage)
 		{
-			$this->errors[] = Translations::translate('Could not store the custom size of') . ' ' . $imageName;
+			$this->error = Translations::translate('Could not store the custom size of') . ' ' . $imageName;
 
 			return false;
 		}
diff --git a/system/typemill/author/css/custom.css b/system/typemill/author/css/custom.css
index 7a214bc..f30904b 100644
--- a/system/typemill/author/css/custom.css
+++ b/system/typemill/author/css/custom.css
@@ -52,11 +52,20 @@
 .fade-enter-active, .fade-leave-active {
   transition: opacity 0.5s ease-in-out;
 }
-
 .fade-enter, .fade-leave-to {
   opacity: 0;
 }
 
+/* enter or fade items in list with transition group */
+.list-enter-active, .list-leave-active {
+  transition: all 0.2s;
+}
+.list-enter, .list-leave-to {
+  opacity: 0;
+}
+
+
+
 .accordion-enter-active, .accordion-leave-active {
   transition: max-height 0.5s ease, padding 0.5s ease;
   overflow: hidden;
diff --git a/system/typemill/author/js/vue-forms.js b/system/typemill/author/js/vue-forms.js
index 49e697d..ab6a42d 100644
--- a/system/typemill/author/js/vue-forms.js
+++ b/system/typemill/author/js/vue-forms.js
@@ -741,7 +741,7 @@ app.component('component-customfields', {
 
 
 app.component('component-image', {
-	props: ['id', 'description', 'maxlength', 'hidden', 'readonly', 'required', 'disabled', 'placeholder', 'label', 'name', 'type', 'value', 'css', 'errors'],
+	props: ['id', 'description', 'maxlength', 'hidden', 'readonly', 'required', 'disabled', 'placeholder', 'label', 'name', 'type', 'value', 'css', 'errors', 'keepformat'],
 	components: {
 		medialib: medialib
 	},	
@@ -900,6 +900,7 @@ app.component('component-image', {
 				{
 					sharedself = this;
 					
+					let keepformat = this.keepformat ? true : false;
 					let reader = new FileReader();
 					reader.readAsDataURL(imageFile);
 					reader.onload = function(e) 
@@ -910,6 +911,7 @@ app.component('component-image', {
 							'image':			e.target.result,
 							'name': 			imageFile.name,
 							'publish':  		true,
+							'keepformat': 		keepformat
 						})
 					    .then(function (response) {
 							sharedself.update(response.data.name);
diff --git a/system/typemill/settings/system.yaml b/system/typemill/settings/system.yaml
index dd41ceb..e24e6e5 100644
--- a/system/typemill/settings/system.yaml
+++ b/system/typemill/settings/system.yaml
@@ -73,6 +73,7 @@ fieldsetmedia:
       type: image
       label: Favicon
       description: 'Only PNG format will work.'
+      keepformat: true
     liveimagewidth:
       type: number
       label: 'Standard width for live pictures'
diff --git a/themes/cyanine/landingpage.twig b/themes/cyanine/landingpage.twig
index d699bb6..c24a896 100644
--- a/themes/cyanine/landingpage.twig
+++ b/themes/cyanine/landingpage.twig
@@ -4,7 +4,7 @@