dsql-admin/dsql-app/.local_dist/static/chunks/pages/admin-eaa52fa698c19034.js
Benjamin Toby e0a030f10d Updates
2025-01-13 09:00:21 +01:00

1 line
4.2 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6309],{6049:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return s(5172)}])},5146:(e,t,s)=>{"use strict";s.d(t,{A:()=>v});var a=s(4848),r=s(6540),n=s(8590),l=s(3647),i=s(18),c=s(2992);function d(){let{databases:e,setTargetDatabase:t,user:s}=r.useContext(n.DashboardContext);return(0,a.jsx)(r.Fragment,{children:(0,a.jsx)(c.A,{databases:e,setTargetDatabase:t,title:"Recently added Databases",more:!0,user:s})})}var o=s(4435),x=s(9140),u=s(8190),h=s(1915);let m=(0,s(5737).A)("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);function j(e){let{icon:t,metric:s,count:r,url:n}=e;return(0,a.jsxs)("a",{href:n,className:"card col w-full",children:[(0,a.jsx)("div",{className:"absolute top-4 right-4",children:t}),(0,a.jsxs)("div",{className:"content-block",children:[(0,a.jsx)("span",{className:"metric text-slate-800 dark:text-white",children:r}),(0,a.jsx)("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:s})]})]})}function y(){let{databases:e,setTargetDatabase:t,metrics:s,user:l}=r.useContext(n.DashboardContext);return(0,a.jsx)("section",{className:"p-0",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 w-full gap-6 items-stretch",children:[(0,a.jsx)(j,{metric:"Databases Created",count:(null==s?void 0:s.dbCount)||0,icon:(0,a.jsx)(x.A,{size:20,className:"text-secondary2"}),url:"/admin/".concat(null==l?void 0:l.id,"/databases")}),(0,a.jsx)(j,{metric:"Tables Created",count:(null==s?void 0:s.tablesCount)||0,icon:(0,a.jsx)(u.A,{size:20,className:"text-primary"})}),(0,a.jsx)(j,{metric:"Media Added",count:(null==s?void 0:s.mediaCount)||0,icon:(0,a.jsx)(h.A,{size:20,className:"text-slate-500"}),url:"/admin/".concat(null==l?void 0:l.id,"/media")}),(0,a.jsx)(j,{metric:"API Keys",count:(null==s?void 0:s.apiKeysCount)||0,icon:(0,a.jsx)(m,{size:20,className:"text-slate-900 dark:text-white"}),url:"/admin/".concat(null==l?void 0:l.id,"/api-keys")})]})})}function v(){var e;let{databases:t,user:s}=r.useContext(n.DashboardContext);return(0,a.jsxs)(r.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0",children:[(0,a.jsx)("h1",{className:"text-3xl m-0",children:"Dashboard"}),(0,a.jsx)(l.A,{user:s})]}),(null==s?void 0:null===(e=s.verification_status)||void 0===e?void 0:e.toString().match(/1/))?(0,a.jsxs)(r.Fragment,{children:[(0,a.jsx)(y,{}),(0,a.jsx)(d,{}),(0,a.jsx)(o.A,{user:s})]}):(0,a.jsx)(i.A,{})]})}},8190:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(5737).A)("Sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]])},8590:(e,t,s)=>{"use strict";s.r(t),s.d(t,{DashboardContext:()=>d,__N_SSP:()=>c,default:()=>o});var a=s(4848),r=s(6540),n=s(8181),l=s(5146),i=s(1670),c=!0;let d=r.createContext({});function o(e){let{user:t,databases:s,metrics:c}=e,o=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[x,u]=r.useState();return(0,a.jsx)(n.A,{head:o,user:t,children:(0,a.jsxs)(d.Provider,{value:{user:t,databases:s,targetDatabase:x,setTargetDatabase:u,metrics:c},children:[(0,a.jsx)(l.A,{}),(0,a.jsx)(i.A,{targetDatabase:x})]})})}},5172:(e,t,s)=>{"use strict";s.r(t),s.d(t,{DashboardContext:()=>d,__N_SSP:()=>c,default:()=>o});var a=s(4848),r=s(6540),n=s(8181),l=s(5146),i=s(1670),c=!0;let d=r.createContext({});function o(e){let{user:t,databases:s,metrics:c}=e,o=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[x,u]=r.useState(null);return(0,a.jsx)(n.A,{head:o,user:t,children:(0,a.jsxs)(d.Provider,{value:{user:t,databases:s,targetDatabase:x,setTargetDatabase:u,metrics:c},children:[(0,a.jsx)(l.A,{}),(0,a.jsx)(i.A,{targetDatabase:x})]})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[7391,9950,636,6593,8792],()=>t(6049)),_N_E=e.O()}]);