PageSourceSearch

https://tesana.com/assets/FollowingPage-r8zVtXBp.js

js tesana.com collected 2026-10-09 22:39:50 UTC 8,009 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-motion-hRg_q8lq.js";import{u as F}from"./vendor-query-bOUN_gKe.js";import{u as A,H as $,L as n,R as g,o as D}from"./index-BKzE8EQ8.js";import{M as k,p as T}from"./MediaImage-DKgx-nW4.js";import{a as E}from"./social-DLS0gBy5.js";import{du as s}from"./vendor-fa-Bn2dnpnC.js";import{E as M}from"./exploreLaunch-BPkNcOSK.js";import"./vendor-react-E98sgxjj.js";function L(){return e.jsx("div",{className:"space-y-4",children:Array.from({length:6}).map((o,a)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 rounded-full bg-foreground/10 animate-pulse"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"h-4 w-1/3 rounded bg-foreground/10 animate-pulse"}),e.jsx("div",{className:"mt-2 h-3 w-1/5 rounded bg-foreground/10 animate-pulse"})]})]},a))})}function O(){const{t:o}=A("explore"),{data:a,isLoading:x,error:h}=F({...E()}),p=r=>{const l=new Date,t=[],u=[],m=[];return r.forEach(d=>{const _=new Date(d.created_at),b=l.getTime()-_.getTime(),f=Math.floor(b/(1e3*60*60*24));f===0?t.push(d):f<7?u.push(d):m.push(d)}),{today:t,thisWeek:u,earlier:m}},j=r=>{const l=new Date(r),u=new Date().getTime()-l.getTime(),m=Math.floor(u/(1e3*60*60)),d=Math.floor(u/(1e3*60*60*24));return m<1?o("following.justNow"):m<24?o("following.hoursAgo",{count:m}):d<7?o("following.daysAgo",{count:d}):l.toLocaleDateString()},N=r=>{switch(r){case"game_created":return e.jsx(s,{icon:["far","gamepad-modern"],className:"text-muted-foreground/50 mt-0.5"});case"game_edited":return e.jsx(s,{icon:["far","pen"],className:"text-muted-foreground/50 mt-0.5"});case"comment":return e.jsx(s,{icon:["far","comment"],className:"text-muted-foreground/50 mt-0.5"});case"favorite":return e.jsx(s,{icon:["far","heart"],className:"text-muted-foreground/50 mt-0.5"});case"follow":return e.jsx(s,{icon:["far","user"],className:"text-muted-foreground/50 mt-0.5"});default:return e.jsx(s,{icon:["far","circle-info"],className:"text-muted-foreground/50 mt-0.5"})}},w=r=>{switch(r.action_type){case"game_created":return e.jsxs(e.Fragment,{children:[e.jsxs(n,{to:`/u/${r.user}`,className:"text-foreground underline underline-offset-2 decoration-foreground/20 hover:decoration-foreground/100 transition-all cursor-pointer",children:["@",r.user]}),e.jsxs("span",{className:"text-muted-foreground",children:[" ",o("following.createdNewGame")," "]}),r.target_game&&e.jsx(n,{to:r.target_game.slug?`/game/${r.target_game.slug}`:g(r.target_game),className:"text-foreground underline underline-offset-2 decoration-foreground/20 hover:decoration-foreground/100 transition-all cursor-pointer",children:r.target_game.name})]});case"game_edited":return e.jsxs(e.Fragment,{children:[e.jsxs(n,{to:`/u/${r.user}`,className:"text-foreground underline underline-offset-2 decoration-foreground/20 hover:decoration-foreground/100 transition-all cursor-pointer",children:["@",r.user]}),e.jsxs("span",{className:"text-muted-foreground",children:[" ",o("following.editedTheGame")," "]}),r.target_game&&e.jsx(n,{to:r.target_game.slug?`/game/${r.target_game.slug}`:g(r.target_game),className:"text-foreground underline underline-offset-2 decoration-foreground/20 hover:decoration-foreground/100 transition-all cursor-pointer",children:r.target_game.name})]});case"comment":return e.jsxs(e.Fragment,{children:[e.jsxs(n,{to:`/u/${r.user}`,className:"text-foreground underline underline-offset-2 decoration-foreground/20 hover:decoration-foreground/100 transition-all cursor-pointer",children:["@",r.user]}),e.jsxs("span",{className:"text-muted-foreground",children:[" ",o("following.commentedOn")," "]}),r.target_game&&e.jsx(n,{to:r.target_game.slug?`/game/${r.target_game.slug}`:g(r.target_game),className:"text-foreground underline underline-offset-2 decoration-foreground/20 hover:decoration-foreground/100 transition-all cursor-pointer",children:r.target_game.name}),r.target_comment&&e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground italic",children:['"',r.target_comment.content.slice(0,100),r.target_comment.content.length>100?"...":"",'"']})]});case"favorite":return e.jsxs(e.Fragment,{children:[e.jsxs(n,{to:`/u/${r.user}`,className:"text-foreground underline underline-offset-2 decoration-foreground
1/20 hover:decoration-foreground/100 transition-all cursor-pointer",children:["@",r.user]}),e.jsxs("span",{className:"text-muted-foreground",children:[" ",o("following.favorited")," "]}),r.target_game&&e.jsx(n,{to:r.target_game.slug?`/game/${r.target_game.slug}`:g(r.target_game),className:"text-foreground underline underline-offset-2 decoration-foreground/20 hover:decoration-foreground/100 transition-all cursor-pointer",children:r.target_game.name})]});case"follow":return e.jsxs(e.Fragment,{children:[e.jsxs(n,{to:`/u/${r.user}`,className:"text-foreground underline underline-offset-2 decoration-foreground/20 hover:decoration-foreground/100 transition-all cursor-pointer",children:["@",r.user]}),e.jsxs("span",{className:"text-muted-foreground",children:[" ",o("following.startedFollowing")," "]}),r.target_user&&e.jsxs(n,{to:`/u/${r.target_user}`,className:"text-foreground underline underline-offset-2 decoration-foreground/20 hover:decoration-foreground/100 transition-all cursor-pointer",children:["@",r.target_user]})]});default:return null}},i=(r,l)=>l.length===0?null:e.jsxs("div",{className:"mt-8",children:[e.jsx("h2",{className:"text-base text-foreground mb-4",children:r}),e.jsx("div",{className:"space-y-4",children:l.map(t=>e.jsxs("div",{className:"flex items-start gap-4 p-4 bg-card rounded-md border border-border",children:[N(t.action_type),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm",children:w(t)}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:j(t.created_at)})]}),t.target_game&&t.action_type!=="follow"&&e.jsx(n,{to:t.target_game.slug?`/game/${t.target_game.slug}`:g(t.target_game),className:"flex-shrink-0",children:e.jsx("div",{className:"w-16 h-10 rounded-md bg-secondary overflow-hidden hover:opacity-80 transition-opacity",children:t.target_game.engine_game_name&&e.jsx(k,{sources:[T(t.target_game,D(t.target_game))],alt:"",layout:"inline",width:64,className:"w-full h-full object-cover [image-rendering:pixelated]"})})})]},t.id))})]}),c=a?.activities?p(a.activities):{today:[],thisWeek:[],earlier:[]};return e.jsxs(e.Fragment,{children:[e.jsx($,{children:e.jsx("title",{children:o("following.pageTitle")})}),e.jsxs("div",{className:"px-4 md:px-8 pt-22 md:pt-8 pb-12 max-w-[1280px] mx-auto",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-lg text-foreground mb-1",children:o("following.title")}),e.jsx("p",{className:"text-muted-foreground",children:o("following.subtitle")})]}),x?e.jsx(L,{}):h?e.jsxs("div",{className:"text-center py-16 rounded-md border border-border flex flex-col items-center justify-center",children:[e.jsx(s,{icon:["far","user-group"],className:"text-4xl mb-7 text-destructive"}),e.jsx("p",{className:"text-center text-destructive",children:o("following.loadError")})]}):!a?.activities||a.activities.length===0?e.jsxs("div",{className:"text-center py-16 rounded-md border border-border flex flex-col items-center justify-center",children:[e.jsx(s,{icon:["far","user-group"],className:"text-4xl mb-7 text-muted-foreground/50"}),e.jsx("p",{className:"text-foreground text-lg mb-3",children:o("following.noActivityYet")}),e.jsx("p",{className:"text-muted-foreground text-base mb-7",children:o("following.noActivityDescription")}),e.jsx(n,{to:M,className:"mx-auto px-3 h-9 flex items-center bg-foreground text-background rounded-md text-sm hover:opacity-80 transition-opacity",children:o("following.exploreGames")})]}):e.jsxs(e.Fragment,{children:[i(o("following.today"),c.today),i(o("following.thisWeek"),c.thisWeek),i(o("following.earlier"),c.earlier),e.jsx("p",{className:"text-sm text-muted-foreground text-center mt-12",children:o("following.showingActivities",{count:a.activities.length})})]})]})]})}export{O 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.