You've already forked Atomcms-edit
1 line
5.4 KiB
JavaScript
Executable File
1 line
5.4 KiB
JavaScript
Executable File
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18566,(e,s,t)=>{s.exports=e.r(76562)},83250,e=>{"use strict";var s=e.i(43476),t=e.i(71645),a=e.i(18566),l=e.i(22016),r=e.i(57688),d=e.i(88589),n=e.i(13642),i=e.i(9165);e.s(["default",0,function(){let e=(0,a.useParams)().username,[c,m]=(0,t.useState)(null),[x,o]=(0,t.useState)(null),[h,u]=(0,t.useState)(!0);return((0,t.useEffect)(()=>{!async function(){let[s,t]=await Promise.all([i.users.getByUsername(e),i.users.getProfile(e)]);s.data&&m(s.data),t.data&&o(t.data),u(!1)}()},[e]),h)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.default,{}),(0,s.jsx)("main",{className:"bg-background min-h-screen flex items-center justify-center",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto"}),(0,s.jsx)("p",{className:"text-text-muted mt-4",children:"Laden..."})]})}),(0,s.jsx)(n.default,{})]}):c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.default,{}),(0,s.jsx)("main",{className:"bg-background min-h-screen",children:(0,s.jsxs)("div",{className:"max-w-7xl mx-auto p-4 lg:p-6",children:[(0,s.jsxs)("div",{className:"bg-surface rounded-lg shadow-card overflow-hidden",children:[(0,s.jsx)("div",{className:"h-32 md:h-48 bg-cover bg-center",style:{backgroundImage:"url(/assets/images/kasja_mepage_header.png)"},children:(0,s.jsx)("div",{className:"h-full bg-black/30"})}),(0,s.jsx)("div",{className:"relative px-4 md:px-8 pb-8",children:(0,s.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-end gap-4 -mt-12 md:-mt-16",children:[(0,s.jsx)("div",{className:"relative w-24 h-24 md:w-32 md:h-32 rounded-lg overflow-hidden border-4 border-primary bg-surface",children:(0,s.jsx)(r.default,{src:`https://epicnabbo.nl/imaging/?figure=${c.look}&headonly=1&direction=2`,alt:c.username,fill:!0,className:"object-cover"})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h1",{className:"text-2xl md:text-3xl font-bold text-text-main",children:c.username}),c.motto&&(0,s.jsx)("p",{className:"text-text-muted mt-1",children:c.motto})]}),(0,s.jsxs)("div",{className:"flex gap-4 md:gap-6 mt-4 md:mt-0",children:[x?.online&&(0,s.jsx)("span",{className:"px-3 py-1 rounded-full bg-accent text-white text-sm font-semibold",children:"Online"}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"text-lg font-bold text-primary",children:c.credits?.toLocaleString()||0}),(0,s.jsx)("p",{className:"text-xs text-text-muted uppercase",children:"Credits"})]}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"text-lg font-bold text-accent",children:c.pixels?.toLocaleString()||0}),(0,s.jsx)("p",{className:"text-xs text-text-muted uppercase",children:"Pixels"})]}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"text-lg font-bold text-danger",children:c.diamonds?.toLocaleString()||0}),(0,s.jsx)("p",{className:"text-xs text-text-muted uppercase",children:"Diamanten"})]})]})]})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 mt-6",children:[(0,s.jsxs)("div",{className:"lg:col-span-2 bg-surface rounded-lg shadow-card p-4",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"Kamers"}),x?.rooms&&x.rooms.length>0?(0,s.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:x.rooms.map(e=>(0,s.jsxs)("div",{className:"aspect-video rounded-lg overflow-hidden bg-background relative group",children:[(0,s.jsx)("div",{className:"w-full h-full bg-gray-200 flex items-center justify-center",children:(0,s.jsx)("span",{className:"text-gray-400 text-sm",children:e.name})}),(0,s.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-2 bg-gradient-to-t from-black/70 to-transparent",children:[(0,s.jsx)("p",{className:"text-white text-sm font-semibold truncate",children:e.name}),(0,s.jsxs)("p",{className:"text-gray-300 text-xs",children:[e.users_now||0," online"]})]})]},e.id))}):(0,s.jsx)("p",{className:"text-text-muted",children:"Nog geen kamers gemaakt"})]}),(0,s.jsxs)("div",{className:"bg-surface rounded-lg shadow-card p-4",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"Vrienden"}),x?.friends&&x.friends.length>0?(0,s.jsx)("div",{className:"space-y-3",children:x.friends.map(e=>(0,s.jsxs)(l.default,{href:`/profile/${e.username}`,className:"flex items-center gap-3 p-2 rounded-lg hover:bg-background transition-colors",children:[(0,s.jsx)("div",{className:"w-10 h-10 rounded-lg overflow-hidden bg-background relative",children:(0,s.jsx)(r.default,{src:`https://epicnabbo.nl/imaging/?figure=${e.look}&headonly=1&direction=2`,alt:e.username,fill:!0,className:"object-cover"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-semibold text-sm",children:e.username}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:e.motto||"Geen motto"})]})]},e.id))}):(0,s.jsx)("p",{className:"text-text-muted",children:"Nog geen vrienden"})]})]})]})}),(0,s.jsx)(n.default,{})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.default,{}),(0,s.jsx)("main",{className:"bg-background min-h-screen flex items-center justify-center",children:(0,s.jsxs)("div",{className:"bg-surface rounded-lg p-8 shadow-card text-center max-w-md",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold mb-4",children:"Gebruiker niet gevonden"}),(0,s.jsx)(l.default,{href:"/",className:"text-primary hover:underline",children:"Terug naar home"})]})}),(0,s.jsx)(n.default,{})]})}])}]); |