diff --git a/.gitignore b/.gitignore index b1c4634..2fcadfc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ *.db *.sqlite build/ -*.txt .env \ No newline at end of file diff --git a/internal/web/templates/admin/assets/index-CWPfp0-e.js b/internal/web/templates/admin/assets/index-Do3iuUd_.js similarity index 99% rename from internal/web/templates/admin/assets/index-CWPfp0-e.js rename to internal/web/templates/admin/assets/index-Do3iuUd_.js index a0aa748..10470b0 100644 --- a/internal/web/templates/admin/assets/index-CWPfp0-e.js +++ b/internal/web/templates/admin/assets/index-Do3iuUd_.js @@ -110,4 +110,4 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */const qS="6";try{window.__reactRouterVersion=qS}catch{}const ZS="startTransition",sf=Nf[ZS];function JS(e){let{basename:t,children:n,future:r,window:o}=e,i=w.useRef();i.current==null&&(i.current=pS({window:o,v5Compat:!0}));let s=i.current,[l,a]=w.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=w.useCallback(f=>{u&&sf?sf(()=>a(f)):a(f)},[a,u]);return w.useLayoutEffect(()=>s.listen(c),[s,c]),w.useEffect(()=>YS(r),[r]),w.createElement(GS,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}var lf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lf||(lf={}));var af;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(af||(af={}));const eE=lm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),br=w.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?n0:"button";return C.jsx(s,{className:De(eE({variant:t,size:n,className:e})),ref:i,...o})});br.displayName="Button";const fg=w.forwardRef(({className:e,type:t,...n},r)=>C.jsx("input",{type:t,className:De("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));fg.displayName="Input";const ac=w.forwardRef(({className:e,...t},n)=>C.jsx("div",{ref:n,className:De("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ac.displayName="Card";const pg=w.forwardRef(({className:e,...t},n)=>C.jsx("div",{ref:n,className:De("flex flex-col space-y-1.5 p-6",e),...t}));pg.displayName="CardHeader";const hg=w.forwardRef(({className:e,...t},n)=>C.jsx("h3",{ref:n,className:De("text-2xl font-semibold leading-none tracking-tight",e),...t}));hg.displayName="CardTitle";const tE=w.forwardRef(({className:e,...t},n)=>C.jsx("p",{ref:n,className:De("text-sm text-muted-foreground",e),...t}));tE.displayName="CardDescription";const uc=w.forwardRef(({className:e,...t},n)=>C.jsx("div",{ref:n,className:De("p-6 pt-0",e),...t}));uc.displayName="CardContent";const nE=w.forwardRef(({className:e,...t},n)=>C.jsx("div",{ref:n,className:De("flex items-center p-6 pt-0",e),...t}));nE.displayName="CardFooter";const rE=({onLogin:e})=>{const[t,n]=w.useState(""),[r,o]=w.useState(!1),i=async s=>{if(s.preventDefault(),!t.trim()){wt({title:"Error",description:"Please enter a password",variant:"destructive"});return}o(!0);try{const l=await fetch("/admin/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({Password:t})}),a=await l.json();l.ok&&a.token?(wt({title:"Success",description:a.message||"Login successful"}),e(a.token)):wt({title:"Error",description:a.message||"Login failed",variant:"destructive"})}catch{wt({title:"Error",description:"Network error. Please try again.",variant:"destructive"})}finally{o(!1)}};return C.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-50 to-slate-100",children:C.jsxs(ac,{className:"w-full max-w-md shadow-lg",children:[C.jsxs(pg,{className:"text-center pb-4",children:[C.jsx("div",{className:"mx-auto w-12 h-12 bg-slate-100 rounded-full flex items-center justify-center mb-4",children:C.jsx(J0,{className:"w-6 h-6 text-slate-600"})}),C.jsx(hg,{className:"text-2xl font-semibold text-slate-800",children:"Admin Login"})]}),C.jsx(uc,{children:C.jsxs("form",{onSubmit:i,className:"space-y-6",children:[C.jsx("div",{className:"space-y-2",children:C.jsx(fg,{type:"password",placeholder:"Enter admin password",value:t,onChange:s=>n(s.target.value),className:"h-12",disabled:r})}),C.jsx(br,{type:"submit",className:"w-full h-12 text-base",disabled:r,children:r?"Signing in...":"Sign In"})]})})]})})},oE=({token:e,onLogout:t})=>{const[n,r]=w.useState([]),[o,i]=w.useState(!1),[s,l]=w.useState(!1),[a,u]=w.useState(""),c=n.length>0?n[0]:null;w.useEffect(()=>{n.length>0&&n.slice(1,3).forEach(g=>{if(g.preview_url){const y=new Image;y.src=g.preview_url}})},[n]);const f=async()=>{i(!0);try{const g=await fetch("/admin/api/getmedia",{headers:{Authorization:`Bearer ${e}`}});if(g.status===401)return wt({title:"Session Expired",description:"Please login again",variant:"destructive"}),t(),null;if(g.ok)return await g.json();{const y=await g.json();return wt({title:"Error",description:y.message||"Failed to fetch media",variant:"destructive"}),null}}catch{return wt({title:"Error",description:"Network error. Please try again.",variant:"destructive"}),null}finally{i(!1)}},m=async()=>{const g=await f();g&&r(y=>[...y,g])},d=async()=>{if(o||n.length>=3)return;const g=3-n.length;for(let y=0;y{d()},[n.length]);const x=async g=>{if(c){l(!0),u(`${g==="approve"?"Approving":"Rejecting"}...`);try{const y=await fetch(`/admin/api/${g}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({mediaId:c.id})});if(y.status===401){wt({title:"Session Expired",description:"Please login again",variant:"destructive"}),t();return}const h=await y.json();y.ok?(u(`${g==="approve"?"Approved":"Rejected"} successfully!`),setTimeout(()=>{r(p=>p.slice(1)),u(""),l(!1)},1e3)):(wt({title:"Error",description:h.message||`Failed to ${g} media`,variant:"destructive"}),l(!1),u(""))}catch{wt({title:"Error",description:"Network error. Please try again.",variant:"destructive"}),l(!1),u("")}}};return C.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 to-slate-100",children:[C.jsx("div",{className:"bg-white shadow-sm border-b",children:C.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:C.jsxs("div",{className:"flex justify-between items-center h-16",children:[C.jsx("h1",{className:"text-xl font-semibold text-slate-800",children:"Admin Dashboard"}),C.jsxs(br,{variant:"outline",onClick:t,className:"flex items-center gap-2",children:[C.jsx(ew,{className:"w-4 h-4"}),"Logout"]})]})})}),C.jsx("div",{className:"flex items-center justify-center min-h-[calc(100vh-4rem)] p-8",children:C.jsx(ac,{className:"max-w-2xl w-full shadow-lg",children:C.jsx(uc,{className:"p-8",children:o&&n.length===0?C.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[C.jsx(Z0,{className:"w-8 h-8 animate-spin text-slate-600 mb-4"}),C.jsx("p",{className:"text-slate-600",children:"Loading media..."})]}):c?C.jsxs("div",{className:"space-y-6",children:[C.jsx("div",{className:"flex justify-center",children:C.jsx("img",{src:c.preview_url,alt:"Media to review",className:"max-w-full max-h-96 rounded-lg shadow-md object-contain",onError:g=>{const y=g.target;y.src=c.url}})}),C.jsxs("div",{className:"text-center text-sm text-slate-600",children:[C.jsxs("p",{children:["Media ID: ",c.id]}),C.jsxs("p",{children:["Post ID: ",c.PostID]}),C.jsx("p",{className:"text-xs text-slate-400 mt-1",children:n.length>1?`${n.length-1} more item(s) pre-loaded`:"Loading more items..."})]}),a&&C.jsx("div",{className:"text-center",children:C.jsx("p",{className:"text-lg font-medium text-slate-700",children:a})}),C.jsxs("div",{className:"flex gap-4 justify-center",children:[C.jsxs(br,{onClick:()=>x("reject"),disabled:s,variant:"destructive",className:"flex items-center gap-2 px-8 py-3",children:[C.jsx(um,{className:"w-5 h-5"}),"Reject"]}),C.jsxs(br,{onClick:()=>x("approve"),disabled:s,className:"flex items-center gap-2 px-8 py-3 bg-green-600 hover:bg-green-700",children:[C.jsx(q0,{className:"w-5 h-5"}),"Approve"]})]})]}):C.jsxs("div",{className:"text-center py-16",children:[C.jsx("p",{className:"text-lg text-slate-600",children:"No media available for review"}),C.jsx(br,{onClick:d,className:"mt-4",variant:"outline",children:"Refresh"})]})})})})]})},iE=()=>{const[e,t]=w.useState(null);w.useEffect(()=>{const o=localStorage.getItem("adminToken");if(o)try{const i=JSON.parse(atob(o.split(".")[1])),s=Math.floor(Date.now()/1e3);i.exp&&i.exp>s?t(o):localStorage.removeItem("adminToken")}catch{localStorage.removeItem("adminToken")}},[]);const n=o=>{t(o),localStorage.setItem("adminToken",o)},r=()=>{t(null),localStorage.removeItem("adminToken")};return e?C.jsx(oE,{token:e,onLogout:r}):C.jsx(rE,{onLogin:n})},sE=()=>{const e=cg();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),C.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:C.jsxs("div",{className:"text-center",children:[C.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),C.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),C.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},lE=new cS,aE=()=>C.jsx(fS,{client:lE,children:C.jsxs($1,{children:[C.jsx(Iw,{}),C.jsx(hx,{}),C.jsx(JS,{basename:"/admin",children:C.jsxs(XS,{children:[C.jsx(Ya,{path:"/",element:C.jsx(iE,{})}),C.jsx(Ya,{path:"*",element:C.jsx(sE,{})})]})})]})});Ah(document.getElementById("root")).render(C.jsx(aE,{})); + */const qS="6";try{window.__reactRouterVersion=qS}catch{}const ZS="startTransition",sf=Nf[ZS];function JS(e){let{basename:t,children:n,future:r,window:o}=e,i=w.useRef();i.current==null&&(i.current=pS({window:o,v5Compat:!0}));let s=i.current,[l,a]=w.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=w.useCallback(f=>{u&&sf?sf(()=>a(f)):a(f)},[a,u]);return w.useLayoutEffect(()=>s.listen(c),[s,c]),w.useEffect(()=>YS(r),[r]),w.createElement(GS,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}var lf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lf||(lf={}));var af;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(af||(af={}));const eE=lm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),br=w.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?n0:"button";return C.jsx(s,{className:De(eE({variant:t,size:n,className:e})),ref:i,...o})});br.displayName="Button";const fg=w.forwardRef(({className:e,type:t,...n},r)=>C.jsx("input",{type:t,className:De("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));fg.displayName="Input";const ac=w.forwardRef(({className:e,...t},n)=>C.jsx("div",{ref:n,className:De("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ac.displayName="Card";const pg=w.forwardRef(({className:e,...t},n)=>C.jsx("div",{ref:n,className:De("flex flex-col space-y-1.5 p-6",e),...t}));pg.displayName="CardHeader";const hg=w.forwardRef(({className:e,...t},n)=>C.jsx("h3",{ref:n,className:De("text-2xl font-semibold leading-none tracking-tight",e),...t}));hg.displayName="CardTitle";const tE=w.forwardRef(({className:e,...t},n)=>C.jsx("p",{ref:n,className:De("text-sm text-muted-foreground",e),...t}));tE.displayName="CardDescription";const uc=w.forwardRef(({className:e,...t},n)=>C.jsx("div",{ref:n,className:De("p-6 pt-0",e),...t}));uc.displayName="CardContent";const nE=w.forwardRef(({className:e,...t},n)=>C.jsx("div",{ref:n,className:De("flex items-center p-6 pt-0",e),...t}));nE.displayName="CardFooter";const rE=({onLogin:e})=>{const[t,n]=w.useState(""),[r,o]=w.useState(!1),i=async s=>{if(s.preventDefault(),!t.trim()){wt({title:"Error",description:"Please enter a password",variant:"destructive"});return}o(!0);try{const l=await fetch("/admin/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({Password:t})}),a=await l.json();l.ok&&a.token?(wt({title:"Success",description:a.message||"Login successful"}),e(a.token)):wt({title:"Error",description:a.message||"Login failed",variant:"destructive"})}catch{wt({title:"Error",description:"Network error. Please try again.",variant:"destructive"})}finally{o(!1)}};return C.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-50 to-slate-100",children:C.jsxs(ac,{className:"w-full max-w-md shadow-lg",children:[C.jsxs(pg,{className:"text-center pb-4",children:[C.jsx("div",{className:"mx-auto w-12 h-12 bg-slate-100 rounded-full flex items-center justify-center mb-4",children:C.jsx(J0,{className:"w-6 h-6 text-slate-600"})}),C.jsx(hg,{className:"text-2xl font-semibold text-slate-800",children:"Admin Login"})]}),C.jsx(uc,{children:C.jsxs("form",{onSubmit:i,className:"space-y-6",children:[C.jsx("div",{className:"space-y-2",children:C.jsx(fg,{type:"password",placeholder:"Enter admin password",value:t,onChange:s=>n(s.target.value),className:"h-12",disabled:r})}),C.jsx(br,{type:"submit",className:"w-full h-12 text-base",disabled:r,children:r?"Signing in...":"Sign In"})]})})]})})},oE=({token:e,onLogout:t})=>{const[n,r]=w.useState([]),[o,i]=w.useState(!1),[s,l]=w.useState(!1),[a,u]=w.useState(""),c=n.length>0?n[0]:null;w.useEffect(()=>{n.length>0&&n.slice(1,3).forEach(g=>{if(g.preview_url){const y=new Image;y.src=g.preview_url}})},[n]);const f=async()=>{i(!0);try{const g=await fetch("/admin/api/getmedia",{headers:{Authorization:`Bearer ${e}`}});if(g.status===401)return wt({title:"Session Expired",description:"Please login again",variant:"destructive"}),t(),null;if(g.ok)return await g.json();{const y=await g.json();return wt({title:"Error",description:y.message||"Failed to fetch media",variant:"destructive"}),null}}catch{return wt({title:"Error",description:"Network error. Please try again.",variant:"destructive"}),null}finally{i(!1)}},m=async()=>{const g=await f();g&&r(y=>[...y,g])},d=async()=>{if(o||n.length>=3)return;const g=3-n.length;for(let y=0;y{d()},[n.length]);const x=async g=>{if(c){l(!0),u(`${g==="approve"?"Approving":"Rejecting"}...`);try{const y=await fetch(`/admin/api/${g}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({mediaId:c.id})});if(y.status===401){wt({title:"Session Expired",description:"Please login again",variant:"destructive"}),t();return}const h=await y.json();y.ok?(u(`${g==="approve"?"Approved":"Rejected"} successfully!`),setTimeout(()=>{r(p=>p.slice(1)),u(""),l(!1)},1e3)):(wt({title:"Error",description:h.message||`Failed to ${g} media`,variant:"destructive"}),l(!1),u(""))}catch{wt({title:"Error",description:"Network error. Please try again.",variant:"destructive"}),l(!1),u("")}}};return C.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 to-slate-100",children:[C.jsx("div",{className:"bg-white shadow-sm border-b",children:C.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:C.jsxs("div",{className:"flex justify-between items-center h-16",children:[C.jsx("h1",{className:"text-xl font-semibold text-slate-800",children:"Admin Dashboard"}),C.jsxs(br,{variant:"outline",onClick:t,className:"flex items-center gap-2",children:[C.jsx(ew,{className:"w-4 h-4"}),"Logout"]})]})})}),C.jsx("div",{className:"flex items-center justify-center min-h-[calc(100vh-4rem)] p-8",children:C.jsx(ac,{className:"max-w-2xl w-full shadow-lg",children:C.jsx(uc,{className:"p-8",children:o&&n.length===0?C.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[C.jsx(Z0,{className:"w-8 h-8 animate-spin text-slate-600 mb-4"}),C.jsx("p",{className:"text-slate-600",children:"Loading media..."})]}):c?C.jsxs("div",{className:"space-y-6",children:[C.jsx("div",{className:"flex justify-center",children:C.jsx("img",{src:c.preview_url,alt:"Media to review",className:"max-w-full max-h-96 rounded-lg shadow-md object-contain",onError:g=>{const y=g.target;y.src=c.remote_url}})}),C.jsxs("div",{className:"text-center text-sm text-slate-600",children:[C.jsxs("p",{children:["Media ID: ",c.id]}),C.jsxs("p",{children:["Post ID: ",c.PostID]}),C.jsx("p",{className:"text-xs text-slate-400 mt-1",children:n.length>1?`${n.length-1} more item(s) pre-loaded`:"Loading more items..."})]}),a&&C.jsx("div",{className:"text-center",children:C.jsx("p",{className:"text-lg font-medium text-slate-700",children:a})}),C.jsxs("div",{className:"flex gap-4 justify-center",children:[C.jsxs(br,{onClick:()=>x("reject"),disabled:s,variant:"destructive",className:"flex items-center gap-2 px-8 py-3",children:[C.jsx(um,{className:"w-5 h-5"}),"Reject"]}),C.jsxs(br,{onClick:()=>x("approve"),disabled:s,className:"flex items-center gap-2 px-8 py-3 bg-green-600 hover:bg-green-700",children:[C.jsx(q0,{className:"w-5 h-5"}),"Approve"]})]})]}):C.jsxs("div",{className:"text-center py-16",children:[C.jsx("p",{className:"text-lg text-slate-600",children:"No media available for review"}),C.jsx(br,{onClick:d,className:"mt-4",variant:"outline",children:"Refresh"})]})})})})]})},iE=()=>{const[e,t]=w.useState(null);w.useEffect(()=>{const o=localStorage.getItem("adminToken");if(o)try{const i=JSON.parse(atob(o.split(".")[1])),s=Math.floor(Date.now()/1e3);i.exp&&i.exp>s?t(o):localStorage.removeItem("adminToken")}catch{localStorage.removeItem("adminToken")}},[]);const n=o=>{t(o),localStorage.setItem("adminToken",o)},r=()=>{t(null),localStorage.removeItem("adminToken")};return e?C.jsx(oE,{token:e,onLogout:r}):C.jsx(rE,{onLogin:n})},sE=()=>{const e=cg();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),C.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:C.jsxs("div",{className:"text-center",children:[C.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),C.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),C.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},lE=new cS,aE=()=>C.jsx(fS,{client:lE,children:C.jsxs($1,{children:[C.jsx(Iw,{}),C.jsx(hx,{}),C.jsx(JS,{basename:"/admin",children:C.jsxs(XS,{children:[C.jsx(Ya,{path:"/",element:C.jsx(iE,{})}),C.jsx(Ya,{path:"*",element:C.jsx(sE,{})})]})})]})});Ah(document.getElementById("root")).render(C.jsx(aE,{})); diff --git a/internal/web/templates/admin/index.html b/internal/web/templates/admin/index.html index 93e60d4..748200d 100644 --- a/internal/web/templates/admin/index.html +++ b/internal/web/templates/admin/index.html @@ -6,17 +6,14 @@ Admin Dashboard - + - - - - + diff --git a/internal/web/templates/admin/robots.txt b/internal/web/templates/admin/robots.txt new file mode 100644 index 0000000..1f53798 --- /dev/null +++ b/internal/web/templates/admin/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /