This commit is contained in:
p 2023-09-16 12:04:43 +05:30
commit bcf86f589b
3 changed files with 43 additions and 8 deletions

View file

@ -3,7 +3,7 @@ import React from "react";
export const SearchSVG = () => {
return (
<svg width="26" height="26" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M36.6667 36.6667L33.3333 33.3334M19.1667 35C21.2459 35 23.3048 34.5905 25.2258 33.7948C27.1468 32.9991 28.8923 31.8328 30.3625 30.3626C31.8328 28.8923 32.9991 27.1468 33.7948 25.2259C34.5905 23.3049 35 21.246 35 19.1667C35 17.0874 34.5905 15.0285 33.7948 13.1076C32.9991 11.1866 31.8328 9.44111 30.3625 7.97085C28.8923 6.50059 27.1468 5.33431 25.2258 4.53861C23.3048 3.74292 21.2459 3.33337 19.1667 3.33337C14.9674 3.33337 10.9401 5.00152 7.9708 7.97085C5.00148 10.9402 3.33333 14.9674 3.33333 19.1667C3.33333 23.366 5.00148 27.3932 7.9708 30.3626C10.9401 33.3319 14.9674 35 19.1667 35Z" stroke="#7AFFB8" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"/>
<path d="M36.6667 36.6667L33.3333 33.3334M19.1667 35C21.2459 35 23.3048 34.5905 25.2258 33.7948C27.1468 32.9991 28.8923 31.8328 30.3625 30.3626C31.8328 28.8923 32.9991 27.1468 33.7948 25.2259C34.5905 23.3049 35 21.246 35 19.1667C35 17.0874 34.5905 15.0285 33.7948 13.1076C32.9991 11.1866 31.8328 9.44111 30.3625 7.97085C28.8923 6.50059 27.1468 5.33431 25.2258 4.53861C23.3048 3.74292 21.2459 3.33337 19.1667 3.33337C14.9674 3.33337 10.9401 5.00152 7.9708 7.97085C5.00148 10.9402 3.33333 14.9674 3.33333 19.1667C3.33333 23.366 5.00148 27.3932 7.9708 30.3626C10.9401 33.3319 14.9674 35 19.1667 35Z" stroke="#2f6af5" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
);
};

View file

