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
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2564],{2134:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases",function(){return a(8096)}])},8096:(e,s,a)=>{"use strict";a.r(s),a.d(s,{DatabasesContext:()=>h,__N_SSP:()=>o,default:()=>j});var t=a(4848),n=a(6540),r=a(8181),l=a(3647),i=a(18),d=a(2992),c=a(4435);function u(){var e;let{databases:s,setTargetDatabase:a,user:r}=n.useContext(h);return(0,t.jsxs)(n.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,t.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,t.jsx)("h1",{className:"text-3xl m-0",children:"Databases"}),(0,t.jsxs)("a",{href:"/admin/".concat(null==r?void 0:r.id,"/databases/add-database"),className:"button flex items-center gap-2",children:[(0,t.jsx)("span",{className:"symbol",children:"+"}),(0,t.jsx)("span",{children:"Add Database"})]})]}),(0,t.jsx)(l.A,{user:r})]}),(null==r?void 0:null===(e=r.verification_status)||void 0===e?void 0:e.toString().match(/1/))?(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)(d.A,{databases:s,setTargetDatabase:a,user:r}),(0,t.jsx)(c.A,{user:r})]}):(0,t.jsx)(i.A,{})]})}var x=a(1670),o=!0;let h=n.createContext({});function j(e){let{user:s,databases:a}=e,l=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:"Databases | Datasquirel"}),(0,t.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[i,d]=n.useState();return(0,t.jsx)(h.Provider,{value:{user:s,databases:a,targetDatabase:i,setTargetDatabase:d},children:(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)(r.A,{head:l,user:s,children:(0,t.jsx)(u,{})}),(0,t.jsx)(x.A,{targetDatabase:i})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[7391,9950,636,6593,8792],()=>s(2134)),_N_E=e.O()}]);
|
||||
@@ -1 +0,0 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2564],{9107:(_,n,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases",function(){return s(8471)}])}},_=>{var n=n=>_(_.s=n);_.O(0,[9799,3616,636,6593,8792],()=>n(9107)),_N_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
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +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,8261,7391,8076,3867,636,6593,8792],()=>a(6892)),_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
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
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
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
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
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
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
@@ -0,0 +1 @@
|
||||
(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,[8261,7391,3867,636,6593,8792],()=>s(6108)),_N_E=e.O()}]);
|
||||
-1
@@ -1 +0,0 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9718],{370:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases/add-database",function(){return a(7810)}])},9862:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(4848),l=a(7216);function n(){return(0,s.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,s.jsx)(l.A,{})})}a(6540)},5165:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>r,PB:()=>o,fs:()=>i});var s=a(4848),l=a(6897),n=a(6540);function r(e){let{children:t,title:a,data:r,fullPage:o,wrapperClasses:d,closePopupDispatch:c,wrapperStyle:u,noContainer:p}=e;return o?(0,s.jsxs)("div",{className:"popup-bg overflow-hidden "+(d||""),"data-popupid":a||null,style:u,children:[p?(0,s.jsx)(n.Fragment,{children:t}):(0,s.jsx)("div",{className:"relative w-full h-full z-50","data-data":r?JSON.stringify(r):"",children:t}),(0,s.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{i(),c&&c()},children:(0,s.jsx)(l.A,{color:"white",size:20})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{i(),c&&c()}})]}):(0,s.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[p?(0,s.jsx)(n.Fragment,{children:t}):(0,s.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":r?JSON.stringify(r):"",children:[t,(0,s.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{i(),c&&c()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})})]}),p&&(0,s.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{i(),c&&c()},children:(0,s.jsx)("span",{className:"font-normal",children:"✖"})}),(0,s.jsx)("div",{className:"popup-canceller",onClick:e=>{i(),c&&c()}})]})}function o(e,t){let a=document.querySelector("[data-popupid='".concat(e,"']"));a&&(a.style.display="flex",t&&t(a))}function i(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},557:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(4848),l=a(6540);function n(e){let{children:t,column:a,className:n}=e,r=l.useRef();return l.useEffect(()=>{try{let e=r.current.childNodes,t=Array.from(e);if((null==t?void 0:t.length)===1)return;t.forEach((e,s)=>{let l=e;if(l.classList.contains("dropdown-wrapper")){let t=Array.from(e.childNodes).filter(e=>{var t;return(null==e?void 0:null===(t=e.nodeName)||void 0===t?void 0:t.match(/button/i))||e.classList.contains("button")});t&&t[0]&&(l=t[0])}s<t.length-1&&(l.style[a?"borderBottomRightRadius":"borderTopRightRadius"]=0,l.style[a?"borderBottomLeftRadius":"borderBottomRightRadius"]=0),s>0&&(l.style[a?"borderTop":"borderLeft"]="none",l.style[a?"borderTopRightRadius":"borderTopLeftRadius"]=0,l.style[a?"borderTopLeftRadius":"borderBottomLeftRadius"]=0)})}catch(e){console.log(e.message)}},[]),(0,s.jsx)("div",{className:"items-stretch gap-0"+(a?" flex-col":" flex-wrap xl:flex-nowrap")+(n?" "+n:""),ref:r,children:t})}},4909:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(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"}]])}},e=>{var t=t=>e(e.s=t);e.O(0,[1570,9799,5414,5160,6052,636,6593,8792],()=>t(370)),_N_E=e.O()}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9326],{3545:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/media",function(){return t(3517)}])},3517:(e,s,t)=>{"use strict";t.r(s),t.d(s,{MediaContext:()=>_,__N_SSP:()=>g,default:()=>A});var a=t(4848),i=t(6540),l=t(8181),r=t(3647),n=t(5655),d=t(18),o=t(5094),c=t(900);function u(){var e;let{media:s,setTargetMedia:t,user:l,folders:u,staticHost:x}=i.useContext(_);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 justify-between flex-wrap",children:[(0,a.jsx)("h1",{className:"text-3xl m-0",children:"Media"}),(0,a.jsxs)(c.A,{children:[(0,a.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,n.PB)("choose-media-type-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add Media"})]}),(0,a.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:e=>{(0,n.PB)("add-folder-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add Folder"})]})]})]}),(0,a.jsx)(r.A,{user:l})]}),(null==l?void 0:null===(e=l.verification_status)||void 0===e?void 0:e.toString().match(/1/))?(0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)(o.A,{media:s,setTargetMedia:t,folders:u,staticHost:x,user:l}),s&&s[0]&&(0,a.jsxs)("a",{className:"border-dotted border-slate-400 border-2 px-4 py-3 w-full rounded flex items-center hover:border-primary/50 gap-2 cursor-pointer justify-center",onClick:e=>{(0,n.PB)("choose-media-type-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,a.jsx)(d.A,{})]})}var x=t(3142),j=t(1828),m=t(1923),p=t(6217),h=t(431),N=t(1720),w=t(1710),f=t(9200),g=!0;let _=i.createContext({});function A(e){let{user:s,media:t,folders:r,staticHost:n}=e,d=(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"})]}),[o,c]=i.useState(null),[g,A]=i.useState(null),[b,v]=i.useState(null),[y,M]=i.useState(!1),[F,C]=i.useState(null);return(0,a.jsx)(_.Provider,{value:{user:s,media:t,targetMedia:F,setTargetMedia:C,folders:r,staticHost:n},children:(0,a.jsxs)(i.Fragment,{children:[(0,a.jsxs)(l.A,{head:d,user:s,children:[y&&(0,a.jsx)(w.A,{screen:!0,title:"Processing Files ..."}),(0,a.jsx)(u,{}),(0,a.jsx)(x.A,{setNewMedia:c,setLoading:M}),(0,a.jsx)(h.A,{setNewFile:A,setLoading:M}),(0,a.jsx)(f.A,{setNewVideo:v,setLoading:M})]}),(0,a.jsx)(j.A,{newMedia:o,setNewMedia:c,newFile:g,setNewFile:A,newVideo:b,setNewVideo:v}),(0,a.jsx)(m.A,{targetMedia:F,setTargetMedia:C,staticHost:n,media:t}),(0,a.jsx)(p.A,{}),(0,a.jsx)(N.A,{user:s})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[8261,7391,2480,636,6593,8792],()=>s(3545)),_N_E=e.O()}]);
|
||||
@@ -1 +0,0 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9326],{4299:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/media",function(){return t(6636)}])},6636:(e,s,t)=>{"use strict";t.r(s),t.d(s,{MediaContext:()=>_,__N_SSP:()=>g,default:()=>A});var a=t(4848),i=t(6540),l=t(1187),r=t(4709),n=t(5165),d=t(5624),o=t(7651),c=t(557);function u(e){var s;let{media:t,setTargetMedia:l,user:u,folders:x,staticHost:j}=i.useContext(_);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 justify-between flex-wrap",children:[(0,a.jsx)("h1",{className:"text-3xl m-0",children:"Media"}),(0,a.jsxs)(c.A,{children:[(0,a.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,n.PB)("choose-media-type-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add Media"})]}),(0,a.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:e=>{(0,n.PB)("add-folder-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add Folder"})]})]})]}),(0,a.jsx)(r.A,{user:u})]}),(null==u?void 0:null===(s=u.verification_status)||void 0===s?void 0:s.toString().match(/1/))?(0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)(o.A,{media:t,setTargetMedia:l,folders:x,staticHost:j,user:u}),t&&t[0]&&(0,a.jsxs)("a",{className:"border-dotted border-slate-400 border-2 px-4 py-3 w-full rounded flex items-center hover:border-primary/50 gap-2 cursor-pointer justify-center",onClick:e=>{(0,n.PB)("choose-media-type-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,a.jsx)(d.A,{})]})}var x=t(7764),j=t(6093),m=t(4003),p=t(5531),h=t(1493),N=t(5001),w=t(620),f=t(2154),g=!0;let _=i.createContext({});function A(e){let{user:s,media:t,folders:r,staticHost:n}=e,d=(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"})]}),[o,c]=i.useState(null),[g,A]=i.useState(null),[b,v]=i.useState(null),[y,M]=i.useState(!1),[F,C]=i.useState(null);return(0,a.jsx)(_.Provider,{value:{user:s,media:t,targetMedia:F,setTargetMedia:C,folders:r,staticHost:n},children:(0,a.jsxs)(i.Fragment,{children:[(0,a.jsxs)(l.A,{head:d,user:s,children:[y&&(0,a.jsx)(w.A,{screen:!0,title:"Processing Files ..."}),(0,a.jsx)(u,{}),(0,a.jsx)(x.A,{setNewMedia:c,setLoading:M}),(0,a.jsx)(h.A,{setNewFile:A,setLoading:M}),(0,a.jsx)(f.A,{setNewVideo:v,setLoading:M})]}),(0,a.jsx)(j.A,{newMedia:o,setNewMedia:c,newFile:g,setNewFile:A,newVideo:b,setNewVideo:v}),(0,a.jsx)(m.A,{targetMedia:F,setTargetMedia:C,staticHost:n,media:t}),(0,a.jsx)(p.A,{}),(0,a.jsx)(N.A,{user:s})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[9799,5256,636,6593,8792],()=>s(4299)),_N_E=e.O()}]);
|
||||
+1
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[431],{2444:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/media/[...folder]",function(){return t(7097)}])},5844:(e,s,t)=>{"use strict";t.d(s,{A:()=>i});var r=t(4848),l=t(7216);function i(){return(0,r.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,r.jsx)(l.A,{})})}t(6540)},7220:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(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"}]])},7097:(e,s,t)=>{"use strict";t.r(s),t.d(s,{MediaContext:()=>v,__N_SSP:()=>g,default:()=>_});var r=t(4848),l=t(6540),i=t(8181),a=t(3142),n=t(1828),d=t(1923),o=t(6217),c=t(5844),u=t(3647),x=t(5655),j=t(18),h=t(5094),p=t(900),m=t(7220);function f(e){var s;let{media:t,setTargetMedia:i,user:a,folders:n,query:d,staticHost:o,folder:f}=l.useContext(v);return(0,r.jsxs)(l.Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(c.A,{}),(0,r.jsx)(m.A,{size:20}),(0,r.jsx)("h1",{className:"text-3xl m-0",children:d.folder[d.folder.length-1]})]}),(0,r.jsxs)(p.A,{children:[(0,r.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,x.PB)("choose-media-type-popoup")},children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add Media"})]}),(0,r.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:e=>{(0,x.PB)("add-folder-popoup",e=>{var s;null==e||null===(s=e.querySelector("input"))||void 0===s||s.focus()})},children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add Folder"})]})]})]}),(0,r.jsx)(u.A,{user:a})]}),(null==a?void 0:null===(s=a.verification_status)||void 0===s?void 0:s.toString().match(/1/))?(0,r.jsxs)(l.Fragment,{children:[(0,r.jsx)(h.A,{media:t,setTargetMedia:i,folders:n,folder:f,staticHost:o,user:a}),t&&t[0]&&(0,r.jsxs)("a",{className:"border-dotted border-slate-400 border-2 px-4 py-3 w-full rounded flex items-center hover:border-primary/50 gap-2 cursor-pointer justify-center",onClick:e=>{(0,x.PB)("choose-media-type-popoup")},children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,r.jsx)(j.A,{})]})}var w=t(431),N=t(1720),A=t(1710),y=t(9200),g=!0;let v=l.createContext({});function _(e){let{user:s,media:t,folders:c,query:u,staticHost:x,folderNameFull:j}=e,h=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[p,m]=l.useState(null),[g,_]=l.useState(null),[b,k]=l.useState(null),[C,M]=l.useState(!1),[F,S]=l.useState(null);return(0,r.jsx)(v.Provider,{value:{user:s,media:t,targetMedia:F,setTargetMedia:S,folders:c,query:u,staticHost:x,folder:j},children:(0,r.jsxs)(l.Fragment,{children:[(0,r.jsxs)(i.A,{head:h,user:s,children:[C&&(0,r.jsx)(A.A,{screen:!0,title:"Processing Files ..."}),(0,r.jsx)(f,{}),(0,r.jsx)(a.A,{setNewMedia:m,setLoading:M}),(0,r.jsx)(w.A,{setNewFile:_,setLoading:M}),(0,r.jsx)(y.A,{setNewVideo:k,setLoading:M})]}),(0,r.jsx)(n.A,{newMedia:p,setNewMedia:m,newFile:g,setNewFile:_,folder:j,newVideo:b,setNewVideo:k}),(0,r.jsx)(d.A,{targetMedia:F,staticHost:x,setTargetMedia:S,media:t}),(0,r.jsx)(o.A,{folder:j}),(0,r.jsx)(N.A,{user:s})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[8261,7391,2480,636,6593,8792],()=>s(2444)),_N_E=e.O()}]);
|
||||
-1
@@ -1 +0,0 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[431],{9186:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/media/[...folder]",function(){return t(2691)}])},9862:(e,s,t)=>{"use strict";t.d(s,{A:()=>i});var r=t(4848),l=t(7216);function i(){return(0,r.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,r.jsx)(l.A,{})})}t(6540)},7220:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(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"}]])},2691:(e,s,t)=>{"use strict";t.r(s),t.d(s,{MediaContext:()=>v,__N_SSP:()=>g,default:()=>_});var r=t(4848),l=t(6540),i=t(1187),a=t(7764),n=t(6093),d=t(4003),o=t(5531),c=t(9862),u=t(4709),x=t(5165),j=t(5624),h=t(7651),p=t(557),m=t(7220);function f(e){var s;let{media:t,setTargetMedia:i,user:a,folders:n,query:d,staticHost:o,folder:f}=l.useContext(v);return(0,r.jsxs)(l.Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(c.A,{}),(0,r.jsx)(m.A,{size:20}),(0,r.jsx)("h1",{className:"text-3xl m-0",children:d.folder[d.folder.length-1]})]}),(0,r.jsxs)(p.A,{children:[(0,r.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,x.PB)("choose-media-type-popoup")},children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add Media"})]}),(0,r.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:e=>{(0,x.PB)("add-folder-popoup",e=>{var s;null==e||null===(s=e.querySelector("input"))||void 0===s||s.focus()})},children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{children:"Add Folder"})]})]})]}),(0,r.jsx)(u.A,{user:a})]}),(null==a?void 0:null===(s=a.verification_status)||void 0===s?void 0:s.toString().match(/1/))?(0,r.jsxs)(l.Fragment,{children:[(0,r.jsx)(h.A,{media:t,setTargetMedia:i,folders:n,folder:f,staticHost:o,user:a}),t&&t[0]&&(0,r.jsxs)("a",{className:"border-dotted border-slate-400 border-2 px-4 py-3 w-full rounded flex items-center hover:border-primary/50 gap-2 cursor-pointer justify-center",onClick:e=>{(0,x.PB)("choose-media-type-popoup")},children:[(0,r.jsx)("span",{className:"symbol",children:"+"}),(0,r.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,r.jsx)(j.A,{})]})}var w=t(1493),N=t(5001),A=t(620),y=t(2154),g=!0;let v=l.createContext({});function _(e){let{user:s,media:t,folders:c,query:u,staticHost:x,folderNameFull:j}=e,h=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[p,m]=l.useState(null),[g,_]=l.useState(null),[b,k]=l.useState(null),[C,M]=l.useState(!1),[F,S]=l.useState(null);return(0,r.jsx)(v.Provider,{value:{user:s,media:t,targetMedia:F,setTargetMedia:S,folders:c,query:u,staticHost:x,folder:j},children:(0,r.jsxs)(l.Fragment,{children:[(0,r.jsxs)(i.A,{head:h,user:s,children:[C&&(0,r.jsx)(A.A,{screen:!0,title:"Processing Files ..."}),(0,r.jsx)(f,{}),(0,r.jsx)(a.A,{setNewMedia:m,setLoading:M}),(0,r.jsx)(w.A,{setNewFile:_,setLoading:M}),(0,r.jsx)(y.A,{setNewVideo:k,setLoading:M})]}),(0,r.jsx)(n.A,{newMedia:p,setNewMedia:m,newFile:g,setNewFile:_,folder:j,newVideo:b,setNewVideo:k}),(0,r.jsx)(d.A,{targetMedia:F,staticHost:x,setTargetMedia:S,media:t}),(0,r.jsx)(o.A,{folder:j}),(0,r.jsx)(N.A,{user:s})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[9799,5256,636,6593,8792],()=>s(9186)),_N_E=e.O()}]);
|
||||
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
File diff suppressed because one or more lines are too long
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 +0,0 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3681],{3367:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/users/databases",function(){return a(4222)}])},9862:(e,s,a)=>{"use strict";a.d(s,{A:()=>n});var l=a(4848),t=a(7216);function n(){return(0,l.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,l.jsx)(t.A,{})})}a(6540)},5165:(e,s,a)=>{"use strict";a.d(s,{Ay:()=>r,PB:()=>c,fs:()=>i});var l=a(4848),t=a(6897),n=a(6540);function r(e){let{children:s,title:a,data:r,fullPage:c,wrapperClasses:d,closePopupDispatch:o,wrapperStyle:u,noContainer:p}=e;return c?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(d||""),"data-popupid":a||null,style:u,children:[p?(0,l.jsx)(n.Fragment,{children:s}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":r?JSON.stringify(r):"",children:s}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{i(),o&&o()},children:(0,l.jsx)(t.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{i(),o&&o()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[p?(0,l.jsx)(n.Fragment,{children:s}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":r?JSON.stringify(r):"",children:[s,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{i(),o&&o()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),p&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{i(),o&&o()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{i(),o&&o()}})]})}function c(e,s){let a=document.querySelector("[data-popupid='".concat(e,"']"));a&&(a.style.display="flex",s&&s(a))}function i(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},4909:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(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"}]])},4222:(e,s,a)=>{"use strict";a.r(s),a.d(s,{AllDatabasesUsersContext:()=>p,__N_SSP:()=>u,default:()=>x});var l=a(4848),t=a(6540),n=a(1187),r=a(443),c=a(4709);function i(e){let{databases:s,user:a}=e;return(0,l.jsx)(t.Fragment,{children:(0,l.jsxs)("section",{className:"p-4 items-start gap-4 overflow-visible",children:[(0,l.jsx)("h2",{className:"text-xl m-0",children:"Database Users"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-6",children:s&&s[0]?s.map((e,s)=>(0,l.jsxs)("a",{href:"/admin/".concat(null==a?void 0:a.id,"/users/databases/").concat(e.db_slug),className:"border border-slate-200 border-solid rounded px-6 py-4 hover:border-primary flex items-center gap-2",children:[(0,l.jsx)("img",{src:e.db_image,className:"w-8 h-8 rounded-full object-cover",alt:""}),e.db_name]},s+1)):(0,l.jsx)("span",{children:"No Databases Yet"})})]})})}var d=a(9862);function o(e){let{databases:s,user:a}=t.useContext(p);return(0,l.jsxs)(t.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(d.A,{}),(0,l.jsx)("h1",{className:"text-3xl m-0",children:"All Databases Users"})]}),(0,l.jsxs)("a",{href:"/admin/".concat(null==a?void 0:a.id,"/users/add-user"),className:"flex items-center gap-2 whitespace-normal button",children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New User"})]})]}),(0,l.jsx)(c.A,{user:a})]}),(0,l.jsx)(i,{databases:s,user:a})]})}var u=!0;let p=t.createContext({});function x(e){let{user:s,users:a,databases:c}=e,i=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"Users | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[d,u]=t.useState(null),[x,m]=t.useState(null);return(0,l.jsx)(p.Provider,{value:{user:s,users:a,targetUser:x,setTargetUser:m,databases:c},children:(0,l.jsxs)(t.Fragment,{children:[(0,l.jsx)(n.A,{head:i,user:s,children:(0,l.jsx)(o,{})}),(0,l.jsx)(r.A,{targetUser:x,user:s,setTargetUser:m})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[9799,3857,636,6593,8792],()=>s(3367)),_N_E=e.O()}]);
|
||||
+1
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3681],{5429:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/users/databases",function(){return a(2796)}])},5844:(e,s,a)=>{"use strict";a.d(s,{A:()=>n});var l=a(4848),t=a(7216);function n(){return(0,l.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,l.jsx)(t.A,{})})}a(6540)},5655:(e,s,a)=>{"use strict";a.d(s,{Ay:()=>r,PB:()=>c,fs:()=>i});var l=a(4848),t=a(6897),n=a(6540);function r(e){let{children:s,title:a,data:r,fullPage:c,wrapperClasses:d,closePopupDispatch:o,wrapperStyle:u,noContainer:p}=e;return c?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(d||""),"data-popupid":a||null,style:u,children:[p?(0,l.jsx)(n.Fragment,{children:s}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":r?JSON.stringify(r):"",children:s}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{i(),o&&o()},children:(0,l.jsx)(t.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{i(),o&&o()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[p?(0,l.jsx)(n.Fragment,{children:s}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":r?JSON.stringify(r):"",children:[s,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{i(),o&&o()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),p&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{i(),o&&o()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{i(),o&&o()}})]})}function c(e,s){let a=document.querySelector("[data-popupid='".concat(e,"']"));a&&(a.style.display="flex",null==s||s(a))}function i(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),null==e||e()}},4909:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(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"}]])},2796:(e,s,a)=>{"use strict";a.r(s),a.d(s,{AllDatabasesUsersContext:()=>p,__N_SSP:()=>u,default:()=>x});var l=a(4848),t=a(6540),n=a(8181),r=a(361),c=a(3647);function i(e){let{databases:s,user:a}=e;return(0,l.jsx)(t.Fragment,{children:(0,l.jsxs)("section",{className:"p-4 items-start gap-4 overflow-visible",children:[(0,l.jsx)("h2",{className:"text-xl m-0",children:"Database Users"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-6",children:s&&s[0]?s.map((e,s)=>(0,l.jsxs)("a",{href:"/admin/".concat(null==a?void 0:a.id,"/users/databases/").concat(e.db_slug),className:"border border-slate-200 border-solid rounded px-6 py-4 hover:border-primary flex items-center gap-2",children:[(0,l.jsx)("img",{src:e.db_image,className:"w-8 h-8 rounded-full object-cover",alt:""}),e.db_name]},s+1)):(0,l.jsx)("span",{children:"No Databases Yet"})})]})})}var d=a(5844);function o(){let{databases:e,user:s}=t.useContext(p);return(0,l.jsxs)(t.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(d.A,{}),(0,l.jsx)("h1",{className:"text-3xl m-0",children:"All Databases Users"})]}),(0,l.jsxs)("a",{href:"/admin/".concat(null==s?void 0:s.id,"/users/add-user"),className:"flex items-center gap-2 whitespace-normal button",children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New User"})]})]}),(0,l.jsx)(c.A,{user:s})]}),(0,l.jsx)(i,{databases:e,user:s})]})}var u=!0;let p=t.createContext({});function x(e){let{user:s,users:a,databases:c}=e,i=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"Users | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[d,u]=t.useState(null),[x,m]=t.useState();return(0,l.jsx)(p.Provider,{value:{user:s,users:a,targetUser:x,setTargetUser:m,databases:c},children:(0,l.jsxs)(t.Fragment,{children:[(0,l.jsx)(n.A,{head:i,user:s,children:(0,l.jsx)(o,{})}),x&&(0,l.jsx)(r.A,{targetUser:x,user:s,setTargetUser:m})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[7391,6383,636,6593,8792],()=>s(5429)),_N_E=e.O()}]);
|
||||
+1
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4397],{3198:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/users/databases/[database]",function(){return a(8606)}])},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)},5655:(e,s,a)=>{"use strict";a.d(s,{Ay:()=>r,PB:()=>c,fs:()=>i});var t=a(4848),l=a(6897),n=a(6540);function r(e){let{children:s,title:a,data:r,fullPage:c,wrapperClasses:d,closePopupDispatch:o,wrapperStyle:u,noContainer:p}=e;return c?(0,t.jsxs)("div",{className:"popup-bg overflow-hidden "+(d||""),"data-popupid":a||null,style:u,children:[p?(0,t.jsx)(n.Fragment,{children:s}):(0,t.jsx)("div",{className:"relative w-full h-full z-50","data-data":r?JSON.stringify(r):"",children:s}),(0,t.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{i(),o&&o()},children:(0,t.jsx)(l.A,{color:"white",size:20})}),(0,t.jsx)("div",{className:"popup-canceller",onClick:e=>{i(),o&&o()}})]}):(0,t.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[p?(0,t.jsx)(n.Fragment,{children:s}):(0,t.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":r?JSON.stringify(r):"",children:[s,(0,t.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{i(),o&&o()},children:(0,t.jsx)("span",{className:"font-normal",children:"✖"})})]}),p&&(0,t.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{i(),o&&o()},children:(0,t.jsx)("span",{className:"font-normal",children:"✖"})}),(0,t.jsx)("div",{className:"popup-canceller",onClick:e=>{i(),o&&o()}})]})}function c(e,s){let a=document.querySelector("[data-popupid='".concat(e,"']"));a&&(a.style.display="flex",null==s||s(a))}function i(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),null==e||e()}},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"}]])},8606:(e,s,a)=>{"use strict";a.r(s),a.d(s,{SingleDatabaseUsersContext:()=>u,__N_SSP:()=>o,default:()=>p});var t=a(4848),l=a(6540),n=a(8181),r=a(361),c=a(3647),i=a(5844);function d(){let{database:e,users:s,user:a}=l.useContext(u);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:"w-full justify-between flex-wrap",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(i.A,{}),(0,t.jsxs)("h1",{className:"text-3xl m-0",children:[e.db_name," Users"]})]}),(0,t.jsxs)("a",{href:"/admin/".concat(null==a?void 0:a.id,"/users/add-user?db=").concat(e.db_slug),className:"flex items-center gap-2 whitespace-normal button",children:[(0,t.jsx)("span",{className:"symbol",children:"+"}),(0,t.jsx)("span",{children:"Add New User"})]})]}),(0,t.jsx)(c.A,{user:a})]}),(0,t.jsx)("div",{className:"paper w-full flex-col items-stretch",children:s&&s[0]?s.map(s=>{var l;return(0,t.jsxs)("a",{href:"/admin/".concat(null==a?void 0:a.id,"/users/databases/").concat(e.db_slug,"/").concat(s.id),className:"w-full flex items-center gap-2 p-4 border border-solid border-slate-200 rounded cursor-pointer hover:border-slate-400 flex-wrap",onClick:e=>{if(e.target.closest("button"))return e.preventDefault()},children:[(0,t.jsx)("img",{src:s.image_thumbnail,alt:"",className:"w-10 h-10 rounded-full object-cover bg-slate-200"}),(0,t.jsxs)("div",{className:"flex-col items-start gap-1",children:[(0,t.jsxs)("span",{className:"font-bold",children:[s.first_name," ",s.last_name]}),(0,t.jsx)("span",{className:"text-xs text-slate-500",children:null===(l=s.date_created)||void 0===l?void 0:l.substring(0,16)})]}),(0,t.jsx)("button",{className:"ml-auto outlined gray pointer-events-none",children:"Edit User"})]})}):(0,t.jsx)("span",{children:"No Users for this database yet"})})]})}var o=!0;let u=l.createContext({});function p(e){let{user:s,users:a,database:c}=e,i="".concat(c.db_name,' Users | Datasquirel"'),o=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:i}),(0,t.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[p,x]=l.useState(null),[m,h]=l.useState();return(0,t.jsx)(u.Provider,{value:{user:s,users:a,targetUser:m,setTargetUser:h,database:c},children:(0,t.jsx)(l.Fragment,{children:(0,t.jsxs)(n.A,{head:o,user:s,children:[(0,t.jsx)(d,{}),(0,t.jsx)(r.A,{targetUser:m,user:s,setTargetUser:h})]})})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[7391,6383,636,6593,8792],()=>s(3198)),_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
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user