dsql-admin/dsql-app/.local_dist/static/chunks/4750-16db76b374e35273.js

1 line
33 KiB
JavaScript
Raw Normal View History

2024-12-05 07:03:33 +00:00
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4750],{65001:(e,l,a)=>{a.d(l,{A:()=>r});var t=a(74848);a(96540);var i=a(45165),o=a(1915),n=a(95737);let s=(0,n.A)("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]),d=(0,n.A)("FileVideo2",[["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"}],["rect",{width:"8",height:"6",x:"2",y:"12",rx:"1",key:"1a6c1e"}],["path",{d:"m10 15.5 4 2.5v-6l-4 2.5",key:"t7cp39"}]]);function r(e){let{user:l}=e;return(0,t.jsx)(i.Ay,{title:"choose-media-type-popoup",noContainer:!0,wrapperClasses:"items-center",wrapperStyle:{alignItems:"center"},children:(0,t.jsxs)("div",{className:"paper items-center max-w-2xl m-auto z-50 p-4 xl:p-10",children:[(0,t.jsxs)("h4",{className:"m-0 text-center text-lg leading-tight",children:["What kind of Media do you",(0,t.jsx)("br",{}),"want to upload?"]}),(0,t.jsx)("span",{children:"Please Select the media type to upload."}),(0,t.jsxs)("div",{className:"w-full grid grid-cols-1 lg:grid-cols-2 gap-6 items-stretch",children:[(0,t.jsxs)("div",{className:"card cursor-pointer",onClick:e=>{var a;if(null==l?void 0:null===(a=l.verification_status)||void 0===a?void 0:a.toString().match(/1/)){let e=document.getElementById("upload_image_input");null==e||e.click()}else alert("Please Verify to Add Media");setTimeout(()=>{(0,i.fs)()},500)},children:[(0,t.jsx)(o.A,{size:50,className:"text-primary"}),(0,t.jsxs)("div",{className:"content",children:[(0,t.jsx)("span",{className:"title",children:"Images"}),(0,t.jsx)("span",{className:"text-sm",children:"General image formats like JPEG, PNG, SVG, WEBP, etc."})]})]}),(0,t.jsxs)("div",{className:"card cursor-pointer",onClick:e=>{var a,t;(null==l?void 0:null===(a=l.verification_status)||void 0===a?void 0:a.toString().match(/1/))?null===(t=document.getElementById("upload_file_input"))||void 0===t||t.click():alert("Please Verify to Add Media"),(0,i.fs)()},children:[(0,t.jsx)(s,{size:50,className:"text-secondary"}),(0,t.jsxs)("div",{className:"content",children:[(0,t.jsx)("span",{className:"title",children:"Files"}),(0,t.jsx)("span",{className:"text-sm",children:"Other documents type. Like PDF, XLSX, CSV, etc."})]})]})]}),(0,t.jsx)("div",{className:"w-full grid grid-cols-1 lg:grid-cols-2 gap-6 items-stretch",children:(0,t.jsxs)("div",{className:"card cursor-pointer",onClick:e=>{var a,t;(null==l?void 0:null===(a=l.verification_status)||void 0===a?void 0:a.toString().match(/1/))?null===(t=document.getElementById("upload_video_input"))||void 0===t||t.click():alert("Please Verify to Add Media"),(0,i.fs)()},children:[(0,t.jsx)(d,{size:55,className:"text-slate-600"}),(0,t.jsxs)("div",{className:"content",children:[(0,t.jsx)("span",{className:"title",children:"Videos"}),(0,t.jsxs)("span",{className:"text-sm",children:["Video Files. ",(0,t.jsx)("b",{children:"MP4"})," for now. These files can be streamed. Max 200mb"]})]})]})})]})})}},53301:(e,l,a)=>{a.d(l,{A:()=>A});var t=a(74848),i=a(96540),o=a(23698),n=a(96228),s=a(2436),d=a(620);function r(e){let{folderName:l,folder:a,user:r}=e,c="".concat(a?a+"/":"").concat(l),[u,m]=i.useState(!1);return(0,t.jsxs)("a",{href:"/admin/".concat(null==r?void 0:r.id,"/media/").concat(c),className:"card col items-center justify-center",onClick:e=>{if(e.target.closest("button"))return e.preventDefault()},children:[u&&(0,t.jsx)(d.A,{}),(0,t.jsx)(n.A,{sx:{fontSize:100},className:"opacity-20"}),(0,t.jsx)("span",{className:"absolute top-4 left-4 text-xs bg-slate-200 dark:bg-slate-700 px-2 py-0.5 rounded-full",children:"Folder"}),(0,t.jsx)("span",{className:"",children:l}),(0,t.jsx)("button",{className:"plain-text absolute top-2 right-2",onClick:e=>{window.confirm("Delete this Folder and all its contents?")&&(m(!0),window.confirm("NOTE: this folder and all its contents will be permanently lost. Continue?")?(0,o.A)("/api/deleteMediaFolder",{method:"post",body:{folder:c}}