PageSourceSearch

https://zeropointlabs.ai/assets/SettingsPage-QJUQP6TU.js

js zeropointlabs.ai collected 2026-10-05 15:19:47 UTC 4,693 bytes, 1 lines download raw bytes

1import{ak as y,r as u,u as N,j as e,g as j,E as w,D as b,C as o,e as d,f as h,$ as m,a as x,I as l,a1 as C,s as p,w as g}from"./index-CLtGP32Z.js";import{u as S}from"./useMutation-BvxM86re.js";import{L as r}from"./label-C5P13FKO.js";import{S as k}from"./save-DQzP6t1C.js";const q=()=>{const _=y(),[i,a]=u.useState({}),{data:t,isLoading:v}=N({queryKey:["site-settings"],queryFn:async()=>{const{data:s,error:n}=await p.from("site_settings").select("*").limit(1).single();if(n)throw n;return s}});u.useEffect(()=>{t&&a(t)},[t]);const c=S({mutationFn:async s=>{if(!(t!=null&&t.id))throw new Error("No settings row found");const{error:n}=await p.from("site_settings").update({site_title:s.site_title,site_description:s.site_description,contact_email:s.contact_email,social_linkedin:s.social_linkedin,social_twitter:s.social_twitter,social_github:s.social_github}).eq("id",t.id);if(n)throw n},onSuccess:()=>{_.invalidateQueries({queryKey:["site-settings"]}),g.success("Settings saved successfully")},onError:s=>{console.error("Failed to save settings:",s),g.error("Failed to save settings")}}),f=()=>{c.mutate(i)};return v?e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold",children:"Settings"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"Loading settings..."})]})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold",children:"Settings"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"Manage your site configuration"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(j,{variant:"outline",asChild:!0,children:e.jsxs("a",{href:"/",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(w,{className:"h-4 w-4 mr-2"}),"View Site"]})}),e.jsxs(j,{onClick:f,disabled:c.isPending,children:[c.isPending?e.jsx(b,{className:"h-4 w-4 mr-2 animate-spin"}):e.jsx(k,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]}),e.jsxs(o,{children:[e.jsxs(d,{children:[e.jsx(h,{children:"Site Metadata"}),e.jsx(m,{children:"Basic information about your site"})]}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"site_title",children:"Site Title"}),e.jsx(l,{id:"site_title",value:i.site_title||"",onChange:s=>a({...i,site_title:s.target.value}),placeholder:"Zero Point Labs"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"contact_email",children:"Contact Email"}),e.jsx(l,{id:"contact_email",type:"email",value:i.contact_email||"",onChange:s=>a({...i,contact_email:s.target.value}),placeholder:"[email protected]"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"site_description",children:"Site Description"}),e.jsx(C,{id:"site_description",value:i.site_description||"",onChange:s=>a({...i,site_description:s.target.value}),placeholder:"AI Research Think Tank",rows:3})]})]})]}),e.jsxs(o,{children:[e.jsxs(d,{children:[e.jsx(h,{children:"Social Media Links"}),e.jsx(m,{children:"Your organization's social media profiles"})]}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"social_linkedin",children:"LinkedIn URL"}),e.jsx(l,{id:"social_linkedin",value:i.social_linkedin||"",onChange:s=>a({...i,social_linkedin:s.target.value}),placeholder:"https://linkedin.com/company/zeropointlabs"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"social_twitter",children:"Twitter / X URL"}),e.jsx(l,{id:"social_twitter",value:i.social_twitter||"",onChange:s=>a({...i,social_twitter:s.target.value}),placeholder:"https://twitter.com/zeropointlabs"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"social_github",children:"GitHub URL"}),e.jsx(l,{id:"social_github",value:i.social_github||"",onChange:s=>a({...i,social_github:s.target.value}),placeholder:"https://github.com/zeropointlabs"})]})]})]}),e.jsxs(o,{children:[e.jsxs(d,{children:[e.jsx(h,{children:"Environment"}),e.jsx(m,{children:"Application environment information"})]}),e.jsx(x,{children:e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Last Updated"}),e.jsx("p",{className:"font-medium",children:t!=null&&t.updated_at?new Date(t.updated_at).toLocaleStr
1ing():"Never"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Platform"}),e.jsx("p",{className:"font-medium",children:"CyberGen Cloud"})]})]})})]})]})};export{q as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.