diff --git a/src/components/AuthPages/VerifyLink/index2.jsx b/src/components/AuthPages/VerifyLink/index2.jsx index e3336b3..cf93552 100644 --- a/src/components/AuthPages/VerifyLink/index2.jsx +++ b/src/components/AuthPages/VerifyLink/index2.jsx @@ -5,6 +5,7 @@ import debounce from "../../../hooks/debounce"; import usersService from "../../../services/UsersService"; import InputCom from "../../Helpers/Inputs/InputCom"; import AuthLayout from "../AuthLayout2"; +import LoadingSpinner from '../../../components/Spinners/LoadingSpinner' export default function VerifyLink() { const [email, setEmail] = useState(""); @@ -119,7 +120,14 @@ export default function VerifyLink() { <> {pageLoader ? ( - wrenchboard +
+ wrenchboard +
+ +

Loading...

+

please do not refresh

+
+
) : (
diff --git a/src/components/Resources/tabs/MyUploadedFiles.jsx b/src/components/Resources/tabs/MyUploadedFiles.jsx index b682cc5..b72beb0 100644 --- a/src/components/Resources/tabs/MyUploadedFiles.jsx +++ b/src/components/Resources/tabs/MyUploadedFiles.jsx @@ -16,6 +16,22 @@ export default function MyUploadedFiles({ uploadedFiles }) { const handlePagination = (e) => { handlePagingFunc(e, setCurrentPage); }; + + + //FUNCTION TO OPEN NEW WINDOW + const openNewWindow = (e, url, width=1000, height=600) => { + e.preventDefault() + var leftPosition, topPosition; + //Allow for borders. + leftPosition = (window.screen.width / 2) - ((width / 2) + 10); + //Allow for title and status bars. + topPosition = (window.screen.height / 2) - ((height / 2) + 50); + //Open the window. + window.open(url, "", + "status=no,height=" + height + ",width=" + width + ",resizable=yes,left=" + + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY=" + + topPosition + ",toolbar=no,menubar=no,scrollbars=yes,location=no,directories=no"); + } return ( <>
@@ -106,6 +122,7 @@ export default function MyUploadedFiles({ uploadedFiles }) { openNewWindow(e, downloadLink)} // className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white" > { + e.preventDefault() + var leftPosition, topPosition; + //Allow for borders. + leftPosition = (window.screen.width / 2) - ((width / 2) + 10); + //Allow for title and status bars. + topPosition = (window.screen.height / 2) - ((height / 2) + 50); + //Open the window. + window.open(url, "", + "status=no,height=" + height + ",width=" + width + ",resizable=yes,left=" + + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY=" + + topPosition + ",toolbar=no,menubar=no,scrollbars=yes,location=no,directories=no"); + } + useEffect(()=>{ apiCall.jobManagerFiles({job_uid:data?.job_uid || data?.origin_job_uid}).then(res => { setUploadedList({loading: false, data:res.data}) @@ -105,6 +120,7 @@ export default function AttachFile({data='', fontSize='text-sm', showOnData=fals alt='download-link' className='' href={downloadLink} + onClick={(e)=> openNewWindow(e, downloadLink)} > {(item.originalname).toString().length > 30 ? (item.originalname).toString().slice(0, 26) + '..._.' + fileNameExt : (item.originalname).toString()} @@ -148,6 +164,7 @@ export default function AttachFile({data='', fontSize='text-sm', showOnData=fals alt='download-link' className='' href={downloadLink} + onClick={(e)=> openNewWindow(e, downloadLink)} > {(item.originalname).toString().length > 30 ? (item.originalname).toString().slice(0, 26) + '..._.' + fileNameExt : (item.originalname).toString()}