Updates
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7384],{7384:(e,u,n)=>{n.d(u,{A:()=>l}),n(4848),n(6540),n(9020);function l(e){let{user:u,userType:n,setLoading:l}=e;return null}}}]);
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6309],{6049:(_,n,e)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return e(5172)}])},5172:(_,n,e)=>{"use strict";e.r(n),e.d(n,{DashboardContext:()=>r,__N_SSP:()=>u,default:()=>a});var t=e(6540),u=!0;let r=t.createContext({});function a(){return null}}},_=>{var n=n=>_(_.s=n);_.O(0,[636,6593,8792],()=>n(6049)),_N_E=_.O()}]);
|
||||
@@ -1 +0,0 @@
|
||||
(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()}]);
|
||||
@@ -1 +0,0 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[531],{1889:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]",function(){return s(8590)}])},5146:(e,t,s)=>{"use strict";s.d(t,{A:()=>v});var a=s(4848),n=s(6540),i=s(8590),r=s(3647),l=s(18),c=s(2992);function d(){let{databases:e,setTargetDatabase:t,user:s}=n.useContext(i.DashboardContext);return(0,a.jsx)(n.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:n,url:i}=e;return(0,a.jsxs)("a",{href:i,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:n}),(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:r}=n.useContext(i.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==r?void 0:r.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==r?void 0:r.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==r?void 0:r.id,"/api-keys")})]})})}function v(){var e;let{databases:t,user:s}=n.useContext(i.DashboardContext);return(0,a.jsxs)(n.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)(r.A,{user:s})]}),(null==s?void 0:null===(e=s.verification_status)||void 0===e?void 0:e.toString().match(/1/))?(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)(y,{}),(0,a.jsx)(d,{}),(0,a.jsx)(o.A,{user:s})]}):(0,a.jsx)(l.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),n=s(6540),i=s(8181),r=s(5146),l=s(1670),c=!0;let d=n.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]=n.useState();return(0,a.jsx)(i.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)(r.A,{}),(0,a.jsx)(l.A,{targetDatabase:x})]})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[7391,9950,636,6593,8792],()=>t(1889)),_N_E=e.O()}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[531],{1889:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]",function(){return s(4852)}])},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"}]])},4852:(e,t,s)=>{"use strict";s.r(t),s.d(t,{DashboardContext:()=>k,__N_SSP:()=>N,default:()=>p});var a=s(4848),i=s(6540),n=s(8181),l=s(3647),r=s(18),c=s(2992);function d(){let{databases:e,setTargetDatabase:t,user:s}=i.useContext(k);return(0,a.jsx)(i.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),m=s(1915);let h=(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:i,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:i}),(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:n}=i.useContext(k);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==n?void 0:n.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)(m.A,{size:20,className:"text-slate-500"}),url:"/admin/".concat(null==n?void 0:n.id,"/media")}),(0,a.jsx)(j,{metric:"API Keys",count:(null==s?void 0:s.apiKeysCount)||0,icon:(0,a.jsx)(h,{size:20,className:"text-slate-900 dark:text-white"}),url:"/admin/".concat(null==n?void 0:n.id,"/api-keys")})]})})}function v(){var e;let{databases:t,user:s}=i.useContext(k);return(0,a.jsxs)(i.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)(i.Fragment,{children:[(0,a.jsx)(y,{}),(0,a.jsx)(d,{}),(0,a.jsx)(o.A,{user:s})]}):(0,a.jsx)(r.A,{})]})}var b=s(1670),N=!0;let k=i.createContext({});function p(e){let{user:t,databases:s,metrics:l}=e,r=(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"})]}),[c,d]=i.useState();return(0,a.jsx)(n.A,{head:r,user:t,children:(0,a.jsxs)(k.Provider,{value:{user:t,databases:s,targetDatabase:c,setTargetDatabase:d,metrics:l},children:[(0,a.jsx)(v,{}),(0,a.jsx)(b.A,{targetDatabase:c})]})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[7391,9950,636,6593,8792],()=>t(1889)),_N_E=e.O()}]);
|
||||
-1
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4076],{6892:(e,a,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases/[single]/edit-database",function(){return t(8708)}])},8064:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var s=t(4848);function r(e){var a;let{database:t,user:r}=e,d=null===(a=t.active_clone_parent_db)||void 0===a?void 0:a.replace(/datasquirel_user_\d+_/,""),l="/admin/".concat(null==r?void 0:r.id,"/databases/").concat(d);return(0,s.jsx)("div",{className:"info green",children:(0,s.jsxs)("span",{className:"text font-normal",children:["This database is an active clone of"," ",(0,s.jsx)("b",{children:(0,s.jsx)("a",{href:l,target:"_blank",className:"query-url",children:d})})]})})}t(6540)},7220:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});let s=(0,t(5737).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},7290:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});let s=(0,t(5737).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},4266:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});let s=(0,t(5737).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},3419:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});let s=(0,t(5737).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},6051:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});let s=(0,t(5737).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},8708:(e,a,t)=>{"use strict";t.r(a),t.d(a,{EditDatabaseContext:()=>b,__N_SSP:()=>j,default:()=>v});var s=t(4848),r=t(6540),d=t(8181),l=t(2592),n=t(5844),i=t(3647),c=t(1710),h=t(7168),u=t(3605);function x(){let{user:e,dbImage:a,setDbImage:t,database:d}=r.useContext(b),[l,n]=r.useState(!1);return r.useRef(),(0,s.jsx)("section",{className:"paper",children:(0,s.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-6 items-stretch",children:[l&&(0,s.jsx)(c.A,{}),(0,s.jsxs)("div",{className:"flex-col items-start w-full xl:w-auto",children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"Update Database Information"}),e&&a?(0,s.jsx)(h.A,{user:e,dbImage:a,setDbImage:t,database:d,setLoading:n}):(0,s.jsx)("span",{children:"No User and Database Image present"})]}),e&&a&&t?(0,s.jsx)(u.A,{user:e,dbImage:a,setDbImage:t,database:d}):(0,s.jsx)("span",{children:"Database Image could not be rendered"})]})})}var o=t(8064);function m(){let{database:e,user:a}=r.useContext(b);return(0,s.jsxs)(r.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(n.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:["Edit"," ",(0,s.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:null==e?void 0:e.db_name})]})]}),(0,s.jsx)(i.A,{user:a})]}),(null==e?void 0:e.active_clone)&&a?(0,s.jsx)(o.A,{database:e,user:a}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(x,{})]})}var p=t(5211),j=!0;let b=r.createContext({});function v(e){let{user:a,database:t,query:n}=e,i=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Add Database | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Add a database"})]}),[c,h]=r.useState(t.db_image);return(0,s.jsx)(b.Provider,{value:{user:a,database:t,dbImage:c,setDbImage:h},children:(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)(d.A,{head:i,user:a,extraHeaderContent:(0,s.jsx)(p.A,{database:t,query:n,user:a}),children:(0,s.jsx)(m,{})}),(0,s.jsx)(l.A,{setDbImage:h})]})})}}},e=>{var a=a=>e(e.s=a);e.O(0,[6428,1335,7391,8076,8319,6272,636,6593,8792],()=>a(6892)),_N_E=e.O()}]);
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4076],{6892:(e,a,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases/[single]/edit-database",function(){return t(8708)}])},8064:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var s=t(4848);function r(e){var a;let{database:t,user:r}=e,d=null===(a=t.active_clone_parent_db)||void 0===a?void 0:a.replace(/datasquirel_user_\d+_/,""),l="/admin/".concat(null==r?void 0:r.id,"/databases/").concat(d);return(0,s.jsx)("div",{className:"info green",children:(0,s.jsxs)("span",{className:"text font-normal",children:["This database is an active clone of"," ",(0,s.jsx)("b",{children:(0,s.jsx)("a",{href:l,target:"_blank",className:"query-url",children:d})})]})})}t(6540)},7220:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});let s=(0,t(5737).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},7290:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});let s=(0,t(5737).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},4266:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});let s=(0,t(5737).A)("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},3419:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});let s=(0,t(5737).A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]])},6051:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});let s=(0,t(5737).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},8708:(e,a,t)=>{"use strict";t.r(a),t.d(a,{EditDatabaseContext:()=>b,__N_SSP:()=>j,default:()=>v});var s=t(4848),r=t(6540),d=t(8181),l=t(2592),n=t(5844),i=t(3647),c=t(1710),h=t(5481),u=t(2778);function x(){let{user:e,dbImage:a,setDbImage:t,database:d}=r.useContext(b),[l,n]=r.useState(!1);return r.useRef(),(0,s.jsx)("section",{className:"paper",children:(0,s.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-6 items-stretch",children:[l&&(0,s.jsx)(c.A,{}),(0,s.jsxs)("div",{className:"flex-col items-start w-full xl:w-auto",children:[(0,s.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"Update Database Information"}),e&&a?(0,s.jsx)(h.A,{user:e,dbImage:a,setDbImage:t,database:d,setLoading:n}):(0,s.jsx)("span",{children:"No User and Database Image present"})]}),e&&a&&t?(0,s.jsx)(u.A,{user:e,dbImage:a,setDbImage:t,database:d}):(0,s.jsx)("span",{children:"Database Image could not be rendered"})]})})}var o=t(8064);function m(){let{database:e,user:a}=r.useContext(b);return(0,s.jsxs)(r.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsx)(n.A,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:["Edit"," ",(0,s.jsx)("span",{className:"px-2 bg-slate-100 dark:bg-white/10 border border-solid border-slate-300 dark:border-slate-300/20 rounded py-1",children:null==e?void 0:e.db_name})]})]}),(0,s.jsx)(i.A,{user:a})]}),(null==e?void 0:e.active_clone)&&a?(0,s.jsx)(o.A,{database:e,user:a}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(x,{})]})}var p=t(1990),j=!0;let b=r.createContext({});function v(e){let{user:a,database:t,query:n}=e,i=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Add Database | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Add a database"})]}),[c,h]=r.useState(t.db_image);return(0,s.jsx)(b.Provider,{value:{user:a,database:t,dbImage:c,setDbImage:h},children:(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)(d.A,{head:i,user:a,extraHeaderContent:(0,s.jsx)(p.A,{database:t,query:n,user:a}),children:(0,s.jsx)(m,{})}),(0,s.jsx)(l.A,{setDbImage:h})]})})}}},e=>{var a=a=>e(e.s=a);e.O(0,[6428,1335,7391,3865,8319,4770,636,6593,8792],()=>a(6892)),_N_E=e.O()}]);
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
-1
@@ -1 +0,0 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9718],{6108:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases/add-database",function(){return a(9930)}])},5844:(e,s,a)=>{"use strict";a.d(s,{A:()=>n});var t=a(4848),l=a(7216);function n(){return(0,t.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,t.jsx)(l.A,{})})}a(6540)},4909:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(5737).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},9930:(e,s,a)=>{"use strict";a.r(s),a.d(s,{AddDatabaseContext:()=>j,__N_SSP:()=>m,default:()=>b});var t=a(4848),l=a(6540),n=a(8181),d=a(5844),r=a(3647),i=a(1710),c=a(7168),u=a(3605);function x(){let{user:e,dbImage:s,setDbImage:a,query:n}=l.useContext(j);if(!e)return(0,t.jsx)(l.Fragment,{});let[d,r]=l.useState(null),[x,o]=l.useState(!1);return(0,t.jsx)("section",{className:"card",children:(0,t.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-6 items-stretch",children:[x&&(0,t.jsx)(i.A,{}),(0,t.jsxs)("div",{className:"flex-col items-start",children:[(0,t.jsx)("h2",{className:"text-xl m-0 text-left w-full",children:"New Database Information"}),e&&s&&a&&(0,t.jsx)(c.A,{user:e,dbImage:s,setDbImage:a,setLoading:o,query:n})]}),e&&s&&a&&(0,t.jsx)(u.A,{user:e,dbImage:s,setDbImage:a})]})})}function o(){let{query:e,duplicateDb:s,user:a}=l.useContext(j),n=(null==e?void 0:e.duplicate)?(0,t.jsxs)("span",{children:["Duplicate"," ",(0,t.jsx)("a",{href:"/admin/".concat(null==a?void 0:a.id,"/databases/").concat(null==s?void 0:s.db_slug),target:"_blank",children:null==s?void 0:s.db_name})," ","Database"]}):"Add A New Database";return(0,t.jsxs)(l.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,t.jsxs)("div",{className:"flex-wrap",children:[(0,t.jsx)(d.A,{}),(0,t.jsx)("h1",{className:"text-3xl m-0",children:n})]}),(0,t.jsx)(r.A,{user:a})]}),(0,t.jsx)(x,{})]})}var h=a(2592),m=!0;let j=l.createContext({});function b(e){let{user:s,databases:a,query:d,duplicateDb:r}=e,i=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:"Add Database | Datasquirel"}),(0,t.jsx)("meta",{name:"description",content:"Add a database"})]}),[c,u]=l.useState("/images/database-placeholder.png");return(0,t.jsx)(j.Provider,{value:{user:s,databases:a,dbImage:c,setDbImage:u,query:d,duplicateDb:r},children:(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(n.A,{head:i,user:s,children:(0,t.jsx)(o,{})}),(0,t.jsx)(h.A,{setDbImage:u})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[1335,7391,8319,6272,636,6593,8792],()=>s(6108)),_N_E=e.O()}]);
|
||||
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[189],{9922:(e,s,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/settings",function(){return l(9241)}])},4909:(e,s,l)=>{"use strict";l.d(s,{A:()=>a});let a=(0,l(5737).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},9241:(e,s,l)=>{"use strict";l.r(s),l.d(s,{SettingsContext:()=>p,__N_SSP:()=>x,default:()=>g});var a=l(4848),i=l(6540),t=l(8181),r=l(3647),n=l(4060),c=l(2659),d=l(5655),o=l(900);function u(e){let{user:s,image:l,setImage:t}=e,r=i.useRef();return(0,a.jsxs)("div",{className:"paper w-full items-center",children:[(0,a.jsx)("h2",{className:"m-0 text-xl",children:"User Image"}),(0,a.jsx)("div",{className:"bg-white rounded-full overflow-hidden w-24 h-24",children:(0,a.jsx)("img",{src:l?"string"==typeof l?l:l.imageBase64Full:"/images/database-placeholder.png",alt:"User Image",width:100,className:"w-full h-full object-cover",ref:r,"data-imagepreview":"image"})}),(0,a.jsxs)("div",{className:"w-full flex-col",id:"upload-user-image-options",children:[(0,a.jsxs)(o.A,{column:!0,className:"w-full",children:[(0,a.jsx)("button",{className:"outlined gray w-full whitespace-normal",onClick:e=>{(0,d.PB)("user-media-popup")},children:"Choose image From your Uploads"}),(0,a.jsx)("button",{className:"secondary w-full whitespace-normal",onClick:e=>{var s,l;null===(l=e.target.closest("#upload-user-image-options"))||void 0===l||null===(s=l.querySelector("input"))||void 0===s||s.click()},children:(0,a.jsx)("span",{children:"Choose image From your Computer"})})]}),(0,a.jsx)("input",{type:"file",accept:".png,.jpg,.jpeg,.webp",placeholder:"Choose Image",className:"hidden",onChange:async e=>{var s;let l=e.target,a=null==l?void 0:null===(s=l.files)||void 0===s?void 0:s[0];a&&t(await (0,c.A)({imageInputFile:a,maxWidth:400}))}})]})]})}function m(){let{user:e,image:s,setImage:l,activeUser:t}=i.useContext(p),[c,d]=i.useState(!1);return(0,a.jsxs)(i.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,a.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,a.jsx)("h1",{className:"text-3xl m-0",children:"Settings"}),(0,a.jsx)("div",{children:!(null==e?void 0:e.social_login)&&(0,a.jsx)("a",{href:"/send-password-reset-link",className:"button outlined",children:"Reset Password"})})]}),(0,a.jsx)(r.A,{user:e})]}),(0,a.jsx)("section",{className:"p-0",children:(0,a.jsxs)("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-8 items-stretch",children:[(0,a.jsxs)("div",{className:"paper w-full",children:[(0,a.jsx)("h2",{className:"m-0 text-xl",children:"Account Information"}),(0,a.jsxs)("div",{className:"flex flex-row w-full",children:[(0,a.jsx)("span",{children:"USER ID"}),(0,a.jsx)("b",{className:"info w-auto",children:e.id})]}),(0,a.jsx)(n.A,{user:t,image:s})]}),(0,a.jsx)("div",{className:"items-stretch",children:(0,a.jsx)(u,{image:s,setImage:l})})]})}),!1]})}l(1710),l(9020);var h=l(2592),x=!0;let p=i.createContext({});function g(e){let{user:s,databases:l,activeUser:r}=e,n=(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"})]}),[c,d]=i.useState(r.image);return(0,a.jsx)(t.A,{head:n,user:s,children:(0,a.jsxs)(p.Provider,{value:{user:s,image:c,setImage:d,activeUser:r},children:[(0,a.jsx)(m,{}),(0,a.jsx)(h.A,{setDbImage:d})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[1335,7391,8319,4060,636,6593,8792],()=>s(9922)),_N_E=e.O()}]);
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8810],{7900:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/create-account",function(){return n(6660)}])},6234:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(4848);function s(e){let{message:t}=e;return(0,r.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,r.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,r.jsx)("span",{children:t})]})}n(6540)},4329:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(4848);n(6540);var s=n(1710);function a(){return(0,r.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,r.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,r.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,r.jsx)(s.A,{width:"25px",position:"relative"})})]})})}},9625:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(4848),s=n(6540);function a(e){let{pageTitle:t,pageDescription:n,pagePathname:a,aceEditor:i}=e;return(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)("link",{rel:"canonical",href:"http://localhost:7070"+a}),(0,r.jsx)("meta",{property:"og:url",content:"http://localhost:7070"+a}),(0,r.jsx)("meta",{itemProp:"url",content:"http://localhost:7070"+a}),(0,r.jsx)("meta",{name:"twitter:url",content:"http://localhost:7070"+a}),(0,r.jsx)("meta",{property:"og:title",content:t}),(0,r.jsx)("meta",{property:"og:description",content:n}),(0,r.jsx)("meta",{itemProp:"name",content:t}),(0,r.jsx)("meta",{itemProp:"description",content:n}),(0,r.jsx)("meta",{name:"twitter:title",content:t}),(0,r.jsx)("meta",{name:"twitter:description",content:n}),i&&(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,r.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]})}},6660:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CreateAccountContext:()=>m,__N_SSP:()=>u,default:()=>x});var r=n(4848),s=n(6540),a=n(8883),i=n(9625),c=n(4060);function l(){let{query:e,invitingUser:t}=s.useContext(m);return(0,r.jsxs)("section",{className:"flex-col items-center lg:items-center gap-20 p-0",children:[(0,r.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-80 dark:opacity-10 z-0"}),(0,r.jsxs)("div",{className:"w-full lg:w-1/2 max-w-6xl gap-4 flex-col items-center px-4 py-10 bg-white dark:bg-slate-900 relative z-10",children:[(null==t?void 0:t.first_name)&&(0,r.jsxs)("span",{className:"text-xs bg-emerald-100 rounded-full px-4 py-1 mb-4",children:["You have been invited by"," ",(0,r.jsxs)("b",{children:[t.first_name," ",t.last_name," (",t.email,")"]})," ","to manage an account. Please create an account to gain access."]}),(0,r.jsx)("h1",{className:"m-0 text-center text-2xl",children:"Create An Account"}),(0,r.jsx)(c.A,{query:e})]})]})}var o=n(9020),d=n(4329),u=!0;let m=s.createContext({});function x(e){var t;let n="Create Account | Datasquirel",c="Create a FREE account and start storing data.",u=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:n}),(0,r.jsx)("meta",{name:"description",content:c}),(0,r.jsx)(i.A,{pageTitle:n,pageDescription:c,pagePathname:"/"})]}),[x,p]=s.useState(null);return(s.useEffect(()=>{var t;(null===(t=e.query)||void 0===t?void 0:t.invite)&&!e.isAuthCookie&&setTimeout(()=>{(0,o.A)("/api/addAdminUserUser",{method:"POST",body:{query:e.query}},!0).then(t=>{var n;window.location.pathname="/admin/".concat(null===(n=e.user)||void 0===n?void 0:n.id,"/users")})},1e3)},[]),null===(t=e.query)||void 0===t?void 0:t.invite)?(0,r.jsx)(d.A,{}):(0,r.jsx)(a.A,{head:u,children:(0,r.jsx)(m.Provider,{value:{user:x,query:e.query,invitingUser:e.invitingUser},children:(0,r.jsx)("main",{children:(0,r.jsx)(l,{})})})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[1335,4060,636,6593,8792],()=>t(7900)),_N_E=e.O()}]);
|
||||
@@ -1 +0,0 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[676],{7864:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return a(5386)}])},4329:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});var t=a(4848);a(6540);var r=a(1710);function l(){return(0,t.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,t.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,t.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,t.jsx)(r.A,{width:"25px",position:"relative"})})]})})}},5386:(e,s,a)=>{"use strict";a.r(s),a.d(s,{__N_SSP:()=>v,default:()=>w});var t=a(4848),r=a(6540),l=a(3368),n=a.n(l),i=a(9020),o=a(1335),c=a.n(o);async function d(e){let{e:s,setAlert:a,setLoading:t,query:r}=e;s.preventDefault(),t(!0);let l=s.target["email-or-username-input"],n=s.target.password;if((null==l?void 0:l.value)===""&&(null==n?void 0:n.value)===""){l.classList.add("warning"),n.classList.add("warning"),a("No Email or Password Provided"),t(!1);return}if((null==n?void 0:n.value)===""){a(!1),n.classList.add("warning"),a(!0),t(!1);return}l.classList.remove("warning"),n.classList.remove("warning"),a(!1);let o={email:l.value,password:n.value,query:r};(0,i.A)("/api/loginUser",{method:"post",body:o}).then(e=>{var s;e.success&&(null===(s=e.payload)||void 0===s?void 0:s.logged_in_status)?(c().auth.postLogin(e),window.location.reload()):e.msg&&(a(e.msg),t(!1))})}var u=a(1710),m=a(7384);let x=r.createContext({});function h(e){let{user:s,query:a}=e,[l,n]=(0,r.useState)(!1),[i,o]=(0,r.useState)(!1);return(0,t.jsxs)(x.Provider,{value:{loading:i,setLoading:o,alert:l,setAlert:n,user:s},children:[(0,t.jsx)(m.A,{user:s,userType:"admin",setLoading:o}),(0,t.jsxs)("div",{className:"w-full justify-center relative",children:[(0,t.jsx)("span",{className:"bg-white dark:bg-slate-800 px-3 relative z-10",children:"OR"}),(0,t.jsx)("hr",{className:"absolute"})]}),(0,t.jsxs)("div",{className:"w-full flex-col items-stretch gap-4",children:[i&&(0,t.jsx)(u.A,{}),l&&(0,t.jsx)("div",{className:"p-2 justify-center text-sm border border-solid border-orange-400 rounded bg-orange-50",children:l}),(0,t.jsxs)("form",{className:"flex flex-col gap-2 w-full",onSubmit:e=>{d({e,setAlert:n,setLoading:o,query:a})},children:[(0,t.jsx)("input",{type:"text",name:"email-or-username-input",id:"email-or-username-input",placeholder:"Email or username",defaultValue:(null==a?void 0:a.email)?a.email:"",required:!0,onInput:e=>{l&&n(!1)}}),(0,t.jsx)("input",{type:"password",name:"password",id:"password-input",placeholder:"Password",required:!0,onInput:e=>{l&&n(!1)}}),(0,t.jsx)("button",{type:"submit",children:"Login"})]}),(0,t.jsx)("div",{className:"flex flex-col items-center w-full mb-2",children:(0,t.jsx)("a",{href:"/send-password-reset-link",className:"text-secondary font-semibold",children:"Forgot Password?"})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-center w-full mb-2 flex-wrap",children:[(0,t.jsx)("span",{children:"Dont have an account yet?"}),(0,t.jsx)("a",{href:"/create-account",className:"text-secondary font-semibold",children:"Register Now"})]}),(0,t.jsxs)("div",{className:"justify-center text-sm text-secondary",children:[(0,t.jsx)("a",{href:"/terms",className:"text-secondary",children:"Terms and Conditions"}),(0,t.jsx)("a",{href:"/privacy",className:"text-secondary",children:"Privacy Policy"})]})]})]})}var f=a(6232),p=a(4329),v=!0;function w(e){return(r.useEffect(()=>{setTimeout(()=>{e.query.invite&&e.user&&(window.location.pathname="/create-account")},1e3),e.query.invite||localStorage.setItem("user","{}")},[]),e.query.invite&&e.user)?(0,t.jsx)(p.A,{}):(0,t.jsxs)(r.Fragment,{children:[(0,t.jsxs)(n(),{children:[(0,t.jsx)("title",{children:"Login to your account"}),(0,t.jsx)("meta",{name:"description",content:"Login to your account"})]}),(0,t.jsx)("main",{className:"w-screen h-screen flex items-center justify-center p-4 md:p-8",children:(0,t.jsxs)("div",{className:"card col items-center no-hover max-w-md w-full bg-white p-4 sm:p-6 overflow-auto minimal-scrollbars",style:{maxHeight:"calc(100vh - 40px)"},children:[(0,t.jsx)(f.A,{}),(0,t.jsx)("hr",{}),(0,t.jsx)("h3",{className:"m-0 text-lg font-semibold",children:"Login to your account"}),(0,t.jsx)(h,{user:e.user,query:e.query})]})})]})}}},e=>{var s=s=>e(e.s=s);e.O(0,[1335,7384,636,6593,8792],()=>s(7864)),_N_E=e.O()}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[676],{7864:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return t(5386)}])},4329:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});var r=t(4848);t(6540);var a=t(1710);function l(){return(0,r.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,r.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,r.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,r.jsx)(a.A,{width:"25px",position:"relative"})})]})})}},8058:(e,s,t)=>{"use strict";function r(e){let{user:s,setLoading:t}=e;return null}t.d(s,{A:()=>r}),t(4848),t(6540),t(1335),t(9020),t(8133),t(1212)},1212:(e,s,t)=>{"use strict";t.d(s,{B:()=>r});let r={OneTimeEmail:"one-time-login-email",User:"user",CSRF:"csrf"}},5386:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSP:()=>v,default:()=>w});var r=t(4848),a=t(6540),l=t(3368),n=t.n(l),i=t(9020),o=t(1335),c=t.n(o);async function d(e){let{e:s,setAlert:t,setLoading:r,query:a}=e;s.preventDefault(),r(!0);let l=s.target["email-or-username-input"],n=s.target.password;if((null==l?void 0:l.value)===""&&(null==n?void 0:n.value)===""){l.classList.add("warning"),n.classList.add("warning"),t("No Email or Password Provided"),r(!1);return}if((null==n?void 0:n.value)===""){t(!1),n.classList.add("warning"),t(!0),r(!1);return}l.classList.remove("warning"),n.classList.remove("warning"),t(!1);let o={email:l.value,password:n.value,query:a};(0,i.A)("/api/loginUser",{method:"post",body:o}).then(e=>{var s;e.success&&(null===(s=e.payload)||void 0===s?void 0:s.logged_in_status)?(c().auth.postLogin(e),window.location.reload()):e.msg&&(t(e.msg),r(!1))})}var u=t(1710),m=t(8058);let x=a.createContext({});function f(e){let{user:s,query:t}=e,[l,n]=(0,a.useState)(!1),[i,o]=(0,a.useState)(!1);return(0,r.jsxs)(x.Provider,{value:{loading:i,setLoading:o,alert:l,setAlert:n,user:s},children:[(0,r.jsx)(m.A,{user:s,setLoading:o}),(0,r.jsxs)("div",{className:"w-full justify-center relative",children:[(0,r.jsx)("span",{className:"bg-white dark:bg-slate-800 px-3 relative z-10",children:"OR"}),(0,r.jsx)("hr",{className:"absolute"})]}),(0,r.jsxs)("div",{className:"w-full flex-col items-stretch gap-4",children:[i&&(0,r.jsx)(u.A,{}),l&&(0,r.jsx)("div",{className:"p-2 justify-center text-sm border border-solid border-orange-400 rounded bg-orange-50",children:l}),(0,r.jsxs)("form",{className:"flex flex-col gap-2 w-full",onSubmit:e=>{d({e,setAlert:n,setLoading:o,query:t})},children:[(0,r.jsx)("input",{type:"text",name:"email-or-username-input",id:"email-or-username-input",placeholder:"Email or username",defaultValue:(null==t?void 0:t.email)?t.email:"",required:!0,onInput:e=>{l&&n(!1)}}),(0,r.jsx)("input",{type:"password",name:"password",id:"password-input",placeholder:"Password",required:!0,onInput:e=>{l&&n(!1)}}),(0,r.jsx)("button",{type:"submit",children:"Login"})]}),(0,r.jsx)("div",{className:"flex flex-col items-center w-full mb-2",children:(0,r.jsx)("a",{href:"/send-password-reset-link",className:"text-secondary font-semibold",children:"Forgot Password?"})}),(0,r.jsxs)("div",{className:"flex items-center gap-2 justify-center w-full mb-2 flex-wrap",children:[(0,r.jsx)("span",{children:"Dont have an account yet?"}),(0,r.jsx)("a",{href:"/create-account",className:"text-secondary font-semibold",children:"Register Now"})]}),(0,r.jsxs)("div",{className:"justify-center text-sm text-secondary",children:[(0,r.jsx)("a",{href:"/terms",className:"text-secondary",children:"Terms and Conditions"}),(0,r.jsx)("a",{href:"/privacy",className:"text-secondary",children:"Privacy Policy"})]})]})]})}var h=t(6232),p=t(4329),v=!0;function w(e){return(a.useEffect(()=>{setTimeout(()=>{e.query.invite&&e.user&&(window.location.pathname="/create-account")},1e3),e.query.invite||localStorage.setItem("user","{}")},[]),e.query.invite&&e.user)?(0,r.jsx)(p.A,{}):(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)(n(),{children:[(0,r.jsx)("title",{children:"Login to your account"}),(0,r.jsx)("meta",{name:"description",content:"Login to your account"})]}),(0,r.jsx)("main",{className:"w-screen h-screen flex items-center justify-center p-4 md:p-8",children:(0,r.jsxs)("div",{className:"card col items-center no-hover max-w-md w-full bg-white p-4 sm:p-6 overflow-auto minimal-scrollbars",style:{maxHeight:"calc(100vh - 40px)"},children:[(0,r.jsx)(h.A,{}),(0,r.jsx)("hr",{}),(0,r.jsx)("h3",{className:"m-0 text-lg font-semibold",children:"Login to your account"}),(0,r.jsx)(f,{user:e.user,query:e.query})]})})]})}}},e=>{var s=s=>e(e.s=s);e.O(0,[1335,636,6593,8792],()=>s(7864)),_N_E=e.O()}]);
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user