veza/apps/web/dist_verification/assets/LiveView-DSSm3dtG.js
2026-02-07 20:36:48 +01:00

1 line
8.1 KiB
JavaScript

import{a as m,j as e}from"./vendor-react-YMhRUmcb.js";import{m as u,B as l,C as d,s as g}from"./index-D2uzyr9g.js";import{y as p,w as f,z as v,k as b,a3 as j,E as N,D as h,a1 as w,ah as y}from"./vendor-icons-DINCNwpk.js";import{G as x}from"./vendor-fFnFILYR.js";import"./skeleton-BPDNnZ8E.js";import"./vendor-router-DX94Iu-2.js";import"./vendor-tanstack-CoFNL2zy.js";import"./vendor-utils-4BWoYre8.js";const k={id:"1",title:"Late Night DnB Production 🎧 | Feedback Session",streamer:"Neuro_Glitch",viewers:1240,thumbnailUrl:"https://picsum.photos/id/140/800/450",tags:["Production","Ableton","DnB"],isLive:!0,category:"Production"},S=[{user:"BassHead99",text:"That Reese bass is filthy! 🤮🔥",color:"text-muted-foreground"},{user:"Studio_Rat",text:"What VST is that?",color:"text-muted-foreground"},{user:"Neuro_Glitch",text:"It's Phase Plant, just initializing now.",color:"text-warning font-bold"},{user:"VocalChops",text:"Sent a $5 dono! Check my track?",color:"text-success"}];function C(s={}){const{addToast:a}=u(),r=s.stream??k,n=s.chatMessages??S,[o,t]=m.useState(""),c=m.useCallback(()=>{o.trim()&&(s.onSendMessage?s.onSendMessage(o):a("Message sent to chat","success"),t(""))},[o,s.onSendMessage,a]);return{stream:r,chatMessages:n,msgInput:o,setMsgInput:t,handleSend:c,addToast:a}}function M({stream:s,onToggleChat:a,onSettings:r,onFullscreen:n}){return e.jsxs("div",{className:"relative aspect-video bg-black rounded-xl overflow-hidden shadow-2xl border border-border group",children:[e.jsx("img",{src:s.thumbnailUrl,alt:"",className:"w-full h-full object-cover opacity-80"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-transparent to-transparent"}),e.jsxs("div",{className:"absolute top-4 left-4 flex gap-2",children:[e.jsxs("span",{className:"bg-destructive text-destructive-foreground px-2 py-1 text-xs font-bold rounded flex items-center gap-1 animate-pulse",children:[e.jsx(p,{className:"w-3 h-3"})," LIVE"]}),e.jsxs("span",{className:"bg-black/50 backdrop-blur text-white px-2 py-1 text-xs font-mono rounded flex items-center gap-1",children:[e.jsx(f,{className:"w-3 h-3"})," ",s.viewers]})]}),e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-4 flex justify-between items-end opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:[e.jsxs("div",{className:"flex gap-4",children:[e.jsx(l,{variant:"ghost",size:"sm",className:"text-white hover:bg-white/10",onClick:a,children:e.jsx(v,{className:"w-5 h-5"})}),e.jsx(l,{variant:"ghost",size:"sm",className:"text-white hover:bg-white/10",onClick:r,children:e.jsx(b,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"flex gap-4",children:e.jsx(l,{variant:"ghost",size:"sm",className:"text-white hover:bg-white/10",onClick:n,children:e.jsx(j,{className:"w-5 h-5"})})})]})]})}function E({stream:s,onStreamerClick:a,onFollow:r,onDonate:n,onShare:o}){return e.jsx(d,{variant:"glass",className:"p-6 border-white/5 bg-black/20 backdrop-blur-xl hover-glow-cyan transition-shadow duration-300",children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-neon p-0.5",children:e.jsx("img",{src:"https://picsum.photos/100/100",alt:"",className:"w-full h-full rounded-full object-cover border-2 border-border"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-foreground tracking-tight",children:s.title}),e.jsx("p",{className:"text-primary font-medium cursor-pointer hover:underline",onClick:a,children:s.streamer}),e.jsx("div",{className:"flex gap-2 mt-2",children:s.tags.map(t=>e.jsx(g,{label:t,variant:"terminal"},t))})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(l,{variant:"secondary",icon:e.jsx(N,{className:"w-4 h-4"}),onClick:r,children:"FOLLOW"}),e.jsx(l,{variant:"primary",icon:e.jsx(h,{className:"w-4 h-4"}),onClick:n,children:"DONATE"}),e.jsx(l,{variant:"ghost",icon:e.jsx(w,{className:"w-4 h-4"}),onClick:o,children:"SHARE"})]})]})})}function T({onChannelClick:s}){return e.jsxs("div",{className:"mt-4",children:[e.jsx("h3",{className:"font-bold text-muted-foreground mb-4 uppercase text-sm tracking-wider",children:"Recommended Channels"}),e.jsx(x.div,{className:"grid grid-cols-1 md:grid-cols-3 gap-4",initial:"hidden",animate:"visible",variants:{visible:{transition:{staggerChildren:.06}},hidden:{}},children:[1,2,3].map(a=>e.jsx(x.div,{variants:{hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},children:e.jsxs(d,{variant:"glass",className:"p-0 overflow-hidden group cursor-pointer border-white/5 bg-black/20 backdrop-blur-xl hover-glow-cyan transition-all duration-300",onClick:()=>s?.(a),children:[e.jsxs("div",{className:"aspect-video relative",children:[e.jsx("img",{src:`https://picsum.photos/300/200?random=${a}`,alt:"",className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute bottom-2 left-2 bg-background/80 px-2 py-0.5 rounded text-xs text-foreground",children:"DJ Set"})]}),e.jsxs("div",{className:"p-4 flex gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-muted"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-sm text-foreground truncate tracking-tight",children:"Techno Bunker 24/7"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Underground_Radio"})]})]})]})},a))})]})}function L({messages:s,msgInput:a,onMsgInputChange:r,onSend:n,onWalletClick:o}){return e.jsxs(d,{variant:"glass",className:"lg:col-span-3 flex flex-col p-0 overflow-hidden h-full min-h-0 border-white/5 bg-black/20 backdrop-blur-xl hover-glow-cyan transition-shadow duration-300",children:[e.jsxs("div",{className:"p-4 border-b border-border flex justify-between items-center bg-card",children:[e.jsx("span",{className:"font-mono text-sm font-bold text-foreground tracking-tight",children:"STREAM CHAT"}),e.jsx("div",{className:"w-2 h-2 bg-success rounded-full animate-pulse"})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4 font-mono text-sm",children:[s.map((t,c)=>e.jsxs("div",{className:"break-words",children:[e.jsxs("span",{className:`font-bold ${t.color} mr-2 cursor-pointer hover:underline`,children:[t.user,":"]}),e.jsx("span",{className:"text-foreground",children:t.text})]},c)),e.jsx("div",{className:"text-center py-2",children:e.jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-1 rounded-full",children:"Welcome to the chat room!"})})]}),e.jsxs("div",{className:"p-4 bg-muted border-t border-border",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx("input",{value:a,onChange:t=>r(t.target.value),onKeyDown:t=>t.key==="Enter"&&n(),className:"w-full bg-background border border-border rounded-xl px-4 py-2 text-sm text-foreground focus:border-primary outline-none transition-colors duration-[var(--duration-normal)]",placeholder:"Say something..."}),e.jsx(h,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 text-warning cursor-pointer hover:opacity-80 transition-opacity"})]}),e.jsx(l,{variant:"primary",size:"sm",className:"px-4",onClick:n,children:e.jsx(y,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex justify-between mt-2 px-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Balance: 420 $VEZA"}),e.jsx("span",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground",onClick:o,children:"Get Coins"})]})]})]})}function P({stream:s,chatMessages:a}={}){const{stream:r,chatMessages:n,msgInput:o,setMsgInput:t,handleSend:c,addToast:i}=C({stream:s??void 0,chatMessages:a});return e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 min-h-layout-main animate-fadeIn",children:[e.jsxs("div",{className:"lg:col-span-9 flex flex-col gap-4",children:[e.jsx(M,{stream:r,onToggleChat:()=>i("Chat hidden"),onSettings:()=>i("Stream Settings"),onFullscreen:()=>i("Entering Fullscreen")}),e.jsx(E,{stream:r,onStreamerClick:()=>i("Opening Streamer Profile"),onFollow:()=>i("Followed Streamer","success"),onDonate:()=>i("Donation modal opening...","info"),onShare:()=>i("Stream link copied!")}),e.jsx(T,{onChannelClick:()=>i("Switching stream...")})]}),e.jsx(L,{messages:n,msgInput:o,onMsgInputChange:t,onSend:c,onWalletClick:()=>i("Opening Wallet...")})]})}export{P as LiveView};