feat: complete i18n support with 13 languages and bug fixes
- Add translations for: ar, de, es, fr, it, ja, ko, nl, pl, ru, tr, uk, zh_CN - Fix raw_payload not being saved in messages - Fix content field stored as array instead of JSON string - Fix profilePicUrl extraction from Evolution API - Add content preview column in messages table - Improve message display with proper text/media handling
This commit is contained in:
127
README.md
127
README.md
@@ -93,75 +93,100 @@ FilamentEvolutionPlugin::make()
|
||||
|
||||
## Configuration
|
||||
|
||||
Add these variables to your `.env` file:
|
||||
### Environment Variables (.env)
|
||||
|
||||
### Required Settings
|
||||
Only API credentials should be in your `.env` file:
|
||||
|
||||
```env
|
||||
# Evolution API Connection
|
||||
# Evolution API Connection (Required)
|
||||
EVOLUTION_URL=https://your-evolution-api.com
|
||||
EVOLUTION_API_KEY=your_api_key
|
||||
|
||||
# Webhook (Required for receiving events)
|
||||
EVOLUTION_URL_WEBHOOK=https://your-app.com/api/webhooks/evolution
|
||||
EVOLUTION_WEBHOOK_ENABLED=true
|
||||
# Webhook URL (Required for receiving events)
|
||||
EVOLUTION_WEBHOOK_URL=https://your-app.com/api/evolution/webhook
|
||||
|
||||
# Webhook Secret (Optional - for security)
|
||||
EVOLUTION_WEBHOOK_SECRET=your_secret_key
|
||||
|
||||
# Default Instance (Optional - for single instance setups)
|
||||
EVOLUTION_DEFAULT_INSTANCE=your_instance_id
|
||||
```
|
||||
|
||||
### Optional Settings
|
||||
### Config File
|
||||
|
||||
```env
|
||||
# QR Code Settings
|
||||
EVOLUTION_QRCODE_EXPIRES=30
|
||||
All other settings are in `config/filament-evolution.php`. Publish and customize:
|
||||
|
||||
# Instance Defaults
|
||||
EVOLUTION_REJECT_CALL=false
|
||||
EVOLUTION_MSG_CALL="I can't answer calls right now"
|
||||
EVOLUTION_GROUPS_IGNORE=false
|
||||
EVOLUTION_ALWAYS_ONLINE=false
|
||||
EVOLUTION_READ_MESSAGES=false
|
||||
EVOLUTION_READ_STATUS=false
|
||||
EVOLUTION_SYNC_HISTORY=false
|
||||
|
||||
# Media Storage
|
||||
EVOLUTION_MEDIA_DISK=public
|
||||
EVOLUTION_MEDIA_DIRECTORY=whatsapp-media
|
||||
EVOLUTION_MEDIA_MAX_SIZE=16384
|
||||
|
||||
# Queue Configuration
|
||||
EVOLUTION_QUEUE_ENABLED=true
|
||||
EVOLUTION_QUEUE_CONNECTION=redis
|
||||
EVOLUTION_QUEUE_NAME=whatsapp
|
||||
|
||||
# Storage (save webhooks and messages to database)
|
||||
EVOLUTION_STORE_WEBHOOKS=true
|
||||
EVOLUTION_STORE_MESSAGES=true
|
||||
```bash
|
||||
php artisan vendor:publish --tag="filament-evolution-config"
|
||||
```
|
||||
|
||||
### Queue Settings
|
||||
Key configuration options:
|
||||
|
||||
| Variable | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `EVOLUTION_QUEUE_ENABLED` | `true` | Enable/disable queue processing |
|
||||
| `EVOLUTION_QUEUE_CONNECTION` | `null` | Queue connection (null = default) |
|
||||
| `EVOLUTION_QUEUE_NAME` | `default` | Queue name for processing webhooks |
|
||||
```php
|
||||
// config/filament-evolution.php
|
||||
|
||||
### Storage Settings
|
||||
return [
|
||||
// Queue settings
|
||||
'queue' => [
|
||||
'enabled' => true,
|
||||
'connection' => null, // null = default connection
|
||||
'name' => 'default', // queue name
|
||||
],
|
||||
|
||||
| Variable | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `EVOLUTION_STORE_WEBHOOKS` | `true` | Save webhook events to database |
|
||||
| `EVOLUTION_STORE_MESSAGES` | `true` | Save messages to database |
|
||||
// Storage settings
|
||||
'storage' => [
|
||||
'webhooks' => true, // save webhooks to database
|
||||
'messages' => true, // save messages to database
|
||||
],
|
||||
|
||||
> **Note:** Disabling storage improves performance but you lose history and the Message/Webhook resources will be empty.
|
||||
// Cleanup policy (automatic deletion of old records)
|
||||
'cleanup' => [
|
||||
'webhooks_days' => 30, // delete webhooks older than 30 days
|
||||
'messages_days' => 90, // delete messages older than 90 days
|
||||
],
|
||||
|
||||
### Multi-Tenancy Settings
|
||||
// Instance defaults
|
||||
'instance' => [
|
||||
'reject_call' => false,
|
||||
'always_online' => false,
|
||||
// ...
|
||||
],
|
||||
|
||||
```env
|
||||
EVOLUTION_TENANCY_ENABLED=true
|
||||
EVOLUTION_TENANT_COLUMN=team_id
|
||||
EVOLUTION_TENANT_TABLE=teams
|
||||
EVOLUTION_TENANT_MODEL=App\Models\Team
|
||||
EVOLUTION_TENANT_COLUMN_TYPE=uuid
|
||||
// Multi-tenancy
|
||||
'tenancy' => [
|
||||
'enabled' => false,
|
||||
'column' => 'team_id',
|
||||
'table' => 'teams',
|
||||
'model' => 'App\\Models\\Team',
|
||||
],
|
||||
];
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Cleanup Command
|
||||
|
||||
The plugin includes a cleanup command to remove old records:
|
||||
|
||||
```bash
|
||||
# Run cleanup with config settings
|
||||
php artisan evolution:cleanup
|
||||
|
||||
# Preview what would be deleted (dry run)
|
||||
php artisan evolution:cleanup --dry-run
|
||||
|
||||
# Override config settings
|
||||
php artisan evolution:cleanup --webhooks-days=7 --messages-days=30
|
||||
```
|
||||
|
||||
### Scheduling Cleanup
|
||||
|
||||
Add to your `routes/console.php`:
|
||||
|
||||
```php
|
||||
use Illuminate\Support\Facades\Schedule;
|
||||
|
||||
Schedule::command('evolution:cleanup')->daily();
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -5,20 +5,20 @@ declare(strict_types=1);
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Evolution API Connection
|
||||
| Evolution API Connection (Required - .env)
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These settings are required and must be defined in your .env file.
|
||||
| NEVER store these credentials in the database!
|
||||
| These are the only settings that MUST be in your .env file.
|
||||
| All other settings can be customized directly in this config file.
|
||||
|
|
||||
*/
|
||||
'api' => [
|
||||
'base_url' => env('EVOLUTION_URL', env('EVOLUTION_API_URL', 'http://localhost:8080')),
|
||||
'base_url' => env('EVOLUTION_URL'),
|
||||
'api_key' => env('EVOLUTION_API_KEY'),
|
||||
'timeout' => env('EVOLUTION_TIMEOUT', 30),
|
||||
'timeout' => 30,
|
||||
'retry' => [
|
||||
'times' => 3,
|
||||
'sleep' => 100, // ms
|
||||
'sleep' => 100, // milliseconds
|
||||
],
|
||||
],
|
||||
|
||||
@@ -27,18 +27,13 @@ return [
|
||||
| Webhook Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The secret is used to validate that webhooks come from Evolution API.
|
||||
| URL and secret should be in .env, other settings are optional.
|
||||
|
|
||||
*/
|
||||
'webhook' => [
|
||||
'enabled' => env('EVOLUTION_WEBHOOK_ENABLED', true),
|
||||
'url' => env('EVOLUTION_URL_WEBHOOK'),
|
||||
'path' => env('EVOLUTION_WEBHOOK_PATH', 'api/evolution/webhook'),
|
||||
'url' => env('EVOLUTION_WEBHOOK_URL'),
|
||||
'secret' => env('EVOLUTION_WEBHOOK_SECRET'),
|
||||
'verify_signature' => env('EVOLUTION_VERIFY_SIGNATURE', true),
|
||||
'by_events' => env('EVOLUTION_WEBHOOK_BY_EVENTS', false),
|
||||
'base64' => env('EVOLUTION_WEBHOOK_BASE64', false),
|
||||
'queue' => env('EVOLUTION_WEBHOOK_QUEUE', 'default'),
|
||||
'path' => 'api/evolution/webhook',
|
||||
'events' => [
|
||||
'APPLICATION_STARTUP',
|
||||
'QRCODE_UPDATED',
|
||||
@@ -47,6 +42,7 @@ return [
|
||||
'SEND_MESSAGE',
|
||||
'PRESENCE_UPDATE',
|
||||
'MESSAGES_UPSERT',
|
||||
'MESSAGES_UPDATE',
|
||||
],
|
||||
],
|
||||
|
||||
@@ -59,39 +55,15 @@ return [
|
||||
|
|
||||
*/
|
||||
'instance' => [
|
||||
'integration' => env('EVOLUTION_INTEGRATION', 'WHATSAPP-BAILEYS'),
|
||||
'qrcode_expires_in' => env('EVOLUTION_QRCODE_EXPIRES', 30), // seconds
|
||||
'reject_call' => env('EVOLUTION_REJECT_CALL', false),
|
||||
'msg_call' => env('EVOLUTION_MSG_CALL', ''),
|
||||
'groups_ignore' => env('EVOLUTION_GROUPS_IGNORE', false),
|
||||
'always_online' => env('EVOLUTION_ALWAYS_ONLINE', false),
|
||||
'read_messages' => env('EVOLUTION_READ_MESSAGES', false),
|
||||
'read_status' => env('EVOLUTION_READ_STATUS', false),
|
||||
'sync_full_history' => env('EVOLUTION_SYNC_HISTORY', false),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filament Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| UI settings for Filament panel integration.
|
||||
| Labels and translations are handled via lang files.
|
||||
|
|
||||
*/
|
||||
'filament' => [
|
||||
'navigation_sort' => 100,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'cache' => [
|
||||
'enabled' => env('EVOLUTION_CACHE_ENABLED', true),
|
||||
'ttl' => env('EVOLUTION_CACHE_TTL', 60), // seconds
|
||||
'prefix' => 'evolution_',
|
||||
'integration' => 'WHATSAPP-BAILEYS',
|
||||
'qrcode_expires_in' => 30, // seconds
|
||||
'reject_call' => false,
|
||||
'msg_call' => '',
|
||||
'groups_ignore' => false,
|
||||
'always_online' => false,
|
||||
'read_messages' => false,
|
||||
'read_status' => false,
|
||||
'sync_full_history' => false,
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -99,14 +71,13 @@ return [
|
||||
| Queue Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configure which queue connection and queue name to use for processing
|
||||
| webhooks and sending messages. Set to null to use the default queue.
|
||||
| Configure queue for processing webhooks and sending messages.
|
||||
|
|
||||
*/
|
||||
'queue' => [
|
||||
'enabled' => env('EVOLUTION_QUEUE_ENABLED', true),
|
||||
'connection' => env('EVOLUTION_QUEUE_CONNECTION'),
|
||||
'name' => env('EVOLUTION_QUEUE_NAME', 'default'),
|
||||
'enabled' => true,
|
||||
'connection' => null, // null = use default connection
|
||||
'name' => 'default',
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -119,22 +90,37 @@ return [
|
||||
|
|
||||
*/
|
||||
'storage' => [
|
||||
'webhooks' => env('EVOLUTION_STORE_WEBHOOKS', true),
|
||||
'messages' => env('EVOLUTION_STORE_MESSAGES', true),
|
||||
'webhooks' => true,
|
||||
'messages' => true,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Media Storage Configuration
|
||||
| Cleanup Policy
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Automatic cleanup of old records. Set days to null to disable cleanup.
|
||||
| Run the cleanup command: php artisan evolution:cleanup
|
||||
| Schedule it in your app/Console/Kernel.php or routes/console.php
|
||||
|
|
||||
*/
|
||||
'cleanup' => [
|
||||
'webhooks_days' => 30, // Delete webhooks older than X days (null = never)
|
||||
'messages_days' => 90, // Delete messages older than X days (null = never)
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Media Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configuration for media file uploads when sending messages.
|
||||
|
|
||||
*/
|
||||
'media' => [
|
||||
'disk' => env('EVOLUTION_MEDIA_DISK', 'public'),
|
||||
'directory' => env('EVOLUTION_MEDIA_DIRECTORY', 'whatsapp-media'),
|
||||
'max_size' => env('EVOLUTION_MEDIA_MAX_SIZE', 16384), // KB (16MB default)
|
||||
'disk' => 'public',
|
||||
'directory' => 'whatsapp-media',
|
||||
'max_size' => 16384, // KB (16MB default)
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -143,20 +129,44 @@ return [
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default instance ID to use when sending messages without specifying one.
|
||||
| Useful for simple use cases with a single WhatsApp instance.
|
||||
|
|
||||
*/
|
||||
'default_instance' => env('EVOLUTION_DEFAULT_INSTANCE'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filament Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| UI settings for Filament panel integration.
|
||||
|
|
||||
*/
|
||||
'filament' => [
|
||||
'navigation_sort' => 100,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'cache' => [
|
||||
'enabled' => true,
|
||||
'ttl' => 60, // seconds
|
||||
'prefix' => 'evolution_',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Logging
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'logging' => [
|
||||
'enabled' => env('EVOLUTION_LOGGING', true),
|
||||
'channel' => env('EVOLUTION_LOG_CHANNEL'),
|
||||
'log_payloads' => env('EVOLUTION_LOG_PAYLOADS', false),
|
||||
'enabled' => true,
|
||||
'channel' => null, // null = use default channel
|
||||
'webhook_events' => false,
|
||||
'webhook_errors' => true,
|
||||
'log_payloads' => false,
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -165,23 +175,13 @@ return [
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configuration for Filament multi-tenancy support.
|
||||
| When enabled, migrations will include the tenant foreign key
|
||||
| and models will automatically scope queries by tenant.
|
||||
|
|
||||
*/
|
||||
'tenancy' => [
|
||||
'enabled' => env('EVOLUTION_TENANCY_ENABLED', false),
|
||||
|
||||
// Tenant column name (e.g., 'team_id', 'company_id', 'tenant_id')
|
||||
'column' => env('EVOLUTION_TENANT_COLUMN', 'team_id'),
|
||||
|
||||
// Tenant table for foreign key (e.g., 'teams', 'companies', 'tenants')
|
||||
'table' => env('EVOLUTION_TENANT_TABLE', 'teams'),
|
||||
|
||||
// Tenant model class (e.g., App\Models\Team::class)
|
||||
'model' => env('EVOLUTION_TENANT_MODEL', 'App\\Models\\Team'),
|
||||
|
||||
// Tenant column type ('uuid' or 'id')
|
||||
'column_type' => env('EVOLUTION_TENANT_COLUMN_TYPE', 'uuid'),
|
||||
'enabled' => false,
|
||||
'column' => 'team_id',
|
||||
'table' => 'teams',
|
||||
'model' => 'App\\Models\\Team',
|
||||
'column_type' => 'uuid', // 'uuid' or 'id'
|
||||
],
|
||||
];
|
||||
|
||||
42
resources/lang/ar/action.php
Normal file
42
resources/lang/ar/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'إرسال رسالة واتساب',
|
||||
'modal_heading' => 'إرسال رسالة واتساب',
|
||||
'modal_description' => 'إرسال رسالة إلى رقم واتساب.',
|
||||
'send' => 'إرسال الرسالة',
|
||||
|
||||
// Form fields
|
||||
'instance' => 'المثيل',
|
||||
'instance_helper' => 'اختر مثيل واتساب لإرسال الرسالة منه.',
|
||||
'number' => 'رقم الهاتف',
|
||||
'number_helper' => 'أدخل رقم الهاتف مع رمز البلد (مثال: 5511999999999).',
|
||||
'type' => 'نوع الرسالة',
|
||||
'message' => 'الرسالة',
|
||||
'message_placeholder' => 'اكتب رسالتك هنا...',
|
||||
'caption' => 'التعليق',
|
||||
'caption_placeholder' => 'تعليق اختياري للوسائط...',
|
||||
'media' => 'ملف الوسائط',
|
||||
'media_helper' => 'قم بتحميل الملف المراد إرساله.',
|
||||
|
||||
// Location fields
|
||||
'latitude' => 'خط العرض',
|
||||
'longitude' => 'خط الطول',
|
||||
'location_name' => 'اسم الموقع',
|
||||
'location_name_placeholder' => 'مثال: مكتبي',
|
||||
'location_address' => 'العنوان',
|
||||
'location_address_placeholder' => 'مثال: 123 الشارع الرئيسي، المدينة',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => 'اسم جهة الاتصال',
|
||||
'contact_number' => 'هاتف جهة الاتصال',
|
||||
|
||||
// Notifications
|
||||
'success_title' => 'تم إرسال الرسالة!',
|
||||
'success_body' => 'تم إرسال رسالة واتساب الخاصة بك بنجاح.',
|
||||
'error_title' => 'فشل الإرسال',
|
||||
'missing_required_fields' => 'معرف المثيل ورقم الهاتف مطلوبان.',
|
||||
'unsupported_type' => 'نوع رسالة غير مدعوم.',
|
||||
];
|
||||
51
resources/lang/ar/enums.php
Normal file
51
resources/lang/ar/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => 'متصل',
|
||||
'connecting' => 'جاري الاتصال',
|
||||
'close' => 'غير متصل',
|
||||
'refused' => 'مرفوض',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => 'نص',
|
||||
'image' => 'صورة',
|
||||
'audio' => 'صوت',
|
||||
'video' => 'فيديو',
|
||||
'document' => 'مستند',
|
||||
'location' => 'موقع',
|
||||
'contact' => 'جهة اتصال',
|
||||
'sticker' => 'ملصق',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => 'وارد',
|
||||
'outgoing' => 'صادر',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => 'قيد الانتظار',
|
||||
'sent' => 'مرسل',
|
||||
'delivered' => 'تم التسليم',
|
||||
'read' => 'مقروء',
|
||||
'failed' => 'فشل',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => 'بدء التطبيق',
|
||||
'qrcode_updated' => 'تم تحديث رمز QR',
|
||||
'connection_update' => 'تحديث الاتصال',
|
||||
'messages_set' => 'تعيين الرسائل',
|
||||
'messages_upsert' => 'رسالة مستلمة',
|
||||
'messages_update' => 'تحديث الرسالة',
|
||||
'messages_delete' => 'حذف الرسالة',
|
||||
'send_message' => 'رسالة مرسلة',
|
||||
'presence_update' => 'تحديث التواجد',
|
||||
'new_token' => 'رمز جديد',
|
||||
'logout_instance' => 'تسجيل خروج المثيل',
|
||||
'remove_instance' => 'إزالة المثيل',
|
||||
],
|
||||
];
|
||||
34
resources/lang/ar/message.php
Normal file
34
resources/lang/ar/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'الرسائل',
|
||||
'model_label' => 'رسالة',
|
||||
'plural_model_label' => 'الرسائل',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => 'معلومات الرسالة',
|
||||
'content' => 'المحتوى',
|
||||
'timestamps' => 'الطوابع الزمنية',
|
||||
'raw_payload' => 'البيانات الخام',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'المثيل',
|
||||
'direction' => 'الاتجاه',
|
||||
'phone' => 'الهاتف',
|
||||
'type' => 'النوع',
|
||||
'content' => 'المحتوى',
|
||||
'status' => 'الحالة',
|
||||
'message_id' => 'معرف الرسالة',
|
||||
'media' => 'الوسائط',
|
||||
'media_caption' => 'تعليق الوسائط',
|
||||
'media_url' => 'رابط الوسائط',
|
||||
'location' => 'الموقع',
|
||||
'sent_at' => 'تاريخ الإرسال',
|
||||
'delivered_at' => 'تاريخ التسليم',
|
||||
'read_at' => 'تاريخ القراءة',
|
||||
'created_at' => 'تاريخ الإنشاء',
|
||||
],
|
||||
];
|
||||
21
resources/lang/ar/qrcode.php
Normal file
21
resources/lang/ar/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => 'اتصال :instance',
|
||||
'loading' => 'جاري التحميل...',
|
||||
'connected' => 'متصل',
|
||||
'waiting_scan' => 'في انتظار المسح',
|
||||
'error' => 'خطأ في الاتصال',
|
||||
'expires_in' => 'ينتهي في',
|
||||
'connected_title' => 'تم اتصال واتساب!',
|
||||
'connected_description' => 'مثيل واتساب الخاص بك متصل وجاهز لإرسال واستقبال الرسائل.',
|
||||
'error_title' => 'خطأ في الاتصال',
|
||||
'try_again' => 'حاول مرة أخرى',
|
||||
'scan_instructions' => 'افتح واتساب على هاتفك، اذهب إلى الإعدادات > الأجهزة المرتبطة > ربط جهاز، وامسح رمز QR هذا.',
|
||||
'or_use_code' => 'أو أدخل هذا الرمز على هاتفك:',
|
||||
'copied' => 'تم النسخ!',
|
||||
'refresh' => 'تحديث رمز QR',
|
||||
'generate' => 'إنشاء رمز QR',
|
||||
];
|
||||
60
resources/lang/ar/resource.php
Normal file
60
resources/lang/ar/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'المثيلات',
|
||||
'navigation_group' => 'واتساب',
|
||||
'model_label' => 'مثيل',
|
||||
'plural_model_label' => 'المثيلات',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => 'معلومات المثيل',
|
||||
'settings' => 'الإعدادات',
|
||||
'connection' => 'الاتصال',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => 'اسم المثيل',
|
||||
'name_helper' => 'اسم فريد لتحديد هذا المثيل',
|
||||
'number' => 'رقم الهاتف',
|
||||
'number_helper' => 'رقم هاتف واتساب مع رمز البلد',
|
||||
'status' => 'الحالة',
|
||||
'profile_picture' => 'صورة الملف الشخصي',
|
||||
'reject_call' => 'رفض المكالمات',
|
||||
'reject_call_helper' => 'رفض المكالمات الواردة تلقائيًا',
|
||||
'msg_call' => 'رسالة الرفض',
|
||||
'msg_call_helper' => 'الرسالة المرسلة عند رفض المكالمة',
|
||||
'groups_ignore' => 'تجاهل المجموعات',
|
||||
'groups_ignore_helper' => 'عدم معالجة الرسائل من المجموعات',
|
||||
'always_online' => 'متصل دائمًا',
|
||||
'always_online_helper' => 'إبقاء الحالة كمتصل',
|
||||
'read_messages' => 'قراءة الرسائل',
|
||||
'read_messages_helper' => 'وضع علامة مقروء على الرسائل تلقائيًا',
|
||||
'read_status' => 'قراءة الحالة',
|
||||
'read_status_helper' => 'عرض تحديثات الحالة تلقائيًا',
|
||||
'sync_full_history' => 'مزامنة السجل الكامل',
|
||||
'sync_full_history_helper' => 'مزامنة جميع سجل الرسائل عند الاتصال',
|
||||
'created_at' => 'تاريخ الإنشاء',
|
||||
'updated_at' => 'تاريخ التحديث',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => 'اتصال',
|
||||
'disconnect' => 'قطع الاتصال',
|
||||
'delete' => 'حذف',
|
||||
'refresh' => 'تحديث',
|
||||
'view_qrcode' => 'عرض رمز QR',
|
||||
'close' => 'إغلاق',
|
||||
'back' => 'العودة للقائمة',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => 'تم إنشاء المثيل بنجاح',
|
||||
'updated' => 'تم تحديث المثيل بنجاح',
|
||||
'deleted' => 'تم حذف المثيل بنجاح',
|
||||
'connected' => 'تم الاتصال بالمثيل بنجاح',
|
||||
'disconnected' => 'تم قطع اتصال المثيل بنجاح',
|
||||
'connection_failed' => 'فشل الاتصال بالمثيل',
|
||||
],
|
||||
];
|
||||
31
resources/lang/ar/webhook.php
Normal file
31
resources/lang/ar/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'سجلات Webhook',
|
||||
'model_label' => 'سجل Webhook',
|
||||
'plural_model_label' => 'سجلات Webhook',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'معلومات Webhook',
|
||||
'payload' => 'البيانات',
|
||||
'error' => 'الخطأ',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'المثيل',
|
||||
'event' => 'الحدث',
|
||||
'processed' => 'تمت المعالجة',
|
||||
'has_error' => 'يوجد خطأ',
|
||||
'error' => 'الخطأ',
|
||||
'processing_time' => 'وقت المعالجة',
|
||||
'created_at' => 'تاريخ الإنشاء',
|
||||
'updated_at' => 'تاريخ التحديث',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => 'نعم',
|
||||
'no' => 'لا',
|
||||
],
|
||||
];
|
||||
42
resources/lang/de/action.php
Normal file
42
resources/lang/de/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'WhatsApp-Nachricht senden',
|
||||
'modal_heading' => 'WhatsApp-Nachricht senden',
|
||||
'modal_description' => 'Senden Sie eine Nachricht an eine WhatsApp-Nummer.',
|
||||
'send' => 'Nachricht senden',
|
||||
|
||||
// Form fields
|
||||
'instance' => 'Instanz',
|
||||
'instance_helper' => 'Wählen Sie die WhatsApp-Instanz zum Senden der Nachricht.',
|
||||
'number' => 'Telefonnummer',
|
||||
'number_helper' => 'Geben Sie die Telefonnummer mit Ländervorwahl ein (z.B. 4915123456789).',
|
||||
'type' => 'Nachrichtentyp',
|
||||
'message' => 'Nachricht',
|
||||
'message_placeholder' => 'Geben Sie hier Ihre Nachricht ein...',
|
||||
'caption' => 'Beschriftung',
|
||||
'caption_placeholder' => 'Optionale Beschriftung für die Medien...',
|
||||
'media' => 'Mediendatei',
|
||||
'media_helper' => 'Laden Sie die zu sendende Datei hoch.',
|
||||
|
||||
// Location fields
|
||||
'latitude' => 'Breitengrad',
|
||||
'longitude' => 'Längengrad',
|
||||
'location_name' => 'Ortsname',
|
||||
'location_name_placeholder' => 'z.B. Mein Büro',
|
||||
'location_address' => 'Adresse',
|
||||
'location_address_placeholder' => 'z.B. Hauptstraße 123, Stadt',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => 'Kontaktname',
|
||||
'contact_number' => 'Kontakttelefon',
|
||||
|
||||
// Notifications
|
||||
'success_title' => 'Nachricht gesendet!',
|
||||
'success_body' => 'Ihre WhatsApp-Nachricht wurde erfolgreich gesendet.',
|
||||
'error_title' => 'Senden fehlgeschlagen',
|
||||
'missing_required_fields' => 'Instanz-ID und Telefonnummer sind erforderlich.',
|
||||
'unsupported_type' => 'Nicht unterstützter Nachrichtentyp.',
|
||||
];
|
||||
51
resources/lang/de/enums.php
Normal file
51
resources/lang/de/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => 'Verbunden',
|
||||
'connecting' => 'Verbinden',
|
||||
'close' => 'Getrennt',
|
||||
'refused' => 'Abgelehnt',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => 'Text',
|
||||
'image' => 'Bild',
|
||||
'audio' => 'Audio',
|
||||
'video' => 'Video',
|
||||
'document' => 'Dokument',
|
||||
'location' => 'Standort',
|
||||
'contact' => 'Kontakt',
|
||||
'sticker' => 'Sticker',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => 'Eingehend',
|
||||
'outgoing' => 'Ausgehend',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => 'Ausstehend',
|
||||
'sent' => 'Gesendet',
|
||||
'delivered' => 'Zugestellt',
|
||||
'read' => 'Gelesen',
|
||||
'failed' => 'Fehlgeschlagen',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => 'Anwendungsstart',
|
||||
'qrcode_updated' => 'QR-Code aktualisiert',
|
||||
'connection_update' => 'Verbindungsaktualisierung',
|
||||
'messages_set' => 'Nachrichten gesetzt',
|
||||
'messages_upsert' => 'Nachricht empfangen',
|
||||
'messages_update' => 'Nachricht aktualisiert',
|
||||
'messages_delete' => 'Nachricht gelöscht',
|
||||
'send_message' => 'Nachricht gesendet',
|
||||
'presence_update' => 'Präsenzaktualisierung',
|
||||
'new_token' => 'Neuer Token',
|
||||
'logout_instance' => 'Instanz-Abmeldung',
|
||||
'remove_instance' => 'Instanz entfernt',
|
||||
],
|
||||
];
|
||||
34
resources/lang/de/message.php
Normal file
34
resources/lang/de/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Nachrichten',
|
||||
'model_label' => 'Nachricht',
|
||||
'plural_model_label' => 'Nachrichten',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => 'Nachrichteninformationen',
|
||||
'content' => 'Inhalt',
|
||||
'timestamps' => 'Zeitstempel',
|
||||
'raw_payload' => 'Rohdaten',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Instanz',
|
||||
'direction' => 'Richtung',
|
||||
'phone' => 'Telefon',
|
||||
'type' => 'Typ',
|
||||
'content' => 'Inhalt',
|
||||
'status' => 'Status',
|
||||
'message_id' => 'Nachrichten-ID',
|
||||
'media' => 'Medien',
|
||||
'media_caption' => 'Medienbeschriftung',
|
||||
'media_url' => 'Medien-URL',
|
||||
'location' => 'Standort',
|
||||
'sent_at' => 'Gesendet am',
|
||||
'delivered_at' => 'Zugestellt am',
|
||||
'read_at' => 'Gelesen am',
|
||||
'created_at' => 'Erstellt am',
|
||||
],
|
||||
];
|
||||
21
resources/lang/de/qrcode.php
Normal file
21
resources/lang/de/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => 'Verbinden :instance',
|
||||
'loading' => 'Laden...',
|
||||
'connected' => 'Verbunden',
|
||||
'waiting_scan' => 'Warten auf Scan',
|
||||
'error' => 'Verbindungsfehler',
|
||||
'expires_in' => 'Läuft ab in',
|
||||
'connected_title' => 'WhatsApp verbunden!',
|
||||
'connected_description' => 'Ihre WhatsApp-Instanz ist verbunden und bereit zum Senden und Empfangen von Nachrichten.',
|
||||
'error_title' => 'Verbindungsfehler',
|
||||
'try_again' => 'Erneut versuchen',
|
||||
'scan_instructions' => 'Öffnen Sie WhatsApp auf Ihrem Telefon, gehen Sie zu Einstellungen > Verknüpfte Geräte > Gerät verknüpfen und scannen Sie diesen QR-Code.',
|
||||
'or_use_code' => 'Oder geben Sie diesen Code auf Ihrem Telefon ein:',
|
||||
'copied' => 'Kopiert!',
|
||||
'refresh' => 'QR-Code aktualisieren',
|
||||
'generate' => 'QR-Code generieren',
|
||||
];
|
||||
60
resources/lang/de/resource.php
Normal file
60
resources/lang/de/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Instanzen',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => 'Instanz',
|
||||
'plural_model_label' => 'Instanzen',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => 'Instanzinformationen',
|
||||
'settings' => 'Einstellungen',
|
||||
'connection' => 'Verbindung',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => 'Instanzname',
|
||||
'name_helper' => 'Ein eindeutiger Name zur Identifizierung dieser Instanz',
|
||||
'number' => 'Telefonnummer',
|
||||
'number_helper' => 'Die WhatsApp-Telefonnummer mit Ländervorwahl',
|
||||
'status' => 'Status',
|
||||
'profile_picture' => 'Profilbild',
|
||||
'reject_call' => 'Anrufe ablehnen',
|
||||
'reject_call_helper' => 'Eingehende Anrufe automatisch ablehnen',
|
||||
'msg_call' => 'Ablehnungsnachricht',
|
||||
'msg_call_helper' => 'Nachricht, die beim Ablehnen eines Anrufs gesendet wird',
|
||||
'groups_ignore' => 'Gruppen ignorieren',
|
||||
'groups_ignore_helper' => 'Nachrichten aus Gruppen nicht verarbeiten',
|
||||
'always_online' => 'Immer online',
|
||||
'always_online_helper' => 'Status als online halten',
|
||||
'read_messages' => 'Nachrichten lesen',
|
||||
'read_messages_helper' => 'Nachrichten automatisch als gelesen markieren',
|
||||
'read_status' => 'Status lesen',
|
||||
'read_status_helper' => 'Statusaktualisierungen automatisch anzeigen',
|
||||
'sync_full_history' => 'Vollständigen Verlauf synchronisieren',
|
||||
'sync_full_history_helper' => 'Gesamten Nachrichtenverlauf bei Verbindung synchronisieren',
|
||||
'created_at' => 'Erstellt am',
|
||||
'updated_at' => 'Aktualisiert am',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => 'Verbinden',
|
||||
'disconnect' => 'Trennen',
|
||||
'delete' => 'Löschen',
|
||||
'refresh' => 'Aktualisieren',
|
||||
'view_qrcode' => 'QR-Code anzeigen',
|
||||
'close' => 'Schließen',
|
||||
'back' => 'Zurück zur Liste',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => 'Instanz erfolgreich erstellt',
|
||||
'updated' => 'Instanz erfolgreich aktualisiert',
|
||||
'deleted' => 'Instanz erfolgreich gelöscht',
|
||||
'connected' => 'Instanz erfolgreich verbunden',
|
||||
'disconnected' => 'Instanz erfolgreich getrennt',
|
||||
'connection_failed' => 'Verbindung zur Instanz fehlgeschlagen',
|
||||
],
|
||||
];
|
||||
31
resources/lang/de/webhook.php
Normal file
31
resources/lang/de/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Webhook-Protokolle',
|
||||
'model_label' => 'Webhook-Protokoll',
|
||||
'plural_model_label' => 'Webhook-Protokolle',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Webhook-Informationen',
|
||||
'payload' => 'Nutzlast',
|
||||
'error' => 'Fehler',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Instanz',
|
||||
'event' => 'Ereignis',
|
||||
'processed' => 'Verarbeitet',
|
||||
'has_error' => 'Hat Fehler',
|
||||
'error' => 'Fehler',
|
||||
'processing_time' => 'Verarbeitungszeit',
|
||||
'created_at' => 'Erstellt am',
|
||||
'updated_at' => 'Aktualisiert am',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => 'Ja',
|
||||
'no' => 'Nein',
|
||||
],
|
||||
];
|
||||
42
resources/lang/es/action.php
Normal file
42
resources/lang/es/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'Enviar Mensaje de WhatsApp',
|
||||
'modal_heading' => 'Enviar Mensaje de WhatsApp',
|
||||
'modal_description' => 'Enviar un mensaje a un número de WhatsApp.',
|
||||
'send' => 'Enviar Mensaje',
|
||||
|
||||
// Form fields
|
||||
'instance' => 'Instancia',
|
||||
'instance_helper' => 'Seleccione la instancia de WhatsApp para enviar el mensaje.',
|
||||
'number' => 'Número de Teléfono',
|
||||
'number_helper' => 'Ingrese el número de teléfono con código de país (ej: 5491155555555).',
|
||||
'type' => 'Tipo de Mensaje',
|
||||
'message' => 'Mensaje',
|
||||
'message_placeholder' => 'Escriba su mensaje aquí...',
|
||||
'caption' => 'Leyenda',
|
||||
'caption_placeholder' => 'Leyenda opcional para el archivo...',
|
||||
'media' => 'Archivo Multimedia',
|
||||
'media_helper' => 'Suba el archivo a enviar.',
|
||||
|
||||
// Location fields
|
||||
'latitude' => 'Latitud',
|
||||
'longitude' => 'Longitud',
|
||||
'location_name' => 'Nombre del Lugar',
|
||||
'location_name_placeholder' => 'ej: Mi Oficina',
|
||||
'location_address' => 'Dirección',
|
||||
'location_address_placeholder' => 'ej: Calle Principal 123, Ciudad',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => 'Nombre del Contacto',
|
||||
'contact_number' => 'Teléfono del Contacto',
|
||||
|
||||
// Notifications
|
||||
'success_title' => '¡Mensaje Enviado!',
|
||||
'success_body' => 'Su mensaje de WhatsApp ha sido enviado exitosamente.',
|
||||
'error_title' => 'Error al Enviar',
|
||||
'missing_required_fields' => 'El ID de instancia y el número de teléfono son requeridos.',
|
||||
'unsupported_type' => 'Tipo de mensaje no soportado.',
|
||||
];
|
||||
51
resources/lang/es/enums.php
Normal file
51
resources/lang/es/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => 'Conectado',
|
||||
'connecting' => 'Conectando',
|
||||
'close' => 'Desconectado',
|
||||
'refused' => 'Rechazado',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => 'Texto',
|
||||
'image' => 'Imagen',
|
||||
'audio' => 'Audio',
|
||||
'video' => 'Video',
|
||||
'document' => 'Documento',
|
||||
'location' => 'Ubicación',
|
||||
'contact' => 'Contacto',
|
||||
'sticker' => 'Sticker',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => 'Entrante',
|
||||
'outgoing' => 'Saliente',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => 'Pendiente',
|
||||
'sent' => 'Enviado',
|
||||
'delivered' => 'Entregado',
|
||||
'read' => 'Leído',
|
||||
'failed' => 'Fallido',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => 'Inicio de Aplicación',
|
||||
'qrcode_updated' => 'Código QR Actualizado',
|
||||
'connection_update' => 'Actualización de Conexión',
|
||||
'messages_set' => 'Mensajes Establecidos',
|
||||
'messages_upsert' => 'Mensaje Recibido',
|
||||
'messages_update' => 'Mensaje Actualizado',
|
||||
'messages_delete' => 'Mensaje Eliminado',
|
||||
'send_message' => 'Mensaje Enviado',
|
||||
'presence_update' => 'Actualización de Presencia',
|
||||
'new_token' => 'Nuevo Token',
|
||||
'logout_instance' => 'Cierre de Sesión de Instancia',
|
||||
'remove_instance' => 'Instancia Eliminada',
|
||||
],
|
||||
];
|
||||
34
resources/lang/es/message.php
Normal file
34
resources/lang/es/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Mensajes',
|
||||
'model_label' => 'Mensaje',
|
||||
'plural_model_label' => 'Mensajes',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => 'Información del Mensaje',
|
||||
'content' => 'Contenido',
|
||||
'timestamps' => 'Marcas de Tiempo',
|
||||
'raw_payload' => 'Datos Crudos',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Instancia',
|
||||
'direction' => 'Dirección',
|
||||
'phone' => 'Teléfono',
|
||||
'type' => 'Tipo',
|
||||
'content' => 'Contenido',
|
||||
'status' => 'Estado',
|
||||
'message_id' => 'ID del Mensaje',
|
||||
'media' => 'Multimedia',
|
||||
'media_caption' => 'Leyenda del Archivo',
|
||||
'media_url' => 'URL del Archivo',
|
||||
'location' => 'Ubicación',
|
||||
'sent_at' => 'Enviado el',
|
||||
'delivered_at' => 'Entregado el',
|
||||
'read_at' => 'Leído el',
|
||||
'created_at' => 'Creado el',
|
||||
],
|
||||
];
|
||||
21
resources/lang/es/qrcode.php
Normal file
21
resources/lang/es/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => 'Conectar :instance',
|
||||
'loading' => 'Cargando...',
|
||||
'connected' => 'Conectado',
|
||||
'waiting_scan' => 'Esperando escaneo',
|
||||
'error' => 'Error de conexión',
|
||||
'expires_in' => 'Expira en',
|
||||
'connected_title' => '¡WhatsApp Conectado!',
|
||||
'connected_description' => 'Su instancia de WhatsApp está conectada y lista para enviar y recibir mensajes.',
|
||||
'error_title' => 'Error de Conexión',
|
||||
'try_again' => 'Intentar de Nuevo',
|
||||
'scan_instructions' => 'Abra WhatsApp en su teléfono, vaya a Configuración > Dispositivos Vinculados > Vincular un Dispositivo, y escanee este código QR.',
|
||||
'or_use_code' => 'O ingrese este código en su teléfono:',
|
||||
'copied' => '¡Copiado!',
|
||||
'refresh' => 'Actualizar Código QR',
|
||||
'generate' => 'Generar Código QR',
|
||||
];
|
||||
60
resources/lang/es/resource.php
Normal file
60
resources/lang/es/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Instancias',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => 'Instancia',
|
||||
'plural_model_label' => 'Instancias',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => 'Información de la Instancia',
|
||||
'settings' => 'Configuración',
|
||||
'connection' => 'Conexión',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => 'Nombre de la Instancia',
|
||||
'name_helper' => 'Un nombre único para identificar esta instancia',
|
||||
'number' => 'Número de Teléfono',
|
||||
'number_helper' => 'El número de teléfono de WhatsApp con código de país',
|
||||
'status' => 'Estado',
|
||||
'profile_picture' => 'Foto de Perfil',
|
||||
'reject_call' => 'Rechazar Llamadas',
|
||||
'reject_call_helper' => 'Rechazar automáticamente las llamadas entrantes',
|
||||
'msg_call' => 'Mensaje de Rechazo',
|
||||
'msg_call_helper' => 'Mensaje enviado al rechazar una llamada',
|
||||
'groups_ignore' => 'Ignorar Grupos',
|
||||
'groups_ignore_helper' => 'No procesar mensajes de grupos',
|
||||
'always_online' => 'Siempre en Línea',
|
||||
'always_online_helper' => 'Mantener el estado como en línea',
|
||||
'read_messages' => 'Leer Mensajes',
|
||||
'read_messages_helper' => 'Marcar automáticamente los mensajes como leídos',
|
||||
'read_status' => 'Leer Estado',
|
||||
'read_status_helper' => 'Ver automáticamente las actualizaciones de estado',
|
||||
'sync_full_history' => 'Sincronizar Historial Completo',
|
||||
'sync_full_history_helper' => 'Sincronizar todo el historial de mensajes al conectar',
|
||||
'created_at' => 'Creado el',
|
||||
'updated_at' => 'Actualizado el',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => 'Conectar',
|
||||
'disconnect' => 'Desconectar',
|
||||
'delete' => 'Eliminar',
|
||||
'refresh' => 'Actualizar',
|
||||
'view_qrcode' => 'Ver Código QR',
|
||||
'close' => 'Cerrar',
|
||||
'back' => 'Volver a la Lista',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => 'Instancia creada exitosamente',
|
||||
'updated' => 'Instancia actualizada exitosamente',
|
||||
'deleted' => 'Instancia eliminada exitosamente',
|
||||
'connected' => 'Instancia conectada exitosamente',
|
||||
'disconnected' => 'Instancia desconectada exitosamente',
|
||||
'connection_failed' => 'Error al conectar la instancia',
|
||||
],
|
||||
];
|
||||
31
resources/lang/es/webhook.php
Normal file
31
resources/lang/es/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Registros de Webhook',
|
||||
'model_label' => 'Registro de Webhook',
|
||||
'plural_model_label' => 'Registros de Webhook',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Información del Webhook',
|
||||
'payload' => 'Carga Útil',
|
||||
'error' => 'Error',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Instancia',
|
||||
'event' => 'Evento',
|
||||
'processed' => 'Procesado',
|
||||
'has_error' => 'Tiene Error',
|
||||
'error' => 'Error',
|
||||
'processing_time' => 'Tiempo de Procesamiento',
|
||||
'created_at' => 'Creado el',
|
||||
'updated_at' => 'Actualizado el',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => 'Sí',
|
||||
'no' => 'No',
|
||||
],
|
||||
];
|
||||
42
resources/lang/fr/action.php
Normal file
42
resources/lang/fr/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'Envoyer un Message WhatsApp',
|
||||
'modal_heading' => 'Envoyer un Message WhatsApp',
|
||||
'modal_description' => 'Envoyer un message à un numéro WhatsApp.',
|
||||
'send' => 'Envoyer le Message',
|
||||
|
||||
// Form fields
|
||||
'instance' => 'Instance',
|
||||
'instance_helper' => 'Sélectionnez l\'instance WhatsApp pour envoyer le message.',
|
||||
'number' => 'Numéro de Téléphone',
|
||||
'number_helper' => 'Entrez le numéro de téléphone avec l\'indicatif du pays (ex: 33612345678).',
|
||||
'type' => 'Type de Message',
|
||||
'message' => 'Message',
|
||||
'message_placeholder' => 'Tapez votre message ici...',
|
||||
'caption' => 'Légende',
|
||||
'caption_placeholder' => 'Légende optionnelle pour le média...',
|
||||
'media' => 'Fichier Média',
|
||||
'media_helper' => 'Téléchargez le fichier à envoyer.',
|
||||
|
||||
// Location fields
|
||||
'latitude' => 'Latitude',
|
||||
'longitude' => 'Longitude',
|
||||
'location_name' => 'Nom du Lieu',
|
||||
'location_name_placeholder' => 'ex: Mon Bureau',
|
||||
'location_address' => 'Adresse',
|
||||
'location_address_placeholder' => 'ex: 123 Rue Principale, Ville',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => 'Nom du Contact',
|
||||
'contact_number' => 'Téléphone du Contact',
|
||||
|
||||
// Notifications
|
||||
'success_title' => 'Message Envoyé !',
|
||||
'success_body' => 'Votre message WhatsApp a été envoyé avec succès.',
|
||||
'error_title' => 'Échec de l\'Envoi',
|
||||
'missing_required_fields' => 'L\'ID de l\'instance et le numéro de téléphone sont requis.',
|
||||
'unsupported_type' => 'Type de message non supporté.',
|
||||
];
|
||||
51
resources/lang/fr/enums.php
Normal file
51
resources/lang/fr/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => 'Connecté',
|
||||
'connecting' => 'Connexion',
|
||||
'close' => 'Déconnecté',
|
||||
'refused' => 'Refusé',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => 'Texte',
|
||||
'image' => 'Image',
|
||||
'audio' => 'Audio',
|
||||
'video' => 'Vidéo',
|
||||
'document' => 'Document',
|
||||
'location' => 'Localisation',
|
||||
'contact' => 'Contact',
|
||||
'sticker' => 'Autocollant',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => 'Entrant',
|
||||
'outgoing' => 'Sortant',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => 'En attente',
|
||||
'sent' => 'Envoyé',
|
||||
'delivered' => 'Livré',
|
||||
'read' => 'Lu',
|
||||
'failed' => 'Échoué',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => 'Démarrage de l\'Application',
|
||||
'qrcode_updated' => 'Code QR Mis à Jour',
|
||||
'connection_update' => 'Mise à Jour de Connexion',
|
||||
'messages_set' => 'Messages Définis',
|
||||
'messages_upsert' => 'Message Reçu',
|
||||
'messages_update' => 'Message Mis à Jour',
|
||||
'messages_delete' => 'Message Supprimé',
|
||||
'send_message' => 'Message Envoyé',
|
||||
'presence_update' => 'Mise à Jour de Présence',
|
||||
'new_token' => 'Nouveau Jeton',
|
||||
'logout_instance' => 'Déconnexion de l\'Instance',
|
||||
'remove_instance' => 'Instance Supprimée',
|
||||
],
|
||||
];
|
||||
34
resources/lang/fr/message.php
Normal file
34
resources/lang/fr/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Messages',
|
||||
'model_label' => 'Message',
|
||||
'plural_model_label' => 'Messages',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => 'Informations du Message',
|
||||
'content' => 'Contenu',
|
||||
'timestamps' => 'Horodatages',
|
||||
'raw_payload' => 'Données Brutes',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Instance',
|
||||
'direction' => 'Direction',
|
||||
'phone' => 'Téléphone',
|
||||
'type' => 'Type',
|
||||
'content' => 'Contenu',
|
||||
'status' => 'Statut',
|
||||
'message_id' => 'ID du Message',
|
||||
'media' => 'Média',
|
||||
'media_caption' => 'Légende du Média',
|
||||
'media_url' => 'URL du Média',
|
||||
'location' => 'Localisation',
|
||||
'sent_at' => 'Envoyé le',
|
||||
'delivered_at' => 'Livré le',
|
||||
'read_at' => 'Lu le',
|
||||
'created_at' => 'Créé le',
|
||||
],
|
||||
];
|
||||
21
resources/lang/fr/qrcode.php
Normal file
21
resources/lang/fr/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => 'Connecter :instance',
|
||||
'loading' => 'Chargement...',
|
||||
'connected' => 'Connecté',
|
||||
'waiting_scan' => 'En attente du scan',
|
||||
'error' => 'Erreur de connexion',
|
||||
'expires_in' => 'Expire dans',
|
||||
'connected_title' => 'WhatsApp Connecté !',
|
||||
'connected_description' => 'Votre instance WhatsApp est connectée et prête à envoyer et recevoir des messages.',
|
||||
'error_title' => 'Erreur de Connexion',
|
||||
'try_again' => 'Réessayer',
|
||||
'scan_instructions' => 'Ouvrez WhatsApp sur votre téléphone, allez dans Paramètres > Appareils Liés > Lier un Appareil, et scannez ce code QR.',
|
||||
'or_use_code' => 'Ou entrez ce code sur votre téléphone :',
|
||||
'copied' => 'Copié !',
|
||||
'refresh' => 'Actualiser le Code QR',
|
||||
'generate' => 'Générer le Code QR',
|
||||
];
|
||||
60
resources/lang/fr/resource.php
Normal file
60
resources/lang/fr/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Instances',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => 'Instance',
|
||||
'plural_model_label' => 'Instances',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => 'Informations de l\'Instance',
|
||||
'settings' => 'Paramètres',
|
||||
'connection' => 'Connexion',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => 'Nom de l\'Instance',
|
||||
'name_helper' => 'Un nom unique pour identifier cette instance',
|
||||
'number' => 'Numéro de Téléphone',
|
||||
'number_helper' => 'Le numéro de téléphone WhatsApp avec l\'indicatif du pays',
|
||||
'status' => 'Statut',
|
||||
'profile_picture' => 'Photo de Profil',
|
||||
'reject_call' => 'Rejeter les Appels',
|
||||
'reject_call_helper' => 'Rejeter automatiquement les appels entrants',
|
||||
'msg_call' => 'Message de Rejet',
|
||||
'msg_call_helper' => 'Message envoyé lors du rejet d\'un appel',
|
||||
'groups_ignore' => 'Ignorer les Groupes',
|
||||
'groups_ignore_helper' => 'Ne pas traiter les messages des groupes',
|
||||
'always_online' => 'Toujours en Ligne',
|
||||
'always_online_helper' => 'Garder le statut comme en ligne',
|
||||
'read_messages' => 'Lire les Messages',
|
||||
'read_messages_helper' => 'Marquer automatiquement les messages comme lus',
|
||||
'read_status' => 'Lire le Statut',
|
||||
'read_status_helper' => 'Voir automatiquement les mises à jour de statut',
|
||||
'sync_full_history' => 'Synchroniser l\'Historique Complet',
|
||||
'sync_full_history_helper' => 'Synchroniser tout l\'historique des messages lors de la connexion',
|
||||
'created_at' => 'Créé le',
|
||||
'updated_at' => 'Mis à jour le',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => 'Connecter',
|
||||
'disconnect' => 'Déconnecter',
|
||||
'delete' => 'Supprimer',
|
||||
'refresh' => 'Actualiser',
|
||||
'view_qrcode' => 'Voir le Code QR',
|
||||
'close' => 'Fermer',
|
||||
'back' => 'Retour à la Liste',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => 'Instance créée avec succès',
|
||||
'updated' => 'Instance mise à jour avec succès',
|
||||
'deleted' => 'Instance supprimée avec succès',
|
||||
'connected' => 'Instance connectée avec succès',
|
||||
'disconnected' => 'Instance déconnectée avec succès',
|
||||
'connection_failed' => 'Échec de la connexion de l\'instance',
|
||||
],
|
||||
];
|
||||
31
resources/lang/fr/webhook.php
Normal file
31
resources/lang/fr/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Journaux Webhook',
|
||||
'model_label' => 'Journal Webhook',
|
||||
'plural_model_label' => 'Journaux Webhook',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Informations du Webhook',
|
||||
'payload' => 'Charge Utile',
|
||||
'error' => 'Erreur',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Instance',
|
||||
'event' => 'Événement',
|
||||
'processed' => 'Traité',
|
||||
'has_error' => 'A une Erreur',
|
||||
'error' => 'Erreur',
|
||||
'processing_time' => 'Temps de Traitement',
|
||||
'created_at' => 'Créé le',
|
||||
'updated_at' => 'Mis à jour le',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => 'Oui',
|
||||
'no' => 'Non',
|
||||
],
|
||||
];
|
||||
42
resources/lang/it/action.php
Normal file
42
resources/lang/it/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'Invia Messaggio WhatsApp',
|
||||
'modal_heading' => 'Invia Messaggio WhatsApp',
|
||||
'modal_description' => 'Invia un messaggio a un numero WhatsApp.',
|
||||
'send' => 'Invia Messaggio',
|
||||
|
||||
// Form fields
|
||||
'instance' => 'Istanza',
|
||||
'instance_helper' => 'Seleziona l\'istanza WhatsApp da cui inviare il messaggio.',
|
||||
'number' => 'Numero di Telefono',
|
||||
'number_helper' => 'Inserisci il numero di telefono con prefisso internazionale (es: 393331234567).',
|
||||
'type' => 'Tipo di Messaggio',
|
||||
'message' => 'Messaggio',
|
||||
'message_placeholder' => 'Scrivi il tuo messaggio qui...',
|
||||
'caption' => 'Didascalia',
|
||||
'caption_placeholder' => 'Didascalia opzionale per il media...',
|
||||
'media' => 'File Media',
|
||||
'media_helper' => 'Carica il file da inviare.',
|
||||
|
||||
// Location fields
|
||||
'latitude' => 'Latitudine',
|
||||
'longitude' => 'Longitudine',
|
||||
'location_name' => 'Nome Posizione',
|
||||
'location_name_placeholder' => 'es: Il Mio Ufficio',
|
||||
'location_address' => 'Indirizzo',
|
||||
'location_address_placeholder' => 'es: Via Principale 123, Città',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => 'Nome Contatto',
|
||||
'contact_number' => 'Telefono Contatto',
|
||||
|
||||
// Notifications
|
||||
'success_title' => 'Messaggio Inviato!',
|
||||
'success_body' => 'Il tuo messaggio WhatsApp è stato inviato con successo.',
|
||||
'error_title' => 'Invio Fallito',
|
||||
'missing_required_fields' => 'ID istanza e numero di telefono sono obbligatori.',
|
||||
'unsupported_type' => 'Tipo di messaggio non supportato.',
|
||||
];
|
||||
51
resources/lang/it/enums.php
Normal file
51
resources/lang/it/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => 'Connesso',
|
||||
'connecting' => 'Connessione',
|
||||
'close' => 'Disconnesso',
|
||||
'refused' => 'Rifiutato',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => 'Testo',
|
||||
'image' => 'Immagine',
|
||||
'audio' => 'Audio',
|
||||
'video' => 'Video',
|
||||
'document' => 'Documento',
|
||||
'location' => 'Posizione',
|
||||
'contact' => 'Contatto',
|
||||
'sticker' => 'Sticker',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => 'In Arrivo',
|
||||
'outgoing' => 'In Uscita',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => 'In Attesa',
|
||||
'sent' => 'Inviato',
|
||||
'delivered' => 'Consegnato',
|
||||
'read' => 'Letto',
|
||||
'failed' => 'Fallito',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => 'Avvio Applicazione',
|
||||
'qrcode_updated' => 'Codice QR Aggiornato',
|
||||
'connection_update' => 'Aggiornamento Connessione',
|
||||
'messages_set' => 'Messaggi Impostati',
|
||||
'messages_upsert' => 'Messaggio Ricevuto',
|
||||
'messages_update' => 'Messaggio Aggiornato',
|
||||
'messages_delete' => 'Messaggio Eliminato',
|
||||
'send_message' => 'Messaggio Inviato',
|
||||
'presence_update' => 'Aggiornamento Presenza',
|
||||
'new_token' => 'Nuovo Token',
|
||||
'logout_instance' => 'Logout Istanza',
|
||||
'remove_instance' => 'Istanza Rimossa',
|
||||
],
|
||||
];
|
||||
34
resources/lang/it/message.php
Normal file
34
resources/lang/it/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Messaggi',
|
||||
'model_label' => 'Messaggio',
|
||||
'plural_model_label' => 'Messaggi',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => 'Informazioni Messaggio',
|
||||
'content' => 'Contenuto',
|
||||
'timestamps' => 'Timestamp',
|
||||
'raw_payload' => 'Dati Grezzi',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Istanza',
|
||||
'direction' => 'Direzione',
|
||||
'phone' => 'Telefono',
|
||||
'type' => 'Tipo',
|
||||
'content' => 'Contenuto',
|
||||
'status' => 'Stato',
|
||||
'message_id' => 'ID Messaggio',
|
||||
'media' => 'Media',
|
||||
'media_caption' => 'Didascalia Media',
|
||||
'media_url' => 'URL Media',
|
||||
'location' => 'Posizione',
|
||||
'sent_at' => 'Inviato il',
|
||||
'delivered_at' => 'Consegnato il',
|
||||
'read_at' => 'Letto il',
|
||||
'created_at' => 'Creato il',
|
||||
],
|
||||
];
|
||||
21
resources/lang/it/qrcode.php
Normal file
21
resources/lang/it/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => 'Connetti :instance',
|
||||
'loading' => 'Caricamento...',
|
||||
'connected' => 'Connesso',
|
||||
'waiting_scan' => 'In attesa della scansione',
|
||||
'error' => 'Errore di connessione',
|
||||
'expires_in' => 'Scade tra',
|
||||
'connected_title' => 'WhatsApp Connesso!',
|
||||
'connected_description' => 'La tua istanza WhatsApp è connessa e pronta per inviare e ricevere messaggi.',
|
||||
'error_title' => 'Errore di Connessione',
|
||||
'try_again' => 'Riprova',
|
||||
'scan_instructions' => 'Apri WhatsApp sul tuo telefono, vai su Impostazioni > Dispositivi Collegati > Collega un Dispositivo, e scansiona questo codice QR.',
|
||||
'or_use_code' => 'Oppure inserisci questo codice sul tuo telefono:',
|
||||
'copied' => 'Copiato!',
|
||||
'refresh' => 'Aggiorna Codice QR',
|
||||
'generate' => 'Genera Codice QR',
|
||||
];
|
||||
60
resources/lang/it/resource.php
Normal file
60
resources/lang/it/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Istanze',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => 'Istanza',
|
||||
'plural_model_label' => 'Istanze',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => 'Informazioni Istanza',
|
||||
'settings' => 'Impostazioni',
|
||||
'connection' => 'Connessione',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => 'Nome Istanza',
|
||||
'name_helper' => 'Un nome univoco per identificare questa istanza',
|
||||
'number' => 'Numero di Telefono',
|
||||
'number_helper' => 'Il numero di telefono WhatsApp con prefisso internazionale',
|
||||
'status' => 'Stato',
|
||||
'profile_picture' => 'Foto Profilo',
|
||||
'reject_call' => 'Rifiuta Chiamate',
|
||||
'reject_call_helper' => 'Rifiuta automaticamente le chiamate in arrivo',
|
||||
'msg_call' => 'Messaggio di Rifiuto',
|
||||
'msg_call_helper' => 'Messaggio inviato quando si rifiuta una chiamata',
|
||||
'groups_ignore' => 'Ignora Gruppi',
|
||||
'groups_ignore_helper' => 'Non elaborare messaggi dai gruppi',
|
||||
'always_online' => 'Sempre Online',
|
||||
'always_online_helper' => 'Mantieni lo stato come online',
|
||||
'read_messages' => 'Leggi Messaggi',
|
||||
'read_messages_helper' => 'Segna automaticamente i messaggi come letti',
|
||||
'read_status' => 'Leggi Stato',
|
||||
'read_status_helper' => 'Visualizza automaticamente gli aggiornamenti di stato',
|
||||
'sync_full_history' => 'Sincronizza Cronologia Completa',
|
||||
'sync_full_history_helper' => 'Sincronizza tutta la cronologia messaggi alla connessione',
|
||||
'created_at' => 'Creato il',
|
||||
'updated_at' => 'Aggiornato il',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => 'Connetti',
|
||||
'disconnect' => 'Disconnetti',
|
||||
'delete' => 'Elimina',
|
||||
'refresh' => 'Aggiorna',
|
||||
'view_qrcode' => 'Visualizza Codice QR',
|
||||
'close' => 'Chiudi',
|
||||
'back' => 'Torna alla Lista',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => 'Istanza creata con successo',
|
||||
'updated' => 'Istanza aggiornata con successo',
|
||||
'deleted' => 'Istanza eliminata con successo',
|
||||
'connected' => 'Istanza connessa con successo',
|
||||
'disconnected' => 'Istanza disconnessa con successo',
|
||||
'connection_failed' => 'Connessione istanza fallita',
|
||||
],
|
||||
];
|
||||
31
resources/lang/it/webhook.php
Normal file
31
resources/lang/it/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Log Webhook',
|
||||
'model_label' => 'Log Webhook',
|
||||
'plural_model_label' => 'Log Webhook',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Informazioni Webhook',
|
||||
'payload' => 'Payload',
|
||||
'error' => 'Errore',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Istanza',
|
||||
'event' => 'Evento',
|
||||
'processed' => 'Elaborato',
|
||||
'has_error' => 'Ha Errore',
|
||||
'error' => 'Errore',
|
||||
'processing_time' => 'Tempo di Elaborazione',
|
||||
'created_at' => 'Creato il',
|
||||
'updated_at' => 'Aggiornato il',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => 'Sì',
|
||||
'no' => 'No',
|
||||
],
|
||||
];
|
||||
42
resources/lang/ja/action.php
Normal file
42
resources/lang/ja/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'WhatsAppメッセージを送信',
|
||||
'modal_heading' => 'WhatsAppメッセージを送信',
|
||||
'modal_description' => 'WhatsApp番号にメッセージを送信します。',
|
||||
'send' => 'メッセージを送信',
|
||||
|
||||
// Form fields
|
||||
'instance' => 'インスタンス',
|
||||
'instance_helper' => 'メッセージを送信するWhatsAppインスタンスを選択してください。',
|
||||
'number' => '電話番号',
|
||||
'number_helper' => '国番号付きの電話番号を入力してください(例:819012345678)。',
|
||||
'type' => 'メッセージタイプ',
|
||||
'message' => 'メッセージ',
|
||||
'message_placeholder' => 'ここにメッセージを入力...',
|
||||
'caption' => 'キャプション',
|
||||
'caption_placeholder' => 'メディアのオプションキャプション...',
|
||||
'media' => 'メディアファイル',
|
||||
'media_helper' => '送信するファイルをアップロードしてください。',
|
||||
|
||||
// Location fields
|
||||
'latitude' => '緯度',
|
||||
'longitude' => '経度',
|
||||
'location_name' => '場所名',
|
||||
'location_name_placeholder' => '例:私のオフィス',
|
||||
'location_address' => '住所',
|
||||
'location_address_placeholder' => '例:東京都渋谷区1-2-3',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => '連絡先名',
|
||||
'contact_number' => '連絡先電話番号',
|
||||
|
||||
// Notifications
|
||||
'success_title' => 'メッセージ送信完了!',
|
||||
'success_body' => 'WhatsAppメッセージが正常に送信されました。',
|
||||
'error_title' => '送信失敗',
|
||||
'missing_required_fields' => 'インスタンスIDと電話番号は必須です。',
|
||||
'unsupported_type' => 'サポートされていないメッセージタイプです。',
|
||||
];
|
||||
51
resources/lang/ja/enums.php
Normal file
51
resources/lang/ja/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => '接続済み',
|
||||
'connecting' => '接続中',
|
||||
'close' => '切断済み',
|
||||
'refused' => '拒否済み',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => 'テキスト',
|
||||
'image' => '画像',
|
||||
'audio' => '音声',
|
||||
'video' => '動画',
|
||||
'document' => 'ドキュメント',
|
||||
'location' => '位置情報',
|
||||
'contact' => '連絡先',
|
||||
'sticker' => 'ステッカー',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => '受信',
|
||||
'outgoing' => '送信',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => '保留中',
|
||||
'sent' => '送信済み',
|
||||
'delivered' => '配信済み',
|
||||
'read' => '既読',
|
||||
'failed' => '失敗',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => 'アプリケーション起動',
|
||||
'qrcode_updated' => 'QRコード更新',
|
||||
'connection_update' => '接続更新',
|
||||
'messages_set' => 'メッセージ設定',
|
||||
'messages_upsert' => 'メッセージ受信',
|
||||
'messages_update' => 'メッセージ更新',
|
||||
'messages_delete' => 'メッセージ削除',
|
||||
'send_message' => 'メッセージ送信',
|
||||
'presence_update' => 'プレゼンス更新',
|
||||
'new_token' => '新しいトークン',
|
||||
'logout_instance' => 'インスタンスログアウト',
|
||||
'remove_instance' => 'インスタンス削除',
|
||||
],
|
||||
];
|
||||
34
resources/lang/ja/message.php
Normal file
34
resources/lang/ja/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'メッセージ',
|
||||
'model_label' => 'メッセージ',
|
||||
'plural_model_label' => 'メッセージ',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => 'メッセージ情報',
|
||||
'content' => 'コンテンツ',
|
||||
'timestamps' => 'タイムスタンプ',
|
||||
'raw_payload' => '生データ',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'インスタンス',
|
||||
'direction' => '方向',
|
||||
'phone' => '電話番号',
|
||||
'type' => 'タイプ',
|
||||
'content' => 'コンテンツ',
|
||||
'status' => 'ステータス',
|
||||
'message_id' => 'メッセージID',
|
||||
'media' => 'メディア',
|
||||
'media_caption' => 'メディアキャプション',
|
||||
'media_url' => 'メディアURL',
|
||||
'location' => '位置情報',
|
||||
'sent_at' => '送信日時',
|
||||
'delivered_at' => '配信日時',
|
||||
'read_at' => '既読日時',
|
||||
'created_at' => '作成日時',
|
||||
],
|
||||
];
|
||||
21
resources/lang/ja/qrcode.php
Normal file
21
resources/lang/ja/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => ':instance に接続',
|
||||
'loading' => '読み込み中...',
|
||||
'connected' => '接続済み',
|
||||
'waiting_scan' => 'スキャン待ち',
|
||||
'error' => '接続エラー',
|
||||
'expires_in' => '有効期限',
|
||||
'connected_title' => 'WhatsApp接続完了!',
|
||||
'connected_description' => 'WhatsAppインスタンスが接続され、メッセージの送受信が可能です。',
|
||||
'error_title' => '接続エラー',
|
||||
'try_again' => '再試行',
|
||||
'scan_instructions' => 'お使いの携帯電話でWhatsAppを開き、設定 > リンクされたデバイス > デバイスをリンク に進み、このQRコードをスキャンしてください。',
|
||||
'or_use_code' => 'または携帯電話でこのコードを入力してください:',
|
||||
'copied' => 'コピーしました!',
|
||||
'refresh' => 'QRコードを更新',
|
||||
'generate' => 'QRコードを生成',
|
||||
];
|
||||
60
resources/lang/ja/resource.php
Normal file
60
resources/lang/ja/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'インスタンス',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => 'インスタンス',
|
||||
'plural_model_label' => 'インスタンス',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => 'インスタンス情報',
|
||||
'settings' => '設定',
|
||||
'connection' => '接続',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => 'インスタンス名',
|
||||
'name_helper' => 'このインスタンスを識別するための一意の名前',
|
||||
'number' => '電話番号',
|
||||
'number_helper' => '国番号付きのWhatsApp電話番号',
|
||||
'status' => 'ステータス',
|
||||
'profile_picture' => 'プロフィール画像',
|
||||
'reject_call' => '通話を拒否',
|
||||
'reject_call_helper' => '着信を自動的に拒否する',
|
||||
'msg_call' => '拒否メッセージ',
|
||||
'msg_call_helper' => '通話を拒否する際に送信されるメッセージ',
|
||||
'groups_ignore' => 'グループを無視',
|
||||
'groups_ignore_helper' => 'グループからのメッセージを処理しない',
|
||||
'always_online' => '常にオンライン',
|
||||
'always_online_helper' => 'ステータスをオンラインに保つ',
|
||||
'read_messages' => 'メッセージを既読',
|
||||
'read_messages_helper' => 'メッセージを自動的に既読にする',
|
||||
'read_status' => 'ステータスを表示',
|
||||
'read_status_helper' => 'ステータス更新を自動的に表示する',
|
||||
'sync_full_history' => '完全な履歴を同期',
|
||||
'sync_full_history_helper' => '接続時にすべてのメッセージ履歴を同期する',
|
||||
'created_at' => '作成日時',
|
||||
'updated_at' => '更新日時',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => '接続',
|
||||
'disconnect' => '切断',
|
||||
'delete' => '削除',
|
||||
'refresh' => '更新',
|
||||
'view_qrcode' => 'QRコードを表示',
|
||||
'close' => '閉じる',
|
||||
'back' => 'リストに戻る',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => 'インスタンスが正常に作成されました',
|
||||
'updated' => 'インスタンスが正常に更新されました',
|
||||
'deleted' => 'インスタンスが正常に削除されました',
|
||||
'connected' => 'インスタンスが正常に接続されました',
|
||||
'disconnected' => 'インスタンスが正常に切断されました',
|
||||
'connection_failed' => 'インスタンスの接続に失敗しました',
|
||||
],
|
||||
];
|
||||
31
resources/lang/ja/webhook.php
Normal file
31
resources/lang/ja/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Webhookログ',
|
||||
'model_label' => 'Webhookログ',
|
||||
'plural_model_label' => 'Webhookログ',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Webhook情報',
|
||||
'payload' => 'ペイロード',
|
||||
'error' => 'エラー',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'インスタンス',
|
||||
'event' => 'イベント',
|
||||
'processed' => '処理済み',
|
||||
'has_error' => 'エラーあり',
|
||||
'error' => 'エラー',
|
||||
'processing_time' => '処理時間',
|
||||
'created_at' => '作成日時',
|
||||
'updated_at' => '更新日時',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => 'はい',
|
||||
'no' => 'いいえ',
|
||||
],
|
||||
];
|
||||
42
resources/lang/ko/action.php
Normal file
42
resources/lang/ko/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'WhatsApp 메시지 보내기',
|
||||
'modal_heading' => 'WhatsApp 메시지 보내기',
|
||||
'modal_description' => 'WhatsApp 번호로 메시지를 보냅니다.',
|
||||
'send' => '메시지 보내기',
|
||||
|
||||
// Form fields
|
||||
'instance' => '인스턴스',
|
||||
'instance_helper' => '메시지를 보낼 WhatsApp 인스턴스를 선택하세요.',
|
||||
'number' => '전화번호',
|
||||
'number_helper' => '국가 코드가 포함된 전화번호를 입력하세요 (예: 821012345678).',
|
||||
'type' => '메시지 유형',
|
||||
'message' => '메시지',
|
||||
'message_placeholder' => '여기에 메시지를 입력하세요...',
|
||||
'caption' => '캡션',
|
||||
'caption_placeholder' => '미디어의 선택적 캡션...',
|
||||
'media' => '미디어 파일',
|
||||
'media_helper' => '보낼 파일을 업로드하세요.',
|
||||
|
||||
// Location fields
|
||||
'latitude' => '위도',
|
||||
'longitude' => '경도',
|
||||
'location_name' => '장소 이름',
|
||||
'location_name_placeholder' => '예: 내 사무실',
|
||||
'location_address' => '주소',
|
||||
'location_address_placeholder' => '예: 서울시 강남구 123',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => '연락처 이름',
|
||||
'contact_number' => '연락처 전화번호',
|
||||
|
||||
// Notifications
|
||||
'success_title' => '메시지 전송 완료!',
|
||||
'success_body' => 'WhatsApp 메시지가 성공적으로 전송되었습니다.',
|
||||
'error_title' => '전송 실패',
|
||||
'missing_required_fields' => '인스턴스 ID와 전화번호가 필요합니다.',
|
||||
'unsupported_type' => '지원되지 않는 메시지 유형입니다.',
|
||||
];
|
||||
51
resources/lang/ko/enums.php
Normal file
51
resources/lang/ko/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => '연결됨',
|
||||
'connecting' => '연결 중',
|
||||
'close' => '연결 해제됨',
|
||||
'refused' => '거부됨',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => '텍스트',
|
||||
'image' => '이미지',
|
||||
'audio' => '오디오',
|
||||
'video' => '비디오',
|
||||
'document' => '문서',
|
||||
'location' => '위치',
|
||||
'contact' => '연락처',
|
||||
'sticker' => '스티커',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => '수신',
|
||||
'outgoing' => '발신',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => '대기 중',
|
||||
'sent' => '전송됨',
|
||||
'delivered' => '전달됨',
|
||||
'read' => '읽음',
|
||||
'failed' => '실패',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => '애플리케이션 시작',
|
||||
'qrcode_updated' => 'QR 코드 업데이트',
|
||||
'connection_update' => '연결 업데이트',
|
||||
'messages_set' => '메시지 설정',
|
||||
'messages_upsert' => '메시지 수신',
|
||||
'messages_update' => '메시지 업데이트',
|
||||
'messages_delete' => '메시지 삭제',
|
||||
'send_message' => '메시지 전송',
|
||||
'presence_update' => '상태 업데이트',
|
||||
'new_token' => '새 토큰',
|
||||
'logout_instance' => '인스턴스 로그아웃',
|
||||
'remove_instance' => '인스턴스 제거',
|
||||
],
|
||||
];
|
||||
34
resources/lang/ko/message.php
Normal file
34
resources/lang/ko/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => '메시지',
|
||||
'model_label' => '메시지',
|
||||
'plural_model_label' => '메시지',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => '메시지 정보',
|
||||
'content' => '내용',
|
||||
'timestamps' => '타임스탬프',
|
||||
'raw_payload' => '원시 데이터',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => '인스턴스',
|
||||
'direction' => '방향',
|
||||
'phone' => '전화번호',
|
||||
'type' => '유형',
|
||||
'content' => '내용',
|
||||
'status' => '상태',
|
||||
'message_id' => '메시지 ID',
|
||||
'media' => '미디어',
|
||||
'media_caption' => '미디어 캡션',
|
||||
'media_url' => '미디어 URL',
|
||||
'location' => '위치',
|
||||
'sent_at' => '전송일',
|
||||
'delivered_at' => '전달일',
|
||||
'read_at' => '읽은 날짜',
|
||||
'created_at' => '생성일',
|
||||
],
|
||||
];
|
||||
21
resources/lang/ko/qrcode.php
Normal file
21
resources/lang/ko/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => ':instance 연결',
|
||||
'loading' => '로딩 중...',
|
||||
'connected' => '연결됨',
|
||||
'waiting_scan' => '스캔 대기 중',
|
||||
'error' => '연결 오류',
|
||||
'expires_in' => '만료 시간',
|
||||
'connected_title' => 'WhatsApp 연결됨!',
|
||||
'connected_description' => 'WhatsApp 인스턴스가 연결되어 메시지를 보내고 받을 준비가 되었습니다.',
|
||||
'error_title' => '연결 오류',
|
||||
'try_again' => '다시 시도',
|
||||
'scan_instructions' => '휴대폰에서 WhatsApp을 열고 설정 > 연결된 기기 > 기기 연결로 이동하여 이 QR 코드를 스캔하세요.',
|
||||
'or_use_code' => '또는 휴대폰에 이 코드를 입력하세요:',
|
||||
'copied' => '복사됨!',
|
||||
'refresh' => 'QR 코드 새로고침',
|
||||
'generate' => 'QR 코드 생성',
|
||||
];
|
||||
60
resources/lang/ko/resource.php
Normal file
60
resources/lang/ko/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => '인스턴스',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => '인스턴스',
|
||||
'plural_model_label' => '인스턴스',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => '인스턴스 정보',
|
||||
'settings' => '설정',
|
||||
'connection' => '연결',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => '인스턴스 이름',
|
||||
'name_helper' => '이 인스턴스를 식별하기 위한 고유한 이름',
|
||||
'number' => '전화번호',
|
||||
'number_helper' => '국가 코드가 포함된 WhatsApp 전화번호',
|
||||
'status' => '상태',
|
||||
'profile_picture' => '프로필 사진',
|
||||
'reject_call' => '통화 거부',
|
||||
'reject_call_helper' => '수신 전화 자동 거부',
|
||||
'msg_call' => '거부 메시지',
|
||||
'msg_call_helper' => '통화 거부 시 전송되는 메시지',
|
||||
'groups_ignore' => '그룹 무시',
|
||||
'groups_ignore_helper' => '그룹의 메시지를 처리하지 않음',
|
||||
'always_online' => '항상 온라인',
|
||||
'always_online_helper' => '상태를 온라인으로 유지',
|
||||
'read_messages' => '메시지 읽기',
|
||||
'read_messages_helper' => '메시지를 자동으로 읽음으로 표시',
|
||||
'read_status' => '상태 읽기',
|
||||
'read_status_helper' => '상태 업데이트를 자동으로 표시',
|
||||
'sync_full_history' => '전체 기록 동기화',
|
||||
'sync_full_history_helper' => '연결 시 모든 메시지 기록 동기화',
|
||||
'created_at' => '생성일',
|
||||
'updated_at' => '수정일',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => '연결',
|
||||
'disconnect' => '연결 해제',
|
||||
'delete' => '삭제',
|
||||
'refresh' => '새로고침',
|
||||
'view_qrcode' => 'QR 코드 보기',
|
||||
'close' => '닫기',
|
||||
'back' => '목록으로 돌아가기',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => '인스턴스가 성공적으로 생성되었습니다',
|
||||
'updated' => '인스턴스가 성공적으로 업데이트되었습니다',
|
||||
'deleted' => '인스턴스가 성공적으로 삭제되었습니다',
|
||||
'connected' => '인스턴스가 성공적으로 연결되었습니다',
|
||||
'disconnected' => '인스턴스 연결이 성공적으로 해제되었습니다',
|
||||
'connection_failed' => '인스턴스 연결에 실패했습니다',
|
||||
],
|
||||
];
|
||||
31
resources/lang/ko/webhook.php
Normal file
31
resources/lang/ko/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Webhook 로그',
|
||||
'model_label' => 'Webhook 로그',
|
||||
'plural_model_label' => 'Webhook 로그',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Webhook 정보',
|
||||
'payload' => '페이로드',
|
||||
'error' => '오류',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => '인스턴스',
|
||||
'event' => '이벤트',
|
||||
'processed' => '처리됨',
|
||||
'has_error' => '오류 있음',
|
||||
'error' => '오류',
|
||||
'processing_time' => '처리 시간',
|
||||
'created_at' => '생성일',
|
||||
'updated_at' => '수정일',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => '예',
|
||||
'no' => '아니오',
|
||||
],
|
||||
];
|
||||
42
resources/lang/nl/action.php
Normal file
42
resources/lang/nl/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'WhatsApp Bericht Versturen',
|
||||
'modal_heading' => 'WhatsApp Bericht Versturen',
|
||||
'modal_description' => 'Stuur een bericht naar een WhatsApp nummer.',
|
||||
'send' => 'Bericht Versturen',
|
||||
|
||||
// Form fields
|
||||
'instance' => 'Instantie',
|
||||
'instance_helper' => 'Selecteer de WhatsApp instantie om het bericht vanaf te versturen.',
|
||||
'number' => 'Telefoonnummer',
|
||||
'number_helper' => 'Voer het telefoonnummer met landcode in (bijv. 31612345678).',
|
||||
'type' => 'Berichttype',
|
||||
'message' => 'Bericht',
|
||||
'message_placeholder' => 'Typ hier uw bericht...',
|
||||
'caption' => 'Onderschrift',
|
||||
'caption_placeholder' => 'Optioneel onderschrift voor de media...',
|
||||
'media' => 'Mediabestand',
|
||||
'media_helper' => 'Upload het te versturen bestand.',
|
||||
|
||||
// Location fields
|
||||
'latitude' => 'Breedtegraad',
|
||||
'longitude' => 'Lengtegraad',
|
||||
'location_name' => 'Locatienaam',
|
||||
'location_name_placeholder' => 'bijv. Mijn Kantoor',
|
||||
'location_address' => 'Adres',
|
||||
'location_address_placeholder' => 'bijv. Hoofdstraat 123, Stad',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => 'Contactnaam',
|
||||
'contact_number' => 'Contacttelefoon',
|
||||
|
||||
// Notifications
|
||||
'success_title' => 'Bericht Verzonden!',
|
||||
'success_body' => 'Uw WhatsApp bericht is succesvol verzonden.',
|
||||
'error_title' => 'Verzenden Mislukt',
|
||||
'missing_required_fields' => 'Instantie ID en telefoonnummer zijn verplicht.',
|
||||
'unsupported_type' => 'Niet-ondersteund berichttype.',
|
||||
];
|
||||
51
resources/lang/nl/enums.php
Normal file
51
resources/lang/nl/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => 'Verbonden',
|
||||
'connecting' => 'Verbinden',
|
||||
'close' => 'Losgekoppeld',
|
||||
'refused' => 'Geweigerd',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => 'Tekst',
|
||||
'image' => 'Afbeelding',
|
||||
'audio' => 'Audio',
|
||||
'video' => 'Video',
|
||||
'document' => 'Document',
|
||||
'location' => 'Locatie',
|
||||
'contact' => 'Contact',
|
||||
'sticker' => 'Sticker',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => 'Inkomend',
|
||||
'outgoing' => 'Uitgaand',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => 'In Afwachting',
|
||||
'sent' => 'Verzonden',
|
||||
'delivered' => 'Afgeleverd',
|
||||
'read' => 'Gelezen',
|
||||
'failed' => 'Mislukt',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => 'Applicatie Opstart',
|
||||
'qrcode_updated' => 'QR-code Bijgewerkt',
|
||||
'connection_update' => 'Verbinding Update',
|
||||
'messages_set' => 'Berichten Ingesteld',
|
||||
'messages_upsert' => 'Bericht Ontvangen',
|
||||
'messages_update' => 'Bericht Bijgewerkt',
|
||||
'messages_delete' => 'Bericht Verwijderd',
|
||||
'send_message' => 'Bericht Verzonden',
|
||||
'presence_update' => 'Aanwezigheid Update',
|
||||
'new_token' => 'Nieuwe Token',
|
||||
'logout_instance' => 'Instantie Uitloggen',
|
||||
'remove_instance' => 'Instantie Verwijderd',
|
||||
],
|
||||
];
|
||||
34
resources/lang/nl/message.php
Normal file
34
resources/lang/nl/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Berichten',
|
||||
'model_label' => 'Bericht',
|
||||
'plural_model_label' => 'Berichten',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => 'Berichtinformatie',
|
||||
'content' => 'Inhoud',
|
||||
'timestamps' => 'Tijdstempels',
|
||||
'raw_payload' => 'Ruwe Data',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Instantie',
|
||||
'direction' => 'Richting',
|
||||
'phone' => 'Telefoon',
|
||||
'type' => 'Type',
|
||||
'content' => 'Inhoud',
|
||||
'status' => 'Status',
|
||||
'message_id' => 'Bericht ID',
|
||||
'media' => 'Media',
|
||||
'media_caption' => 'Media Onderschrift',
|
||||
'media_url' => 'Media URL',
|
||||
'location' => 'Locatie',
|
||||
'sent_at' => 'Verzonden op',
|
||||
'delivered_at' => 'Afgeleverd op',
|
||||
'read_at' => 'Gelezen op',
|
||||
'created_at' => 'Aangemaakt op',
|
||||
],
|
||||
];
|
||||
21
resources/lang/nl/qrcode.php
Normal file
21
resources/lang/nl/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => 'Verbinden :instance',
|
||||
'loading' => 'Laden...',
|
||||
'connected' => 'Verbonden',
|
||||
'waiting_scan' => 'Wachten op scan',
|
||||
'error' => 'Verbindingsfout',
|
||||
'expires_in' => 'Verloopt over',
|
||||
'connected_title' => 'WhatsApp Verbonden!',
|
||||
'connected_description' => 'Uw WhatsApp instantie is verbonden en klaar om berichten te verzenden en ontvangen.',
|
||||
'error_title' => 'Verbindingsfout',
|
||||
'try_again' => 'Opnieuw Proberen',
|
||||
'scan_instructions' => 'Open WhatsApp op uw telefoon, ga naar Instellingen > Gekoppelde Apparaten > Apparaat Koppelen, en scan deze QR-code.',
|
||||
'or_use_code' => 'Of voer deze code in op uw telefoon:',
|
||||
'copied' => 'Gekopieerd!',
|
||||
'refresh' => 'QR-code Vernieuwen',
|
||||
'generate' => 'QR-code Genereren',
|
||||
];
|
||||
60
resources/lang/nl/resource.php
Normal file
60
resources/lang/nl/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Instanties',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => 'Instantie',
|
||||
'plural_model_label' => 'Instanties',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => 'Instantie Informatie',
|
||||
'settings' => 'Instellingen',
|
||||
'connection' => 'Verbinding',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => 'Instantie Naam',
|
||||
'name_helper' => 'Een unieke naam om deze instantie te identificeren',
|
||||
'number' => 'Telefoonnummer',
|
||||
'number_helper' => 'Het WhatsApp telefoonnummer met landcode',
|
||||
'status' => 'Status',
|
||||
'profile_picture' => 'Profielfoto',
|
||||
'reject_call' => 'Oproepen Weigeren',
|
||||
'reject_call_helper' => 'Automatisch inkomende oproepen weigeren',
|
||||
'msg_call' => 'Weigeringsbericht',
|
||||
'msg_call_helper' => 'Bericht dat wordt verzonden bij het weigeren van een oproep',
|
||||
'groups_ignore' => 'Groepen Negeren',
|
||||
'groups_ignore_helper' => 'Berichten van groepen niet verwerken',
|
||||
'always_online' => 'Altijd Online',
|
||||
'always_online_helper' => 'Status als online houden',
|
||||
'read_messages' => 'Berichten Lezen',
|
||||
'read_messages_helper' => 'Berichten automatisch als gelezen markeren',
|
||||
'read_status' => 'Status Lezen',
|
||||
'read_status_helper' => 'Statusupdates automatisch bekijken',
|
||||
'sync_full_history' => 'Volledige Geschiedenis Synchroniseren',
|
||||
'sync_full_history_helper' => 'Alle berichtengeschiedenis synchroniseren bij verbinding',
|
||||
'created_at' => 'Aangemaakt op',
|
||||
'updated_at' => 'Bijgewerkt op',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => 'Verbinden',
|
||||
'disconnect' => 'Verbinding Verbreken',
|
||||
'delete' => 'Verwijderen',
|
||||
'refresh' => 'Vernieuwen',
|
||||
'view_qrcode' => 'QR-code Bekijken',
|
||||
'close' => 'Sluiten',
|
||||
'back' => 'Terug naar Lijst',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => 'Instantie succesvol aangemaakt',
|
||||
'updated' => 'Instantie succesvol bijgewerkt',
|
||||
'deleted' => 'Instantie succesvol verwijderd',
|
||||
'connected' => 'Instantie succesvol verbonden',
|
||||
'disconnected' => 'Instantie succesvol losgekoppeld',
|
||||
'connection_failed' => 'Verbinding met instantie mislukt',
|
||||
],
|
||||
];
|
||||
31
resources/lang/nl/webhook.php
Normal file
31
resources/lang/nl/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Webhook Logs',
|
||||
'model_label' => 'Webhook Log',
|
||||
'plural_model_label' => 'Webhook Logs',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Webhook Informatie',
|
||||
'payload' => 'Payload',
|
||||
'error' => 'Fout',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Instantie',
|
||||
'event' => 'Gebeurtenis',
|
||||
'processed' => 'Verwerkt',
|
||||
'has_error' => 'Heeft Fout',
|
||||
'error' => 'Fout',
|
||||
'processing_time' => 'Verwerkingstijd',
|
||||
'created_at' => 'Aangemaakt op',
|
||||
'updated_at' => 'Bijgewerkt op',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => 'Ja',
|
||||
'no' => 'Nee',
|
||||
],
|
||||
];
|
||||
42
resources/lang/pl/action.php
Normal file
42
resources/lang/pl/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'Wyślij Wiadomość WhatsApp',
|
||||
'modal_heading' => 'Wyślij Wiadomość WhatsApp',
|
||||
'modal_description' => 'Wyślij wiadomość na numer WhatsApp.',
|
||||
'send' => 'Wyślij Wiadomość',
|
||||
|
||||
// Form fields
|
||||
'instance' => 'Instancja',
|
||||
'instance_helper' => 'Wybierz instancję WhatsApp do wysłania wiadomości.',
|
||||
'number' => 'Numer Telefonu',
|
||||
'number_helper' => 'Wprowadź numer telefonu z kodem kraju (np. 48123456789).',
|
||||
'type' => 'Typ Wiadomości',
|
||||
'message' => 'Wiadomość',
|
||||
'message_placeholder' => 'Wpisz tutaj swoją wiadomość...',
|
||||
'caption' => 'Podpis',
|
||||
'caption_placeholder' => 'Opcjonalny podpis dla mediów...',
|
||||
'media' => 'Plik Multimedialny',
|
||||
'media_helper' => 'Prześlij plik do wysłania.',
|
||||
|
||||
// Location fields
|
||||
'latitude' => 'Szerokość Geograficzna',
|
||||
'longitude' => 'Długość Geograficzna',
|
||||
'location_name' => 'Nazwa Lokalizacji',
|
||||
'location_name_placeholder' => 'np. Moje Biuro',
|
||||
'location_address' => 'Adres',
|
||||
'location_address_placeholder' => 'np. ul. Główna 123, Miasto',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => 'Nazwa Kontaktu',
|
||||
'contact_number' => 'Telefon Kontaktu',
|
||||
|
||||
// Notifications
|
||||
'success_title' => 'Wiadomość Wysłana!',
|
||||
'success_body' => 'Twoja wiadomość WhatsApp została wysłana pomyślnie.',
|
||||
'error_title' => 'Wysyłanie Nie Powiodło Się',
|
||||
'missing_required_fields' => 'ID instancji i numer telefonu są wymagane.',
|
||||
'unsupported_type' => 'Nieobsługiwany typ wiadomości.',
|
||||
];
|
||||
51
resources/lang/pl/enums.php
Normal file
51
resources/lang/pl/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => 'Połączony',
|
||||
'connecting' => 'Łączenie',
|
||||
'close' => 'Rozłączony',
|
||||
'refused' => 'Odrzucony',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => 'Tekst',
|
||||
'image' => 'Obraz',
|
||||
'audio' => 'Audio',
|
||||
'video' => 'Wideo',
|
||||
'document' => 'Dokument',
|
||||
'location' => 'Lokalizacja',
|
||||
'contact' => 'Kontakt',
|
||||
'sticker' => 'Naklejka',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => 'Przychodzące',
|
||||
'outgoing' => 'Wychodzące',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => 'Oczekujące',
|
||||
'sent' => 'Wysłane',
|
||||
'delivered' => 'Dostarczone',
|
||||
'read' => 'Przeczytane',
|
||||
'failed' => 'Nieudane',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => 'Uruchomienie Aplikacji',
|
||||
'qrcode_updated' => 'Kod QR Zaktualizowany',
|
||||
'connection_update' => 'Aktualizacja Połączenia',
|
||||
'messages_set' => 'Wiadomości Ustawione',
|
||||
'messages_upsert' => 'Wiadomość Odebrana',
|
||||
'messages_update' => 'Wiadomość Zaktualizowana',
|
||||
'messages_delete' => 'Wiadomość Usunięta',
|
||||
'send_message' => 'Wiadomość Wysłana',
|
||||
'presence_update' => 'Aktualizacja Obecności',
|
||||
'new_token' => 'Nowy Token',
|
||||
'logout_instance' => 'Wylogowanie Instancji',
|
||||
'remove_instance' => 'Instancja Usunięta',
|
||||
],
|
||||
];
|
||||
34
resources/lang/pl/message.php
Normal file
34
resources/lang/pl/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Wiadomości',
|
||||
'model_label' => 'Wiadomość',
|
||||
'plural_model_label' => 'Wiadomości',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => 'Informacje o Wiadomości',
|
||||
'content' => 'Treść',
|
||||
'timestamps' => 'Znaczniki Czasu',
|
||||
'raw_payload' => 'Surowe Dane',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Instancja',
|
||||
'direction' => 'Kierunek',
|
||||
'phone' => 'Telefon',
|
||||
'type' => 'Typ',
|
||||
'content' => 'Treść',
|
||||
'status' => 'Status',
|
||||
'message_id' => 'ID Wiadomości',
|
||||
'media' => 'Media',
|
||||
'media_caption' => 'Podpis Mediów',
|
||||
'media_url' => 'URL Mediów',
|
||||
'location' => 'Lokalizacja',
|
||||
'sent_at' => 'Wysłano',
|
||||
'delivered_at' => 'Dostarczono',
|
||||
'read_at' => 'Przeczytano',
|
||||
'created_at' => 'Utworzono',
|
||||
],
|
||||
];
|
||||
21
resources/lang/pl/qrcode.php
Normal file
21
resources/lang/pl/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => 'Połącz :instance',
|
||||
'loading' => 'Ładowanie...',
|
||||
'connected' => 'Połączony',
|
||||
'waiting_scan' => 'Oczekiwanie na skan',
|
||||
'error' => 'Błąd połączenia',
|
||||
'expires_in' => 'Wygasa za',
|
||||
'connected_title' => 'WhatsApp Połączony!',
|
||||
'connected_description' => 'Twoja instancja WhatsApp jest połączona i gotowa do wysyłania i odbierania wiadomości.',
|
||||
'error_title' => 'Błąd Połączenia',
|
||||
'try_again' => 'Spróbuj Ponownie',
|
||||
'scan_instructions' => 'Otwórz WhatsApp na telefonie, przejdź do Ustawienia > Połączone Urządzenia > Połącz Urządzenie i zeskanuj ten kod QR.',
|
||||
'or_use_code' => 'Lub wprowadź ten kod na telefonie:',
|
||||
'copied' => 'Skopiowano!',
|
||||
'refresh' => 'Odśwież Kod QR',
|
||||
'generate' => 'Generuj Kod QR',
|
||||
];
|
||||
60
resources/lang/pl/resource.php
Normal file
60
resources/lang/pl/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Instancje',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => 'Instancja',
|
||||
'plural_model_label' => 'Instancje',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => 'Informacje o Instancji',
|
||||
'settings' => 'Ustawienia',
|
||||
'connection' => 'Połączenie',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => 'Nazwa Instancji',
|
||||
'name_helper' => 'Unikalna nazwa identyfikująca tę instancję',
|
||||
'number' => 'Numer Telefonu',
|
||||
'number_helper' => 'Numer telefonu WhatsApp z kodem kraju',
|
||||
'status' => 'Status',
|
||||
'profile_picture' => 'Zdjęcie Profilowe',
|
||||
'reject_call' => 'Odrzucaj Połączenia',
|
||||
'reject_call_helper' => 'Automatycznie odrzucaj połączenia przychodzące',
|
||||
'msg_call' => 'Wiadomość Odrzucenia',
|
||||
'msg_call_helper' => 'Wiadomość wysyłana przy odrzucaniu połączenia',
|
||||
'groups_ignore' => 'Ignoruj Grupy',
|
||||
'groups_ignore_helper' => 'Nie przetwarzaj wiadomości z grup',
|
||||
'always_online' => 'Zawsze Online',
|
||||
'always_online_helper' => 'Utrzymuj status jako online',
|
||||
'read_messages' => 'Czytaj Wiadomości',
|
||||
'read_messages_helper' => 'Automatycznie oznaczaj wiadomości jako przeczytane',
|
||||
'read_status' => 'Czytaj Status',
|
||||
'read_status_helper' => 'Automatycznie wyświetlaj aktualizacje statusu',
|
||||
'sync_full_history' => 'Synchronizuj Pełną Historię',
|
||||
'sync_full_history_helper' => 'Synchronizuj całą historię wiadomości przy połączeniu',
|
||||
'created_at' => 'Utworzono',
|
||||
'updated_at' => 'Zaktualizowano',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => 'Połącz',
|
||||
'disconnect' => 'Rozłącz',
|
||||
'delete' => 'Usuń',
|
||||
'refresh' => 'Odśwież',
|
||||
'view_qrcode' => 'Zobacz Kod QR',
|
||||
'close' => 'Zamknij',
|
||||
'back' => 'Wróć do Listy',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => 'Instancja utworzona pomyślnie',
|
||||
'updated' => 'Instancja zaktualizowana pomyślnie',
|
||||
'deleted' => 'Instancja usunięta pomyślnie',
|
||||
'connected' => 'Instancja połączona pomyślnie',
|
||||
'disconnected' => 'Instancja rozłączona pomyślnie',
|
||||
'connection_failed' => 'Nie udało się połączyć z instancją',
|
||||
],
|
||||
];
|
||||
31
resources/lang/pl/webhook.php
Normal file
31
resources/lang/pl/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Logi Webhook',
|
||||
'model_label' => 'Log Webhook',
|
||||
'plural_model_label' => 'Logi Webhook',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Informacje o Webhook',
|
||||
'payload' => 'Ładunek',
|
||||
'error' => 'Błąd',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Instancja',
|
||||
'event' => 'Zdarzenie',
|
||||
'processed' => 'Przetworzono',
|
||||
'has_error' => 'Ma Błąd',
|
||||
'error' => 'Błąd',
|
||||
'processing_time' => 'Czas Przetwarzania',
|
||||
'created_at' => 'Utworzono',
|
||||
'updated_at' => 'Zaktualizowano',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => 'Tak',
|
||||
'no' => 'Nie',
|
||||
],
|
||||
];
|
||||
42
resources/lang/ru/action.php
Normal file
42
resources/lang/ru/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'Отправить Сообщение WhatsApp',
|
||||
'modal_heading' => 'Отправить Сообщение WhatsApp',
|
||||
'modal_description' => 'Отправить сообщение на номер WhatsApp.',
|
||||
'send' => 'Отправить Сообщение',
|
||||
|
||||
// Form fields
|
||||
'instance' => 'Экземпляр',
|
||||
'instance_helper' => 'Выберите экземпляр WhatsApp для отправки сообщения.',
|
||||
'number' => 'Номер Телефона',
|
||||
'number_helper' => 'Введите номер телефона с кодом страны (например, 79123456789).',
|
||||
'type' => 'Тип Сообщения',
|
||||
'message' => 'Сообщение',
|
||||
'message_placeholder' => 'Введите сообщение здесь...',
|
||||
'caption' => 'Подпись',
|
||||
'caption_placeholder' => 'Необязательная подпись для медиа...',
|
||||
'media' => 'Медиафайл',
|
||||
'media_helper' => 'Загрузите файл для отправки.',
|
||||
|
||||
// Location fields
|
||||
'latitude' => 'Широта',
|
||||
'longitude' => 'Долгота',
|
||||
'location_name' => 'Название Места',
|
||||
'location_name_placeholder' => 'например, Мой Офис',
|
||||
'location_address' => 'Адрес',
|
||||
'location_address_placeholder' => 'например, ул. Главная 123, Город',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => 'Имя Контакта',
|
||||
'contact_number' => 'Телефон Контакта',
|
||||
|
||||
// Notifications
|
||||
'success_title' => 'Сообщение Отправлено!',
|
||||
'success_body' => 'Ваше сообщение WhatsApp успешно отправлено.',
|
||||
'error_title' => 'Ошибка Отправки',
|
||||
'missing_required_fields' => 'ID экземпляра и номер телефона обязательны.',
|
||||
'unsupported_type' => 'Неподдерживаемый тип сообщения.',
|
||||
];
|
||||
51
resources/lang/ru/enums.php
Normal file
51
resources/lang/ru/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => 'Подключен',
|
||||
'connecting' => 'Подключение',
|
||||
'close' => 'Отключен',
|
||||
'refused' => 'Отклонен',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => 'Текст',
|
||||
'image' => 'Изображение',
|
||||
'audio' => 'Аудио',
|
||||
'video' => 'Видео',
|
||||
'document' => 'Документ',
|
||||
'location' => 'Местоположение',
|
||||
'contact' => 'Контакт',
|
||||
'sticker' => 'Стикер',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => 'Входящее',
|
||||
'outgoing' => 'Исходящее',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => 'Ожидание',
|
||||
'sent' => 'Отправлено',
|
||||
'delivered' => 'Доставлено',
|
||||
'read' => 'Прочитано',
|
||||
'failed' => 'Ошибка',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => 'Запуск Приложения',
|
||||
'qrcode_updated' => 'QR-код Обновлен',
|
||||
'connection_update' => 'Обновление Подключения',
|
||||
'messages_set' => 'Сообщения Установлены',
|
||||
'messages_upsert' => 'Сообщение Получено',
|
||||
'messages_update' => 'Сообщение Обновлено',
|
||||
'messages_delete' => 'Сообщение Удалено',
|
||||
'send_message' => 'Сообщение Отправлено',
|
||||
'presence_update' => 'Обновление Присутствия',
|
||||
'new_token' => 'Новый Токен',
|
||||
'logout_instance' => 'Выход из Экземпляра',
|
||||
'remove_instance' => 'Экземпляр Удален',
|
||||
],
|
||||
];
|
||||
34
resources/lang/ru/message.php
Normal file
34
resources/lang/ru/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Сообщения',
|
||||
'model_label' => 'Сообщение',
|
||||
'plural_model_label' => 'Сообщения',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => 'Информация о Сообщении',
|
||||
'content' => 'Содержимое',
|
||||
'timestamps' => 'Временные Метки',
|
||||
'raw_payload' => 'Сырые Данные',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Экземпляр',
|
||||
'direction' => 'Направление',
|
||||
'phone' => 'Телефон',
|
||||
'type' => 'Тип',
|
||||
'content' => 'Содержимое',
|
||||
'status' => 'Статус',
|
||||
'message_id' => 'ID Сообщения',
|
||||
'media' => 'Медиа',
|
||||
'media_caption' => 'Подпись Медиа',
|
||||
'media_url' => 'URL Медиа',
|
||||
'location' => 'Местоположение',
|
||||
'sent_at' => 'Отправлено',
|
||||
'delivered_at' => 'Доставлено',
|
||||
'read_at' => 'Прочитано',
|
||||
'created_at' => 'Создано',
|
||||
],
|
||||
];
|
||||
21
resources/lang/ru/qrcode.php
Normal file
21
resources/lang/ru/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => 'Подключить :instance',
|
||||
'loading' => 'Загрузка...',
|
||||
'connected' => 'Подключен',
|
||||
'waiting_scan' => 'Ожидание сканирования',
|
||||
'error' => 'Ошибка подключения',
|
||||
'expires_in' => 'Истекает через',
|
||||
'connected_title' => 'WhatsApp Подключен!',
|
||||
'connected_description' => 'Ваш экземпляр WhatsApp подключен и готов к отправке и получению сообщений.',
|
||||
'error_title' => 'Ошибка Подключения',
|
||||
'try_again' => 'Попробовать Снова',
|
||||
'scan_instructions' => 'Откройте WhatsApp на телефоне, перейдите в Настройки > Связанные устройства > Привязать устройство и отсканируйте этот QR-код.',
|
||||
'or_use_code' => 'Или введите этот код на телефоне:',
|
||||
'copied' => 'Скопировано!',
|
||||
'refresh' => 'Обновить QR-код',
|
||||
'generate' => 'Сгенерировать QR-код',
|
||||
];
|
||||
60
resources/lang/ru/resource.php
Normal file
60
resources/lang/ru/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Экземпляры',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => 'Экземпляр',
|
||||
'plural_model_label' => 'Экземпляры',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => 'Информация об Экземпляре',
|
||||
'settings' => 'Настройки',
|
||||
'connection' => 'Подключение',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => 'Имя Экземпляра',
|
||||
'name_helper' => 'Уникальное имя для идентификации этого экземпляра',
|
||||
'number' => 'Номер Телефона',
|
||||
'number_helper' => 'Номер телефона WhatsApp с кодом страны',
|
||||
'status' => 'Статус',
|
||||
'profile_picture' => 'Фото Профиля',
|
||||
'reject_call' => 'Отклонять Звонки',
|
||||
'reject_call_helper' => 'Автоматически отклонять входящие звонки',
|
||||
'msg_call' => 'Сообщение Отклонения',
|
||||
'msg_call_helper' => 'Сообщение, отправляемое при отклонении звонка',
|
||||
'groups_ignore' => 'Игнорировать Группы',
|
||||
'groups_ignore_helper' => 'Не обрабатывать сообщения из групп',
|
||||
'always_online' => 'Всегда Онлайн',
|
||||
'always_online_helper' => 'Держать статус онлайн',
|
||||
'read_messages' => 'Читать Сообщения',
|
||||
'read_messages_helper' => 'Автоматически отмечать сообщения как прочитанные',
|
||||
'read_status' => 'Читать Статус',
|
||||
'read_status_helper' => 'Автоматически просматривать обновления статуса',
|
||||
'sync_full_history' => 'Синхронизировать Полную Историю',
|
||||
'sync_full_history_helper' => 'Синхронизировать всю историю сообщений при подключении',
|
||||
'created_at' => 'Создано',
|
||||
'updated_at' => 'Обновлено',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => 'Подключить',
|
||||
'disconnect' => 'Отключить',
|
||||
'delete' => 'Удалить',
|
||||
'refresh' => 'Обновить',
|
||||
'view_qrcode' => 'Показать QR-код',
|
||||
'close' => 'Закрыть',
|
||||
'back' => 'Вернуться к Списку',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => 'Экземпляр успешно создан',
|
||||
'updated' => 'Экземпляр успешно обновлен',
|
||||
'deleted' => 'Экземпляр успешно удален',
|
||||
'connected' => 'Экземпляр успешно подключен',
|
||||
'disconnected' => 'Экземпляр успешно отключен',
|
||||
'connection_failed' => 'Не удалось подключить экземпляр',
|
||||
],
|
||||
];
|
||||
31
resources/lang/ru/webhook.php
Normal file
31
resources/lang/ru/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Логи Вебхуков',
|
||||
'model_label' => 'Лог Вебхука',
|
||||
'plural_model_label' => 'Логи Вебхуков',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Информация о Вебхуке',
|
||||
'payload' => 'Данные',
|
||||
'error' => 'Ошибка',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Экземпляр',
|
||||
'event' => 'Событие',
|
||||
'processed' => 'Обработано',
|
||||
'has_error' => 'Есть Ошибка',
|
||||
'error' => 'Ошибка',
|
||||
'processing_time' => 'Время Обработки',
|
||||
'created_at' => 'Создано',
|
||||
'updated_at' => 'Обновлено',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => 'Да',
|
||||
'no' => 'Нет',
|
||||
],
|
||||
];
|
||||
42
resources/lang/tr/action.php
Normal file
42
resources/lang/tr/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'WhatsApp Mesajı Gönder',
|
||||
'modal_heading' => 'WhatsApp Mesajı Gönder',
|
||||
'modal_description' => 'Bir WhatsApp numarasına mesaj gönderin.',
|
||||
'send' => 'Mesaj Gönder',
|
||||
|
||||
// Form fields
|
||||
'instance' => 'Örnek',
|
||||
'instance_helper' => 'Mesaj göndermek için WhatsApp örneğini seçin.',
|
||||
'number' => 'Telefon Numarası',
|
||||
'number_helper' => 'Ülke kodu ile telefon numarasını girin (örn: 905551234567).',
|
||||
'type' => 'Mesaj Türü',
|
||||
'message' => 'Mesaj',
|
||||
'message_placeholder' => 'Mesajınızı buraya yazın...',
|
||||
'caption' => 'Başlık',
|
||||
'caption_placeholder' => 'Medya için isteğe bağlı başlık...',
|
||||
'media' => 'Medya Dosyası',
|
||||
'media_helper' => 'Gönderilecek dosyayı yükleyin.',
|
||||
|
||||
// Location fields
|
||||
'latitude' => 'Enlem',
|
||||
'longitude' => 'Boylam',
|
||||
'location_name' => 'Konum Adı',
|
||||
'location_name_placeholder' => 'örn: Ofisim',
|
||||
'location_address' => 'Adres',
|
||||
'location_address_placeholder' => 'örn: Ana Cadde 123, Şehir',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => 'Kişi Adı',
|
||||
'contact_number' => 'Kişi Telefonu',
|
||||
|
||||
// Notifications
|
||||
'success_title' => 'Mesaj Gönderildi!',
|
||||
'success_body' => 'WhatsApp mesajınız başarıyla gönderildi.',
|
||||
'error_title' => 'Gönderme Başarısız',
|
||||
'missing_required_fields' => 'Örnek ID ve telefon numarası gereklidir.',
|
||||
'unsupported_type' => 'Desteklenmeyen mesaj türü.',
|
||||
];
|
||||
51
resources/lang/tr/enums.php
Normal file
51
resources/lang/tr/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => 'Bağlı',
|
||||
'connecting' => 'Bağlanıyor',
|
||||
'close' => 'Bağlantı Kesildi',
|
||||
'refused' => 'Reddedildi',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => 'Metin',
|
||||
'image' => 'Resim',
|
||||
'audio' => 'Ses',
|
||||
'video' => 'Video',
|
||||
'document' => 'Belge',
|
||||
'location' => 'Konum',
|
||||
'contact' => 'Kişi',
|
||||
'sticker' => 'Çıkartma',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => 'Gelen',
|
||||
'outgoing' => 'Giden',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => 'Beklemede',
|
||||
'sent' => 'Gönderildi',
|
||||
'delivered' => 'Teslim Edildi',
|
||||
'read' => 'Okundu',
|
||||
'failed' => 'Başarısız',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => 'Uygulama Başlatma',
|
||||
'qrcode_updated' => 'QR Kodu Güncellendi',
|
||||
'connection_update' => 'Bağlantı Güncellemesi',
|
||||
'messages_set' => 'Mesajlar Ayarlandı',
|
||||
'messages_upsert' => 'Mesaj Alındı',
|
||||
'messages_update' => 'Mesaj Güncellendi',
|
||||
'messages_delete' => 'Mesaj Silindi',
|
||||
'send_message' => 'Mesaj Gönderildi',
|
||||
'presence_update' => 'Durum Güncellemesi',
|
||||
'new_token' => 'Yeni Token',
|
||||
'logout_instance' => 'Örnek Çıkışı',
|
||||
'remove_instance' => 'Örnek Kaldırıldı',
|
||||
],
|
||||
];
|
||||
34
resources/lang/tr/message.php
Normal file
34
resources/lang/tr/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Mesajlar',
|
||||
'model_label' => 'Mesaj',
|
||||
'plural_model_label' => 'Mesajlar',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => 'Mesaj Bilgisi',
|
||||
'content' => 'İçerik',
|
||||
'timestamps' => 'Zaman Damgaları',
|
||||
'raw_payload' => 'Ham Veri',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Örnek',
|
||||
'direction' => 'Yön',
|
||||
'phone' => 'Telefon',
|
||||
'type' => 'Tür',
|
||||
'content' => 'İçerik',
|
||||
'status' => 'Durum',
|
||||
'message_id' => 'Mesaj ID',
|
||||
'media' => 'Medya',
|
||||
'media_caption' => 'Medya Başlığı',
|
||||
'media_url' => 'Medya URL',
|
||||
'location' => 'Konum',
|
||||
'sent_at' => 'Gönderilme',
|
||||
'delivered_at' => 'Teslim',
|
||||
'read_at' => 'Okunma',
|
||||
'created_at' => 'Oluşturulma',
|
||||
],
|
||||
];
|
||||
21
resources/lang/tr/qrcode.php
Normal file
21
resources/lang/tr/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => ':instance Bağlan',
|
||||
'loading' => 'Yükleniyor...',
|
||||
'connected' => 'Bağlı',
|
||||
'waiting_scan' => 'Tarama bekleniyor',
|
||||
'error' => 'Bağlantı hatası',
|
||||
'expires_in' => 'Süresi doluyor',
|
||||
'connected_title' => 'WhatsApp Bağlandı!',
|
||||
'connected_description' => 'WhatsApp örneğiniz bağlı ve mesaj gönderip almaya hazır.',
|
||||
'error_title' => 'Bağlantı Hatası',
|
||||
'try_again' => 'Tekrar Dene',
|
||||
'scan_instructions' => 'Telefonunuzda WhatsApp\'ı açın, Ayarlar > Bağlı Cihazlar > Cihaz Bağla\'ya gidin ve bu QR kodunu tarayın.',
|
||||
'or_use_code' => 'Veya bu kodu telefonunuza girin:',
|
||||
'copied' => 'Kopyalandı!',
|
||||
'refresh' => 'QR Kodunu Yenile',
|
||||
'generate' => 'QR Kodu Oluştur',
|
||||
];
|
||||
60
resources/lang/tr/resource.php
Normal file
60
resources/lang/tr/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Örnekler',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => 'Örnek',
|
||||
'plural_model_label' => 'Örnekler',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => 'Örnek Bilgisi',
|
||||
'settings' => 'Ayarlar',
|
||||
'connection' => 'Bağlantı',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => 'Örnek Adı',
|
||||
'name_helper' => 'Bu örneği tanımlamak için benzersiz bir ad',
|
||||
'number' => 'Telefon Numarası',
|
||||
'number_helper' => 'Ülke kodu ile WhatsApp telefon numarası',
|
||||
'status' => 'Durum',
|
||||
'profile_picture' => 'Profil Resmi',
|
||||
'reject_call' => 'Aramaları Reddet',
|
||||
'reject_call_helper' => 'Gelen aramaları otomatik olarak reddet',
|
||||
'msg_call' => 'Reddetme Mesajı',
|
||||
'msg_call_helper' => 'Arama reddedildiğinde gönderilen mesaj',
|
||||
'groups_ignore' => 'Grupları Yoksay',
|
||||
'groups_ignore_helper' => 'Gruplardan gelen mesajları işleme',
|
||||
'always_online' => 'Her Zaman Çevrimiçi',
|
||||
'always_online_helper' => 'Durumu çevrimiçi olarak tut',
|
||||
'read_messages' => 'Mesajları Oku',
|
||||
'read_messages_helper' => 'Mesajları otomatik olarak okundu işaretle',
|
||||
'read_status' => 'Durumu Oku',
|
||||
'read_status_helper' => 'Durum güncellemelerini otomatik olarak görüntüle',
|
||||
'sync_full_history' => 'Tam Geçmişi Senkronize Et',
|
||||
'sync_full_history_helper' => 'Bağlantıda tüm mesaj geçmişini senkronize et',
|
||||
'created_at' => 'Oluşturulma',
|
||||
'updated_at' => 'Güncellenme',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => 'Bağlan',
|
||||
'disconnect' => 'Bağlantıyı Kes',
|
||||
'delete' => 'Sil',
|
||||
'refresh' => 'Yenile',
|
||||
'view_qrcode' => 'QR Kodunu Görüntüle',
|
||||
'close' => 'Kapat',
|
||||
'back' => 'Listeye Dön',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => 'Örnek başarıyla oluşturuldu',
|
||||
'updated' => 'Örnek başarıyla güncellendi',
|
||||
'deleted' => 'Örnek başarıyla silindi',
|
||||
'connected' => 'Örnek başarıyla bağlandı',
|
||||
'disconnected' => 'Örnek başarıyla bağlantısı kesildi',
|
||||
'connection_failed' => 'Örnek bağlantısı başarısız',
|
||||
],
|
||||
];
|
||||
31
resources/lang/tr/webhook.php
Normal file
31
resources/lang/tr/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Webhook Kayıtları',
|
||||
'model_label' => 'Webhook Kaydı',
|
||||
'plural_model_label' => 'Webhook Kayıtları',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Webhook Bilgisi',
|
||||
'payload' => 'Yük',
|
||||
'error' => 'Hata',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Örnek',
|
||||
'event' => 'Olay',
|
||||
'processed' => 'İşlendi',
|
||||
'has_error' => 'Hata Var',
|
||||
'error' => 'Hata',
|
||||
'processing_time' => 'İşleme Süresi',
|
||||
'created_at' => 'Oluşturulma',
|
||||
'updated_at' => 'Güncellenme',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => 'Evet',
|
||||
'no' => 'Hayır',
|
||||
],
|
||||
];
|
||||
42
resources/lang/uk/action.php
Normal file
42
resources/lang/uk/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => 'Надіслати Повідомлення WhatsApp',
|
||||
'modal_heading' => 'Надіслати Повідомлення WhatsApp',
|
||||
'modal_description' => 'Надіслати повідомлення на номер WhatsApp.',
|
||||
'send' => 'Надіслати Повідомлення',
|
||||
|
||||
// Form fields
|
||||
'instance' => 'Екземпляр',
|
||||
'instance_helper' => 'Виберіть екземпляр WhatsApp для надсилання повідомлення.',
|
||||
'number' => 'Номер Телефону',
|
||||
'number_helper' => 'Введіть номер телефону з кодом країни (наприклад, 380501234567).',
|
||||
'type' => 'Тип Повідомлення',
|
||||
'message' => 'Повідомлення',
|
||||
'message_placeholder' => 'Введіть повідомлення тут...',
|
||||
'caption' => 'Підпис',
|
||||
'caption_placeholder' => 'Необов\'язковий підпис для медіа...',
|
||||
'media' => 'Медіафайл',
|
||||
'media_helper' => 'Завантажте файл для надсилання.',
|
||||
|
||||
// Location fields
|
||||
'latitude' => 'Широта',
|
||||
'longitude' => 'Довгота',
|
||||
'location_name' => 'Назва Місця',
|
||||
'location_name_placeholder' => 'наприклад, Мій Офіс',
|
||||
'location_address' => 'Адреса',
|
||||
'location_address_placeholder' => 'наприклад, вул. Головна 123, Місто',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => 'Ім\'я Контакту',
|
||||
'contact_number' => 'Телефон Контакту',
|
||||
|
||||
// Notifications
|
||||
'success_title' => 'Повідомлення Надіслано!',
|
||||
'success_body' => 'Ваше повідомлення WhatsApp успішно надіслано.',
|
||||
'error_title' => 'Помилка Надсилання',
|
||||
'missing_required_fields' => 'ID екземпляра та номер телефону обов\'язкові.',
|
||||
'unsupported_type' => 'Непідтримуваний тип повідомлення.',
|
||||
];
|
||||
51
resources/lang/uk/enums.php
Normal file
51
resources/lang/uk/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => 'Підключено',
|
||||
'connecting' => 'Підключення',
|
||||
'close' => 'Відключено',
|
||||
'refused' => 'Відхилено',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => 'Текст',
|
||||
'image' => 'Зображення',
|
||||
'audio' => 'Аудіо',
|
||||
'video' => 'Відео',
|
||||
'document' => 'Документ',
|
||||
'location' => 'Місцезнаходження',
|
||||
'contact' => 'Контакт',
|
||||
'sticker' => 'Стікер',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => 'Вхідне',
|
||||
'outgoing' => 'Вихідне',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => 'Очікування',
|
||||
'sent' => 'Надіслано',
|
||||
'delivered' => 'Доставлено',
|
||||
'read' => 'Прочитано',
|
||||
'failed' => 'Помилка',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => 'Запуск Додатку',
|
||||
'qrcode_updated' => 'QR-код Оновлено',
|
||||
'connection_update' => 'Оновлення Підключення',
|
||||
'messages_set' => 'Повідомлення Встановлено',
|
||||
'messages_upsert' => 'Повідомлення Отримано',
|
||||
'messages_update' => 'Повідомлення Оновлено',
|
||||
'messages_delete' => 'Повідомлення Видалено',
|
||||
'send_message' => 'Повідомлення Надіслано',
|
||||
'presence_update' => 'Оновлення Присутності',
|
||||
'new_token' => 'Новий Токен',
|
||||
'logout_instance' => 'Вихід з Екземпляра',
|
||||
'remove_instance' => 'Екземпляр Видалено',
|
||||
],
|
||||
];
|
||||
34
resources/lang/uk/message.php
Normal file
34
resources/lang/uk/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Повідомлення',
|
||||
'model_label' => 'Повідомлення',
|
||||
'plural_model_label' => 'Повідомлення',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => 'Інформація про Повідомлення',
|
||||
'content' => 'Вміст',
|
||||
'timestamps' => 'Часові Мітки',
|
||||
'raw_payload' => 'Сирі Дані',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Екземпляр',
|
||||
'direction' => 'Напрямок',
|
||||
'phone' => 'Телефон',
|
||||
'type' => 'Тип',
|
||||
'content' => 'Вміст',
|
||||
'status' => 'Статус',
|
||||
'message_id' => 'ID Повідомлення',
|
||||
'media' => 'Медіа',
|
||||
'media_caption' => 'Підпис Медіа',
|
||||
'media_url' => 'URL Медіа',
|
||||
'location' => 'Місцезнаходження',
|
||||
'sent_at' => 'Надіслано',
|
||||
'delivered_at' => 'Доставлено',
|
||||
'read_at' => 'Прочитано',
|
||||
'created_at' => 'Створено',
|
||||
],
|
||||
];
|
||||
21
resources/lang/uk/qrcode.php
Normal file
21
resources/lang/uk/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => 'Підключити :instance',
|
||||
'loading' => 'Завантаження...',
|
||||
'connected' => 'Підключено',
|
||||
'waiting_scan' => 'Очікування сканування',
|
||||
'error' => 'Помилка підключення',
|
||||
'expires_in' => 'Закінчується через',
|
||||
'connected_title' => 'WhatsApp Підключено!',
|
||||
'connected_description' => 'Ваш екземпляр WhatsApp підключено і готовий до надсилання та отримання повідомлень.',
|
||||
'error_title' => 'Помилка Підключення',
|
||||
'try_again' => 'Спробувати Знову',
|
||||
'scan_instructions' => 'Відкрийте WhatsApp на телефоні, перейдіть до Налаштування > Пов\'язані пристрої > Прив\'язати пристрій і відскануйте цей QR-код.',
|
||||
'or_use_code' => 'Або введіть цей код на телефоні:',
|
||||
'copied' => 'Скопійовано!',
|
||||
'refresh' => 'Оновити QR-код',
|
||||
'generate' => 'Згенерувати QR-код',
|
||||
];
|
||||
60
resources/lang/uk/resource.php
Normal file
60
resources/lang/uk/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Екземпляри',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => 'Екземпляр',
|
||||
'plural_model_label' => 'Екземпляри',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => 'Інформація про Екземпляр',
|
||||
'settings' => 'Налаштування',
|
||||
'connection' => 'Підключення',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => 'Назва Екземпляра',
|
||||
'name_helper' => 'Унікальна назва для ідентифікації цього екземпляра',
|
||||
'number' => 'Номер Телефону',
|
||||
'number_helper' => 'Номер телефону WhatsApp з кодом країни',
|
||||
'status' => 'Статус',
|
||||
'profile_picture' => 'Фото Профілю',
|
||||
'reject_call' => 'Відхиляти Дзвінки',
|
||||
'reject_call_helper' => 'Автоматично відхиляти вхідні дзвінки',
|
||||
'msg_call' => 'Повідомлення Відхилення',
|
||||
'msg_call_helper' => 'Повідомлення, що надсилається при відхиленні дзвінка',
|
||||
'groups_ignore' => 'Ігнорувати Групи',
|
||||
'groups_ignore_helper' => 'Не обробляти повідомлення з груп',
|
||||
'always_online' => 'Завжди Онлайн',
|
||||
'always_online_helper' => 'Тримати статус онлайн',
|
||||
'read_messages' => 'Читати Повідомлення',
|
||||
'read_messages_helper' => 'Автоматично позначати повідомлення як прочитані',
|
||||
'read_status' => 'Читати Статус',
|
||||
'read_status_helper' => 'Автоматично переглядати оновлення статусу',
|
||||
'sync_full_history' => 'Синхронізувати Повну Історію',
|
||||
'sync_full_history_helper' => 'Синхронізувати всю історію повідомлень при підключенні',
|
||||
'created_at' => 'Створено',
|
||||
'updated_at' => 'Оновлено',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => 'Підключити',
|
||||
'disconnect' => 'Відключити',
|
||||
'delete' => 'Видалити',
|
||||
'refresh' => 'Оновити',
|
||||
'view_qrcode' => 'Показати QR-код',
|
||||
'close' => 'Закрити',
|
||||
'back' => 'Повернутися до Списку',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => 'Екземпляр успішно створено',
|
||||
'updated' => 'Екземпляр успішно оновлено',
|
||||
'deleted' => 'Екземпляр успішно видалено',
|
||||
'connected' => 'Екземпляр успішно підключено',
|
||||
'disconnected' => 'Екземпляр успішно відключено',
|
||||
'connection_failed' => 'Не вдалося підключити екземпляр',
|
||||
],
|
||||
];
|
||||
31
resources/lang/uk/webhook.php
Normal file
31
resources/lang/uk/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Логи Вебхуків',
|
||||
'model_label' => 'Лог Вебхука',
|
||||
'plural_model_label' => 'Логи Вебхуків',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Інформація про Вебхук',
|
||||
'payload' => 'Дані',
|
||||
'error' => 'Помилка',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => 'Екземпляр',
|
||||
'event' => 'Подія',
|
||||
'processed' => 'Оброблено',
|
||||
'has_error' => 'Є Помилка',
|
||||
'error' => 'Помилка',
|
||||
'processing_time' => 'Час Обробки',
|
||||
'created_at' => 'Створено',
|
||||
'updated_at' => 'Оновлено',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => 'Так',
|
||||
'no' => 'Ні',
|
||||
],
|
||||
];
|
||||
42
resources/lang/zh_CN/action.php
Normal file
42
resources/lang/zh_CN/action.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'send_message' => '发送WhatsApp消息',
|
||||
'modal_heading' => '发送WhatsApp消息',
|
||||
'modal_description' => '向WhatsApp号码发送消息。',
|
||||
'send' => '发送消息',
|
||||
|
||||
// Form fields
|
||||
'instance' => '实例',
|
||||
'instance_helper' => '选择用于发送消息的WhatsApp实例。',
|
||||
'number' => '电话号码',
|
||||
'number_helper' => '输入带国家代码的电话号码(例如:8613812345678)。',
|
||||
'type' => '消息类型',
|
||||
'message' => '消息',
|
||||
'message_placeholder' => '在此输入您的消息...',
|
||||
'caption' => '说明',
|
||||
'caption_placeholder' => '媒体的可选说明...',
|
||||
'media' => '媒体文件',
|
||||
'media_helper' => '上传要发送的文件。',
|
||||
|
||||
// Location fields
|
||||
'latitude' => '纬度',
|
||||
'longitude' => '经度',
|
||||
'location_name' => '位置名称',
|
||||
'location_name_placeholder' => '例如:我的办公室',
|
||||
'location_address' => '地址',
|
||||
'location_address_placeholder' => '例如:主街123号,城市',
|
||||
|
||||
// Contact fields
|
||||
'contact_name' => '联系人姓名',
|
||||
'contact_number' => '联系人电话',
|
||||
|
||||
// Notifications
|
||||
'success_title' => '消息已发送!',
|
||||
'success_body' => '您的WhatsApp消息已成功发送。',
|
||||
'error_title' => '发送失败',
|
||||
'missing_required_fields' => '需要实例ID和电话号码。',
|
||||
'unsupported_type' => '不支持的消息类型。',
|
||||
];
|
||||
51
resources/lang/zh_CN/enums.php
Normal file
51
resources/lang/zh_CN/enums.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'status_connection' => [
|
||||
'open' => '已连接',
|
||||
'connecting' => '连接中',
|
||||
'close' => '已断开',
|
||||
'refused' => '已拒绝',
|
||||
],
|
||||
|
||||
'message_type' => [
|
||||
'text' => '文本',
|
||||
'image' => '图片',
|
||||
'audio' => '音频',
|
||||
'video' => '视频',
|
||||
'document' => '文档',
|
||||
'location' => '位置',
|
||||
'contact' => '联系人',
|
||||
'sticker' => '贴纸',
|
||||
],
|
||||
|
||||
'message_direction' => [
|
||||
'incoming' => '收到',
|
||||
'outgoing' => '发出',
|
||||
],
|
||||
|
||||
'message_status' => [
|
||||
'pending' => '待处理',
|
||||
'sent' => '已发送',
|
||||
'delivered' => '已送达',
|
||||
'read' => '已读',
|
||||
'failed' => '失败',
|
||||
],
|
||||
|
||||
'webhook_event' => [
|
||||
'application_startup' => '应用启动',
|
||||
'qrcode_updated' => '二维码已更新',
|
||||
'connection_update' => '连接更新',
|
||||
'messages_set' => '消息已设置',
|
||||
'messages_upsert' => '收到消息',
|
||||
'messages_update' => '消息已更新',
|
||||
'messages_delete' => '消息已删除',
|
||||
'send_message' => '消息已发送',
|
||||
'presence_update' => '状态更新',
|
||||
'new_token' => '新令牌',
|
||||
'logout_instance' => '实例登出',
|
||||
'remove_instance' => '实例已删除',
|
||||
],
|
||||
];
|
||||
34
resources/lang/zh_CN/message.php
Normal file
34
resources/lang/zh_CN/message.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => '消息',
|
||||
'model_label' => '消息',
|
||||
'plural_model_label' => '消息',
|
||||
|
||||
'sections' => [
|
||||
'message_info' => '消息信息',
|
||||
'content' => '内容',
|
||||
'timestamps' => '时间戳',
|
||||
'raw_payload' => '原始数据',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => '实例',
|
||||
'direction' => '方向',
|
||||
'phone' => '电话',
|
||||
'type' => '类型',
|
||||
'content' => '内容',
|
||||
'status' => '状态',
|
||||
'message_id' => '消息ID',
|
||||
'media' => '媒体',
|
||||
'media_caption' => '媒体说明',
|
||||
'media_url' => '媒体链接',
|
||||
'location' => '位置',
|
||||
'sent_at' => '发送时间',
|
||||
'delivered_at' => '送达时间',
|
||||
'read_at' => '阅读时间',
|
||||
'created_at' => '创建时间',
|
||||
],
|
||||
];
|
||||
21
resources/lang/zh_CN/qrcode.php
Normal file
21
resources/lang/zh_CN/qrcode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'modal_title' => '连接 :instance',
|
||||
'loading' => '加载中...',
|
||||
'connected' => '已连接',
|
||||
'waiting_scan' => '等待扫描',
|
||||
'error' => '连接错误',
|
||||
'expires_in' => '过期时间',
|
||||
'connected_title' => 'WhatsApp已连接!',
|
||||
'connected_description' => '您的WhatsApp实例已连接,可以发送和接收消息。',
|
||||
'error_title' => '连接错误',
|
||||
'try_again' => '重试',
|
||||
'scan_instructions' => '在手机上打开WhatsApp,进入设置 > 已关联的设备 > 关联设备,然后扫描此二维码。',
|
||||
'or_use_code' => '或在手机上输入此代码:',
|
||||
'copied' => '已复制!',
|
||||
'refresh' => '刷新二维码',
|
||||
'generate' => '生成二维码',
|
||||
];
|
||||
60
resources/lang/zh_CN/resource.php
Normal file
60
resources/lang/zh_CN/resource.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => '实例',
|
||||
'navigation_group' => 'WhatsApp',
|
||||
'model_label' => '实例',
|
||||
'plural_model_label' => '实例',
|
||||
|
||||
'sections' => [
|
||||
'instance_info' => '实例信息',
|
||||
'settings' => '设置',
|
||||
'connection' => '连接',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'name' => '实例名称',
|
||||
'name_helper' => '用于识别此实例的唯一名称',
|
||||
'number' => '电话号码',
|
||||
'number_helper' => '带国家代码的WhatsApp电话号码',
|
||||
'status' => '状态',
|
||||
'profile_picture' => '头像',
|
||||
'reject_call' => '拒绝来电',
|
||||
'reject_call_helper' => '自动拒绝来电',
|
||||
'msg_call' => '拒绝消息',
|
||||
'msg_call_helper' => '拒绝来电时发送的消息',
|
||||
'groups_ignore' => '忽略群组',
|
||||
'groups_ignore_helper' => '不处理群组消息',
|
||||
'always_online' => '始终在线',
|
||||
'always_online_helper' => '保持在线状态',
|
||||
'read_messages' => '已读消息',
|
||||
'read_messages_helper' => '自动将消息标记为已读',
|
||||
'read_status' => '查看状态',
|
||||
'read_status_helper' => '自动查看状态更新',
|
||||
'sync_full_history' => '同步完整历史',
|
||||
'sync_full_history_helper' => '连接时同步所有消息历史',
|
||||
'created_at' => '创建时间',
|
||||
'updated_at' => '更新时间',
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
'connect' => '连接',
|
||||
'disconnect' => '断开连接',
|
||||
'delete' => '删除',
|
||||
'refresh' => '刷新',
|
||||
'view_qrcode' => '查看二维码',
|
||||
'close' => '关闭',
|
||||
'back' => '返回列表',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'created' => '实例创建成功',
|
||||
'updated' => '实例更新成功',
|
||||
'deleted' => '实例删除成功',
|
||||
'connected' => '实例连接成功',
|
||||
'disconnected' => '实例断开连接成功',
|
||||
'connection_failed' => '实例连接失败',
|
||||
],
|
||||
];
|
||||
31
resources/lang/zh_CN/webhook.php
Normal file
31
resources/lang/zh_CN/webhook.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'navigation_label' => 'Webhook日志',
|
||||
'model_label' => 'Webhook日志',
|
||||
'plural_model_label' => 'Webhook日志',
|
||||
|
||||
'sections' => [
|
||||
'webhook_info' => 'Webhook信息',
|
||||
'payload' => '负载',
|
||||
'error' => '错误',
|
||||
],
|
||||
|
||||
'fields' => [
|
||||
'instance' => '实例',
|
||||
'event' => '事件',
|
||||
'processed' => '已处理',
|
||||
'has_error' => '有错误',
|
||||
'error' => '错误',
|
||||
'processing_time' => '处理时间',
|
||||
'created_at' => '创建时间',
|
||||
'updated_at' => '更新时间',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'yes' => '是',
|
||||
'no' => '否',
|
||||
],
|
||||
];
|
||||
@@ -4,16 +4,13 @@
|
||||
{{-- QR Code Modal --}}
|
||||
<x-filament::modal id="qr-code-modal" width="md" :close-by-clicking-away="false">
|
||||
<x-slot name="heading">
|
||||
@if($this->connectInstance)
|
||||
@if ($this->connectInstance)
|
||||
{{ __('filament-evolution::qrcode.modal_title', ['instance' => $this->connectInstance->name]) }}
|
||||
@endif
|
||||
</x-slot>
|
||||
|
||||
@if($this->connectInstance && $this->showQrCodeModal)
|
||||
<livewire:filament-evolution::qr-code-display
|
||||
:instance="$this->connectInstance"
|
||||
:key="'qr-' . $this->connectInstance->id"
|
||||
/>
|
||||
@if ($this->connectInstance && $this->showQrCodeModal)
|
||||
<livewire:filament-evolution::qr-code-display :instance="$this->connectInstance" :key="'qr-' . $this->connectInstance->id" />
|
||||
@endif
|
||||
</x-filament::modal>
|
||||
</x-filament-panels::page>
|
||||
|
||||
@@ -1,54 +1,51 @@
|
||||
<div
|
||||
x-data="{
|
||||
countdown: {{ $qrCodeTtl }},
|
||||
ttl: {{ $qrCodeTtl }},
|
||||
timer: null,
|
||||
init() {
|
||||
<div x-data="{
|
||||
countdown: {{ $qrCodeTtl }},
|
||||
ttl: {{ $qrCodeTtl }},
|
||||
timer: null,
|
||||
init() {
|
||||
this.startCountdown();
|
||||
|
||||
// Listen for QR code refresh to reset countdown
|
||||
Livewire.on('qrCodeRefreshed', () => {
|
||||
this.countdown = this.ttl;
|
||||
this.startCountdown();
|
||||
});
|
||||
},
|
||||
startCountdown() {
|
||||
if (this.timer) clearInterval(this.timer);
|
||||
|
||||
// Listen for QR code refresh to reset countdown
|
||||
Livewire.on('qrCodeRefreshed', () => {
|
||||
this.countdown = this.ttl;
|
||||
this.startCountdown();
|
||||
});
|
||||
},
|
||||
startCountdown() {
|
||||
if (this.timer) clearInterval(this.timer);
|
||||
|
||||
this.timer = setInterval(() => {
|
||||
if (this.countdown > 0) {
|
||||
this.countdown--;
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
$wire.fetchQrCode();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
}"
|
||||
x-init="init()"
|
||||
@instance-connected.window="clearInterval(timer)"
|
||||
wire:poll.5s="checkConnection"
|
||||
class="w-full"
|
||||
>
|
||||
this.timer = setInterval(() => {
|
||||
if (this.countdown > 0) {
|
||||
this.countdown--;
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
$wire.fetchQrCode();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
}" x-init="init()" @instance-connected.window="clearInterval(timer)"
|
||||
wire:poll.5s="checkConnection" class="w-full">
|
||||
{{-- Loading State --}}
|
||||
@if($isLoading)
|
||||
@if ($isLoading)
|
||||
<div class="flex flex-col items-center justify-center py-16">
|
||||
<div class="relative">
|
||||
<div class="w-16 h-16 border-4 border-gray-200 dark:border-gray-700 rounded-full"></div>
|
||||
<div class="absolute top-0 left-0 w-16 h-16 border-4 border-primary-500 border-t-transparent rounded-full animate-spin"></div>
|
||||
<div
|
||||
class="absolute top-0 left-0 w-16 h-16 border-4 border-primary-500 border-t-transparent rounded-full animate-spin">
|
||||
</div>
|
||||
</div>
|
||||
<p class="mt-6 text-sm font-medium text-gray-500 dark:text-gray-400">
|
||||
{{ __('filament-evolution::qrcode.loading') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@elseif($isConnected)
|
||||
{{-- Connected State --}}
|
||||
<div class="flex flex-col items-center justify-center py-12">
|
||||
<div class="relative">
|
||||
<div class="w-20 h-20 bg-green-500 rounded-full flex items-center justify-center">
|
||||
<svg class="w-10 h-10 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M5 13l4 4L19 7"></path>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M5 13l4 4L19 7">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,13 +56,13 @@
|
||||
{{ __('filament-evolution::qrcode.connected_description') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@elseif($error)
|
||||
{{-- Error State --}}
|
||||
<div class="flex flex-col items-center justify-center py-12">
|
||||
<div class="w-20 h-20 bg-red-500 rounded-full flex items-center justify-center">
|
||||
<svg class="w-10 h-10 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M6 18L18 6M6 6l12 12"></path>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M6 18L18 6M6 6l12 12">
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="mt-6 text-lg font-semibold text-gray-900 dark:text-white">
|
||||
@@ -74,21 +71,19 @@
|
||||
<p class="mt-2 text-sm text-red-500 text-center">
|
||||
{{ $error }}
|
||||
</p>
|
||||
<button
|
||||
wire:click="fetchQrCode"
|
||||
class="mt-4 px-4 py-2 bg-primary-600 text-white text-sm font-medium rounded-lg hover:bg-primary-700"
|
||||
>
|
||||
<button wire:click="fetchQrCode"
|
||||
class="mt-4 px-4 py-2 bg-primary-600 text-white text-sm font-medium rounded-lg hover:bg-primary-700">
|
||||
{{ __('filament-evolution::qrcode.try_again') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@elseif($qrCode)
|
||||
{{-- QR Code Display --}}
|
||||
<div class="flex flex-col items-center">
|
||||
{{-- Status --}}
|
||||
<div class="flex items-center gap-2 mb-4">
|
||||
<span class="relative flex h-3 w-3">
|
||||
<span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-amber-400 opacity-75"></span>
|
||||
<span
|
||||
class="animate-ping absolute inline-flex h-full w-full rounded-full bg-amber-400 opacity-75"></span>
|
||||
<span class="relative inline-flex rounded-full h-3 w-3 bg-amber-500"></span>
|
||||
</span>
|
||||
<span class="text-sm font-medium text-gray-600 dark:text-gray-300">
|
||||
@@ -104,7 +99,8 @@
|
||||
{{-- Countdown Timer with Alpine --}}
|
||||
<div class="mt-3 flex items-center gap-2 text-sm text-gray-500 dark:text-gray-400">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
||||
</svg>
|
||||
<span>
|
||||
{{ __('filament-evolution::qrcode.expires_in') }}:
|
||||
@@ -118,7 +114,7 @@
|
||||
</p>
|
||||
|
||||
{{-- Pairing Code --}}
|
||||
@if($pairingCode)
|
||||
@if ($pairingCode)
|
||||
<div class="mt-4 text-center">
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400 mb-2">
|
||||
{{ __('filament-evolution::qrcode.or_use_code') }}
|
||||
@@ -132,28 +128,26 @@
|
||||
@endif
|
||||
|
||||
{{-- Refresh Button --}}
|
||||
<button
|
||||
wire:click="refreshQrCode"
|
||||
wire:loading.attr="disabled"
|
||||
class="mt-4 flex items-center gap-2 text-sm text-primary-600 dark:text-primary-400 hover:text-primary-700"
|
||||
>
|
||||
<svg wire:loading.class="animate-spin" class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
|
||||
<button wire:click="refreshQrCode" wire:loading.attr="disabled"
|
||||
class="mt-4 flex items-center gap-2 text-sm text-primary-600 dark:text-primary-400 hover:text-primary-700">
|
||||
<svg wire:loading.class="animate-spin" class="w-4 h-4" fill="none" stroke="currentColor"
|
||||
viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15">
|
||||
</path>
|
||||
</svg>
|
||||
{{ __('filament-evolution::qrcode.refresh') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@else
|
||||
{{-- No QR Code - Generate --}}
|
||||
<div class="flex flex-col items-center justify-center py-12">
|
||||
<button
|
||||
wire:click="fetchQrCode"
|
||||
wire:loading.attr="disabled"
|
||||
class="px-6 py-3 bg-primary-600 text-white text-sm font-semibold rounded-lg hover:bg-primary-700 flex items-center gap-2"
|
||||
>
|
||||
<button wire:click="fetchQrCode" wire:loading.attr="disabled"
|
||||
class="px-6 py-3 bg-primary-600 text-white text-sm font-semibold rounded-lg hover:bg-primary-700 flex items-center gap-2">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v1m6 11h2m-6 0h-2v4m0-11v3m0 0h.01M12 12h4.01M16 20h4M4 12h4m12 0h.01M5 8h2a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1zm12 0h2a1 1 0 001-1V5a1 1 0 00-1-1h-2a1 1 0 00-1 1v2a1 1 0 001 1zM5 20h2a1 1 0 001-1v-2a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1z"></path>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M12 4v1m6 11h2m-6 0h-2v4m0-11v3m0 0h.01M12 12h4.01M16 20h4M4 12h4m12 0h.01M5 8h2a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1zm12 0h2a1 1 0 001-1V5a1 1 0 00-1-1h-2a1 1 0 00-1 1v2a1 1 0 001 1zM5 20h2a1 1 0 001-1v-2a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1z">
|
||||
</path>
|
||||
</svg>
|
||||
{{ __('filament-evolution::qrcode.generate') }}
|
||||
</button>
|
||||
|
||||
@@ -66,7 +66,7 @@ class SendWhatsappMessageAction extends Action
|
||||
|
||||
$this->modalWidth('lg');
|
||||
|
||||
$this->form(fn (): array => $this->getFormSchema());
|
||||
$this->form(fn(): array => $this->getFormSchema());
|
||||
|
||||
$this->action(function (array $data): void {
|
||||
$this->sendMessage($data);
|
||||
@@ -238,21 +238,21 @@ class SendWhatsappMessageAction extends Action
|
||||
$this->getLatitudeInput(),
|
||||
$this->getLongitudeInput(),
|
||||
])
|
||||
->visible(fn (Get $get): bool => $get('type') === MessageTypeEnum::LOCATION->value),
|
||||
->visible(fn(Get $get): bool => $get('type') === MessageTypeEnum::LOCATION->value),
|
||||
|
||||
Grid::make(2)
|
||||
->schema([
|
||||
$this->getLocationNameInput(),
|
||||
$this->getLocationAddressInput(),
|
||||
])
|
||||
->visible(fn (Get $get): bool => $get('type') === MessageTypeEnum::LOCATION->value),
|
||||
->visible(fn(Get $get): bool => $get('type') === MessageTypeEnum::LOCATION->value),
|
||||
|
||||
Grid::make(2)
|
||||
->schema([
|
||||
$this->getContactNameInput(),
|
||||
$this->getContactNumberInput(),
|
||||
])
|
||||
->visible(fn (Get $get): bool => $get('type') === MessageTypeEnum::CONTACT->value),
|
||||
->visible(fn(Get $get): bool => $get('type') === MessageTypeEnum::CONTACT->value),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ class SendWhatsappMessageAction extends Action
|
||||
$types = ! empty($this->allowedTypes) ? $this->allowedTypes : $allTypes;
|
||||
|
||||
return collect($types)
|
||||
->mapWithKeys(fn (MessageTypeEnum $type) => [$type->value => $type->getLabel()])
|
||||
->mapWithKeys(fn(MessageTypeEnum $type) => [$type->value => $type->getLabel()])
|
||||
->toArray();
|
||||
}
|
||||
|
||||
@@ -346,8 +346,8 @@ class SendWhatsappMessageAction extends Action
|
||||
return Textarea::make('message')
|
||||
->label(__('filament-evolution::action.message'))
|
||||
->default($this->defaultMessage)
|
||||
->required(fn (Get $get): bool => $get('type') === MessageTypeEnum::TEXT->value)
|
||||
->visible(fn (Get $get): bool => $get('type') === MessageTypeEnum::TEXT->value)
|
||||
->required(fn(Get $get): bool => $get('type') === MessageTypeEnum::TEXT->value)
|
||||
->visible(fn(Get $get): bool => $get('type') === MessageTypeEnum::TEXT->value)
|
||||
->rows(4)
|
||||
->placeholder(__('filament-evolution::action.message_placeholder'));
|
||||
}
|
||||
@@ -356,7 +356,7 @@ class SendWhatsappMessageAction extends Action
|
||||
{
|
||||
return Textarea::make('caption')
|
||||
->label(__('filament-evolution::action.caption'))
|
||||
->visible(fn (Get $get): bool => in_array($get('type'), [
|
||||
->visible(fn(Get $get): bool => in_array($get('type'), [
|
||||
MessageTypeEnum::IMAGE->value,
|
||||
MessageTypeEnum::VIDEO->value,
|
||||
MessageTypeEnum::DOCUMENT->value,
|
||||
@@ -369,13 +369,13 @@ class SendWhatsappMessageAction extends Action
|
||||
{
|
||||
return FileUpload::make('media')
|
||||
->label(__('filament-evolution::action.media'))
|
||||
->required(fn (Get $get): bool => in_array($get('type'), [
|
||||
->required(fn(Get $get): bool => in_array($get('type'), [
|
||||
MessageTypeEnum::IMAGE->value,
|
||||
MessageTypeEnum::VIDEO->value,
|
||||
MessageTypeEnum::AUDIO->value,
|
||||
MessageTypeEnum::DOCUMENT->value,
|
||||
]))
|
||||
->visible(fn (Get $get): bool => in_array($get('type'), [
|
||||
->visible(fn(Get $get): bool => in_array($get('type'), [
|
||||
MessageTypeEnum::IMAGE->value,
|
||||
MessageTypeEnum::VIDEO->value,
|
||||
MessageTypeEnum::AUDIO->value,
|
||||
@@ -383,7 +383,7 @@ class SendWhatsappMessageAction extends Action
|
||||
]))
|
||||
->disk($this->mediaDisk ?? config('filament-evolution.media.disk', 'public'))
|
||||
->directory(config('filament-evolution.media.directory', 'whatsapp-media'))
|
||||
->acceptedFileTypes(fn (Get $get): array => $this->getAcceptedFileTypes($get('type')))
|
||||
->acceptedFileTypes(fn(Get $get): array => $this->getAcceptedFileTypes($get('type')))
|
||||
->maxSize(config('filament-evolution.media.max_size', 16384))
|
||||
->helperText(__('filament-evolution::action.media_helper'));
|
||||
}
|
||||
@@ -411,7 +411,7 @@ class SendWhatsappMessageAction extends Action
|
||||
{
|
||||
return TextInput::make('latitude')
|
||||
->label(__('filament-evolution::action.latitude'))
|
||||
->required(fn (Get $get): bool => $get('type') === MessageTypeEnum::LOCATION->value)
|
||||
->required(fn(Get $get): bool => $get('type') === MessageTypeEnum::LOCATION->value)
|
||||
->numeric()
|
||||
->step(0.000001)
|
||||
->placeholder('-23.5505');
|
||||
@@ -421,7 +421,7 @@ class SendWhatsappMessageAction extends Action
|
||||
{
|
||||
return TextInput::make('longitude')
|
||||
->label(__('filament-evolution::action.longitude'))
|
||||
->required(fn (Get $get): bool => $get('type') === MessageTypeEnum::LOCATION->value)
|
||||
->required(fn(Get $get): bool => $get('type') === MessageTypeEnum::LOCATION->value)
|
||||
->numeric()
|
||||
->step(0.000001)
|
||||
->placeholder('-46.6333');
|
||||
@@ -445,7 +445,7 @@ class SendWhatsappMessageAction extends Action
|
||||
{
|
||||
return TextInput::make('contact_name')
|
||||
->label(__('filament-evolution::action.contact_name'))
|
||||
->required(fn (Get $get): bool => $get('type') === MessageTypeEnum::CONTACT->value)
|
||||
->required(fn(Get $get): bool => $get('type') === MessageTypeEnum::CONTACT->value)
|
||||
->placeholder('John Doe');
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ class SendWhatsappMessageAction extends Action
|
||||
{
|
||||
return TextInput::make('contact_number')
|
||||
->label(__('filament-evolution::action.contact_number'))
|
||||
->required(fn (Get $get): bool => $get('type') === MessageTypeEnum::CONTACT->value)
|
||||
->required(fn(Get $get): bool => $get('type') === MessageTypeEnum::CONTACT->value)
|
||||
->tel()
|
||||
->placeholder('5511999999999');
|
||||
}
|
||||
@@ -521,7 +521,6 @@ class SendWhatsappMessageAction extends Action
|
||||
->body(__('filament-evolution::action.success_body'))
|
||||
->success()
|
||||
->send();
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Notification::make()
|
||||
->title(__('filament-evolution::action.error_title'))
|
||||
|
||||
79
src/Console/Commands/CleanupCommand.php
Normal file
79
src/Console/Commands/CleanupCommand.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace WallaceMartinss\FilamentEvolution\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use WallaceMartinss\FilamentEvolution\Models\WhatsappMessage;
|
||||
use WallaceMartinss\FilamentEvolution\Models\WhatsappWebhook;
|
||||
|
||||
class CleanupCommand extends Command
|
||||
{
|
||||
protected $signature = 'evolution:cleanup
|
||||
{--webhooks-days= : Override webhook cleanup days from config}
|
||||
{--messages-days= : Override messages cleanup days from config}
|
||||
{--dry-run : Show what would be deleted without actually deleting}';
|
||||
|
||||
protected $description = 'Cleanup old webhook logs and messages';
|
||||
|
||||
public function handle(): int
|
||||
{
|
||||
$webhooksDays = $this->option('webhooks-days') ?? config('filament-evolution.cleanup.webhooks_days');
|
||||
$messagesDays = $this->option('messages-days') ?? config('filament-evolution.cleanup.messages_days');
|
||||
$dryRun = $this->option('dry-run');
|
||||
|
||||
if ($dryRun) {
|
||||
$this->info('🔍 Dry run mode - no records will be deleted');
|
||||
$this->newLine();
|
||||
}
|
||||
|
||||
$totalDeleted = 0;
|
||||
|
||||
// Cleanup webhooks
|
||||
if ($webhooksDays !== null) {
|
||||
$webhooksDays = (int) $webhooksDays;
|
||||
$cutoffDate = now()->subDays($webhooksDays);
|
||||
|
||||
$count = WhatsappWebhook::where('created_at', '<', $cutoffDate)->count();
|
||||
|
||||
if ($dryRun) {
|
||||
$this->info("📋 Would delete {$count} webhooks older than {$webhooksDays} days");
|
||||
} else {
|
||||
$deleted = WhatsappWebhook::where('created_at', '<', $cutoffDate)->delete();
|
||||
$this->info("🗑️ Deleted {$deleted} webhooks older than {$webhooksDays} days");
|
||||
$totalDeleted += $deleted;
|
||||
}
|
||||
} else {
|
||||
$this->info('⏭️ Webhook cleanup disabled (webhooks_days is null)');
|
||||
}
|
||||
|
||||
// Cleanup messages
|
||||
if ($messagesDays !== null) {
|
||||
$messagesDays = (int) $messagesDays;
|
||||
$cutoffDate = now()->subDays($messagesDays);
|
||||
|
||||
$count = WhatsappMessage::where('created_at', '<', $cutoffDate)->count();
|
||||
|
||||
if ($dryRun) {
|
||||
$this->info("📋 Would delete {$count} messages older than {$messagesDays} days");
|
||||
} else {
|
||||
$deleted = WhatsappMessage::where('created_at', '<', $cutoffDate)->delete();
|
||||
$this->info("🗑️ Deleted {$deleted} messages older than {$messagesDays} days");
|
||||
$totalDeleted += $deleted;
|
||||
}
|
||||
} else {
|
||||
$this->info('⏭️ Message cleanup disabled (messages_days is null)');
|
||||
}
|
||||
|
||||
$this->newLine();
|
||||
|
||||
if ($dryRun) {
|
||||
$this->info('✅ Dry run complete. Run without --dry-run to delete records.');
|
||||
} else {
|
||||
$this->info("✅ Cleanup complete. Total records deleted: {$totalDeleted}");
|
||||
}
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ class InstanceData extends Data
|
||||
'read_messages' => $this->readMessages,
|
||||
'read_status' => $this->readStatus,
|
||||
'sync_full_history' => $this->syncFullHistory,
|
||||
], fn ($value) => $value !== null && $value !== false && $value !== '');
|
||||
], fn($value) => $value !== null && $value !== false && $value !== '');
|
||||
|
||||
if (! empty($settings)) {
|
||||
$payload = array_merge($payload, $settings);
|
||||
|
||||
@@ -11,6 +11,7 @@ use Filament\Actions\EditAction;
|
||||
use Filament\Actions\ViewAction;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Forms\Components\ToggleButtons;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Components\Tabs;
|
||||
@@ -93,43 +94,58 @@ class WhatsappInstanceResource extends Resource
|
||||
->schema([
|
||||
Section::make()
|
||||
->schema([
|
||||
Toggle::make('reject_call')
|
||||
ToggleButtons::make('reject_call')
|
||||
->label(__('filament-evolution::resource.fields.reject_call'))
|
||||
->helperText(__('filament-evolution::resource.fields.reject_call_helper'))
|
||||
->default(config('filament-evolution.instance.reject_call', false)),
|
||||
->default(config('filament-evolution.instance.reject_call', false))
|
||||
->boolean()
|
||||
->live()
|
||||
->inline(),
|
||||
|
||||
ToggleButtons::make('groups_ignore')
|
||||
->label(__('filament-evolution::resource.fields.groups_ignore'))
|
||||
->helperText(__('filament-evolution::resource.fields.groups_ignore_helper'))
|
||||
->default(config('filament-evolution.instance.groups_ignore', false))
|
||||
->boolean()
|
||||
->inline(),
|
||||
|
||||
ToggleButtons::make('always_online')
|
||||
->label(__('filament-evolution::resource.fields.always_online'))
|
||||
->helperText(__('filament-evolution::resource.fields.always_online_helper'))
|
||||
->default(config('filament-evolution.instance.always_online', false))
|
||||
->boolean()
|
||||
->inline(),
|
||||
|
||||
ToggleButtons::make('read_messages')
|
||||
->label(__('filament-evolution::resource.fields.read_messages'))
|
||||
->helperText(__('filament-evolution::resource.fields.read_messages_helper'))
|
||||
->default(config('filament-evolution.instance.read_messages', false))
|
||||
->boolean()
|
||||
->inline(),
|
||||
|
||||
ToggleButtons::make('read_status')
|
||||
->label(__('filament-evolution::resource.fields.read_status'))
|
||||
->helperText(__('filament-evolution::resource.fields.read_status_helper'))
|
||||
->default(config('filament-evolution.instance.read_status', false))
|
||||
->boolean()
|
||||
->inline(),
|
||||
|
||||
ToggleButtons::make('sync_full_history')
|
||||
->label(__('filament-evolution::resource.fields.sync_full_history'))
|
||||
->helperText(__('filament-evolution::resource.fields.sync_full_history_helper'))
|
||||
->default(config('filament-evolution.instance.sync_full_history', false))
|
||||
->boolean()
|
||||
->inline(),
|
||||
|
||||
TextInput::make('msg_call')
|
||||
->label(__('filament-evolution::resource.fields.msg_call'))
|
||||
->helperText(__('filament-evolution::resource.fields.msg_call_helper'))
|
||||
->hidden(fn($get) => $get('reject_call') == false)
|
||||
->maxLength(255)
|
||||
->default(config('filament-evolution.instance.msg_call', '')),
|
||||
|
||||
Toggle::make('groups_ignore')
|
||||
->label(__('filament-evolution::resource.fields.groups_ignore'))
|
||||
->helperText(__('filament-evolution::resource.fields.groups_ignore_helper'))
|
||||
->default(config('filament-evolution.instance.groups_ignore', false)),
|
||||
|
||||
Toggle::make('always_online')
|
||||
->label(__('filament-evolution::resource.fields.always_online'))
|
||||
->helperText(__('filament-evolution::resource.fields.always_online_helper'))
|
||||
->default(config('filament-evolution.instance.always_online', false)),
|
||||
|
||||
Toggle::make('read_messages')
|
||||
->label(__('filament-evolution::resource.fields.read_messages'))
|
||||
->helperText(__('filament-evolution::resource.fields.read_messages_helper'))
|
||||
->default(config('filament-evolution.instance.read_messages', false)),
|
||||
|
||||
Toggle::make('read_status')
|
||||
->label(__('filament-evolution::resource.fields.read_status'))
|
||||
->helperText(__('filament-evolution::resource.fields.read_status_helper'))
|
||||
->default(config('filament-evolution.instance.read_status', false)),
|
||||
|
||||
Toggle::make('sync_full_history')
|
||||
->label(__('filament-evolution::resource.fields.sync_full_history'))
|
||||
->helperText(__('filament-evolution::resource.fields.sync_full_history_helper'))
|
||||
->default(config('filament-evolution.instance.sync_full_history', false)),
|
||||
->default(config('filament-evolution.instance.msg_call', ''))
|
||||
->columnSpanFull(),
|
||||
])
|
||||
->columns(2),
|
||||
->columns(3),
|
||||
]),
|
||||
])
|
||||
->columnSpanFull(),
|
||||
@@ -142,8 +158,9 @@ class WhatsappInstanceResource extends Resource
|
||||
->columns([
|
||||
ImageColumn::make('profile_picture_url')
|
||||
->label('')
|
||||
->alignCenter()
|
||||
->circular()
|
||||
->defaultImageUrl(fn () => 'https://ui-avatars.com/api/?name=WA&color=7F9CF5&background=EBF4FF'),
|
||||
->defaultImageUrl(fn() => 'https://ui-avatars.com/api/?name=WA&color=7F9CF5&background=EBF4FF'),
|
||||
|
||||
TextColumn::make('name')
|
||||
->label(__('filament-evolution::resource.fields.name'))
|
||||
@@ -152,15 +169,18 @@ class WhatsappInstanceResource extends Resource
|
||||
|
||||
TextColumn::make('number')
|
||||
->label(__('filament-evolution::resource.fields.number'))
|
||||
->alignCenter()
|
||||
->searchable(),
|
||||
|
||||
TextColumn::make('status')
|
||||
->label(__('filament-evolution::resource.fields.status'))
|
||||
->badge()
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('created_at')
|
||||
->label(__('filament-evolution::resource.fields.created_at'))
|
||||
->alignCenter()
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
@@ -175,17 +195,17 @@ class WhatsappInstanceResource extends Resource
|
||||
SelectFilter::make('status')
|
||||
->options(StatusConnectionEnum::class),
|
||||
])
|
||||
->actions([
|
||||
->recordActions([
|
||||
Action::make('connect')
|
||||
->label(__('filament-evolution::resource.actions.connect'))
|
||||
->icon(Heroicon::QrCode)
|
||||
->color('success')
|
||||
->action(fn ($record, $livewire) => $livewire->openConnectModal((string) $record->id))
|
||||
->hidden(fn ($record): bool => $record->status === StatusConnectionEnum::OPEN),
|
||||
->action(fn($record, $livewire) => $livewire->openConnectModal((string) $record->id))
|
||||
->hidden(fn($record): bool => $record->status === StatusConnectionEnum::OPEN),
|
||||
ViewAction::make(),
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
|
||||
@@ -47,12 +47,11 @@ class CreateWhatsappInstance extends CreateRecord
|
||||
->title(__('filament-evolution::resource.messages.created'))
|
||||
->body('Instance created in Evolution API')
|
||||
->send();
|
||||
|
||||
} catch (EvolutionApiException $e) {
|
||||
Notification::make()
|
||||
->warning()
|
||||
->title(__('filament-evolution::resource.messages.created'))
|
||||
->body('Instance saved locally. API sync failed: '.$e->getMessage())
|
||||
->body('Instance saved locally. API sync failed: ' . $e->getMessage())
|
||||
->send();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace WallaceMartinss\FilamentEvolution\Filament\Resources\WhatsappInstanceResource\Pages;
|
||||
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\{Action, DeleteAction, EditAction};
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Resources\Pages\ViewRecord;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
@@ -26,9 +24,9 @@ class ViewWhatsappInstance extends ViewRecord
|
||||
->label(__('filament-evolution::resource.actions.connect'))
|
||||
->icon(Heroicon::QrCode)
|
||||
->color('success')
|
||||
->visible(fn () => $this->record->status !== StatusConnectionEnum::OPEN)
|
||||
->visible(fn() => $this->record->status !== StatusConnectionEnum::OPEN)
|
||||
->modalHeading(__('filament-evolution::resource.actions.view_qrcode'))
|
||||
->modalContent(fn () => view('filament-evolution::components.qr-code-modal', [
|
||||
->modalContent(fn() => view('filament-evolution::components.qr-code-modal', [
|
||||
'instance' => $this->record,
|
||||
]))
|
||||
->modalWidth('md')
|
||||
@@ -39,7 +37,7 @@ class ViewWhatsappInstance extends ViewRecord
|
||||
->label(__('filament-evolution::resource.actions.disconnect'))
|
||||
->icon(Heroicon::XCircle)
|
||||
->color('danger')
|
||||
->visible(fn () => $this->record->status === StatusConnectionEnum::OPEN)
|
||||
->visible(fn() => $this->record->status === StatusConnectionEnum::OPEN)
|
||||
->requiresConfirmation()
|
||||
->action(function () {
|
||||
try {
|
||||
@@ -54,7 +52,6 @@ class ViewWhatsappInstance extends ViewRecord
|
||||
->success()
|
||||
->title(__('filament-evolution::resource.messages.disconnected'))
|
||||
->send();
|
||||
|
||||
} catch (EvolutionApiException $e) {
|
||||
Notification::make()
|
||||
->danger()
|
||||
@@ -91,23 +88,31 @@ class ViewWhatsappInstance extends ViewRecord
|
||||
return;
|
||||
}
|
||||
|
||||
// Extract profile picture URL from fetchInstance response
|
||||
$instanceData = is_array($instances) ? ($instances[0] ?? $instances) : $instances;
|
||||
$profilePictureUrl = $instanceData['profilePicUrl']
|
||||
?? $instanceData['instance']['profilePicUrl']
|
||||
?? null;
|
||||
|
||||
// Instance exists, check connection state
|
||||
$state = $client->getConnectionState($this->record->name);
|
||||
|
||||
$connectionState = $state['state'] ?? $state['instance']['state'] ?? 'close';
|
||||
$status = match (strtolower($connectionState)) {
|
||||
$status = match (strtolower($connectionState)) {
|
||||
'open', 'connected' => StatusConnectionEnum::OPEN,
|
||||
'connecting' => StatusConnectionEnum::CONNECTING,
|
||||
default => StatusConnectionEnum::CLOSE,
|
||||
default => StatusConnectionEnum::CLOSE,
|
||||
};
|
||||
|
||||
$this->record->update(['status' => $status]);
|
||||
$this->record->update([
|
||||
'status' => $status,
|
||||
'profile_picture_url' => $profilePictureUrl,
|
||||
]);
|
||||
|
||||
Notification::make()
|
||||
->success()
|
||||
->title(__('filament-evolution::resource.fields.status').': '.$status->getLabel())
|
||||
->title(__('filament-evolution::resource.fields.status') . ': ' . $status->getLabel())
|
||||
->send();
|
||||
|
||||
} catch (EvolutionApiException $e) {
|
||||
// If 404, instance doesn't exist - try to create it
|
||||
if (str_contains($e->getMessage(), 'Not Found') || $e->getCode() === 404) {
|
||||
|
||||
@@ -10,9 +10,7 @@ use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
use WallaceMartinss\FilamentEvolution\Enums\MessageDirectionEnum;
|
||||
use WallaceMartinss\FilamentEvolution\Enums\MessageStatusEnum;
|
||||
use WallaceMartinss\FilamentEvolution\Enums\MessageTypeEnum;
|
||||
use WallaceMartinss\FilamentEvolution\Enums\{MessageDirectionEnum, MessageStatusEnum, MessageTypeEnum};
|
||||
use WallaceMartinss\FilamentEvolution\Filament\Resources\WhatsappMessageResource\Pages;
|
||||
use WallaceMartinss\FilamentEvolution\Models\WhatsappMessage;
|
||||
|
||||
@@ -94,22 +92,19 @@ class WhatsappMessageResource extends Resource
|
||||
->badge()
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('content')
|
||||
TextColumn::make('content.text')
|
||||
->label(__('filament-evolution::message.fields.content'))
|
||||
->limit(50)
|
||||
->wrap()
|
||||
->searchable(),
|
||||
->tooltip(fn($state) => $state)
|
||||
->searchable(query: function ($query, string $search) {
|
||||
return $query->whereRaw("JSON_UNQUOTE(JSON_EXTRACT(content, '$.text')) LIKE ?", ["%{$search}%"]);
|
||||
}),
|
||||
|
||||
TextColumn::make('status')
|
||||
->label(__('filament-evolution::message.fields.status'))
|
||||
->badge()
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('sent_at')
|
||||
->label(__('filament-evolution::message.fields.sent_at'))
|
||||
->dateTime()
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('created_at')
|
||||
->label(__('filament-evolution::message.fields.created_at'))
|
||||
->dateTime()
|
||||
@@ -134,16 +129,14 @@ class WhatsappMessageResource extends Resource
|
||||
SelectFilter::make('status')
|
||||
->options(MessageStatusEnum::class)
|
||||
->label(__('filament-evolution::message.fields.status')),
|
||||
])
|
||||
->actions([])
|
||||
->bulkActions([]);
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => Pages\ListWhatsappMessages::route('/'),
|
||||
'view' => Pages\ViewWhatsappMessage::route('/{record}'),
|
||||
'view' => Pages\ViewWhatsappMessage::route('/{record}'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ class ViewWhatsappMessage extends ViewRecord
|
||||
public function infolist(Schema $infolist): Schema
|
||||
{
|
||||
return $infolist
|
||||
->columns(1)
|
||||
->schema([
|
||||
Section::make(__('filament-evolution::message.sections.message_info'))
|
||||
->schema([
|
||||
@@ -47,16 +48,36 @@ class ViewWhatsappMessage extends ViewRecord
|
||||
|
||||
Section::make(__('filament-evolution::message.sections.content'))
|
||||
->schema([
|
||||
TextEntry::make('content')
|
||||
TextEntry::make('content.text')
|
||||
->label(__('filament-evolution::message.fields.content'))
|
||||
->columnSpanFull()
|
||||
->prose(),
|
||||
->prose()
|
||||
->placeholder('-'),
|
||||
|
||||
TextEntry::make('content.media_caption')
|
||||
->label(__('filament-evolution::message.fields.media_caption'))
|
||||
->columnSpanFull()
|
||||
->visible(fn($record) => !empty($record->content['media_caption'])),
|
||||
|
||||
TextEntry::make('content.media_url')
|
||||
->label(__('filament-evolution::message.fields.media_url'))
|
||||
->columnSpanFull()
|
||||
->url(fn($state) => $state)
|
||||
->visible(fn($record) => !empty($record->content['media_url'])),
|
||||
|
||||
TextEntry::make('location')
|
||||
->label(__('filament-evolution::message.fields.location'))
|
||||
->state(fn($record) => $record->content['latitude'] && $record->content['longitude']
|
||||
? "Lat: {$record->content['latitude']}, Lng: {$record->content['longitude']}"
|
||||
: null)
|
||||
->visible(fn($record) => !empty($record->content['latitude']) && !empty($record->content['longitude'])),
|
||||
|
||||
TextEntry::make('media')
|
||||
->label(__('filament-evolution::message.fields.media'))
|
||||
->columnSpanFull()
|
||||
->formatStateUsing(fn ($state) => $state ? json_encode($state, JSON_PRETTY_PRINT) : '-')
|
||||
->visible(fn ($record) => ! empty($record->media)),
|
||||
->state(fn($record) => $this->formatPayloadAsHtml($record->media))
|
||||
->html()
|
||||
->visible(fn($record) => !empty($record->media)),
|
||||
]),
|
||||
|
||||
Section::make(__('filament-evolution::message.sections.timestamps'))
|
||||
@@ -81,14 +102,73 @@ class ViewWhatsappMessage extends ViewRecord
|
||||
|
||||
Section::make(__('filament-evolution::message.sections.raw_payload'))
|
||||
->schema([
|
||||
TextEntry::make('raw_payload')
|
||||
->label('')
|
||||
->columnSpanFull()
|
||||
->formatStateUsing(fn ($state) => $state ? json_encode($state, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) : '-')
|
||||
->prose(),
|
||||
TextEntry::make('raw_payload_display')
|
||||
->hiddenLabel()
|
||||
->state(fn($record) => $this->formatPayloadAsHtml($record->raw_payload))
|
||||
->html()
|
||||
->copyable()
|
||||
->copyableState(fn($record) => $this->formatPayloadAsText($record->raw_payload))
|
||||
->copyMessage('Payload copiado!')
|
||||
->copyMessageDuration(1500),
|
||||
])
|
||||
->icon('heroicon-o-code-bracket')
|
||||
->collapsible()
|
||||
->collapsed(),
|
||||
]);
|
||||
}
|
||||
|
||||
protected function formatPayloadAsHtml(mixed $payload): string
|
||||
{
|
||||
if (empty($payload)) {
|
||||
return '<pre class="language-json p-4 rounded-lg overflow-x-auto m-0 border" style="background-color: #1e293b; color: #e2e8f0; border-color: #334155;"><code>{}</code></pre>';
|
||||
}
|
||||
|
||||
// Se for string, decodifica
|
||||
if (is_string($payload)) {
|
||||
$decoded = json_decode($payload, true);
|
||||
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
$payload = $decoded;
|
||||
}
|
||||
}
|
||||
|
||||
$json = json_encode($payload, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
|
||||
// Aplica syntax highlighting
|
||||
$highlighted = htmlspecialchars($json, ENT_QUOTES, 'UTF-8');
|
||||
|
||||
// Colore keys (strings antes de :)
|
||||
$highlighted = preg_replace('/"([^&]*)"(\s*:)/', '<span style="color: #7dd3fc;">"$1"</span>$2', $highlighted);
|
||||
|
||||
// Colore valores string (após os dois pontos)
|
||||
$highlighted = preg_replace('/:\s*"([^&]*)"/', ': <span style="color: #86efac;">"$1"</span>', $highlighted);
|
||||
|
||||
// Colore números
|
||||
$highlighted = preg_replace('/:\s*(-?\d+\.?\d*)([,\n\r\s])/', ': <span style="color: #34d399;">$1</span>$2', $highlighted);
|
||||
|
||||
// Colore booleanos
|
||||
$highlighted = preg_replace('/:\s*(true|false)/', ': <span style="color: #fbbf24;">$1</span>', $highlighted);
|
||||
|
||||
// Colore null
|
||||
$highlighted = preg_replace('/:\s*(null)/', ': <span style="color: #c084fc;">$1</span>', $highlighted);
|
||||
|
||||
return '<pre class="language-json p-4 rounded-lg overflow-x-auto m-0 border" style="background-color: #1e293b; color: #e2e8f0; border-color: #334155;"><code style="font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.875rem; line-height: 1.5; white-space: pre; display: block;">' . $highlighted . '</code></pre>';
|
||||
}
|
||||
|
||||
protected function formatPayloadAsText(mixed $payload): string
|
||||
{
|
||||
if (empty($payload)) {
|
||||
return '{}';
|
||||
}
|
||||
|
||||
if (is_string($payload)) {
|
||||
$decoded = json_decode($payload, true);
|
||||
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
$payload = $decoded;
|
||||
}
|
||||
}
|
||||
|
||||
return json_encode($payload, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,34 +83,22 @@ class WhatsappWebhookResource extends Resource
|
||||
TextColumn::make('event')
|
||||
->label(__('filament-evolution::webhook.fields.event'))
|
||||
->badge()
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
|
||||
IconColumn::make('processed')
|
||||
->label(__('filament-evolution::webhook.fields.processed'))
|
||||
->boolean()
|
||||
->alignCenter()
|
||||
->trueIcon('heroicon-o-check-circle')
|
||||
->falseIcon('heroicon-o-clock')
|
||||
->trueColor('success')
|
||||
->falseColor('warning')
|
||||
->sortable(),
|
||||
|
||||
IconColumn::make('error')
|
||||
->label(__('filament-evolution::webhook.fields.has_error'))
|
||||
->boolean()
|
||||
->getStateUsing(fn ($record) => ! empty($record->error))
|
||||
->trueIcon('heroicon-o-x-circle')
|
||||
->falseIcon('heroicon-o-check')
|
||||
->trueColor('danger')
|
||||
->falseColor('success'),
|
||||
|
||||
TextColumn::make('processing_time_ms')
|
||||
->label(__('filament-evolution::webhook.fields.processing_time'))
|
||||
->suffix(' ms')
|
||||
->sortable()
|
||||
->placeholder('-'),
|
||||
|
||||
TextColumn::make('created_at')
|
||||
->label(__('filament-evolution::webhook.fields.created_at'))
|
||||
->alignCenter()
|
||||
->dateTime()
|
||||
->sortable(),
|
||||
])
|
||||
@@ -131,12 +119,10 @@ class WhatsappWebhookResource extends Resource
|
||||
TernaryFilter::make('has_error')
|
||||
->label(__('filament-evolution::webhook.fields.has_error'))
|
||||
->queries(
|
||||
true: fn ($query) => $query->whereNotNull('error'),
|
||||
false: fn ($query) => $query->whereNull('error'),
|
||||
true: fn($query) => $query->whereNotNull('error'),
|
||||
false: fn($query) => $query->whereNull('error'),
|
||||
),
|
||||
])
|
||||
->actions([])
|
||||
->bulkActions([]);
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
|
||||
@@ -17,6 +17,7 @@ class ViewWhatsappWebhook extends ViewRecord
|
||||
public function infolist(Schema $infolist): Schema
|
||||
{
|
||||
return $infolist
|
||||
->columns(1)
|
||||
->schema([
|
||||
Section::make(__('filament-evolution::webhook.sections.webhook_info'))
|
||||
->schema([
|
||||
@@ -31,8 +32,8 @@ class ViewWhatsappWebhook extends ViewRecord
|
||||
TextEntry::make('processed')
|
||||
->label(__('filament-evolution::webhook.fields.processed'))
|
||||
->badge()
|
||||
->formatStateUsing(fn ($state) => $state ? __('filament-evolution::webhook.status.yes') : __('filament-evolution::webhook.status.no'))
|
||||
->color(fn ($state) => $state ? 'success' : 'warning'),
|
||||
->formatStateUsing(fn($state) => $state ? __('filament-evolution::webhook.status.yes') : __('filament-evolution::webhook.status.no'))
|
||||
->color(fn($state) => $state ? 'success' : 'warning'),
|
||||
|
||||
TextEntry::make('processing_time_ms')
|
||||
->label(__('filament-evolution::webhook.fields.processing_time'))
|
||||
@@ -57,17 +58,75 @@ class ViewWhatsappWebhook extends ViewRecord
|
||||
->prose()
|
||||
->color('danger'),
|
||||
])
|
||||
->visible(fn ($record) => ! empty($record->error)),
|
||||
->visible(fn($record) => ! empty($record->error)),
|
||||
|
||||
Section::make(__('filament-evolution::webhook.sections.payload'))
|
||||
->schema([
|
||||
TextEntry::make('payload')
|
||||
->label('')
|
||||
->columnSpanFull()
|
||||
->formatStateUsing(fn ($state) => $state ? json_encode($state, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) : '-')
|
||||
->prose(),
|
||||
TextEntry::make('payload_display')
|
||||
->hiddenLabel()
|
||||
->state(fn($record) => $this->formatPayloadAsHtml($record->payload))
|
||||
->html()
|
||||
->copyable()
|
||||
->copyableState(fn($record) => $this->formatPayloadAsText($record->payload))
|
||||
->copyMessage('Payload copiado!')
|
||||
->copyMessageDuration(1500),
|
||||
])
|
||||
->collapsible(),
|
||||
->icon('heroicon-o-code-bracket')
|
||||
->collapsible()
|
||||
->collapsed(false),
|
||||
]);
|
||||
}
|
||||
|
||||
protected function formatPayloadAsHtml(mixed $payload): string
|
||||
{
|
||||
if (empty($payload)) {
|
||||
return '<pre class="language-json p-4 rounded-lg overflow-x-auto m-0 border" style="background-color: #1e293b; color: #e2e8f0; border-color: #334155;"><code>{}</code></pre>';
|
||||
}
|
||||
|
||||
// Se for string, decodifica
|
||||
if (is_string($payload)) {
|
||||
$decoded = json_decode($payload, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
$payload = $decoded;
|
||||
}
|
||||
}
|
||||
|
||||
$json = json_encode($payload, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
|
||||
// Aplica syntax highlighting
|
||||
$highlighted = htmlspecialchars($json, ENT_QUOTES, 'UTF-8');
|
||||
|
||||
// Colore keys (strings antes de :)
|
||||
$highlighted = preg_replace('/"([^&]*)"(\s*:)/', '<span style="color: #7dd3fc;">"$1"</span>$2', $highlighted);
|
||||
|
||||
// Colore valores string (após os dois pontos)
|
||||
$highlighted = preg_replace('/:\s*"([^&]*)"/', ': <span style="color: #86efac;">"$1"</span>', $highlighted);
|
||||
|
||||
// Colore números
|
||||
$highlighted = preg_replace('/:\s*(-?\d+\.?\d*)([,\n\r\s])/', ': <span style="color: #34d399;">$1</span>$2', $highlighted);
|
||||
|
||||
// Colore booleanos
|
||||
$highlighted = preg_replace('/:\s*(true|false)/', ': <span style="color: #fbbf24;">$1</span>', $highlighted);
|
||||
|
||||
// Colore null
|
||||
$highlighted = preg_replace('/:\s*(null)/', ': <span style="color: #c084fc;">$1</span>', $highlighted);
|
||||
|
||||
return '<pre class="language-json p-4 rounded-lg overflow-x-auto m-0 border" style="background-color: #1e293b; color: #e2e8f0; border-color: #334155;"><code style="font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.875rem; line-height: 1.5; white-space: pre; display: block;">' . $highlighted . '</code></pre>';
|
||||
}
|
||||
|
||||
protected function formatPayloadAsText(mixed $payload): string
|
||||
{
|
||||
if (empty($payload)) {
|
||||
return '{}';
|
||||
}
|
||||
|
||||
if (is_string($payload)) {
|
||||
$decoded = json_decode($payload, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
$payload = $decoded;
|
||||
}
|
||||
}
|
||||
|
||||
return json_encode($payload, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ use Livewire\Livewire;
|
||||
use Spatie\LaravelPackageTools\Commands\InstallCommand;
|
||||
use Spatie\LaravelPackageTools\Package;
|
||||
use Spatie\LaravelPackageTools\PackageServiceProvider;
|
||||
use WallaceMartinss\FilamentEvolution\Console\Commands\CleanupCommand;
|
||||
use WallaceMartinss\FilamentEvolution\Livewire\QrCodeDisplay;
|
||||
use WallaceMartinss\FilamentEvolution\Services\EvolutionClient;
|
||||
use WallaceMartinss\FilamentEvolution\Services\WhatsappService;
|
||||
@@ -29,6 +30,7 @@ class FilamentEvolutionServiceProvider extends PackageServiceProvider
|
||||
->hasViews()
|
||||
->hasTranslations()
|
||||
->hasRoutes(['api'])
|
||||
->hasCommand(CleanupCommand::class)
|
||||
->hasInstallCommand(function (InstallCommand $command) {
|
||||
$command
|
||||
->publishConfigFile()
|
||||
|
||||
@@ -7,19 +7,12 @@ namespace WallaceMartinss\FilamentEvolution\Jobs;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Queue\{InteractsWithQueue, SerializesModels};
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use WallaceMartinss\FilamentEvolution\Data\Webhooks\ConnectionUpdateData;
|
||||
use WallaceMartinss\FilamentEvolution\Data\Webhooks\MessageUpsertData;
|
||||
use WallaceMartinss\FilamentEvolution\Data\Webhooks\QrCodeUpdatedData;
|
||||
use WallaceMartinss\FilamentEvolution\Data\Webhooks\{ConnectionUpdateData, MessageUpsertData, QrCodeUpdatedData};
|
||||
use WallaceMartinss\FilamentEvolution\Enums\WebhookEventEnum;
|
||||
use WallaceMartinss\FilamentEvolution\Events\InstanceConnected;
|
||||
use WallaceMartinss\FilamentEvolution\Events\InstanceDisconnected;
|
||||
use WallaceMartinss\FilamentEvolution\Events\MessageReceived;
|
||||
use WallaceMartinss\FilamentEvolution\Events\QrCodeUpdated;
|
||||
use WallaceMartinss\FilamentEvolution\Models\WhatsappInstance;
|
||||
use WallaceMartinss\FilamentEvolution\Models\WhatsappWebhook;
|
||||
use WallaceMartinss\FilamentEvolution\Events\{InstanceConnected, InstanceDisconnected, MessageReceived, QrCodeUpdated};
|
||||
use WallaceMartinss\FilamentEvolution\Models\{WhatsappInstance, WhatsappWebhook};
|
||||
|
||||
class ProcessWebhookJob implements ShouldQueue
|
||||
{
|
||||
@@ -45,7 +38,7 @@ class ProcessWebhookJob implements ShouldQueue
|
||||
try {
|
||||
$instanceName = $this->payload['instance'] ?? $this->payload['instanceName'] ?? null;
|
||||
|
||||
if (! $instanceName) {
|
||||
if (!$instanceName) {
|
||||
$this->markWebhookFailed('No instance name in payload');
|
||||
|
||||
return;
|
||||
@@ -53,7 +46,7 @@ class ProcessWebhookJob implements ShouldQueue
|
||||
|
||||
$instance = WhatsappInstance::where('name', $instanceName)->first();
|
||||
|
||||
if (! $instance) {
|
||||
if (!$instance) {
|
||||
$this->markWebhookFailed("Instance not found: {$instanceName}");
|
||||
|
||||
return;
|
||||
@@ -61,15 +54,14 @@ class ProcessWebhookJob implements ShouldQueue
|
||||
|
||||
$this->processEvent($instance);
|
||||
$this->markWebhookProcessed();
|
||||
|
||||
} catch (\Throwable $e) {
|
||||
$this->markWebhookFailed($e->getMessage());
|
||||
|
||||
if (config('filament-evolution.logging.webhook_errors', true)) {
|
||||
Log::channel(config('filament-evolution.logging.channel', 'stack'))
|
||||
->error('Webhook processing failed', [
|
||||
'event' => $this->event,
|
||||
'error' => $e->getMessage(),
|
||||
'event' => $this->event,
|
||||
'error' => $e->getMessage(),
|
||||
'payload' => $this->payload,
|
||||
]);
|
||||
}
|
||||
@@ -84,10 +76,10 @@ class ProcessWebhookJob implements ShouldQueue
|
||||
|
||||
match ($eventEnum) {
|
||||
WebhookEventEnum::CONNECTION_UPDATE => $this->handleConnectionUpdate($instance),
|
||||
WebhookEventEnum::QRCODE_UPDATED => $this->handleQrCodeUpdated($instance),
|
||||
WebhookEventEnum::MESSAGES_UPSERT => $this->handleMessageUpsert($instance),
|
||||
WebhookEventEnum::MESSAGES_UPDATE => $this->handleMessageUpdate($instance),
|
||||
default => $this->handleUnknownEvent($instance),
|
||||
WebhookEventEnum::QRCODE_UPDATED => $this->handleQrCodeUpdated($instance),
|
||||
WebhookEventEnum::MESSAGES_UPSERT => $this->handleMessageUpsert($instance),
|
||||
WebhookEventEnum::MESSAGES_UPDATE => $this->handleMessageUpdate($instance),
|
||||
default => $this->handleUnknownEvent($instance),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -111,8 +103,8 @@ class ProcessWebhookJob implements ShouldQueue
|
||||
$data = QrCodeUpdatedData::fromWebhook($this->payload);
|
||||
|
||||
$instance->update([
|
||||
'qr_code' => $data->base64,
|
||||
'pairing_code' => $data->pairingCode,
|
||||
'qr_code' => $data->base64,
|
||||
'pairing_code' => $data->pairingCode,
|
||||
'qr_code_updated_at' => now(),
|
||||
]);
|
||||
|
||||
@@ -134,23 +126,24 @@ class ProcessWebhookJob implements ShouldQueue
|
||||
if (config('filament-evolution.storage.messages', true)) {
|
||||
// Extract remoteJid from payload
|
||||
$messageData = $this->payload['data'] ?? $this->payload;
|
||||
$key = $messageData['key'] ?? [];
|
||||
$remoteJid = $key['remoteJid'] ?? $data->message->phone;
|
||||
$key = $messageData['key'] ?? [];
|
||||
$remoteJid = $key['remoteJid'] ?? $data->message->phone;
|
||||
|
||||
$instance->messages()->create([
|
||||
'message_id' => $data->message->messageId,
|
||||
'remote_jid' => $remoteJid,
|
||||
'phone' => $data->message->phone,
|
||||
'direction' => $data->message->direction,
|
||||
'type' => $data->message->type,
|
||||
'content' => json_encode([
|
||||
'text' => $data->message->text,
|
||||
'media_url' => $data->message->mediaUrl,
|
||||
'phone' => $data->message->phone,
|
||||
'direction' => $data->message->direction,
|
||||
'type' => $data->message->type,
|
||||
'content' => [
|
||||
'text' => $data->message->text,
|
||||
'media_url' => $data->message->mediaUrl,
|
||||
'media_caption' => $data->message->mediaCaption,
|
||||
'latitude' => $data->message->latitude,
|
||||
'longitude' => $data->message->longitude,
|
||||
]),
|
||||
'status' => $data->message->status,
|
||||
'latitude' => $data->message->latitude,
|
||||
'longitude' => $data->message->longitude,
|
||||
],
|
||||
'status' => $data->message->status,
|
||||
'raw_payload' => $this->payload,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -160,13 +153,13 @@ class ProcessWebhookJob implements ShouldQueue
|
||||
protected function handleMessageUpdate(WhatsappInstance $instance): void
|
||||
{
|
||||
// Only update if message storage is enabled
|
||||
if (! config('filament-evolution.storage.messages', true)) {
|
||||
if (!config('filament-evolution.storage.messages', true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$messageData = $this->payload['data'] ?? $this->payload;
|
||||
$key = $messageData['key'] ?? [];
|
||||
$update = $messageData['update'] ?? [];
|
||||
$key = $messageData['key'] ?? [];
|
||||
$update = $messageData['update'] ?? [];
|
||||
|
||||
if (isset($key['id']) && isset($update['status'])) {
|
||||
$instance->messages()
|
||||
@@ -182,7 +175,7 @@ class ProcessWebhookJob implements ShouldQueue
|
||||
if (config('filament-evolution.logging.webhook_events', false)) {
|
||||
Log::channel(config('filament-evolution.logging.channel', 'stack'))
|
||||
->info('Unknown webhook event received', [
|
||||
'event' => $this->event,
|
||||
'event' => $this->event,
|
||||
'instance' => $instance->name,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ class SendMessageJob implements ShouldQueue
|
||||
if ($this->messageId) {
|
||||
$this->updateMessageStatus(MessageStatusEnum::SENT, $response);
|
||||
}
|
||||
|
||||
} catch (EvolutionApiException $e) {
|
||||
if ($this->messageId) {
|
||||
$this->updateMessageStatus(MessageStatusEnum::FAILED);
|
||||
|
||||
@@ -56,7 +56,6 @@ class QrCodeDisplay extends Component
|
||||
$this->instance->update(['status' => StatusConnectionEnum::OPEN]);
|
||||
$this->dispatch('instance-connected');
|
||||
}
|
||||
|
||||
} catch (EvolutionApiException $e) {
|
||||
// Don't show error during poll - instance might not exist yet
|
||||
if (! $this->qrCode) {
|
||||
@@ -87,7 +86,6 @@ class QrCodeDisplay extends Component
|
||||
|
||||
// Dispatch event to reset Alpine countdown
|
||||
$this->dispatch('qrCodeRefreshed');
|
||||
|
||||
} catch (EvolutionApiException $e) {
|
||||
$this->error = $e->getMessage();
|
||||
$this->isLoading = false;
|
||||
|
||||
@@ -8,9 +8,7 @@ use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use WallaceMartinss\FilamentEvolution\Enums\MessageDirectionEnum;
|
||||
use WallaceMartinss\FilamentEvolution\Enums\MessageStatusEnum;
|
||||
use WallaceMartinss\FilamentEvolution\Enums\MessageTypeEnum;
|
||||
use WallaceMartinss\FilamentEvolution\Enums\{MessageDirectionEnum, MessageStatusEnum, MessageTypeEnum};
|
||||
use WallaceMartinss\FilamentEvolution\Models\Concerns\HasTenant;
|
||||
|
||||
class WhatsappMessage extends Model
|
||||
@@ -40,14 +38,15 @@ class WhatsappMessage extends Model
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'direction' => MessageDirectionEnum::class,
|
||||
'type' => MessageTypeEnum::class,
|
||||
'status' => MessageStatusEnum::class,
|
||||
'media' => 'array',
|
||||
'raw_payload' => 'array',
|
||||
'sent_at' => 'datetime',
|
||||
'direction' => MessageDirectionEnum::class,
|
||||
'type' => MessageTypeEnum::class,
|
||||
'status' => MessageStatusEnum::class,
|
||||
'content' => 'array',
|
||||
'media' => 'array',
|
||||
'raw_payload' => 'array',
|
||||
'sent_at' => 'datetime',
|
||||
'delivered_at' => 'datetime',
|
||||
'read_at' => 'datetime',
|
||||
'read_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -94,7 +93,7 @@ class WhatsappMessage extends Model
|
||||
public function markAsSent(): void
|
||||
{
|
||||
$this->update([
|
||||
'status' => MessageStatusEnum::SENT,
|
||||
'status' => MessageStatusEnum::SENT,
|
||||
'sent_at' => now(),
|
||||
]);
|
||||
}
|
||||
@@ -102,7 +101,7 @@ class WhatsappMessage extends Model
|
||||
public function markAsDelivered(): void
|
||||
{
|
||||
$this->update([
|
||||
'status' => MessageStatusEnum::DELIVERED,
|
||||
'status' => MessageStatusEnum::DELIVERED,
|
||||
'delivered_at' => now(),
|
||||
]);
|
||||
}
|
||||
@@ -110,7 +109,7 @@ class WhatsappMessage extends Model
|
||||
public function markAsRead(): void
|
||||
{
|
||||
$this->update([
|
||||
'status' => MessageStatusEnum::READ,
|
||||
'status' => MessageStatusEnum::READ,
|
||||
'read_at' => now(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class WhatsappService
|
||||
|
||||
// If Brazilian number without country code, add it
|
||||
if (strlen($number) === 10 || strlen($number) === 11) {
|
||||
$number = '55'.$number;
|
||||
$number = '55' . $number;
|
||||
}
|
||||
|
||||
return $number;
|
||||
|
||||
Reference in New Issue
Block a user