@minecraft-docker/mcctl-console 1.15.0 → 1.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +19 -19
- package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/[id]/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/export/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/stats/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/stream/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/auth/[...all]/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/history/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/restore/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/ban/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/kick/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/op/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/whitelist/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/router/status/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/[action]/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/config/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/exec/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/world/reset/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/user-servers/[id]/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/user-servers/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/users/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/worlds/[name]/[action]/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/worlds/[name]/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/worlds/route.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +9 -9
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/354.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/613.js +48 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
- package/.next/{static/chunks/app/(main)/layout-9311354243420c0d.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-692cb1da92b73287.js} +1 -1
- package/.next/{static/chunks/app/login/page-3ad9d595e6c37214.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-d6a5da720238e5cf.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/page-8b5b6cb30448bcc5.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/{page-69a8bc2df6bc3559.js → page-6e5550bc9fffa4bc.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/package.json +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-9311354243420c0d.js → static/chunks/app/(main)/layout-692cb1da92b73287.js} +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-3ad9d595e6c37214.js → static/chunks/app/login/page-d6a5da720238e5cf.js} +1 -1
- package/.next/static/chunks/app/page-8b5b6cb30448bcc5.js +1 -0
- package/.next/static/chunks/app/signup/{page-69a8bc2df6bc3559.js → page-6e5550bc9fffa4bc.js} +1 -1
- package/package.json +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/page-fcacf1a03f097c1a.js +0 -1
- package/.next/static/chunks/app/page-fcacf1a03f097c1a.js +0 -1
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{Dhuk7IX_HBmn4_EOQA5oS → ddlfT0dafY0G-jGkapBmi}/_buildManifest.js +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{Dhuk7IX_HBmn4_EOQA5oS → ddlfT0dafY0G-jGkapBmi}/_ssgManifest.js +0 -0
- /package/.next/static/{Dhuk7IX_HBmn4_EOQA5oS → ddlfT0dafY0G-jGkapBmi}/_buildManifest.js +0 -0
- /package/.next/static/{Dhuk7IX_HBmn4_EOQA5oS → ddlfT0dafY0G-jGkapBmi}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
exports.id=354,exports.ids=[354],exports.modules={78729:(e,r,t)=>{Promise.resolve().then(t.bind(t,47600))},47600:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>L});var a=t(58120),s=t(36372),i=t(89352),n=t(56539),l=t(40611),o=t(22053),c=t(39497),d=t(54365),x=t(2365),h=t(27121),m=t(58664),p=t(73091),u=t(19609),f=t(63654),g=t(63856),b=t(6695),j=t(33615),y=t(6545),v=t(43908),Z=t(28669),w=t(32130),C=t(88517),k=t(765),S=t(37372),P=t(34081),z=t(60417);function I(e){return(0,a.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[a.jsx("rect",{width:"32",height:"32",fill:"#5DA840"}),a.jsx("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),a.jsx("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),a.jsx("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),a.jsx("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),a.jsx("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),a.jsx("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),a.jsx("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(36597);let A=[{label:"Dashboard",href:"/dashboard",icon:a.jsx(y.Z,{})},{label:"Servers",href:"/servers",icon:a.jsx(v.Z,{})},{label:"Worlds",href:"/worlds",icon:a.jsx(k.Z,{})},{label:"Players",href:"/players",icon:a.jsx(Z.Z,{})},{label:"Audit Log",href:"/audit-logs",icon:a.jsx(C.Z,{})},{label:"Backups",href:"/backups",icon:a.jsx(S.Z,{})},{label:"Routing",href:"/routing",icon:a.jsx(w.Z,{})}];function D({mobileOpen:e,onMenuToggle:r}){let t=(0,n.usePathname)(),s=e=>"/dashboard"===e?"/dashboard"===t||"/"===t:t.startsWith(e);return(0,a.jsxs)(a.Fragment,{children:[a.jsx(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,a.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[a.jsx(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:r,sx:{mr:2,display:{md:"none"}},children:a.jsx(b.Z,{})}),(0,a.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[a.jsx(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),a.jsx(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),a.jsx(i.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:A.map(e=>{let r=s(e.href);return a.jsx(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,a.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[a.jsx(i.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),a.jsx(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),a.jsx(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:a.jsx(P.Ie,{})})]})}),a.jsx(h.ZP,{variant:"temporary",anchor:"left",open:e,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,a.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,a.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[a.jsx(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),a.jsx(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),a.jsx(d.Z,{onClick:r,"aria-label":"close menu",children:a.jsx(j.Z,{})})]}),a.jsx(m.Z,{sx:{flex:1,px:1,py:2},children:A.map(e=>{let t=s(e.href);return a.jsx(p.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,a.jsxs)(u.Z,{component:l.default,href:e.href,onClick:()=>{r(),t||(0,W.Av)()},"aria-current":t?"page":void 0,sx:{borderRadius:2,backgroundColor:t?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[a.jsx(f.Z,{sx:{color:t?"primary.main":"text.secondary",minWidth:40},children:e.icon}),a.jsx(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:t?600:400,color:t?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var T=t(23972),M=t(42578),q=t(80336),R=t(3984),B=t(60028);function E(e){return a.jsx(z.Z,{...e,viewBox:"0 0 24 24",children:a.jsx("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let H=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function U(){let e=new Date().getFullYear();return a.jsx(i.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,a.jsxs)(T.Z,{maxWidth:"lg",sx:{py:6},children:[a.jsx(i.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:H.map(e=>(0,a.jsxs)(i.Z,{children:[a.jsx(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),a.jsx(i.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>a.jsx(i.Z,{component:"li",sx:{mb:1},children:a.jsx(M.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),a.jsx(q.Z,{sx:{mb:3}}),(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,a.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",a.jsx(M.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,a.jsxs)(i.Z,{sx:{display:"flex",gap:2},children:[a.jsx(M.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:a.jsx(R.Z,{fontSize:"small"})}),a.jsx(M.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:a.jsx(B.Z,{fontSize:"small"})}),a.jsx(M.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:a.jsx(E,{fontSize:"small"})})]})]})]})})}function L({children:e}){let[r,t]=(0,s.useState)(!1);return(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[a.jsx(D,{mobileOpen:r,onMenuToggle:()=>{t(!r)}}),a.jsx(i.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"88px",sm:"96px"},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:e}),a.jsx(U,{})]})}},34081:(e,r,t)=>{"use strict";t.d(r,{U0:()=>p,WS:()=>u,Ie:()=>P});var a=t(58120),s=t(36372),i=t(89352),n=t(66757),l=t(6275),o=t(92559),c=t(54365),d=t(10257),x=t(3643),h=t(8721),m=t(68763);function p({onSuccess:e}){let[r,t]=(0,s.useState)(""),[p,u]=(0,s.useState)(""),[f,g]=(0,s.useState)(!1),[b,j]=(0,s.useState)({}),[y,v]=(0,s.useState)(null),[Z,w]=(0,s.useState)(!1),C=()=>{let e={};return r?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),j(e),0===Object.keys(e).length},k=async t=>{if(t.preventDefault(),v(null),C()){w(!0);try{let t=await m.zB.email({email:r,password:p});if(t.error){v(t.error.message||"Invalid credentials"),w(!1);return}e&&e()}catch(e){v("An unexpected error occurred. Please try again."),w(!1)}}};return(0,a.jsxs)(i.Z,{component:"form",onSubmit:k,sx:{display:"flex",flexDirection:"column",gap:2},children:[y&&a.jsx(n.Z,{severity:"error",onClose:()=>v(null),children:y}),a.jsx(l.Z,{label:"Email",type:"email",value:r,onChange:e=>t(e.target.value),error:!!b.email,helperText:b.email,disabled:Z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Password",type:f?"text":"password",value:p,onChange:e=>u(e.target.value),error:!!b.password,helperText:b.password,disabled:Z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{g(!f)},edge:"end",children:f?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:Z,fullWidth:!0,size:"large",children:Z?"Signing in...":"Sign In"})]})}function u({onSuccess:e}){let[r,t]=(0,s.useState)(""),[p,u]=(0,s.useState)(""),[f,g]=(0,s.useState)(""),[b,j]=(0,s.useState)(""),[y,v]=(0,s.useState)(!1),[Z,w]=(0,s.useState)(!1),[C,k]=(0,s.useState)({}),[S,P]=(0,s.useState)(null),[z,I]=(0,s.useState)(!1),W=()=>{let e={};return r||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",f?f.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",b?f!==b&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",k(e),0===Object.keys(e).length},A=async t=>{if(t.preventDefault(),P(null),W()){I(!0);try{let t=await m.y1.email({email:p,password:f,name:r});if(t.error){P(t.error.message||"Registration failed"),I(!1);return}e&&e()}catch(e){P("An unexpected error occurred. Please try again."),I(!1)}}};return(0,a.jsxs)(i.Z,{component:"form",onSubmit:A,sx:{display:"flex",flexDirection:"column",gap:2},children:[S&&a.jsx(n.Z,{severity:"error",onClose:()=>P(null),children:S}),a.jsx(l.Z,{label:"Name",type:"text",value:r,onChange:e=>t(e.target.value),error:!!C.name,helperText:C.name,disabled:z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Email",type:"email",value:p,onChange:e=>u(e.target.value),error:!!C.email,helperText:C.email,disabled:z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Password",type:y?"text":"password",value:f,onChange:e=>g(e.target.value),error:!!C.password,helperText:C.password,disabled:z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{v(!y)},edge:"end",children:y?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(l.Z,{label:"Confirm Password",type:Z?"text":"password",value:b,onChange:e=>j(e.target.value),error:!!C.confirmPassword,helperText:C.confirmPassword,disabled:z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{w(!Z)},edge:"end",children:Z?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:z,fullWidth:!0,size:"large",children:z?"Creating account...":"Sign Up"})]})}var f=t(56539),g=t(79943),b=t(61573),j=t(51232),y=t(2365),v=t(48787),Z=t(80336),w=t(99634),C=t(63654),k=t(63856),S=t(49185);function P(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[n,l]=(0,s.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return a.jsx(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx(g.Z,{size:24})});if(!r?.user)return a.jsx(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,p=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?`${r[0][0]}${r[1][0]}`.toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,a.jsxs)(a.Fragment,{children:[a.jsx(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:a.jsx(b.Z,{sx:{bgcolor:"primary.main"},children:p})}),(0,a.jsxs)(j.Z,{anchorEl:n,open:!!n,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,a.jsxs)(i.Z,{sx:{px:2,py:1.5,minWidth:200},children:[a.jsx(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),a.jsx(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&a.jsx(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),a.jsx(Z.Z,{}),(0,a.jsxs)(w.Z,{onClick:x,children:[a.jsx(C.Z,{children:a.jsx(S.Z,{fontSize:"small"})}),a.jsx(k.Z,{children:"Logout"})]})]})]})}},36597:(e,r,t)=>{"use strict";t.d(r,{Av:()=>a.startLoading});var a=t(21908)},68763:(e,r,t)=>{"use strict";t.d(r,{kP:()=>o,w7:()=>n,y1:()=>l,zB:()=>i});var a=t(19106),s=t(82829);let{signIn:i,signOut:n,signUp:l,useSession:o}=(0,a.X)({baseURL:process.env.NEXT_PUBLIC_BETTER_AUTH_URL||"http://localhost:5000",plugins:[(0,s.zB)()]})},26072:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>a});let a=(0,t(2325).createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/(main)/layout.tsx#default`)},52001:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>s});var a=t(15505);let s=e=>[{type:"image/svg+xml",sizes:"any",url:(0,a.fillMetadataSegment)(".",e.params,"icon.svg")+"?0f68875a168deab8"}]}};
|
|
1
|
+
exports.id=354,exports.ids=[354],exports.modules={78729:(e,r,t)=>{Promise.resolve().then(t.bind(t,47600))},47600:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>L});var a=t(58120),s=t(36372),i=t(89352),n=t(56539),l=t(40611),o=t(22053),c=t(39497),d=t(54365),x=t(2365),h=t(27121),m=t(58664),p=t(73091),u=t(19609),f=t(63654),g=t(63856),b=t(6695),j=t(33615),y=t(6545),v=t(43908),Z=t(28669),w=t(32130),C=t(88517),k=t(765),S=t(37372),P=t(34081),z=t(60417);function I(e){return(0,a.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[a.jsx("rect",{width:"32",height:"32",fill:"#5DA840"}),a.jsx("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),a.jsx("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),a.jsx("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),a.jsx("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),a.jsx("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),a.jsx("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),a.jsx("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(36597);let A=[{label:"Dashboard",href:"/dashboard",icon:a.jsx(y.Z,{})},{label:"Servers",href:"/servers",icon:a.jsx(v.Z,{})},{label:"Worlds",href:"/worlds",icon:a.jsx(k.Z,{})},{label:"Players",href:"/players",icon:a.jsx(Z.Z,{})},{label:"Audit Log",href:"/audit-logs",icon:a.jsx(C.Z,{})},{label:"Backups",href:"/backups",icon:a.jsx(S.Z,{})},{label:"Routing",href:"/routing",icon:a.jsx(w.Z,{})}];function D({mobileOpen:e,onMenuToggle:r}){let t=(0,n.usePathname)(),s=e=>"/dashboard"===e?"/dashboard"===t||"/"===t:t.startsWith(e);return(0,a.jsxs)(a.Fragment,{children:[a.jsx(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,a.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[a.jsx(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:r,sx:{mr:2,display:{md:"none"}},children:a.jsx(b.Z,{})}),(0,a.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[a.jsx(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),a.jsx(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),a.jsx(i.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:A.map(e=>{let r=s(e.href);return a.jsx(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,a.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[a.jsx(i.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),a.jsx(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),a.jsx(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:a.jsx(P.Ie,{})})]})}),a.jsx(h.ZP,{variant:"temporary",anchor:"left",open:e,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,a.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,a.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[a.jsx(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),a.jsx(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),a.jsx(d.Z,{onClick:r,"aria-label":"close menu",children:a.jsx(j.Z,{})})]}),a.jsx(m.Z,{sx:{flex:1,px:1,py:2},children:A.map(e=>{let t=s(e.href);return a.jsx(p.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,a.jsxs)(u.Z,{component:l.default,href:e.href,onClick:()=>{r(),t||(0,W.Av)()},"aria-current":t?"page":void 0,sx:{borderRadius:2,backgroundColor:t?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[a.jsx(f.Z,{sx:{color:t?"primary.main":"text.secondary",minWidth:40},children:e.icon}),a.jsx(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:t?600:400,color:t?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var T=t(23972),M=t(42578),q=t(80336),R=t(3984),B=t(60028);function E(e){return a.jsx(z.Z,{...e,viewBox:"0 0 24 24",children:a.jsx("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let H=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function U(){let e=new Date().getFullYear();return a.jsx(i.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,a.jsxs)(T.Z,{maxWidth:"lg",sx:{py:6},children:[a.jsx(i.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:H.map(e=>(0,a.jsxs)(i.Z,{children:[a.jsx(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),a.jsx(i.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>a.jsx(i.Z,{component:"li",sx:{mb:1},children:a.jsx(M.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),a.jsx(q.Z,{sx:{mb:3}}),(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,a.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",a.jsx(M.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,a.jsxs)(i.Z,{sx:{display:"flex",gap:2},children:[a.jsx(M.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:a.jsx(R.Z,{fontSize:"small"})}),a.jsx(M.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:a.jsx(B.Z,{fontSize:"small"})}),a.jsx(M.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:a.jsx(E,{fontSize:"small"})})]})]})]})})}function L({children:e}){let[r,t]=(0,s.useState)(!1);return(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[a.jsx(D,{mobileOpen:r,onMenuToggle:()=>{t(!r)}}),a.jsx(i.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"88px",sm:"96px"},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:e}),a.jsx(U,{})]})}},34081:(e,r,t)=>{"use strict";t.d(r,{U0:()=>p,WS:()=>u,Ie:()=>P});var a=t(58120),s=t(36372),i=t(89352),n=t(66757),l=t(6275),o=t(92559),c=t(54365),d=t(10257),x=t(3643),h=t(8721),m=t(68763);function p({onSuccess:e}){let[r,t]=(0,s.useState)(""),[p,u]=(0,s.useState)(""),[f,g]=(0,s.useState)(!1),[b,j]=(0,s.useState)({}),[y,v]=(0,s.useState)(null),[Z,w]=(0,s.useState)(!1),C=()=>{let e={};return r?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),j(e),0===Object.keys(e).length},k=async t=>{if(t.preventDefault(),v(null),C()){w(!0);try{let t=await m.zB.email({email:r,password:p});if(t.error){v(t.error.message||"Invalid credentials"),w(!1);return}e&&e()}catch(e){v("An unexpected error occurred. Please try again."),w(!1)}}};return(0,a.jsxs)(i.Z,{component:"form",onSubmit:k,sx:{display:"flex",flexDirection:"column",gap:2},children:[y&&a.jsx(n.Z,{severity:"error",onClose:()=>v(null),children:y}),a.jsx(l.Z,{label:"Email",type:"email",value:r,onChange:e=>t(e.target.value),error:!!b.email,helperText:b.email,disabled:Z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Password",type:f?"text":"password",value:p,onChange:e=>u(e.target.value),error:!!b.password,helperText:b.password,disabled:Z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{g(!f)},edge:"end",children:f?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:Z,fullWidth:!0,size:"large",children:Z?"Signing in...":"Sign In"})]})}function u({onSuccess:e}){let[r,t]=(0,s.useState)(""),[p,u]=(0,s.useState)(""),[f,g]=(0,s.useState)(""),[b,j]=(0,s.useState)(""),[y,v]=(0,s.useState)(!1),[Z,w]=(0,s.useState)(!1),[C,k]=(0,s.useState)({}),[S,P]=(0,s.useState)(null),[z,I]=(0,s.useState)(!1),W=()=>{let e={};return r||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",f?f.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",b?f!==b&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",k(e),0===Object.keys(e).length},A=async t=>{if(t.preventDefault(),P(null),W()){I(!0);try{let t=await m.y1.email({email:p,password:f,name:r});if(t.error){P(t.error.message||"Registration failed"),I(!1);return}e&&e()}catch(e){P("An unexpected error occurred. Please try again."),I(!1)}}};return(0,a.jsxs)(i.Z,{component:"form",onSubmit:A,sx:{display:"flex",flexDirection:"column",gap:2},children:[S&&a.jsx(n.Z,{severity:"error",onClose:()=>P(null),children:S}),a.jsx(l.Z,{label:"Name",type:"text",value:r,onChange:e=>t(e.target.value),error:!!C.name,helperText:C.name,disabled:z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Email",type:"email",value:p,onChange:e=>u(e.target.value),error:!!C.email,helperText:C.email,disabled:z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Password",type:y?"text":"password",value:f,onChange:e=>g(e.target.value),error:!!C.password,helperText:C.password,disabled:z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{v(!y)},edge:"end",children:y?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(l.Z,{label:"Confirm Password",type:Z?"text":"password",value:b,onChange:e=>j(e.target.value),error:!!C.confirmPassword,helperText:C.confirmPassword,disabled:z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{w(!Z)},edge:"end",children:Z?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:z,fullWidth:!0,size:"large",children:z?"Creating account...":"Sign Up"})]})}var f=t(56539),g=t(79943),b=t(61573),j=t(51232),y=t(2365),v=t(48787),Z=t(80336),w=t(99634),C=t(63654),k=t(63856),S=t(49185);function P(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[n,l]=(0,s.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return a.jsx(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx(g.Z,{size:24})});if(!r?.user)return a.jsx(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,p=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?`${r[0][0]}${r[1][0]}`.toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,a.jsxs)(a.Fragment,{children:[a.jsx(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:a.jsx(b.Z,{sx:{bgcolor:"primary.main"},children:p})}),(0,a.jsxs)(j.Z,{anchorEl:n,open:!!n,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,a.jsxs)(i.Z,{sx:{px:2,py:1.5,minWidth:200},children:[a.jsx(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),a.jsx(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&a.jsx(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),a.jsx(Z.Z,{}),(0,a.jsxs)(w.Z,{onClick:x,children:[a.jsx(C.Z,{children:a.jsx(S.Z,{fontSize:"small"})}),a.jsx(k.Z,{children:"Logout"})]})]})]})}},36597:(e,r,t)=>{"use strict";t.d(r,{Av:()=>a.startLoading});var a=t(21908)},68763:(e,r,t)=>{"use strict";t.d(r,{kP:()=>o,w7:()=>n,y1:()=>l,zB:()=>i});var a=t(19106),s=t(82829);let{signIn:i,signOut:n,signUp:l,useSession:o}=(0,a.X)({baseURL:process.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,s.zB)()]})},26072:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>a});let a=(0,t(2325).createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/(main)/layout.tsx#default`)},52001:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>s});var a=t(15505);let s=e=>[{type:"image/svg+xml",sizes:"any",url:(0,a.fillMetadataSegment)(".",e.params,"icon.svg")+"?0f68875a168deab8"}]}};
|
|
@@ -1 +1,48 @@
|
|
|
1
|
-
exports.id=613,exports.ids=[613],exports.modules={93608:(e,r,t)=>{Promise.resolve().then(t.bind(t,83053)),Promise.resolve().then(t.bind(t,21908)),Promise.resolve().then(t.bind(t,53014)),Promise.resolve().then(t.bind(t,53966)),Promise.resolve().then(t.bind(t,93551))},81323:(e,r,t)=>{Promise.resolve().then(t.t.bind(t,67348,23)),Promise.resolve().then(t.t.bind(t,98985,23)),Promise.resolve().then(t.t.bind(t,20881,23)),Promise.resolve().then(t.t.bind(t,68123,23)),Promise.resolve().then(t.t.bind(t,69806,23)),Promise.resolve().then(t.t.bind(t,97952,23))},21908:(e,r,t)=>{"use strict";t.d(r,{LoadingProvider:()=>o,startLoading:()=>d,stopLoading:()=>
|
|
1
|
+
exports.id=613,exports.ids=[613],exports.modules={93608:(e,r,t)=>{Promise.resolve().then(t.bind(t,83053)),Promise.resolve().then(t.bind(t,21908)),Promise.resolve().then(t.bind(t,53014)),Promise.resolve().then(t.bind(t,53966)),Promise.resolve().then(t.bind(t,93551))},81323:(e,r,t)=>{Promise.resolve().then(t.t.bind(t,67348,23)),Promise.resolve().then(t.t.bind(t,98985,23)),Promise.resolve().then(t.t.bind(t,20881,23)),Promise.resolve().then(t.t.bind(t,68123,23)),Promise.resolve().then(t.t.bind(t,69806,23)),Promise.resolve().then(t.t.bind(t,97952,23))},21908:(e,r,t)=>{"use strict";t.d(r,{LoadingProvider:()=>o,startLoading:()=>d,stopLoading:()=>c});var a=t(58120);t(36372);var s=t(56539),i=t(42070),n=t.n(i);function o({children:e}){return(0,s.usePathname)(),(0,s.useSearchParams)(),a.jsx(a.Fragment,{children:e})}function d(){n().start()}function c(){n().done()}n().configure({showSpinner:!1,speed:300,minimum:.1})},53014:(e,r,t)=>{"use strict";t.d(r,{QueryProvider:()=>n});var a=t(58120),s=t(85084),i=t(95343);function n({children:e}){let r=new s.S({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});return a.jsx(i.aH,{client:r,children:e})}},93551:(e,r,t)=>{"use strict";t.d(r,{ThemeProvider:()=>o});var a=t(58120),s=t(94756),i=t(57879),n=t(53966);function o({children:e}){return(0,a.jsxs)(s.Z,{theme:n.darkTheme,children:[a.jsx(i.ZP,{}),e]})}},53966:(e,r,t)=>{"use strict";t.d(r,{darkTheme:()=>i});var a=t(16476);let s={bgBase:"#16181c",bgRaised:"#1a1d22",bgSurface:"#26282e",bgElevated:"#313338",textPrimary:"#ffffff",textSecondary:"#9a9a9a",border:"#2e3035",primary:"#1bd96a",primaryLight:"#4de38a",primaryDark:"#15a852",secondary:"#7c3aed",secondaryLight:"#9f67f0",secondaryDark:"#5b21b6"},i=(0,a.Z)({palette:{mode:"dark",primary:{main:s.primary,light:s.primaryLight,dark:s.primaryDark},secondary:{main:s.secondary,light:s.secondaryLight,dark:s.secondaryDark},background:{default:s.bgBase,paper:s.bgRaised},success:{main:"#22c55e"},error:{main:"#ef4444"},warning:{main:"#f59e0b"},text:{primary:s.textPrimary,secondary:s.textSecondary},divider:s.border,action:{hover:s.bgSurface,selected:s.bgSurface}},typography:{fontFamily:'"Ubuntu", "Roboto", "Helvetica", "Arial", sans-serif'},components:{MuiCard:{styleOverrides:{root:{backgroundColor:s.bgRaised,borderRadius:"12px",border:`1px solid ${s.border}`}}},MuiPaper:{styleOverrides:{root:{backgroundImage:"none"}}},MuiButton:{styleOverrides:{root:{borderRadius:"8px",textTransform:"none"}}},MuiAppBar:{styleOverrides:{root:{backgroundColor:s.bgRaised,borderBottom:`1px solid ${s.border}`}}},MuiDrawer:{styleOverrides:{paper:{backgroundColor:s.bgRaised,borderRight:`1px solid ${s.border}`}}},MuiCssBaseline:{styleOverrides:{body:{scrollbarColor:`${s.bgElevated} ${s.bgBase}`,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:s.bgBase,width:8},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:s.bgElevated,minHeight:24},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:s.bgSurface}}}}}})},97759:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>p,metadata:()=>m});var a=t(8203),s=t(72400),i=t.n(s),n=t(84898),o=t(65577),d=t(2325);(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/theme/muiTheme.ts#darkTheme`);let c=(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/theme/ThemeProvider.tsx#ThemeProvider`),l=(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/lib/QueryProvider.tsx#QueryProvider`);t(22587),t(8290),t(60154);let u=(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/components/providers/LoadingProvider.tsx#LoadingProvider`);(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/components/providers/LoadingProvider.tsx#startLoading`),(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/components/providers/LoadingProvider.tsx#stopLoading`),t(56825);let m={title:"Minecraft Server Manager",description:"Web-based management console for Minecraft server infrastructure"};function p({children:e}){return a.jsx("html",{lang:"en",children:a.jsx("body",{className:i().className,children:a.jsx("div",{id:"__next",children:a.jsx(o.Z,{children:a.jsx(c,{children:a.jsx(l,{children:a.jsx(n.Suspense,{fallback:null,children:a.jsx(u,{children:e})})})})})})})})}},60154:(e,r,t)=>{"use strict";t.d(r,{Ke:()=>l,kF:()=>c,l4:()=>o,mk:()=>d});var a=t(31969),s=t(22587),i=t(8290),n=t(30579);class o extends Error{constructor(e,r=401){super(e),this.statusCode=r,this.name="AuthError"}}async function d(e){let r=await a.I.api.getSession({headers:e});if(!r)throw new o("Unauthorized",401);return r}async function c(e){let r=await d(e);if("admin"!==r.user.role)throw new o("Forbidden: Admin access required",403);return r}async function l(e,r,t="view"){let a=await d(e);if("admin"===a.user.role)return a;let c=await s.db.select().from(i.userServers).where((0,n.xD)((0,n.eq)(i.userServers.userId,a.user.id),(0,n.eq)(i.userServers.serverId,r))).limit(1);if(0===c.length)throw new o("Forbidden: No access to this server",403);let l=c[0].permission,u={view:1,manage:2,admin:3};if(u[l]<u[t])throw new o(`Forbidden: Requires ${t} permission`,403);return a}},31969:(e,r,t)=>{"use strict";t.d(r,{I:()=>d});var a=t(33580),s=t(5944),i=t(90224),n=t(22587),o=t(8290);let d=(0,a.kj)({database:(0,s.s)(n.db,{provider:"sqlite",schema:{user:o.users,session:o.sessions,account:o.accounts,verification:o.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,i.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:["http://localhost:5000","http://localhost:3000",...process.env.BETTER_AUTH_URL?[process.env.BETTER_AUTH_URL]:[],...process.env.NEXT_PUBLIC_APP_URL?[process.env.NEXT_PUBLIC_APP_URL]:[]]})},22587:(e,r,t)=>{"use strict";t.d(r,{db:()=>m});var a=t(85890),s=t.n(a),i=t(31590),n=t(8290),o=t(55315),d=t.n(o),c=t(92048);let l=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=d().join(process.cwd(),"data");return d().join(e,"mcctl.db")}();!function(e){if(":memory:"===e)return;let r=d().dirname(e);(0,c.existsSync)(r)||(0,c.mkdirSync)(r,{recursive:!0})}(l);let u=new(s())(l);u.pragma("journal_mode = WAL"),u.pragma("foreign_keys = ON"),u.exec(`
|
|
2
|
+
CREATE TABLE IF NOT EXISTS users (
|
|
3
|
+
id TEXT PRIMARY KEY,
|
|
4
|
+
name TEXT NOT NULL,
|
|
5
|
+
email TEXT NOT NULL UNIQUE,
|
|
6
|
+
email_verified INTEGER NOT NULL DEFAULT 0,
|
|
7
|
+
image TEXT,
|
|
8
|
+
role TEXT NOT NULL DEFAULT 'user',
|
|
9
|
+
banned INTEGER DEFAULT 0,
|
|
10
|
+
ban_reason TEXT,
|
|
11
|
+
ban_expires INTEGER,
|
|
12
|
+
created_at INTEGER NOT NULL,
|
|
13
|
+
updated_at INTEGER NOT NULL
|
|
14
|
+
);
|
|
15
|
+
CREATE TABLE IF NOT EXISTS accounts (
|
|
16
|
+
id TEXT PRIMARY KEY,
|
|
17
|
+
account_id TEXT NOT NULL,
|
|
18
|
+
provider_id TEXT NOT NULL,
|
|
19
|
+
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
20
|
+
access_token TEXT,
|
|
21
|
+
refresh_token TEXT,
|
|
22
|
+
id_token TEXT,
|
|
23
|
+
access_token_expires_at INTEGER,
|
|
24
|
+
refresh_token_expires_at INTEGER,
|
|
25
|
+
scope TEXT,
|
|
26
|
+
password TEXT,
|
|
27
|
+
created_at INTEGER NOT NULL,
|
|
28
|
+
updated_at INTEGER NOT NULL
|
|
29
|
+
);
|
|
30
|
+
CREATE TABLE IF NOT EXISTS sessions (
|
|
31
|
+
id TEXT PRIMARY KEY,
|
|
32
|
+
expires_at INTEGER NOT NULL,
|
|
33
|
+
token TEXT NOT NULL UNIQUE,
|
|
34
|
+
ip_address TEXT,
|
|
35
|
+
user_agent TEXT,
|
|
36
|
+
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
37
|
+
created_at INTEGER NOT NULL,
|
|
38
|
+
updated_at INTEGER NOT NULL
|
|
39
|
+
);
|
|
40
|
+
CREATE TABLE IF NOT EXISTS verifications (
|
|
41
|
+
id TEXT PRIMARY KEY,
|
|
42
|
+
identifier TEXT NOT NULL,
|
|
43
|
+
value TEXT NOT NULL,
|
|
44
|
+
expires_at INTEGER NOT NULL,
|
|
45
|
+
created_at INTEGER,
|
|
46
|
+
updated_at INTEGER
|
|
47
|
+
);
|
|
48
|
+
`);let m=(0,i.t)(u,{schema:n})},8290:(e,r,t)=>{"use strict";t.r(r),t.d(r,{accounts:()=>c,sessions:()=>d,userServers:()=>u,users:()=>o,verifications:()=>l});var a=t(80722),s=t(10160),i=t(30304),n=t(76303);let o=(0,a.Px)("users",{id:(0,s.fL)("id").primaryKey(),name:(0,s.fL)("name").notNull(),email:(0,s.fL)("email").notNull().unique(),emailVerified:(0,i._L)("email_verified",{mode:"boolean"}).notNull().default(!1),image:(0,s.fL)("image"),role:(0,s.fL)("role").notNull().default("user"),banned:(0,i._L)("banned",{mode:"boolean"}).default(!1),banReason:(0,s.fL)("ban_reason"),banExpires:(0,i._L)("ban_expires",{mode:"timestamp"}),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),d=(0,a.Px)("sessions",{id:(0,s.fL)("id").primaryKey(),expiresAt:(0,i._L)("expires_at",{mode:"timestamp"}).notNull(),token:(0,s.fL)("token").notNull().unique(),ipAddress:(0,s.fL)("ip_address"),userAgent:(0,s.fL)("user_agent"),userId:(0,s.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),c=(0,a.Px)("accounts",{id:(0,s.fL)("id").primaryKey(),accountId:(0,s.fL)("account_id").notNull(),providerId:(0,s.fL)("provider_id").notNull(),userId:(0,s.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),accessToken:(0,s.fL)("access_token"),refreshToken:(0,s.fL)("refresh_token"),idToken:(0,s.fL)("id_token"),accessTokenExpiresAt:(0,i._L)("access_token_expires_at",{mode:"timestamp"}),refreshTokenExpiresAt:(0,i._L)("refresh_token_expires_at",{mode:"timestamp"}),scope:(0,s.fL)("scope"),password:(0,s.fL)("password"),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)}),l=(0,a.Px)("verifications",{id:(0,s.fL)("id").primaryKey(),identifier:(0,s.fL)("identifier").notNull(),value:(0,s.fL)("value").notNull(),expiresAt:(0,i._L)("expires_at",{mode:"timestamp"}).notNull(),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).$defaultFn(()=>new Date)}),u=(0,a.Px)("user_servers",{id:(0,s.fL)("id").primaryKey().$defaultFn(()=>crypto.randomUUID()),userId:(0,s.fL)("user_id").notNull().references(()=>o.id,{onDelete:"cascade"}),serverId:(0,s.fL)("server_id").notNull(),permission:(0,s.fL)("permission").$type().notNull().default("view"),createdAt:(0,i._L)("created_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date),updatedAt:(0,i._L)("updated_at",{mode:"timestamp"}).notNull().$defaultFn(()=>new Date)},e=>({userServerIdx:(0,n.Kz)("user_server_idx").on(e.userId,e.serverId)}))},56825:()=>{}};
|
package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json
CHANGED
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"wasm": [],
|
|
18
18
|
"assets": [],
|
|
19
19
|
"env": {
|
|
20
|
-
"__NEXT_BUILD_ID": "
|
|
21
|
-
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "
|
|
22
|
-
"__NEXT_PREVIEW_MODE_ID": "
|
|
23
|
-
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "
|
|
24
|
-
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "
|
|
20
|
+
"__NEXT_BUILD_ID": "ddlfT0dafY0G-jGkapBmi",
|
|
21
|
+
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "5n7sPT77qOzQ3eul0DZChumfDirdfgUpHpL628fR20Q=",
|
|
22
|
+
"__NEXT_PREVIEW_MODE_ID": "7a9a5cb3e40f69880129c65757c1b7ba",
|
|
23
|
+
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "e0ccbcdb88f543a555c5572f708901180529219b124fa4bb28259eabe38ea129",
|
|
24
|
+
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "efdbee10fce6b9468191a0d8c12197ee46fff745677c24300022de1d795bd8c5"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__NEXT_FONT_MANIFEST='{"pages":{},"app":{"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/layout":["static/media/
|
|
1
|
+
self.__NEXT_FONT_MANIFEST='{"pages":{},"app":{"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/layout":["static/media/3ecd40fce058ee61-s.p.woff2","static/media/70d2fd2b9078a5a3-s.p.woff2","static/media/33a864272e2b3e97-s.p.woff2","static/media/c99b890c5ded8d2e-s.p.woff2"]},"appUsingSizeAdjust":true,"pagesUsingSizeAdjust":false}';
|
package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"pages":{},"app":{"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/layout":["static/media/
|
|
1
|
+
{"pages":{},"app":{"/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/layout":["static/media/3ecd40fce058ee61-s.p.woff2","static/media/70d2fd2b9078a5a3-s.p.woff2","static/media/33a864272e2b3e97-s.p.woff2","static/media/c99b890c5ded8d2e-s.p.woff2"]},"appUsingSizeAdjust":true,"pagesUsingSizeAdjust":false}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/33a864272e2b3e97-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/3ecd40fce058ee61-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/70d2fd2b9078a5a3-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/c99b890c5ded8d2e-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/8dfdea5f9ccf5da4.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c5f126aae1eac753.js"/><script src="/_next/static/chunks/3b518dcd-5724e59d48f01b72.js" async=""></script><script src="/_next/static/chunks/2757-058492b5c236cb62.js" async=""></script><script src="/_next/static/chunks/main-app-666bf3e0c0f3dee2.js" async=""></script><script src="/_next/static/chunks/6812-f5924f14ef351036.js" async=""></script><script src="/_next/static/chunks/540-4b925f2c57833962.js" async=""></script><script src="/_next/static/chunks/5645-d306bb768b5907c8.js" async=""></script><script src="/_next/static/chunks/app/layout-e0e626ece42c56d9.js" async=""></script><meta name="robots" content="noindex"/><title>Minecraft Server Manager</title><meta name="description" content="Web-based management console for Minecraft server infrastructure"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script><style data-emotion="mui-global 1kft0z8">html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;-webkit-text-size-adjust:100%;}*,*::before,*::after{box-sizing:inherit;}strong,b{font-weight:700;}body{margin:0;color:#ffffff;font-family:"Ubuntu","Roboto","Helvetica","Arial",sans-serif;font-weight:400;font-size:1rem;line-height:1.5;background-color:#16181c;}@media print{body{background-color:#fff;}}body::backdrop{background-color:#16181c;}body{scrollbar-color:#313338 #16181c;}body::-webkit-scrollbar,body *::-webkit-scrollbar{background-color:#16181c;width:8px;}body::-webkit-scrollbar-thumb,body *::-webkit-scrollbar-thumb{border-radius:8px;background-color:#313338;min-height:24px;}body::-webkit-scrollbar-thumb:hover,body *::-webkit-scrollbar-thumb:hover{background-color:#26282e;}</style></head><body class="__className_1d908f"><div id="__next"><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$--></div><script src="/_next/static/chunks/webpack-c5f126aae1eac753.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/33a864272e2b3e97-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/3ecd40fce058ee61-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/70d2fd2b9078a5a3-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/c99b890c5ded8d2e-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/css/8dfdea5f9ccf5da4.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"6:I[39943,[],\"\"]\n8:I[14224,[],\"\"]\n9:I[2863,[],\"\"]\na:I[89083,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"default\"]\nb:I[48283,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"ThemeProvider\"]\nc:I[22237,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"QueryProvider\"]\nd:\"$Sreact.suspense\"\ne:I[3454,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"LoadingProvider\"]\n14:I[19253,[],\"\"]\nf:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n10:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n11:{\"display\":\"inline-block\"}\n12:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n15:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L6\",null,{\"buildId\":\"
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/33a864272e2b3e97-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/3ecd40fce058ee61-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/70d2fd2b9078a5a3-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/c99b890c5ded8d2e-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/8dfdea5f9ccf5da4.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c5f126aae1eac753.js"/><script src="/_next/static/chunks/3b518dcd-5724e59d48f01b72.js" async=""></script><script src="/_next/static/chunks/2757-058492b5c236cb62.js" async=""></script><script src="/_next/static/chunks/main-app-666bf3e0c0f3dee2.js" async=""></script><script src="/_next/static/chunks/6812-f5924f14ef351036.js" async=""></script><script src="/_next/static/chunks/540-4b925f2c57833962.js" async=""></script><script src="/_next/static/chunks/5645-d306bb768b5907c8.js" async=""></script><script src="/_next/static/chunks/app/layout-e0e626ece42c56d9.js" async=""></script><meta name="robots" content="noindex"/><title>Minecraft Server Manager</title><meta name="description" content="Web-based management console for Minecraft server infrastructure"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script><style data-emotion="mui-global 1kft0z8">html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;-webkit-text-size-adjust:100%;}*,*::before,*::after{box-sizing:inherit;}strong,b{font-weight:700;}body{margin:0;color:#ffffff;font-family:"Ubuntu","Roboto","Helvetica","Arial",sans-serif;font-weight:400;font-size:1rem;line-height:1.5;background-color:#16181c;}@media print{body{background-color:#fff;}}body::backdrop{background-color:#16181c;}body{scrollbar-color:#313338 #16181c;}body::-webkit-scrollbar,body *::-webkit-scrollbar{background-color:#16181c;width:8px;}body::-webkit-scrollbar-thumb,body *::-webkit-scrollbar-thumb{border-radius:8px;background-color:#313338;min-height:24px;}body::-webkit-scrollbar-thumb:hover,body *::-webkit-scrollbar-thumb:hover{background-color:#26282e;}</style></head><body class="__className_1d908f"><div id="__next"><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$--></div><script src="/_next/static/chunks/webpack-c5f126aae1eac753.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/33a864272e2b3e97-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/3ecd40fce058ee61-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/70d2fd2b9078a5a3-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/c99b890c5ded8d2e-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/css/8dfdea5f9ccf5da4.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"6:I[39943,[],\"\"]\n8:I[14224,[],\"\"]\n9:I[2863,[],\"\"]\na:I[89083,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"default\"]\nb:I[48283,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"ThemeProvider\"]\nc:I[22237,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"QueryProvider\"]\nd:\"$Sreact.suspense\"\ne:I[3454,[\"6812\",\"static/chunks/6812-f5924f14ef351036.js\",\"540\",\"static/chunks/540-4b925f2c57833962.js\",\"5645\",\"static/chunks/5645-d306bb768b5907c8.js\",\"3185\",\"static/chunks/app/layout-e0e626ece42c56d9.js\"],\"LoadingProvider\"]\n14:I[19253,[],\"\"]\nf:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n10:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n11:{\"display\":\"inline-block\"}\n12:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n15:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L6\",null,{\"buildId\":\"ddlfT0dafY0G-jGkapBmi\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L7\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/8dfdea5f9ccf5da4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_1d908f\",\"children\":[\"$\",\"div\",null,{\"id\":\"__next\",\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$d\",null,{\"fallback\":null,\"children\":[\"$\",\"$Le\",null,{\"children\":[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$f\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$10\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$11\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$12\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]}]}]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L13\"],\"globalErrorComponent\":\"$14\",\"missingSlots\":\"$W15\"}]\n"])</script><script>self.__next_f.push([1,"13:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Minecraft Server Manager\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Web-based management console for Minecraft server infrastructure\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n7:null\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-c5f126aae1eac753.js" defer=""></script><script src="/_next/static/chunks/framework-dd2365ff6fe7347f.js" defer=""></script><script src="/_next/static/chunks/main-43f98b458d773ca0.js" defer=""></script><script src="/_next/static/chunks/pages/_app-afb15f99d73f71b7.js" defer=""></script><script src="/_next/static/chunks/pages/_error-3a37b634c5a26fe6.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-c5f126aae1eac753.js" defer=""></script><script src="/_next/static/chunks/framework-dd2365ff6fe7347f.js" defer=""></script><script src="/_next/static/chunks/main-43f98b458d773ca0.js" defer=""></script><script src="/_next/static/chunks/pages/_app-afb15f99d73f71b7.js" defer=""></script><script src="/_next/static/chunks/pages/_error-3a37b634c5a26fe6.js" defer=""></script><script src="/_next/static/ddlfT0dafY0G-jGkapBmi/_buildManifest.js" defer=""></script><script src="/_next/static/ddlfT0dafY0G-jGkapBmi/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"ddlfT0dafY0G-jGkapBmi","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"5n7sPT77qOzQ3eul0DZChumfDirdfgUpHpL628fR20Q="}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return H}});var n=t(94655),a=t(35106),i=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),h=t(31317),x=t(78765),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690);let A=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit Log",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function D(e){let{mobileOpen:r,onMenuToggle:t}=e,a=(0,s.usePathname)(),y=e=>"/dashboard"===e?"/dashboard"===a||"/"===a:a.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(h.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(i.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:A.map(e=>{let r=y(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(i.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(h.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(x.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(h.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:A.map(e=>{let r=y(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var T=t(67337),_=t(41261),E=t(69123),L=t(75845),M=t(43880);function q(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let R=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function B(){let e=new Date().getFullYear();return(0,n.jsx)(i.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(T.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(i.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:R.map(e=>(0,n.jsxs)(i.Z,{children:[(0,n.jsx)(h.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(i.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(i.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(_.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(E.Z,{sx:{mb:3}}),(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(h.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(_.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(i.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(_.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(_.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(_.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(q,{fontSize:"small"})})]})]})]})})}function H(e){let{children:r}=e,[t,s]=(0,a.useState)(!1);return(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(D,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(i.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(B,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return P}});var n=t(94655),a=t(35106),i=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),h=t(36848),x=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,b]=(0,a.useState)(!1),[j,y]=(0,a.useState)({}),[v,Z]=(0,a.useState)(null),[w,C]=(0,a.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.zB.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(i.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(h.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,b]=(0,a.useState)(""),[j,y]=(0,a.useState)(""),[v,Z]=(0,a.useState)(!1),[w,C]=(0,a.useState)(!1),[k,S]=(0,a.useState)({}),[P,z]=(0,a.useState)(null),[I,W]=(0,a.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(i.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(h.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(h.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(35694),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(78319);function P(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,a.useState)(null),o=()=>{l(null)},h=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:x}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(x.name,x.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(i.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:x.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:x.email}),"admin"===x.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),(0,n.jsxs)(w.Z,{onClick:h,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),a=t(35106),i=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,i.usePathname)(),s=(0,i.useSearchParams)();return(0,a.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return c},w7:function(){return l},y1:function(){return o},zB:function(){return s}});var n=t(77054),a=t(61648),i=t(35016);let{signIn:s,signOut:l,signUp:o,useSession:c}=(0,n.X)({baseURL:i.env.NEXT_PUBLIC_BETTER_AUTH_URL||"http://localhost:5000",plugins:[(0,a.zB)()]})}},function(e){e.O(0,[6812,7220,8006,7294,8696,1071,55,3543,8347,2149,2542,8322,8918,212,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return H}});var n=t(94655),a=t(35106),i=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(78765),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690);let A=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit Log",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function D(e){let{mobileOpen:r,onMenuToggle:t}=e,a=(0,s.usePathname)(),y=e=>"/dashboard"===e?"/dashboard"===a||"/"===a:a.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(i.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:A.map(e=>{let r=y(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(i.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:A.map(e=>{let r=y(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var T=t(67337),_=t(41261),E=t(69123),L=t(75845),M=t(43880);function q(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let R=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function B(){let e=new Date().getFullYear();return(0,n.jsx)(i.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(T.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(i.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:R.map(e=>(0,n.jsxs)(i.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(i.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(i.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(_.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(E.Z,{sx:{mb:3}}),(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(_.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(i.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(_.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(_.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(_.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(q,{fontSize:"small"})})]})]})]})})}function H(e){let{children:r}=e,[t,s]=(0,a.useState)(!1);return(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(D,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(i.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(B,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return P}});var n=t(94655),a=t(35106),i=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,b]=(0,a.useState)(!1),[j,y]=(0,a.useState)({}),[v,Z]=(0,a.useState)(null),[w,C]=(0,a.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.zB.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(i.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,b]=(0,a.useState)(""),[j,y]=(0,a.useState)(""),[v,Z]=(0,a.useState)(!1),[w,C]=(0,a.useState)(!1),[k,S]=(0,a.useState)({}),[P,z]=(0,a.useState)(null),[I,W]=(0,a.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(i.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(35694),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(78319);function P(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,a.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(i.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),a=t(35106),i=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,i.usePathname)(),s=(0,i.useSearchParams)();return(0,a.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return c},w7:function(){return l},y1:function(){return o},zB:function(){return s}});var n=t(77054),a=t(61648),i=t(35016);let{signIn:s,signOut:l,signUp:o,useSession:c}=(0,n.X)({baseURL:i.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,a.zB)()]})}},function(e){e.O(0,[6812,7220,8006,7294,8696,1071,55,3543,8347,2149,2542,8322,8918,212,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2626],{40527:function(e,r,t){Promise.resolve().then(t.bind(t,10672))},628:function(e,r,t){"use strict";t.d(r,{Z:function(){return Z}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(69899),c=t(11379),
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2626],{40527:function(e,r,t){Promise.resolve().then(t.bind(t,10672))},628:function(e,r,t){"use strict";t.d(r,{Z:function(){return Z}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(69899),c=t(11379),m=t(9049);function x(e){return(0,m.ZP)("MuiCard",e)}(0,c.Z)("MuiCard",["root"]);var h=t(94655);let p=["className","raised"],f=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},x,r)},g=(0,o.ZP)(u.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({overflow:"hidden"}));var Z=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCard"}),{className:s,raised:l=!1}=t,o=(0,i.Z)(t,p),u=(0,n.Z)({},t,{raised:l}),c=f(u);return(0,h.jsx)(g,(0,n.Z)({className:(0,a.Z)(c.root,s),elevation:l?8:void 0,ref:r,ownerState:u},o))})},41565:function(e,r,t){"use strict";t.d(r,{Z:function(){return g}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(11379),c=t(9049);function m(e){return(0,c.ZP)("MuiCardContent",e)}(0,u.Z)("MuiCardContent",["root"]);var x=t(94655);let h=["className","component"],p=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},m,r)},f=(0,o.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}}));var g=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCardContent"}),{className:s,component:l="div"}=t,o=(0,i.Z)(t,h),u=(0,n.Z)({},t,{component:l}),c=p(u);return(0,x.jsx)(f,(0,n.Z)({as:l,className:(0,a.Z)(c.root,s),ownerState:u,ref:r},o))})},10672:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return x}});var n=t(94655),i=t(74228),s=t(67337),a=t(7281),l=t(628),o=t(41565),d=t(31317),u=t(41261),c=t(85480),m=t(46725);function x(){let e=(0,i.useRouter)();return(0,n.jsx)(s.Z,{maxWidth:"sm",children:(0,n.jsx)(a.Z,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",py:4},children:(0,n.jsx)(l.Z,{sx:{width:"100%",maxWidth:500},children:(0,n.jsxs)(o.Z,{sx:{p:4},children:[(0,n.jsx)(d.Z,{variant:"h4",component:"h1",gutterBottom:!0,sx:{fontWeight:600,textAlign:"center",mb:3},children:"Welcome Back"}),(0,n.jsx)(d.Z,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",mb:4},children:"Sign in to manage your Minecraft servers"}),(0,n.jsx)(c.U0,{onSuccess:()=>{e.push("/dashboard")}}),(0,n.jsx)(a.Z,{sx:{mt:3,textAlign:"center"},children:(0,n.jsxs)(d.Z,{variant:"body2",color:"text.secondary",children:["Don't have an account?"," ",(0,n.jsx)(u.Z,{component:m.default,href:"/signup",underline:"hover",children:"Sign up"})]})})]})})})})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return h},WS:function(){return p},Ie:function(){return k}});var n=t(94655),i=t(35106),s=t(7281),a=t(81071),l=t(97436),o=t(52082),d=t(79983),u=t(30417),c=t(36848),m=t(554),x=t(6986);function h(e){let{onSuccess:r}=e,[t,h]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(!1),[v,j]=(0,i.useState)({}),[y,b]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),S=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),j(e),0===Object.keys(e).length},P=async e=>{if(e.preventDefault(),b(null),S()){C(!0);try{let e=await x.zB.email({email:t,password:p});if(e.error){b(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){b("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:P,sx:{display:"flex",flexDirection:"column",gap:2},children:[y&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>b(null),children:y}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>h(e.target.value),error:!!v.email,helperText:v.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!v.password,helperText:v.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!g)},edge:"end",children:g?(0,n.jsx)(c.Z,{}):(0,n.jsx)(m.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,h]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(""),[v,j]=(0,i.useState)(""),[y,b]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[S,P]=(0,i.useState)({}),[k,W]=(0,i.useState)(null),[I,R]=(0,i.useState)(!1),q=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",v?g!==v&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",P(e),0===Object.keys(e).length},E=async e=>{if(e.preventDefault(),W(null),q()){R(!0);try{let e=await x.y1.email({email:p,password:g,name:t});if(e.error){W(e.error.message||"Registration failed"),R(!1);return}r&&r()}catch(e){W("An unexpected error occurred. Please try again."),R(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:E,sx:{display:"flex",flexDirection:"column",gap:2},children:[k&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>W(null),children:k}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>h(e.target.value),error:!!S.name,helperText:S.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!S.email,helperText:S.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:y?"text":"password",value:g,onChange:e=>Z(e.target.value),error:!!S.password,helperText:S.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!y)},edge:"end",children:y?(0,n.jsx)(c.Z,{}):(0,n.jsx)(m.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:v,onChange:e=>j(e.target.value),error:!!S.confirmPassword,helperText:S.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(c.Z,{}):(0,n.jsx)(m.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),Z=t(86702),v=t(35694),j=t(31317),y=t(25333),b=t(69123),w=t(7178),C=t(17820),S=t(73424),P=t(78319);function k(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,x.kP)(),[a,l]=(0,i.useState)(null),o=()=>{l(null)},c=async()=>{o(),await (0,x.w7)(),e.push("/login")};if(t)return(0,n.jsx)(s.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(u.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:m}=r,h=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(m.name,m.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(Z.Z,{sx:{bgcolor:"primary.main"},children:h})}),(0,n.jsxs)(v.Z,{anchorEl:a,open:!!a,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(s.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(j.Z,{variant:"subtitle1",fontWeight:"600",children:m.name||"User"}),(0,n.jsx)(j.Z,{variant:"body2",color:"text.secondary",children:m.email}),"admin"===m.role&&(0,n.jsx)(y.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(b.Z,{}),(0,n.jsxs)(w.Z,{onClick:c,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(S.Z,{children:"Logout"})]})]})]})}},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return d},w7:function(){return l},y1:function(){return o},zB:function(){return a}});var n=t(77054),i=t(61648),s=t(35016);let{signIn:a,signOut:l,signUp:o,useSession:d}=(0,n.X)({baseURL:s.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]})}},function(e){e.O(0,[6812,7220,8006,7294,8696,1071,55,3543,2149,2542,8322,3669,2757,1744],function(){return e(e.s=40527)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{54985:function(e,r,n){Promise.resolve().then(n.bind(n,26854))},93017:function(e,r,n){"use strict";n.d(r,{Z:function(){return I}});var t=n(16295),a=n(32324),i=n(81500),s=n(35106),o=n(70316),c=n(65951),u=n(41060),l=n(38762),f=n(28057),d=n(34519),h=n(11379),m=n(9049);function v(e){return(0,m.ZP)("MuiCircularProgress",e)}(0,h.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var k=n(94655);function p(){let e=(0,t._)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"]);return p=function(){return e},e}function P(){let e=(0,t._)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"]);return P=function(){return e},e}function g(){let e=(0,t._)(["\n animation: "," 1.4s linear infinite;\n "]);return g=function(){return e},e}function x(){let e=(0,t._)(["\n animation: "," 1.4s ease-in-out infinite;\n "]);return x=function(){return e},e}let Z=["className","color","disableShrink","size","style","thickness","value","variant"],y=e=>e,S,b,_,C,R=(0,u.F4)(S||(S=y(p()))),M=(0,u.F4)(b||(b=y(P()))),w=e=>{let{classes:r,variant:n,color:t,disableShrink:a}=e,i={root:["root",n,"color".concat((0,l.Z)(t))],svg:["svg"],circle:["circle","circle".concat((0,l.Z)(n)),a&&"circleDisableShrink"]};return(0,c.Z)(i,v,r)},D=(0,d.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,r)=>{let{ownerState:n}=e;return[r.root,r[n.variant],r["color".concat((0,l.Z)(n.color))]]}})(e=>{let{ownerState:r,theme:n}=e;return(0,i.Z)({display:"inline-block"},"determinate"===r.variant&&{transition:n.transitions.create("transform")},"inherit"!==r.color&&{color:(n.vars||n).palette[r.color].main})},e=>{let{ownerState:r}=e;return"indeterminate"===r.variant&&(0,u.iv)(_||(_=y(g(),0)),R)}),N=(0,d.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,r)=>r.svg})({display:"block"}),E=(0,d.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,r)=>{let{ownerState:n}=e;return[r.circle,r["circle".concat((0,l.Z)(n.variant))],n.disableShrink&&r.circleDisableShrink]}})(e=>{let{ownerState:r,theme:n}=e;return(0,i.Z)({stroke:"currentColor"},"determinate"===r.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===r.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})},e=>{let{ownerState:r}=e;return"indeterminate"===r.variant&&!r.disableShrink&&(0,u.iv)(C||(C=y(x(),0)),M)});var I=s.forwardRef(function(e,r){let n=(0,f.i)({props:e,name:"MuiCircularProgress"}),{className:t,color:s="primary",disableShrink:c=!1,size:u=40,style:l,thickness:d=3.6,value:h=0,variant:m="indeterminate"}=n,v=(0,a.Z)(n,Z),p=(0,i.Z)({},n,{color:s,disableShrink:c,size:u,thickness:d,value:h,variant:m}),P=w(p),g={},x={},y={};if("determinate"===m){let e=2*Math.PI*((44-d)/2);g.strokeDasharray=e.toFixed(3),y["aria-valuenow"]=Math.round(h),g.strokeDashoffset="".concat(((100-h)/100*e).toFixed(3),"px"),x.transform="rotate(-90deg)"}return(0,k.jsx)(D,(0,i.Z)({className:(0,o.Z)(P.root,t),style:(0,i.Z)({width:u,height:u},x,l),ownerState:p,ref:r,role:"progressbar"},y,v,{children:(0,k.jsx)(N,{className:P.svg,ownerState:p,viewBox:"".concat(22," ").concat(22," ").concat(44," ").concat(44),children:(0,k.jsx)(E,{className:P.circle,style:g,ownerState:p,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d})})}))})},74228:function(e,r,n){"use strict";var t=n(73310);n.o(t,"useParams")&&n.d(r,{useParams:function(){return t.useParams}}),n.o(t,"usePathname")&&n.d(r,{usePathname:function(){return t.usePathname}}),n.o(t,"useRouter")&&n.d(r,{useRouter:function(){return t.useRouter}}),n.o(t,"useSearchParams")&&n.d(r,{useSearchParams:function(){return t.useSearchParams}}),n.o(t,"useServerInsertedHTML")&&n.d(r,{useServerInsertedHTML:function(){return t.useServerInsertedHTML}})},26854:function(e,r,n){"use strict";n.r(r),n.d(r,{default:function(){return u}});var t=n(94655),a=n(35106),i=n(74228),s=n(7281),o=n(93017),c=n(6986);function u(){let e=(0,i.useRouter)(),{data:r,isPending:n}=(0,c.kP)();return(0,a.useEffect)(()=>{n||((null==r?void 0:r.user)?e.push("/dashboard"):e.push("/login"))},[r,n,e]),(0,t.jsx)(s.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh"},children:(0,t.jsx)(o.Z,{})})}},6986:function(e,r,n){"use strict";n.d(r,{kP:function(){return u},w7:function(){return o},y1:function(){return c},zB:function(){return s}});var t=n(77054),a=n(61648),i=n(35016);let{signIn:s,signOut:o,signUp:c,useSession:u}=(0,t.X)({baseURL:i.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,a.zB)()]})}},function(e){e.O(0,[6812,7220,2542,3669,2757,1744],function(){return e(e.s=54985)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4966],{24100:function(e,r,t){Promise.resolve().then(t.bind(t,85795))},628:function(e,r,t){"use strict";t.d(r,{Z:function(){return Z}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(69899),c=t(11379),
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4966],{24100:function(e,r,t){Promise.resolve().then(t.bind(t,85795))},628:function(e,r,t){"use strict";t.d(r,{Z:function(){return Z}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(69899),c=t(11379),x=t(9049);function m(e){return(0,x.ZP)("MuiCard",e)}(0,c.Z)("MuiCard",["root"]);var h=t(94655);let p=["className","raised"],f=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},m,r)},g=(0,o.ZP)(u.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({overflow:"hidden"}));var Z=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCard"}),{className:s,raised:l=!1}=t,o=(0,i.Z)(t,p),u=(0,n.Z)({},t,{raised:l}),c=f(u);return(0,h.jsx)(g,(0,n.Z)({className:(0,a.Z)(c.root,s),elevation:l?8:void 0,ref:r,ownerState:u},o))})},41565:function(e,r,t){"use strict";t.d(r,{Z:function(){return g}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(11379),c=t(9049);function x(e){return(0,c.ZP)("MuiCardContent",e)}(0,u.Z)("MuiCardContent",["root"]);var m=t(94655);let h=["className","component"],p=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},x,r)},f=(0,o.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}}));var g=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCardContent"}),{className:s,component:l="div"}=t,o=(0,i.Z)(t,h),u=(0,n.Z)({},t,{component:l}),c=p(u);return(0,m.jsx)(f,(0,n.Z)({as:l,className:(0,a.Z)(c.root,s),ownerState:u,ref:r},o))})},85795:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return m}});var n=t(94655),i=t(74228),s=t(67337),a=t(7281),l=t(628),o=t(41565),d=t(31317),u=t(41261),c=t(85480),x=t(46725);function m(){let e=(0,i.useRouter)();return(0,n.jsx)(s.Z,{maxWidth:"sm",children:(0,n.jsx)(a.Z,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",py:4},children:(0,n.jsx)(l.Z,{sx:{width:"100%",maxWidth:500},children:(0,n.jsxs)(o.Z,{sx:{p:4},children:[(0,n.jsx)(d.Z,{variant:"h4",component:"h1",gutterBottom:!0,sx:{fontWeight:600,textAlign:"center",mb:3},children:"Create Account"}),(0,n.jsx)(d.Z,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",mb:4},children:"Sign up to start managing Minecraft servers"}),(0,n.jsx)(c.WS,{onSuccess:()=>{e.push("/dashboard")}}),(0,n.jsx)(a.Z,{sx:{mt:3,textAlign:"center"},children:(0,n.jsxs)(d.Z,{variant:"body2",color:"text.secondary",children:["Already have an account?"," ",(0,n.jsx)(u.Z,{component:x.default,href:"/login",underline:"hover",children:"Sign in"})]})})]})})})})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return h},WS:function(){return p},Ie:function(){return W}});var n=t(94655),i=t(35106),s=t(7281),a=t(81071),l=t(97436),o=t(52082),d=t(79983),u=t(30417),c=t(36848),x=t(554),m=t(6986);function h(e){let{onSuccess:r}=e,[t,h]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(!1),[v,j]=(0,i.useState)({}),[y,b]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),S=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),j(e),0===Object.keys(e).length},P=async e=>{if(e.preventDefault(),b(null),S()){C(!0);try{let e=await m.zB.email({email:t,password:p});if(e.error){b(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){b("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:P,sx:{display:"flex",flexDirection:"column",gap:2},children:[y&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>b(null),children:y}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>h(e.target.value),error:!!v.email,helperText:v.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!v.password,helperText:v.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!g)},edge:"end",children:g?(0,n.jsx)(c.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,h]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(""),[v,j]=(0,i.useState)(""),[y,b]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[S,P]=(0,i.useState)({}),[W,k]=(0,i.useState)(null),[A,I]=(0,i.useState)(!1),R=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",v?g!==v&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",P(e),0===Object.keys(e).length},q=async e=>{if(e.preventDefault(),k(null),R()){I(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){k(e.error.message||"Registration failed"),I(!1);return}r&&r()}catch(e){k("An unexpected error occurred. Please try again."),I(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:q,sx:{display:"flex",flexDirection:"column",gap:2},children:[W&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>k(null),children:W}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>h(e.target.value),error:!!S.name,helperText:S.name,disabled:A,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!S.email,helperText:S.email,disabled:A,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:y?"text":"password",value:g,onChange:e=>Z(e.target.value),error:!!S.password,helperText:S.password,disabled:A,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!y)},edge:"end",children:y?(0,n.jsx)(c.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:v,onChange:e=>j(e.target.value),error:!!S.confirmPassword,helperText:S.confirmPassword,disabled:A,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(c.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:A,fullWidth:!0,size:"large",children:A?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),Z=t(86702),v=t(35694),j=t(31317),y=t(25333),b=t(69123),w=t(7178),C=t(17820),S=t(73424),P=t(78319);function W(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[a,l]=(0,i.useState)(null),o=()=>{l(null)},c=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(s.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(u.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:x}=r,h=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(x.name,x.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(Z.Z,{sx:{bgcolor:"primary.main"},children:h})}),(0,n.jsxs)(v.Z,{anchorEl:a,open:!!a,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(s.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(j.Z,{variant:"subtitle1",fontWeight:"600",children:x.name||"User"}),(0,n.jsx)(j.Z,{variant:"body2",color:"text.secondary",children:x.email}),"admin"===x.role&&(0,n.jsx)(y.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(b.Z,{}),(0,n.jsxs)(w.Z,{onClick:c,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(S.Z,{children:"Logout"})]})]})]})}},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return d},w7:function(){return l},y1:function(){return o},zB:function(){return a}});var n=t(77054),i=t(61648),s=t(35016);let{signIn:a,signOut:l,signUp:o,useSession:d}=(0,n.X)({baseURL:s.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]})}},function(e){e.O(0,[6812,7220,8006,7294,8696,1071,55,3543,2149,2542,8322,3669,2757,1744],function(){return e(e.s=24100)}),_N_E=e.O()}]);
|