|
|
@ -1,8 +1,5 @@ |
|
|
|
import React, { Component } from "react"; |
|
|
|
import React, { Component } from "react"; |
|
|
|
|
|
|
|
|
|
|
|
import file from "./images/file.svg"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import pause from "./images/pause.svg"; |
|
|
|
|
|
|
|
import axios from "axios"; |
|
|
|
import axios from "axios"; |
|
|
|
|
|
|
|
|
|
|
|
export default class UploadFile extends Component { |
|
|
|
export default class UploadFile extends Component { |
|
|
@ -48,12 +45,11 @@ export default class UploadFile extends Component { |
|
|
|
{/* ? upload input File */} |
|
|
|
{/* ? upload input File */} |
|
|
|
<div className="relative bg-white w-full flex flex-col items-center px-4 py-7 rounded-lg border-2 border-dashed border-blue-300 mt-5"> |
|
|
|
<div className="relative bg-white w-full flex flex-col items-center px-4 py-7 rounded-lg border-2 border-dashed border-blue-300 mt-5"> |
|
|
|
<div className=" "> |
|
|
|
<div className=" "> |
|
|
|
<img src={file} className="" alt="" /> |
|
|
|
<img src="images/UploadFilefile.svg" className="" alt="" /> |
|
|
|
<input |
|
|
|
<input |
|
|
|
onChange={this.uploadFile} |
|
|
|
onChange={this.uploadFile} |
|
|
|
type="file" |
|
|
|
type="file" |
|
|
|
className="opacity-0 absolute left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-20 cursor-pointer" |
|
|
|
className="opacity-0 absolute top-[39%] left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-20 cursor-pointer" |
|
|
|
style={{ top: "39%" }} |
|
|
|
|
|
|
|
name="" |
|
|
|
name="" |
|
|
|
/> |
|
|
|
/> |
|
|
|
{uploadPercentage > 0 && ( |
|
|
|
{uploadPercentage > 0 && ( |
|
|
@ -65,7 +61,7 @@ export default class UploadFile extends Component { |
|
|
|
)} |
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<p className="text-xs mt-5"> |
|
|
|
<p className="text-xs mt-5"> |
|
|
|
یک فایل را اینجا بکشید یا از{" "} |
|
|
|
یک فایل را اینجا بکشید یا از |
|
|
|
<span className="text-blue-300">رایانه خود انتخاب کنید</span> |
|
|
|
<span className="text-blue-300">رایانه خود انتخاب کنید</span> |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -86,13 +82,13 @@ export default class UploadFile extends Component { |
|
|
|
<span className="text-xs mr-2">3 دقیقه باقیمانده</span> |
|
|
|
<span className="text-xs mr-2">3 دقیقه باقیمانده</span> |
|
|
|
{/* pause button */} |
|
|
|
{/* pause button */} |
|
|
|
<div className="bg-blue-100 bg-opacity-50 p-2 rounded-full cursor-pointer mr-2"> |
|
|
|
<div className="bg-blue-100 bg-opacity-50 p-2 rounded-full cursor-pointer mr-2"> |
|
|
|
<img src={pause} /> |
|
|
|
<img src="images/UploadFilepause.svg" alt="pic" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="bg-rangeBgColor h-3 w-full rounded mt-2"> |
|
|
|
<div className="bg-[#D3E9FF] h-3 w-full rounded mt-2"> |
|
|
|
<div |
|
|
|
<div |
|
|
|
className={`bg-rangeFillBgColor h-3 rounded duration-500 w-72`} |
|
|
|
className={`bg-[#68A8E6] h-3 rounded duration-500 w-72`} |
|
|
|
></div> |
|
|
|
></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|