PageSourceSearch

https://snich.ai/assets/RecordingLayout-298be114.js

js snich.ai collected 2026-10-05 15:07:41 UTC 7,597 bytes, 1 lines download raw bytes

1import{u as J,a as K,r as t,j as e,O as Q}from"./vendor-react-72e4a099.js";import{u as X,b as Y,B as C,d as F,M as Z}from"./Toast-43ee7788.js";import{C as _,E as ee,a as h,T as se,A as ae}from"./Display-48adcc24.js";import{T as re,C as te}from"./Controls-5a18fd37.js";import{A as ne,e as S}from"./api-d8a57490.js";import{b as U,a as oe,h as ie,j as le}from"./format-5039f022.js";import{u as ce,a as me}from"./CabinetContext-31fc5321.js";import{r as i}from"./buildLifecycle-a44b0e05.js";import{r as k,m as B,s as de}from"./api-9e8c3e2c.js";import{S as ue,R as pe}from"./RenameModal-60dde6d5.js";/* empty css                   */import{L as he}from"./lock-73755c1f.js";import{F as xe}from"./film-0ba9e353.js";import{R as fe}from"./radio-dc3b7f8c.js";import{V as je}from"./video-a08888e9.js";import{L as ge}from"./link-2-36909ef8.js";import{D as ve}from"./download-3e69fd6b.js";import{E as be}from"./ellipsis-bbf71637.js";import{T as z}from"./trash-2-7a739e24.js";import{P as ye}from"./pen-line-729408c9.js";import"./createLucideIcon-581cd729.js";import"./eye-5711d0dd.js";import"./x-b9f3d093.js";import"./circle-check-63b159d4.js";import"./circle-alert-67975319.js";import"./chevron-down-888c3b30.js";import"./check-083433f7.js";import"./copy-34f4069e.js";import"./refresh-cw-98362cea.js";import"./users-a990a1e8.js";import"./building-2-4f0d39c1.js";import"./globe-e09c7f1b.js";function es(){const{id:n=""}=J(),T=K(),E=X(),{workspace:v}=ce(),[a,b]=t.useState(null),[m,y]=t.useState(null),[P,w]=t.useState(!1),[V,R]=t.useState(!1),[H,$]=t.useState(!1),u=Y(),l=t.useCallback(async()=>{try{const s=await k.detail(n);b(s),y(null)}catch(s){y({status:s instanceof ne?s.status:0,message:S(s,"Не удалось открыть запись")})}},[n]);t.useEffect(()=>{b(null),y(null),l()},[l]),t.useEffect(()=>{if(!(a!=null&&a.processing))return;const s=window.setInterval(()=>{l()},2e4);return()=>window.clearInterval(s)},[a==null?void 0:a.processing,l]),me([{label:"Записи и итоги",to:i.recordings()},{label:(a==null?void 0:a.room.title)||(m?"Запись":"…")}],[a==null?void 0:a.room.title,m]);const x=t.useCallback(s=>b(r=>r&&s(r)),[]),[D,M]=t.useState(null),[I,N]=t.useState(null),p=t.useRef(null),L=t.useRef(0);t.useEffect(()=>{M(null),N(null),p.current=null,L.current=0},[n]);const O=t.useCallback((s=!1)=>{if(p.current&&!s)return p.current;const r=k.transcript(n).then(g=>(M(g),N(null),g)).catch(g=>(N(S(g,"Не удалось загрузить расшифровку")),p.current=null,null));return p.current=r,r},[n]),q=t.useMemo(()=>a?{roomId:n,detail:a,reload:l,patch:x,openShare:()=>w(!0),transcript:D,transcriptError:I,loadTranscript:O,playhead:L}:null,[a,n,l,x,D,I,O]);if(m){const s=m.status===404,r=m.status===403;return e.jsx(_,{pad:!0,children:e.jsx(ee,{icon:r?e.jsx(he,{className:"sn-i sn-i-24"}):e.jsx(xe,{className:"sn-i sn-i-24"}),title:s?"Запись не найдена":r?"Нет доступа к этой записи":"Не удалось открыть запись",action:s||r?e.jsx(C,{variant:"quiet",to:i.recordings(),children:"Ко всем записям"}):e.jsx(C,{variant:"quiet",onClick:()=>l(),children:"Повторить"}),children:s?"Возможно, её удалили или ссылка неполная.":r?"Запись видят участники встречи и команда события. Попросите организатора открыть доступ.":m.message})})}if(!a||!q)return e.jsxs("div",{className:"sn-rec-detail sn-rec-scope","aria-busy":"true",children:[e.jsx(h,{width:"45%",height:36}),e.jsx(h,{width:"30%",height:20,style:{marginTop:14}}),e.jsx(h,{width:"100%",height:44,style:{marginTop:22}}),e.jsxs("div",{className:"sn-rec-summary sn-rec-tab-body",children:[e.jsx(h,{height:380,radius:18}),e.jsx(h,{height:380,radius:18})]})]});const{room:c,permissions:A}=a,o=a.recordings.find(s=>s.id===a.mainRecordingId)||null,d=a.people.length,f=Math.round(a.durationSeconds/60),W=e.jsxs("span",{children:[`${U(a.date)}, `,e.jsx("span",{className:"sn-mono",children:oe(a.date)}),f>0&&e.jsxs(e.Fragment,{children:[" · ",e.jsx("span",{className:"sn-mono",children:f})," мин"]}),d>0&&` · ${ie(d,"участник","участника","участников")}`]}),G=()=>{o!=null&&o.downloadUrl?de(o.downloadUrl):T(i.recordingFiles(n))},j=[];return A.canManage&&j.push({label:"Переименовать",icon:e.jsx(ye,{className:"sn-i"}),onSelect:()=>R(!0)}),A.canDelete&&j.push({label:"Удалить запись",icon:e.jsx(z,{className:"sn-i"}),danger:!0,onSelect:()=>$(!0)}),e.jsxs("div",{className:"sn-rec-detail sn-rec-scope",children:[e.jsxs("header",{className:"sn-rec-detail-head",children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,minWidth:0},children:[e.jsx("h1",{className:"sn-display sn-rec-detail-title",children:c.title}),e.jsxs("div",{className:"sn-rec-detail-meta",children:[e.jsx(se,{tone:"gray",icon:c.kind==="broadcast"?e.jsx(fe,{className:"sn-i sn-i-14"}):e.jsx(je,{className:"sn-i sn-i-14"}),children:c.kind==="broadcast"?"Трансляция":"Встреча"}),W,d>0&&e.jsx("span",{"aria-label":`Участники: ${a.people.slice(0,5).map(s=>s.name).join(", ")}${d>5?` и ещё ${d-5}`:""}`,children:e.jsx(ae,{people:a.people.map(s=>({id:s.key,name:s.name,src:B(s.avatarUrl)})),max:5,size:28,ring:"var(--sn-paper)"})})]})]}),e.jsxs("div",{className:"sn-rec-detail-actions",children:[e.jsx(C,{variant:"quiet",icon:e.jsx(ge,{className:"sn-i"}),onClick:()=>w(!0),children:"Поделиться"}),e.jsx(F,{label:o!=null&&o.downloadUrl?`Скачать запись${o.sizeBytes?` (${le(o.sizeBytes)})`:""}`:"Файлы записи",variant:"quiet",onClick:G,children:e.jsx(ve,{className:"sn-i"})}),j.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(F,{label:"Ещё",variant:"quiet",onClick:u.toggle,"aria-haspopup":"menu","aria-expanded":u.open,children:e.jsx(be,{className:"sn-i"})}),e.jsx(Z,{open:u.open,onClose:u.close,anchor:u.anchor,items:j,width:240})]})]})]}),e.jsx(re,{className:"sn-rec-tabs",ariaLabel:"Разделы записи",items:[{value:"summary",label:"Итоги",to:i.recording(n),end:!0},{value:"transcript",label:"Расшифровка",to:i.recordingTranscript(n)},{value:"tasks",label:"Задачи",count:a.counts.tasks||void 0,to:i.recordingTasks(n)},{value:"files",label:"Файлы",count:a.counts.files||void 0,to:i.recordingFiles(n)}]}),e.jsx("div",{className:"sn-rec-tab-body",children:e.jsx(Q,{context:q})}),e.jsx(ue,{open:P,onClose:()=>w(!1),roomId:n,title:c.title,subtitle:`${c.title} · ${U(a.date).toLowerCase()}${f?`, ${f} мин`:""}
1`,people:a.people.filter(s=>s.email).map(s=>({name:s.name,email:s.email,avatarUrl:B(s.avatarUrl)})),participantsCount:d,workspaceName:v==null?void 0:v.name,onSaved:s=>x(r=>({...r,share:{mode:s.mode,allowDownload:s.allowDownload,showSummary:s.showSummary}}))}),e.jsx(pe,{open:V,onClose:()=>R(!1),roomId:n,title:c.title,onRenamed:s=>x(r=>({...r,room:{...r.room,title:s}}))}),e.jsx(te,{open:H,onClose:()=>$(!1),onConfirm:async()=>{try{await k.remove(n),E.success("Запись удалена"),T(i.recordings(),{replace:!0})}catch(s){E.error(S(s,"Не удалось удалить запись"))}},title:"Удалить запись?",icon:e.jsx(z,{className:"sn-i"}),description:`«${c.title}»: удалим видео, расшифровку, AI-итоги, задачи и загруженные файлы. Событие останется в «Эфирах и встречах». Отменить нельзя.`,confirmLabel:"Удалить запись"})]})}export{es 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.