1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-03 20:57:38 +02:00

V2.7.0 fix favicon upload and prevent form webp-conversion

This commit is contained in:
trendschau
2024-07-10 13:03:24 +02:00
parent 2ba51b0eaf
commit f6fea928b2
12 changed files with 20 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 B

View File

@@ -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 '<pre>';
var_dump($params);
die('set wp');
$media->setExtension('webp');
}

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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);

View File

@@ -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'

View File

@@ -4,7 +4,7 @@
<div class="logo tl-l">
<p class="pv2 ma0">
<a class="link f4 fw4" href="{{ base_url }}" title="My Title">
<a class="link f5 fw4" href="{{ base_url }}" title="My Title">
{% if logo %}
<img src="{{ base_url }}/{{ logo }}" class="logo-image"/>
{% else %}