@php // محاسبه دقیقه از زمان ساخت $minutesSinceCreation = $server->created_at ? $server->created_at->diffInMinutes(now()) : 999; $showNewServerAlert = $minutesSinceCreation <= 2; // فقط 2 دقیقه اول نمایش بده $remainingSeconds = max(0, (2 * 60) - ($minutesSinceCreation * 60)); // ثانیه باقیمانده @endphp @if($showNewServerAlert)
@endif
Active Time
مدت فعال بودن
@php // فاصله زمان ایجاد تا الان بر حسب ساعت $activeHours = $server->created_at ? $server->created_at->diffInHours(now()) : 0; @endphp {{ floor($activeHours) }} ساعت
Cost
هزینه این ماه
{{ number_format($costThisMonth ?? 0) }} تومان
ip
IP
{{ $server->ip_address ?? $server->main_ip ?? '-' }}
Password
رمز عبور
@if($server->provider === 'hetzner') @if(!empty($server->password)) {{ str_repeat('*', strlen($server->password)) }} @else رمز اولیه فقط در اولین ساخت نمایش داده می‌شود.
در صورت نیاز به رمز جدید، سرور را نصب مجدد کنید.
@endif @else @if(!empty($server->password)) {{ str_repeat('*', strlen($server->password)) }} @else رمز ثبت نشده @endif @endif
OS
سیستم عامل
{{ $osName ?? '-' }}
Status
وضعیت سرور
@php $status = $server->status ?? '-'; $statusText = [ 'active' => 'روشن', 'running' => 'روشن', 'on' => 'روشن', 'stopped' => 'خاموش', 'off' => 'خاموش', 'suspended' => 'مسدود', 'creating' => 'در حال ساخت', 'installing' => 'در حال نصب', 'reinstalling' => 'در حال نصب مجدد', 'pending' => 'در انتظار', 'deleting' => 'در حال حذف', ][$status] ?? $status; $statusClass = match($status) { 'active', 'running', 'on' => 'text-success', 'creating', 'installing', 'reinstalling', 'pending', 'deleting' => 'text-warning', 'suspended' => 'text-danger', 'stopped', 'off' => 'text-secondary', default => 'text-muted', }; $statusIcon = match($status) { 'active', 'running', 'on' => 'ri-checkbox-circle-fill', 'stopped', 'off' => 'ri-pause-circle-fill', 'suspended' => 'ri-error-warning-fill', 'creating', 'installing', 'reinstalling', 'pending', 'deleting' => 'ri-time-fill', default => 'ri-question-fill', }; @endphp {{ $statusText }} @if(in_array($status, ['creating', 'installing', 'reinstalling', 'pending', 'deleting'])) @endif