1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-05 05:37:45 +02:00

v2.3.0 fix image sizes after upload, add translations, update composer

This commit is contained in:
trendschau
2024-03-14 15:29:09 +01:00
parent 1e1e5d609d
commit 6300bbf74b
10 changed files with 29 additions and 26 deletions

View File

@@ -80,7 +80,7 @@
<div class="lg:w-1/2 lg:bg-white lg:text-black p-5 bg-teal-600 text-white border-b border-white content-center flex justify-center items-center">
<div class="max-w-md content-center">
<h2 class="text-4xl py-5">{{ translate('Welcome back') }}!</h2>
<h2 class="text-4xl py-5">{{ translate('Welcome back') }}</h2>
<p>{{ translate('Login to the author area or go to the') }} <a class="underline" href="{{ url_for('home')}}">{{ translate('homepage') }}</a></p>
</div>
</div>

View File

@@ -1045,7 +1045,7 @@ bloxeditor.component('definition-component', {
<div class="flex mb-2" v-for="(description,ddindex) in element.descriptions">
<svg class="icon icon-dots-two-vertical mt-3"><use xlink:href="#icon-dots-two-vertical"></use></svg>
<textarea class="flex-grow p-2 focus:outline-none bg-stone-200 text-stone-900" :placeholder="description" v-html="element.descriptions[ddindex]" :disabled="disabled" @input="updatedescription($event, index, ddindex)" @keydown.13.prevent="enter" @blur="updateMarkdown"></textarea>
<button title="delete description" class="text-white bg-stone-700 w-6 h-6 text-xs hover:bg-rose-500" @click.prevent="deleteItem($event,index,ddindex)">
<button title="{{ $filters.translate('delete description') }}" class="text-white bg-stone-700 w-6 h-6 text-xs hover:bg-rose-500" @click.prevent="deleteItem($event,index,ddindex)">
<svg class="icon icon-minus">
<use xlink:href="#icon-minus"></use>
</svg>
@@ -1056,7 +1056,7 @@ bloxeditor.component('definition-component', {
<use xlink:href="#icon-plus"></use>
</svg>
</button>
<span class="text-sm">Add description</span>
<span class="text-sm">{{ $filters.translate('Add description') }}</span>
</div>
</div>
</div>
@@ -1458,9 +1458,9 @@ bloxeditor.component('image-component', {
<div class="flex">
<div class="imageupload relative w-1/2 border-r border-dotted border-stone-700">
<input type="file" name="image" accept="image/*" class="opacity-0 w-full h-24 absolute cursor-pointer z-10" @change="onFileChange( $event )" />
<p class="text-center p-6"><svg class="icon icon-upload"><use xlink:href="#icon-upload"></use></svg> drag a picture or click to select</p>
<p class="text-center p-6"><svg class="icon icon-upload"><use xlink:href="#icon-upload"></use></svg> {{ $filters.translate('drag a picture or click to select') }}</p>
</div>
<button class="imageselect w-1/2 text-center p-6" @click.prevent="openmedialib()"><svg class="icon icon-image"><use xlink:href="#icon-image"></use></svg> select from medialib</button>
<button class="imageselect w-1/2 text-center p-6" @click.prevent="openmedialib()"><svg class="icon icon-image"><use xlink:href="#icon-image"></use></svg> {{ $filters.translate('select from medialib') }}</button>
</div>
<Transition name="initial" appear>
@@ -1768,8 +1768,7 @@ bloxeditor.component('image-component', {
if(imgattr != '')
{
imgmarkdown = imgmarkdown + '{' + imgattr.trim() + '}';
}
}
if(this.imglink != '')
{
if(this.imglink.length < 101)
@@ -1781,7 +1780,6 @@ bloxeditor.component('image-component', {
errors = this.$filters.translate('Maximum size of image link is 100 characters');
}
}
if(this.imgcaption != '')
{
if(this.imgcaption.length < 140)
@@ -1793,7 +1791,6 @@ bloxeditor.component('image-component', {
errors = this.$filters.translate('Maximum size of image caption is 140 characters');
}
}
if(errors)
{
eventBus.$emit('publishermessage', errors);
@@ -1883,7 +1880,7 @@ bloxeditor.component('image-component', {
eventBus.$emit('publishermessage', message);
}
else
{
{
self = this;
self.load = true;
@@ -1897,7 +1894,7 @@ bloxeditor.component('image-component', {
reader.onload = function(e) {
self.imgpreview = e.target.result;
self.createmarkdown();
tmaxios.post('/api/v1/image',{
@@ -1912,6 +1909,12 @@ bloxeditor.component('image-component', {
self.imgmeta = true;
self.imgfile = response.data.name;
if(self.imgwidth > 820)
{
self.imgwidth = 820;
self.calculateheight();
}
})
.catch(function (error)
{
@@ -2115,7 +2118,7 @@ bloxeditor.component('file-component', {
}
else
{
errors = 'Maximum size of file-text is 100 characters';
errors = this.$filters.translate('Maximum size of file-text is 100 characters');
filemarkdown = '[]';
}
if(this.fileurl != '')
@@ -2126,7 +2129,7 @@ bloxeditor.component('file-component', {
}
else
{
errors = 'Maximum size of file link is 100 characters';
errors = this.$filters.translate('Maximum size of file link is 100 characters');
}
}
if(this.fileextension != '')

View File

@@ -30,7 +30,7 @@ const medialib = {
<div v-if="showimages && totalPages > 1 && active == 'allImages'">
<h3 class="border-b-2 border-stone-700 pt-6 pb-3">Pagination</h3>
<ul class="w-full flex flex-wrap py-3">
<ul class="w-full flex flex-wrap py-3 text-xs">
<li v-for="num in totalPages" :key="num" class="py-1">
<button
@click="goToPage(num)"