@adminforth/upload 1.0.27 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<!-- Modal header -->
|
|
9
9
|
<div class="flex items-center justify-between p-3 md:p-4 border-b rounded-t dark:border-gray-600">
|
|
10
10
|
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">
|
|
11
|
-
{{ $('Generate image with AI') }}
|
|
11
|
+
{{ $t('Generate image with AI') }}
|
|
12
12
|
</h3>
|
|
13
13
|
<button type="button"
|
|
14
14
|
@click="emit('close')"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
|
17
17
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
|
18
18
|
</svg>
|
|
19
|
-
<span class="sr-only">{{ $('Close modal') }}</span>
|
|
19
|
+
<span class="sr-only">{{ $t('Close modal') }}</span>
|
|
20
20
|
</button>
|
|
21
21
|
</div>
|
|
22
22
|
<!-- Modal body -->
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
>
|
|
34
34
|
<div role="status" class="absolute -translate-x-1/2 -translate-y-1/2 top-2/4 left-1/2">
|
|
35
35
|
<svg aria-hidden="true" class="w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/><path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/></svg>
|
|
36
|
-
<span class="sr-only">{{ $('Loading...') }}</span>
|
|
36
|
+
<span class="sr-only">{{ $t('Loading...') }}</span>
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
<button @click="generateImages" type="button" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4
|
|
51
51
|
focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center
|
|
52
|
-
dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 ms-2">{{ $('Generate images') }}</button>
|
|
52
|
+
dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 ms-2">{{ $t('Generate images') }}</button>
|
|
53
53
|
|
|
54
54
|
</div>
|
|
55
55
|
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
<svg class="w-4 h-4 text-white dark:text-gray-800 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
|
|
63
63
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 1 1 5l4 4"/>
|
|
64
64
|
</svg>
|
|
65
|
-
<span class="sr-only">{{ $('Previous') }}</span>
|
|
65
|
+
<span class="sr-only">{{ $t('Previous') }}</span>
|
|
66
66
|
</span>
|
|
67
67
|
</button>
|
|
68
68
|
<button type="button" class="absolute top-0 end-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<svg class="w-4 h-4 text-white dark:text-gray-800 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
|
|
73
73
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
|
|
74
74
|
</svg>
|
|
75
|
-
<span class="sr-only">{{ $('Next') }}</span>
|
|
75
|
+
<span class="sr-only">{{ $t('Next') }}</span>
|
|
76
76
|
</span>
|
|
77
77
|
</button>
|
|
78
78
|
|
|
@@ -87,10 +87,10 @@
|
|
|
87
87
|
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center
|
|
88
88
|
dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800
|
|
89
89
|
disabled:opacity-50 disabled:cursor-not-allowed"
|
|
90
|
-
>{{ $('Use image') }}</button>
|
|
90
|
+
>{{ $t('Use image') }}</button>
|
|
91
91
|
<button type="button" class="py-2.5 px-5 ms-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"
|
|
92
92
|
@click="emit('close')"
|
|
93
|
-
>{{ $('Cancel') }}</button>
|
|
93
|
+
>{{ $t('Cancel') }}</button>
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
96
96
|
</div>
|
package/custom/preview.vue
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<svg class="w-4 h-4 me-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
26
26
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
|
|
27
27
|
</svg>
|
|
28
|
-
{{ $('Download file') }}
|
|
28
|
+
{{ $t('Download file') }}
|
|
29
29
|
</a>
|
|
30
30
|
</template>
|
|
31
31
|
|
package/custom/uploader.vue
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
|
|
51
51
|
</svg>
|
|
52
52
|
<p class="ml-2 text-sm text-green-600 dark:text-green-400 flex items-center">
|
|
53
|
-
{{ $('File uploaded') }}
|
|
53
|
+
{{ $t('File uploaded') }}
|
|
54
54
|
<span class="text-xs text-gray-500 dark:text-gray-400">{{ humanifySize(uploadedSize) }}</span>
|
|
55
55
|
</p>
|
|
56
56
|
|
|
@@ -106,7 +106,6 @@ watch(() => uploaded, (value) => {
|
|
|
106
106
|
|
|
107
107
|
function uploadGeneratedImage(imgBlob) {
|
|
108
108
|
// update the value
|
|
109
|
-
console.log('⚓⚓ Generated image uploaded:', imgBlob);
|
|
110
109
|
|
|
111
110
|
const file = new File([imgBlob], 'generated.png', { type: imgBlob.type });
|
|
112
111
|
onFileChange({
|
|
@@ -133,7 +132,7 @@ const allowedExtensionsLabel = computed(() => {
|
|
|
133
132
|
// make upper case and write in format EXT1, EXT2 or EXT3
|
|
134
133
|
let label = allowedExtensions.map(ext => ext.toUpperCase()).join(', ');
|
|
135
134
|
// last comma to 'or'
|
|
136
|
-
label = label.replace(/,([^,]*)$/, '
|
|
135
|
+
label = label.replace(/,([^,]*)$/, ` ${t('or')}$1`)
|
|
137
136
|
return label
|
|
138
137
|
});
|
|
139
138
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<!-- Modal header -->
|
|
9
9
|
<div class="flex items-center justify-between p-3 md:p-4 border-b rounded-t dark:border-gray-600">
|
|
10
10
|
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">
|
|
11
|
-
{{ $('Generate image with AI') }}
|
|
11
|
+
{{ $t('Generate image with AI') }}
|
|
12
12
|
</h3>
|
|
13
13
|
<button type="button"
|
|
14
14
|
@click="emit('close')"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
|
17
17
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
|
18
18
|
</svg>
|
|
19
|
-
<span class="sr-only">{{ $('Close modal') }}</span>
|
|
19
|
+
<span class="sr-only">{{ $t('Close modal') }}</span>
|
|
20
20
|
</button>
|
|
21
21
|
</div>
|
|
22
22
|
<!-- Modal body -->
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
>
|
|
34
34
|
<div role="status" class="absolute -translate-x-1/2 -translate-y-1/2 top-2/4 left-1/2">
|
|
35
35
|
<svg aria-hidden="true" class="w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/><path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/></svg>
|
|
36
|
-
<span class="sr-only">{{ $('Loading...') }}</span>
|
|
36
|
+
<span class="sr-only">{{ $t('Loading...') }}</span>
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
<button @click="generateImages" type="button" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4
|
|
51
51
|
focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center
|
|
52
|
-
dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 ms-2">{{ $('Generate images') }}</button>
|
|
52
|
+
dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 ms-2">{{ $t('Generate images') }}</button>
|
|
53
53
|
|
|
54
54
|
</div>
|
|
55
55
|
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
<svg class="w-4 h-4 text-white dark:text-gray-800 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
|
|
63
63
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 1 1 5l4 4"/>
|
|
64
64
|
</svg>
|
|
65
|
-
<span class="sr-only">{{ $('Previous') }}</span>
|
|
65
|
+
<span class="sr-only">{{ $t('Previous') }}</span>
|
|
66
66
|
</span>
|
|
67
67
|
</button>
|
|
68
68
|
<button type="button" class="absolute top-0 end-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<svg class="w-4 h-4 text-white dark:text-gray-800 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
|
|
73
73
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
|
|
74
74
|
</svg>
|
|
75
|
-
<span class="sr-only">{{ $('Next') }}</span>
|
|
75
|
+
<span class="sr-only">{{ $t('Next') }}</span>
|
|
76
76
|
</span>
|
|
77
77
|
</button>
|
|
78
78
|
|
|
@@ -87,10 +87,10 @@
|
|
|
87
87
|
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center
|
|
88
88
|
dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800
|
|
89
89
|
disabled:opacity-50 disabled:cursor-not-allowed"
|
|
90
|
-
>{{ $('Use image') }}</button>
|
|
90
|
+
>{{ $t('Use image') }}</button>
|
|
91
91
|
<button type="button" class="py-2.5 px-5 ms-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"
|
|
92
92
|
@click="emit('close')"
|
|
93
|
-
>{{ $('Cancel') }}</button>
|
|
93
|
+
>{{ $t('Cancel') }}</button>
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
96
96
|
</div>
|
package/dist/custom/preview.vue
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<svg class="w-4 h-4 me-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
26
26
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
|
|
27
27
|
</svg>
|
|
28
|
-
{{ $('Download file') }}
|
|
28
|
+
{{ $t('Download file') }}
|
|
29
29
|
</a>
|
|
30
30
|
</template>
|
|
31
31
|
|
package/dist/custom/uploader.vue
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
|
|
51
51
|
</svg>
|
|
52
52
|
<p class="ml-2 text-sm text-green-600 dark:text-green-400 flex items-center">
|
|
53
|
-
{{ $('File uploaded') }}
|
|
53
|
+
{{ $t('File uploaded') }}
|
|
54
54
|
<span class="text-xs text-gray-500 dark:text-gray-400">{{ humanifySize(uploadedSize) }}</span>
|
|
55
55
|
</p>
|
|
56
56
|
|
|
@@ -106,7 +106,6 @@ watch(() => uploaded, (value) => {
|
|
|
106
106
|
|
|
107
107
|
function uploadGeneratedImage(imgBlob) {
|
|
108
108
|
// update the value
|
|
109
|
-
console.log('⚓⚓ Generated image uploaded:', imgBlob);
|
|
110
109
|
|
|
111
110
|
const file = new File([imgBlob], 'generated.png', { type: imgBlob.type });
|
|
112
111
|
onFileChange({
|
|
@@ -133,7 +132,7 @@ const allowedExtensionsLabel = computed(() => {
|
|
|
133
132
|
// make upper case and write in format EXT1, EXT2 or EXT3
|
|
134
133
|
let label = allowedExtensions.map(ext => ext.toUpperCase()).join(', ');
|
|
135
134
|
// last comma to 'or'
|
|
136
|
-
label = label.replace(/,([^,]*)$/, '
|
|
135
|
+
label = label.replace(/,([^,]*)$/, ` ${t('or')}$1`)
|
|
137
136
|
return label
|
|
138
137
|
});
|
|
139
138
|
|