diff --git a/app/Http/Controllers/Video/Veo3Controller.php b/app/Http/Controllers/Video/Veo3Controller.php index 4661fa80..2679ad94 100644 --- a/app/Http/Controllers/Video/Veo3Controller.php +++ b/app/Http/Controllers/Video/Veo3Controller.php @@ -213,7 +213,7 @@ public function history(Request $request): JsonResponse $videos = VideoGeneration::where('user_id', auth()->id()) ->orderByDesc('created_at') ->limit(50) - ->get(['id', 'keyword', 'title', 'status', 'progress', 'cost_usd', 'created_at']); + ->get(['id', 'keyword', 'title', 'status', 'progress', 'cost_usd', 'created_at', 'updated_at']); return response()->json([ 'success' => true, diff --git a/resources/views/video/veo3/index.blade.php b/resources/views/video/veo3/index.blade.php index aa061cc2..b1f82709 100644 --- a/resources/views/video/veo3/index.blade.php +++ b/resources/views/video/veo3/index.blade.php @@ -578,6 +578,26 @@ className="bg-indigo-600 text-white px-8 py-3 rounded-lg font-medium hover:bg-in } }; + const formatKST = (dateStr) => { + if (!dateStr) return '-'; + return new Date(dateStr).toLocaleString('ko-KR', { + timeZone: 'Asia/Seoul', + month: '2-digit', day: '2-digit', + hour: '2-digit', minute: '2-digit', + hour12: false, + }); + }; + + const formatDuration = (created, updated, status) => { + if (!created || !updated) return '-'; + if (!['completed', 'failed'].includes(status)) return '진행 중'; + const diffSec = Math.floor((new Date(updated) - new Date(created)) / 1000); + if (diffSec < 60) return `${diffSec}초`; + const m = Math.floor(diffSec / 60); + const s = diffSec % 60; + return `${m}분 ${s}초`; + }; + if (loading) return
이력 로딩 중...
; if (history.length === 0) return null; @@ -627,7 +647,8 @@ className="flex items-center gap-1.5 px-3 py-1.5 bg-red-500 text-white text-xs f className="w-4 h-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500 cursor-pointer" /> - 날짜 + 생성일시 + 제작시간 키워드 제목 상태 @@ -646,7 +667,8 @@ className="w-4 h-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500 className="w-4 h-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500 cursor-pointer" /> - {new Date(item.created_at).toLocaleDateString('ko-KR')} + {formatKST(item.created_at)} + {formatDuration(item.created_at, item.updated_at, item.status)} {item.keyword} {item.title || '-'}