PageSourceSearch

https://nefes21.com/assets/videos-BJ-nvjah.js

js nefes21.com collected 2026-09-27 08:34:49 UTC 9,349 bytes, 1 lines download raw bytes

1import{bW as T,r as h,p as $,j as e,aw as j,B as o,av as z,i as v,S as D,I as P,f as w,J as F}from"./index-fv-DcFj2.js";import{M as p}from"./monitor-BCew-RJF.js";import{F as I}from"./filter-_bqoqpI7.js";import{C as y}from"./circle-check-big-DM76MPOQ.js";const W=()=>{const{selectedLanguage:C}=T(),t=C.code==="en",[n,k]=h.useState(""),[r,M]=h.useState("all"),[c,m]=h.useState(1),u=8,{data:g,isLoading:S}=$({queryKey:["/api/student/activity/history"],select:s=>(s==null?void 0:s.filter(a=>a.contentType==="video"))||[]}),V=s=>{const a=new Date(s),l=Math.floor((new Date().getTime()-a.getTime())/(1e3*60));return l<60?t?`${l} minutes ago`:`${l} dakika önce`:l<1440?t?`${Math.floor(l/60)} hours ago`:`${Math.floor(l/60)} saat önce`:t?`${Math.floor(l/1440)} days ago`:`${Math.floor(l/1440)} gün önce`},b=s=>{const a=Math.floor(s/3600),d=Math.floor(s%3600/60),l=Math.floor(s%60);return a>0?`${a}:${d.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}`:`${d}:${l.toString().padStart(2,"0")}`},i=(g==null?void 0:g.filter(s=>{const a=s.contentTitle.toLowerCase().includes(n.toLowerCase()),d=r==="all"||r==="completed"&&s.isCompleted||r==="incomplete"&&!s.isCompleted;return a&&d}))||[],x=Math.ceil(i.length/u),N=(c-1)*u,f=i.slice(N,N+u);return h.useEffect(()=>{m(1)},[n,r]),e.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-slate-900 via-slate-800 to-slate-900",children:[e.jsx("div",{className:"bg-slate-800/60 backdrop-blur-sm border-b border-slate-700/50 sticky top-0 z-10",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(j,{to:"/ogrenci-admin",children:e.jsxs(o,{variant:"outline",size:"sm",className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:[e.jsx(z,{className:"w-4 h-4 mr-2"}),t?"Go Back":"Geri Dön"]})}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(p,{className:"w-6 h-6 text-purple-400"}),e.jsx("h1",{className:"text-2xl font-bold text-white",children:t?"Watched Videos":"İzlenen Videolar"})]})]}),e.jsxs(v,{variant:"outline",className:"text-purple-400 border-purple-400",children:[i.length," ",t?"Videos":"Video"]})]})})}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[e.jsx("div",{className:"bg-slate-800/60 backdrop-blur-sm border border-slate-700/50 rounded-lg shadow-xl mb-8",children:e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsx("div",{className:"md:col-span-2",children:e.jsxs("div",{className:"relative",children:[e.jsx(D,{className:"absolute left-3 top-3 w-4 h-4 text-slate-400"}),e.jsx(P,{placeholder:t?"Search videos...":"Video ara...",value:n,onChange:s=>k(s.target.value),className:"pl-10 bg-slate-700/50 border-slate-600 text-white placeholder-slate-400"})]})}),e.jsx("div",{children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(I,{className:"w-4 h-4 text-slate-400"}),e.jsxs("select",{value:r,onChange:s=>M(s.target.value),className:"flex-1 bg-slate-700/50 border border-slate-600 rounded-md px-3 py-2 text-white text-sm",children:[e.jsx("option",{value:"all",children:t?"All":"Tümü"}),e.jsx("option",{value:"completed",children:t?"Completed":"Tamamlanan"}),e.jsx("option",{value:"incomplete",children:t?"In Progress":"Devam Eden"})]})]})})]})})}),e.jsx("div",{className:"bg-slate-800/60 backdrop-blur-sm border border-slate-700/50 rounded-lg shadow-xl",children:e.jsx("div",{className:"p-6",children:S?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"animate-spin w-8 h-8 border-4 border-purple-400 border-t-transparent rounded-full"})}):f.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:f.map(s=>e.jsx(j,{to:`/video-watch/${s.contentId}`,children:e.jsx("div",{className:"group bg-slate-700/50 rounded-lg overflow-hidden hover:bg-slate-600/50 transition-all duration-200 border border-slate-600/50 hover:border-purple-400/50",children:e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"flex items-start space-x-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-12 h-12 bg-purple-600/20 rounded-lg flex items-center justify-center group-hover:bg-purple-600/30 transition-colors",children:e.jsx(w,{className:"w-6 h-6 text-purple-400"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-semibold text-white group-hover:text-purple-300 transition-colors truncate",children:s.contentTitle}),e.jsxs("div",{className:"flex items-center space-x-2 mt-2",children:[e.jsxs("div",{className:"flex items-center space-x-1 text-xs bg-slate-600 px-2 py-1 rounded",children:[e.jsx(p,{className:"w-3 h-3 text-purple-400"}),e.jsx("span",{className:"text-slate-200",children:"Video"})]}),e.jsx("span",{className:"text-slate-400 text-sm",children:"•"}),e.jsx("span",{className:"text-slate-400 text-sm",children:V(s.lastWatched)})]}),e.jsxs("div",{className:"mt-4",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400 mb-2",children:[e.jsx("span",{children:t?"Progress":"İlerleme"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("span",{children:[b(s.watchDuration)," / ",b(s.totalDuration)]}),s.isCompleted&&e.jsx(y,{className:"w-4 h-4 text-green-400"})]})]}),e.jsx("div",{className:"w-full bg-slate-600/50 rounded-full h-2 mb-2",children:e.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${s.isCompleted?"bg-gradient-to-r from-green-500 to-green-400":"bg-gradient-to-r from-purple-500 to-purple-400"}`,style:{width:`${Math.min(100,Math.round(parseFloat(s.progressPercentage)))}%`}})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(v,{variant:s.isCompleted?"default":"secondary",className:`text-xs ${s.isCompleted?"bg-green-600/20 text-green-400 border-green-400/30":"bg-purple-600/20 text-purple-400 border-purple-400/30"}`,children:[Math.round(parseFloat(s.progressPercentage)),"%"]}),e.jsx("span",{className:"text-xs text-slate-400",children:s.isCompleted?t?"Completed":"Tamamlandı":t?"In progress":"Devam ediyor"})]})]})]})]})})})},s.id))}),x>1&&e.jsxs("div",{className:"flex items-center justify-center space-x-2 mt-8",children:[e.jsx(o,{variant:"outline",size:"sm",onClick:()=>m(s=>Math.max(1,s-1)),disabled:c===1,className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:t?"Previous":"Önceki"}),Array.from({length:x},(s,a)=>a+1).map(s=>e.jsx(o,{variant:c===s?"default":"outline",size:"sm",onClick:()=>m(s),className:c===s?"bg-purple-600 text-white hover:bg-purple-700":"border-slate-600 text-slate-300 hover:bg-slate-700",children:s},s)),e.jsx(o,{variant:"outline",size:"sm",onClick:()=>m(s=>Math.min(x,s+1)),disabled:c===x,className:"border-slate-600 text-slate-300 hover:bg-slate-700",children:t?"Next":"Sonraki"})]})]}):e.jsxs("div",{className:"text-center py-12",children:[e.jsx(p,{className:"w-16 h-16 text-slate-500 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-slate-300 mb-2",children:n||r!=="all"?t?"No video foun
1d":"Video bulunamadı":t?"No videos watched yet":"Henüz video izlenmedi"}),e.jsx("p",{className:"text-slate-400 mb-6",children:n||r!=="all"?t?"No videos matching your search criteria.":"Arama kriterlerinize uygun video bulunamadı.":t?"Videos will appear here when you start watching.":"Video izlemeye başladığınızda burada görünecek."}),e.jsx(j,{to:"/nefes21akademi",children:e.jsxs(o,{className:"bg-purple-600 text-white hover:bg-purple-700",children:[e.jsx(w,{className:"w-4 h-4 mr-2"}),t?"Start Watching Videos":"Video İzlemeye Başla"]})})]})})}),i.length>0&&e.jsxs("div",{className:"mt-8 grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsx("div",{className:"bg-slate-800/60 backdrop-blur-sm border border-slate-700/50 rounded-lg shadow-xl p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-300",children:t?"Total Videos":"Toplam Video"}),e.jsx("p",{className:"text-2xl font-bold text-purple-400",children:i.length})]}),e.jsx(p,{className:"w-8 h-8 text-purple-400 opacity-80"})]})}),e.jsx("div",{className:"bg-slate-800/60 backdrop-blur-sm border border-slate-700/50 rounded-lg shadow-xl p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-300",children:t?"Completed":"Tamamlanan"}),e.jsx("p",{className:"text-2xl font-bold text-green-400",children:i.filter(s=>s.isCompleted).length})]}),e.jsx(y,{className:"w-8 h-8 text-green-400 opacity-80"})]})}),e.jsx("div",{className:"bg-slate-800/60 backdrop-blur-sm border border-slate-700/50 rounded-lg shadow-xl p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-300",children:t?"Total Duration":"Toplam Süre"}),e.jsxs("p",{className:"text-2xl font-bold text-cyan-400",children:[Math.floor(i.reduce((s,a)=>s+a.watchDuration,0)/60),t?"min":"dk"]})]}),e.jsx(F,{className:"w-8 h-8 text-cyan-400 opacity-80"})]})})]})]})]})};export{W as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.