@ -4,7 +4,7 @@ import { RecoilRoot } from 'recoil'
import Layout from '../components/Layout'
import '../styles/globals.css'
import '../styles/nprogress.css'
import { ToastContainer } from 'react-toastify';
NProgress.configure({ showSpinner: false })
Router.events.on('routeChangeStart', () => NProgress.start())
Router.events.on('routeChangeComplete', () => NProgress.done())
@ -14,6 +14,7 @@ function MyApp({ Component, pageProps }) {
return (
<RecoilRoot>
<Layout>
<ToastContainer />
<Component {...pageProps} />
</Layout>
</RecoilRoot>

View file

@ -5,6 +5,8 @@ import { getListComment, movieDetailsPost, postComment } from '../../../service/
import moment from 'moment';
import { formatBytes } from '../../../Common/CardExpanded';
import YouTube from "react-youtube";
import { FaRegCopy } from 'react-icons/fa'
import ToastMsg from '../../../Common/ToastMsg';
const Details = () => {
let trackers = [
@ -123,6 +125,25 @@ const Details = () => {
autoplay: 0,
},
};
const [disabledToast,setDisabledToast]=useState(false)
const copyToClipBoard = async() => {
if(disabledToast){
return
}
try {
await navigator.clipboard.writeText(magnateDownload);
ToastMsg("Copied!","success")
setDisabledToast(true)
setTimeout(()=>{
setDisabledToast(false)
},3000)
}
catch (err) {
console.log("pp",err)
ToastMsg('Failed to copy!',"error");
}
};
return (
<div>
@ -137,7 +158,7 @@ const Details = () => {
<div className="w-[94%] md:w-[50%] flex flex-col justify-around text-gray-200 text-opacity-80 text-[16px] p-2 h-auto long-and-truncated ">
<h1 >{data?.name}</h1>
<div className='flex space-x-4 '>
<a href={`/get-posts/category:${data?.category_str}`} className='cursor-pointer px-2 bg-primary/10 text-primary border-primary my-4 text-xs hover:bg-primary/30' style={{ border: "none", fontWeight: "400" }}>{data?.category_str}</a>
<a href={`/get-posts/category:${data?.category_str}`} className='cursor-pointer px-2 bg-primary/10 text-primary border-primary my-4 text-xs hover:bg-primary/30' style={{ border: "none", fontWeight: "400" }}>{data?.category_str}</a>
<span className='px-2 bg-primary/10 text-primary border-primary my-4 text-xs hover:bg-primary/30' style={{ border: "none", fontWeight: "400" }}> &#128077; {data?.imdb_data?.rating}</span>
{/* <span className='px-2 bg-primary/10 text-primary border-primary my-4 text-xs hover:bg-primary/30' style={{ border: "none", fontWeight: "400" }}> &#x1F44D; 0</span> */}
</div>
@ -164,17 +185,30 @@ const Details = () => {
<div className="w-full md:w-[35%] text-gray-200 text-opacity-80 text-[16px] p-2 h-auto flex-1 min-w-0 md:mx-1 relative text-right" >
<div className='flex flex-col justify-around h-full'>
<div className='flex flex-col items-end'>
<button className='w-full xl:w-[70%] px-[2rem] py-2 bg-primary/10 text-gray-100 border-primary my-4 text-[15px] rounded bg-gradient-to-r from-green-400 via-purple-500 to-purple-600 hover:text-primary' onClick={() => {
<button className='w-full xl:w-[70%] px-[2rem] py-2 bg-primary/10 text-gray-100 border-primary my-3 text-[15px] rounded bg-gradient-to-r from-green-400 via-purple-500 to-purple-600 hover:text-primary' onClick={() => {
window.open(torrentDownload, '_self')
}} >Torrent Download</button>
<button className='w-full xl:w-[70%] px-[2rem] py-2 bg-primary/10 text-gray-100 border-primary my-4 text-[15px] rounded bg-gradient-to-r from-green-400 via-purple-500 to-purple-600 hover:text-primary' onClick={() => {
<button className='w-full xl:w-[70%] px-[2rem] py-2 bg-primary/10 text-gray-100 border-primary my-3 text-[15px] rounded bg-gradient-to-r from-green-400 via-purple-500 to-purple-600 hover:text-primary' onClick={() => {
router.push(`/streaming?id=${data?.imdb}`)
}} >Play Now</button>
<button className='w-full xl:w-[70%] px-[2rem] py-2 bg-primary/10 border-primary text-[15px] text-gray-100 rounded bg-gradient-to-r from-green-400 via-blue-500 to-blue-600 hover:text-primary' onClick={() => {
window.open(magnateDownload,"_self");
}} >&#129522; Magnet Download</button>
<button className='w-full xl:w-[70%] px-[2rem] py-2 bg-primary/10 border-primary text-[15px] my-3 text-gray-100 rounded bg-gradient-to-r from-green-400 via-blue-500 to-blue-600 hover:text-primary' onClick={() => {
copyToClipBoard()
}} >&#129522; Copy To Clipboard </button>
<button className='w-full xl:w-[70%] px-[2rem] py-2 bg-primary/10 border-primary text-[15px] text-gray-100 rounded bg-gradient-to-r from-green-400 via-blue-500 to-blue-600 hover:text-primary' onClick={() => {
window.open(magnateDownload, '_blank');
}} >&#129522; Magnet Download </button>
</div>
<div className='align-bottom flex bottom-2 justify-end'>
<button className='px-[1.4rem] w-[50%] xl:w-[35%] py-2 bg-primary/10 text-primary rounded border-primary mr-[0.4rem] text-[13px] hover:bg-primary/30 mt-4' style={{ border: "none", fontWeight: "400" }} onClick={() => {
window.location.reload()