Selecting an avatar or workspace logo now opens a crop dialog (drag + zoom) before uploading, so the image is framed the way it renders. The crop is performed client-side and the resized 512x512 result is what gets uploaded. This reworks the idea from #131 without its cropper dependency: vue-advanced-cropper was last released ~2 years ago and we did not want an unmaintained package for something this load-bearing. What we need is narrow (fixed 1:1, a circle/square mask, fixed-size output), so a small canvas-based cropper covers it: - imageCrop.ts: pure transform math (cover-fit, clamp, zoom, viewport->source). - ImageCropperDialog.vue: CSS-transform preview, pointer drag, wheel/button zoom, a ResizeObserver to measure the modal (no requestAnimationFrame timing hacks), and a canvas toBlob only on save. - PhotoUpload.vue: opens the cropper on file select; the mask shape follows the display shape (round avatar / square logo) instead of always being round. - crop_* strings added to all 15 locales. Also installs Pest browser testing (pest-plugin-browser + Playwright) and adds a browser test for the crop flow. TestCase only calls withoutVite() for non-browser tests, since browser tests need the real Vite assets to boot the SPA. The Pest browser server does not parse multipart uploads, so the test asserts the crop dispatches the correct upload request; endpoint persistence stays covered by ProfileUpdateTest.
66 lines
1.8 KiB
PHP
66 lines
1.8 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
return [
|
|
|
|
'back' => 'Volver',
|
|
|
|
'beta' => 'Beta',
|
|
|
|
'confirm_modal' => [
|
|
'cannot_be_undone' => 'Esta acción no se puede deshacer.',
|
|
'type' => 'Escribe',
|
|
'to_confirm' => 'para confirmar.',
|
|
'copy_to_clipboard' => 'Copiar al portapapeles',
|
|
'delete_keyword' => 'eliminar',
|
|
],
|
|
|
|
'photo_upload' => [
|
|
'upload' => 'Subir',
|
|
'uploading' => 'Subiendo...',
|
|
'remove' => 'Eliminar foto',
|
|
'hint' => 'Recomendado: imagen cuadrada, máximo 2 MB.',
|
|
'crop_title' => 'Recortar imagen',
|
|
'crop_description' => 'Arrastra y haz zoom para encuadrarla.',
|
|
'crop_hint' => 'Arrastra para reposicionar',
|
|
'crop_save' => 'Guardar',
|
|
'crop_cancel' => 'Cancelar',
|
|
],
|
|
|
|
'timezone' => [
|
|
'select' => 'Seleccionar zona horaria',
|
|
'search' => 'Buscar zona horaria...',
|
|
'empty' => 'No se encontró zona horaria',
|
|
],
|
|
|
|
'date_picker' => [
|
|
'select' => 'Seleccionar fecha',
|
|
],
|
|
|
|
'date_range_picker' => [
|
|
'placeholder' => 'Elige un período',
|
|
'today' => 'Hoy',
|
|
'yesterday' => 'Ayer',
|
|
'last_7_days' => 'Últimos 7 días',
|
|
'last_30_days' => 'Últimos 30 días',
|
|
'last_3_months' => 'Últimos 3 meses',
|
|
'last_6_months' => 'Últimos 6 meses',
|
|
'last_12_months' => 'Últimos 12 meses',
|
|
'this_month' => 'Este mes',
|
|
'last_month' => 'Mes pasado',
|
|
'year_to_date' => 'Desde inicio del año',
|
|
'last_year' => 'Año pasado',
|
|
],
|
|
|
|
'cancel' => 'Cancelar',
|
|
'clear' => 'Limpiar',
|
|
'close' => 'Cerrar',
|
|
'loading_more' => 'Cargando más...',
|
|
|
|
'actions' => [
|
|
'copy' => 'Copiar',
|
|
'copied' => 'Copiado',
|
|
'copy_failed' => 'No se pudo copiar al portapapeles',
|
|
],
|
|
];
|