{{-- resources/views/instagram/posts/index.blade.php --}} منشورات إنستقرام

{{ __('منشورات إنستقرام') }}

{{ __('إدارة ومتابعة المنشورات المجدولة والمنشورة') }}

@if(isset($planLimits) && $planLimits['feature_available']) @if($planLimits['can_create_more']) {{ __('منشور جديد') }} @else {{ __('ترقية للمزيد من المنشورات') }} @endif @else {{ __('ترقية لتفعيل الميزة') }} @endif
@if(isset($planLimits)) @php $percentage = !$planLimits['unlimited'] && $planLimits['max'] > 0 ? ($planLimits['current'] / $planLimits['max']) * 100 : 0; $isLow = !$planLimits['unlimited'] && $planLimits['remaining'] <= 5; $isFull = !$planLimits['unlimited'] && $planLimits['remaining'] == 0; // Determine banner color - Instagram theme if (!$planLimits['feature_available']) { $bannerColor = 'from-purple-500 to-purple-600'; $iconBg = 'bg-purple-400/30'; } elseif ($isFull) { $bannerColor = 'from-red-500 to-red-600'; $iconBg = 'bg-red-400/30'; } elseif ($isLow) { $bannerColor = 'from-orange-500 to-orange-600'; $iconBg = 'bg-orange-400/30'; } elseif ($planLimits['unlimited']) { $bannerColor = 'from-green-500 to-green-600'; $iconBg = 'bg-green-400/30'; } else { $bannerColor = 'from-purple-600 via-pink-600 to-orange-500'; $iconBg = 'bg-white/20'; } @endphp

{{ __('استخدام المنشورات - إنستقرام') }}

@if($planLimits['unlimited']) {{ __('غير محدود') }} @endif
{{ $planLimits['current'] }} @if(!$planLimits['unlimited']) / {{ $planLimits['max'] }} @endif {{ __('منشور') }}
@if(!$planLimits['unlimited'])
@php $progressColor = $percentage >= 90 ? 'bg-red-300' : ($percentage >= 70 ? 'bg-yellow-300' : 'bg-green-300'); @endphp
{{ number_format($percentage, 0) }}%
@endif
@if(!$planLimits['feature_available']) {{ __('ترقية الآن') }} @elseif($isFull) {{ __('ترقية') }} @elseif($isLow) {{ __('عرض الباقات') }} @elseif($planLimits['unlimited']) @else @endif
@endif
{{ $stats['total'] }}
إجمالي
{{ $stats['published'] }}
منشور
{{ $stats['scheduled'] }}
مجدول
{{ $stats['draft'] }}
مسودة
@if($posts->count() > 0)
@foreach($posts as $post)
@if($post->getMainImage()) @php $mainImage = Storage::url($post->getMainImage()); $extension = strtolower(pathinfo($post->getMainImage(), PATHINFO_EXTENSION)); $videoExtensions = ['mp4', 'mov', 'avi', 'webm', 'mkv']; $isVideo = in_array($extension, $videoExtensions) || str_contains(Storage::mimeType($post->getMainImage()), 'video'); @endphp @if($isVideo)
فيديو
@else Post preview @endif @else
@endif @if($post->media_type === 'CAROUSEL_ALBUM')
{{ count($post->media_files) }}
@elseif($post->media_type === 'REEL')
ريل
@elseif($post->media_type === 'STORY')
ستوري
@elseif($post->media_type === 'VIDEO')
فيديو
@endif
@switch($post->status) @case('published') منشور @break @case('scheduled') مجدول @break @case('failed') فشل @break @default مسودة @endswitch
{{ '@' . $post->instagramAccount->username }}

{{ $post->getTruncatedCaption(100) }}

@if(!empty($post->hashtags))
@foreach(array_slice($post->hashtags, 0, 3) as $hashtag) #{{ $hashtag }} @endforeach @if(count($post->hashtags) > 3) +{{ count($post->hashtags) - 3 }} @endif
@endif
@php $userTimezone = auth()->user()->timezone ?? 'UTC'; @endphp @if($post->status === 'scheduled')
ينشر في: {{ \App\Helpers\TimeHelper::toUserTimezone($post->scheduled_at, $userTimezone) }}
@elseif($post->status === 'published')
نُشر: {{ \App\Helpers\TimeHelper::diffForHumans($post->published_at, $userTimezone) }}
@else
أُنشئ: {{ \App\Helpers\TimeHelper::diffForHumans($post->created_at, $userTimezone) }}
@endif
@if($post->status === 'failed' && $post->error_message)
{{ Str::limit($post->error_message, 80) }}
@endif
@if($post->status === 'draft' || $post->status === 'scheduled')
@csrf
@endif @if(in_array($post->status, ['draft', 'scheduled'])) تعديل @endif @if($post->status === 'published' && $post->permalink)
@endif @if($post->status === 'failed')
@csrf
@endif
@endforeach
{{ $posts->appends(request()->query())->links() }}
@else

لا توجد منشورات

@if(request()->has('status') && request()->get('status') !== 'all') لا توجد منشورات بحالة "{{ request()->get('status') }}" @else ابدأ بإنشاء أول منشور لحسابك على إنستقرام @endif

إنشاء منشور جديد
@endif