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
2.4 KiB
PHP
66 lines
2.4 KiB
PHP
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
return [
|
||
|
||
'back' => 'Πίσω',
|
||
|
||
'beta' => 'Βήτα',
|
||
|
||
'confirm_modal' => [
|
||
'cannot_be_undone' => 'Αυτό δεν μπορεί να αναιρεθεί.',
|
||
'type' => 'Πληκτρολογήστε',
|
||
'to_confirm' => 'για επιβεβαίωση.',
|
||
'copy_to_clipboard' => 'Αντιγραφή στο πρόχειρο',
|
||
'delete_keyword' => 'διαγραφή',
|
||
],
|
||
|
||
'photo_upload' => [
|
||
'upload' => 'Μεταφόρτωση',
|
||
'uploading' => 'Μεταφόρτωση...',
|
||
'remove' => 'Αφαίρεση φωτογραφίας',
|
||
'hint' => 'Συνιστάται: τετράγωνη εικόνα, έως 2 MB.',
|
||
'crop_title' => 'Περικοπή εικόνας',
|
||
'crop_description' => 'Σύρετε και κάντε ζουμ για πλαισίωση.',
|
||
'crop_hint' => 'Σύρετε για επανατοποθέτηση',
|
||
'crop_save' => 'Αποθήκευση',
|
||
'crop_cancel' => 'Άκυρο',
|
||
],
|
||
|
||
'timezone' => [
|
||
'select' => 'Επιλογή ζώνης ώρας',
|
||
'search' => 'Αναζήτηση ζώνης ώρας...',
|
||
'empty' => 'Δεν βρέθηκε ζώνη ώρας',
|
||
],
|
||
|
||
'date_picker' => [
|
||
'select' => 'Επιλογή ημερομηνίας',
|
||
],
|
||
|
||
'date_range_picker' => [
|
||
'placeholder' => 'Επιλέξτε εύρος ημερομηνιών',
|
||
'today' => 'Σήμερα',
|
||
'yesterday' => 'Χθες',
|
||
'last_7_days' => 'Τελευταίες 7 ημέρες',
|
||
'last_30_days' => 'Τελευταίες 30 ημέρες',
|
||
'last_3_months' => 'Τελευταίοι 3 μήνες',
|
||
'last_6_months' => 'Τελευταίοι 6 μήνες',
|
||
'last_12_months' => 'Τελευταίοι 12 μήνες',
|
||
'this_month' => 'Αυτόν τον μήνα',
|
||
'last_month' => 'Προηγούμενος μήνας',
|
||
'year_to_date' => 'Από την αρχή του έτους',
|
||
'last_year' => 'Πέρσι',
|
||
],
|
||
|
||
'cancel' => 'Ακύρωση',
|
||
'clear' => 'Καθαρισμός',
|
||
'close' => 'Κλείσιμο',
|
||
'loading_more' => 'Φόρτωση περισσότερων...',
|
||
|
||
'actions' => [
|
||
'copy' => 'Αντιγραφή',
|
||
'copied' => 'Αντιγράφηκε',
|
||
'copy_failed' => 'Αποτυχία αντιγραφής στο πρόχειρο',
|
||
],
|
||
];
|