This commit is contained in:
Benjamin Toby
2024-12-15 12:57:19 +01:00
parent bc037e839f
commit 6364f6a312
84 changed files with 1579 additions and 123 deletions
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
(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.jsxs)(i.Fragment,{children:[(0,a.jsx)(l.A,{head:d,user:s,children:(0,a.jsxs)(_.Provider,{value:{user:s,media:t,targetMedia:F,setTargetMedia:C,folders:r,staticHost:n},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()}]);
(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 +1 @@
(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.jsxs)(l.Fragment,{children:[(0,r.jsx)(i.A,{head:h,user:s,children:(0,r.jsxs)(v.Provider,{value:{user:s,media:t,targetMedia:F,setTargetMedia:S,folders:c,query:u,staticHost:x,folder:j},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()}]);
(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()}]);
@@ -1 +1 @@
(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)(n.A,{head:i,user:s,children:(0,l.jsxs)(p.Provider,{value:{user:s,users:a,targetUser:x,setTargetUser:m,databases:c},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()}]);
(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()}]);
@@ -129,7 +129,7 @@
/******/
/******/ /* webpack/runtime/getFullHash */
/******/ (() => {
/******/ __webpack_require__.h = () => ("77df37b8f24b04bb")
/******/ __webpack_require__.h = () => ("e6ae70b7ede822ca")
/******/ })();
/******/
/******/ /* webpack/runtime/global */
@@ -1 +1 @@
self.__BUILD_MANIFEST = (function(a){return {__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:a,__routerFilterDynamic:a,"/":["static\u002Fchunks\u002Fpages\u002Findex.js"],"/404":["static\u002Fchunks\u002Fpages\u002F404.js"],"/_error":["static\u002Fchunks\u002Fpages\u002F_error.js"],"/admin/[user_id]/media":["static\u002Fchunks\u002Fpages\u002Fadmin\u002F[user_id]\u002Fmedia.js"],"/admin/[user_id]/media/[...folder]":["static\u002Fchunks\u002Fpages\u002Fadmin\u002F[user_id]\u002Fmedia\u002F[...folder].js"],sortedPages:["\u002F","\u002F404","\u002F_app","\u002F_error","\u002Fadmin\u002F[user_id]\u002Fmedia","\u002Fadmin\u002F[user_id]\u002Fmedia\u002F[...folder]"]}}(void 0));self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()
self.__BUILD_MANIFEST = (function(a){return {__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:a,__routerFilterDynamic:a,"/":["static\u002Fchunks\u002Fpages\u002Findex.js"],"/404":["static\u002Fchunks\u002Fpages\u002F404.js"],"/_error":["static\u002Fchunks\u002Fpages\u002F_error.js"],"/admin/[user_id]":["static\u002Fchunks\u002Fpages\u002Fadmin\u002F[user_id].js"],"/admin/[user_id]/api-keys":["static\u002Fchunks\u002Fpages\u002Fadmin\u002F[user_id]\u002Fapi-keys.js"],"/admin/[user_id]/databases":["static\u002Fchunks\u002Fpages\u002Fadmin\u002F[user_id]\u002Fdatabases.js"],sortedPages:["\u002F","\u002F404","\u002F_app","\u002F_error","\u002Fadmin\u002F[user_id]","\u002Fadmin\u002F[user_id]\u002Fapi-keys","\u002Fadmin\u002F[user_id]\u002Fdatabases"]}}(void 0));self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()
@@ -0,0 +1 @@
{"c":["webpack"],"r":["pages/admin/[user_id]/media","pages/login","pages/admin","pages/admin/[user_id]"],"m":["./components/admin/media/ChooseMediaTypePopup.jsx","./components/admin/media/MediaContent.jsx","./components/admin/media/MediaFolderCard.jsx","./components/admin/media/MediaList.jsx","./components/admin/media/NewFileCard.jsx","./components/admin/media/NewFolderPopup.jsx","./components/admin/media/NewMediaCard.jsx","./components/admin/media/NewMediaPopup.jsx","./components/admin/media/TargetMediaPreviewPopup.jsx","./components/admin/media/TogglePrivacyButton.jsx","./components/admin/media/card/MediaLinksDropdown.jsx","./components/admin/media/card/MediaListCard.jsx","./components/admin/media/card/MediaMoreButton.jsx","./components/admin/media/card/MediaPreviewSection.jsx","./components/admin/media/card/MediaPrivacyButton.jsx","./components/general/UploadFileComponent.jsx","./components/general/UploadImageComponent.jsx","./components/general/UploadVideoComponent.jsx","./functions/frontend/downloadFile.js","./functions/frontend/downloadPrivateFile.js","./functions/frontend/imageInputFileToBase64.js","./functions/frontend/inputFileToBase64.js","./node_modules/lucide-react/dist/esm/icons/chevron-left.js","./node_modules/lucide-react/dist/esm/icons/file-video-2.js","./node_modules/lucide-react/dist/esm/icons/files.js","./node_modules/lucide-react/dist/esm/icons/folder.js","./node_modules/lucide-react/dist/esm/icons/lock-keyhole-open.js","./node_modules/lucide-react/dist/esm/icons/lock-open.js","./node_modules/lucide-react/dist/esm/icons/lock.js","./node_modules/lucide-react/dist/esm/icons/plus.js","./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2Fapp%2Fpages%2Fadmin%2F%5Buser_id%5D%2Fmedia%2Findex.jsx&page=%2Fadmin%2F%5Buser_id%5D%2Fmedia!","./pages/admin/[user_id]/media/index.jsx","__barrel_optimize__?names=ChevronLeft,ChevronRight!=!./node_modules/lucide-react/dist/esm/lucide-react.js","__barrel_optimize__?names=Copy,Folder,X!=!./node_modules/lucide-react/dist/esm/lucide-react.js","__barrel_optimize__?names=FileVideo2,Files,Images!=!./node_modules/lucide-react/dist/esm/lucide-react.js","__barrel_optimize__?names=Lock,LockKeyholeOpen!=!./node_modules/lucide-react/dist/esm/lucide-react.js","__barrel_optimize__?names=Lock,LockOpen!=!./node_modules/lucide-react/dist/esm/lucide-react.js","__barrel_optimize__?names=Plus!=!./node_modules/lucide-react/dist/esm/lucide-react.js","./components/general/LoadingScreen.jsx","./components/pages/login/FacebookSignInButton.jsx","./components/pages/login/GithubLogin.jsx","./components/pages/login/GoogleIdentityButton.jsx","./components/pages/login/LoginForm.jsx","./components/pages/login/SocialLogin.jsx","./functions/frontend/clearCaches.js","./functions/frontend/userLogin.js","./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2Fapp%2Fpages%2Flogin.jsx&page=%2Flogin!","./pages/login.jsx","./components/admin/dashboard/DashboardContent.jsx","./components/admin/dashboard/DatabasesSummary.jsx","./components/admin/dashboard/Metrics.jsx","./components/general/MetricCard.jsx","./node_modules/lucide-react/dist/esm/icons/key.js","./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2Fapp%2Fpages%2Fadmin%2Findex.jsx&page=%2Fadmin!","./pages/admin/[user_id]/index.jsx","./pages/admin/index.jsx","__barrel_optimize__?names=Database,Images,Key,Sheet!=!./node_modules/lucide-react/dist/esm/lucide-react.js","./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2Fapp%2Fpages%2Fadmin%2F%5Buser_id%5D%2Findex.jsx&page=%2Fadmin%2F%5Buser_id%5D!"]}
@@ -0,0 +1 @@
{"c":["webpack"],"r":[],"m":[]}
@@ -1 +0,0 @@
{"c":["webpack"],"r":["pages/admin/[user_id]"],"m":["./components/admin/dashboard/DashboardContent.jsx","./components/admin/dashboard/DatabasesSummary.jsx","./components/admin/dashboard/Metrics.jsx","./components/admin/databases/DatabaseListCard.jsx","./components/admin/databases/DatabasesContent.jsx","./components/admin/databases/DatabasesList.jsx","./components/admin/databases/DelegatedDatabasesSection.jsx","./components/admin/databases/DeleteDatabaseConfirmationPopup.jsx","./components/general/DatabaseSlugCopy.jsx","./components/general/MetricCard.jsx","./node_modules/lucide-react/dist/esm/icons/key.js","./node_modules/lucide-react/dist/esm/icons/package-plus.js","./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2Fapp%2Fpages%2Fadmin%2F%5Buser_id%5D%2Findex.jsx&page=%2Fadmin%2F%5Buser_id%5D!","./pages/admin/[user_id]/databases/index.jsx","./pages/admin/[user_id]/index.jsx","__barrel_optimize__?names=ChevronRight!=!./node_modules/lucide-react/dist/esm/lucide-react.js","__barrel_optimize__?names=Database,Images,Key,Sheet!=!./node_modules/lucide-react/dist/esm/lucide-react.js","__barrel_optimize__?names=PackagePlus!=!./node_modules/lucide-react/dist/esm/lucide-react.js"]}
@@ -11,7 +11,7 @@ self["webpackHotUpdate_N_E"]("webpack",{},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ /* webpack/runtime/getFullHash */
/******/ (() => {
/******/ __webpack_require__.h = () => ("77df37b8f24b04bb")
/******/ __webpack_require__.h = () => ("d413fc8474d148d3")
/******/ })();
/******/
/******/ }
@@ -11,7 +11,7 @@ self["webpackHotUpdate_N_E"]("webpack",{},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ /* webpack/runtime/getFullHash */
/******/ (() => {
/******/ __webpack_require__.h = () => ("4d5fe4a7e5835ea3")
/******/ __webpack_require__.h = () => ("d9af05de7fd2a0b1")
/******/ })();
/******/
/******/ }
@@ -0,0 +1,18 @@
"use strict";
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
self["webpackHotUpdate_N_E"]("webpack",{},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ /* webpack/runtime/getFullHash */
/******/ (() => {
/******/ __webpack_require__.h = () => ("e6ae70b7ede822ca")
/******/ })();
/******/
/******/ }
);