changed icons from text svg to file
							
								
								
									
										
											BIN
										
									
								
								public/favicon-old.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 15 KiB | 
| Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.2 KiB | 
							
								
								
									
										4
									
								
								public/icons/copy.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,4 @@ | |||||||
|  | <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> | ||||||
|  | <svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path d="M8 5.00005C7.01165 5.00082 6.49359 5.01338 6.09202 5.21799C5.71569 5.40973 5.40973 5.71569 5.21799 6.09202C5 6.51984 5 7.07989 5 8.2V17.8C5 18.9201 5 19.4802 5.21799 19.908C5.40973 20.2843 5.71569 20.5903 6.09202 20.782C6.51984 21 7.07989 21 8.2 21H15.8C16.9201 21 17.4802 21 17.908 20.782C18.2843 20.5903 18.5903 20.2843 18.782 19.908C19 19.4802 19 18.9201 19 17.8V8.2C19 7.07989 19 6.51984 18.782 6.09202C18.5903 5.71569 18.2843 5.40973 17.908 5.21799C17.5064 5.01338 16.9884 5.00082 16 5.00005M8 5.00005V7H16V5.00005M8 5.00005V4.70711C8 4.25435 8.17986 3.82014 8.5 3.5C8.82014 3.17986 9.25435 3 9.70711 3H14.2929C14.7456 3 15.1799 3.17986 15.5 3.5C15.8201 3.82014 16 4.25435 16 4.70711V5.00005M15 12H12M15 16H12M9 12H9.01M9 16H9.01" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 1.0 KiB | 
							
								
								
									
										4
									
								
								public/icons/delete.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,4 @@ | |||||||
|  | <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> | ||||||
|  | <svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path d="M18 6L17.1991 18.0129C17.129 19.065 17.0939 19.5911 16.8667 19.99C16.6666 20.3412 16.3648 20.6235 16.0011 20.7998C15.588 21 15.0607 21 14.0062 21H9.99377C8.93927 21 8.41202 21 7.99889 20.7998C7.63517 20.6235 7.33339 20.3412 7.13332 19.99C6.90607 19.5911 6.871 19.065 6.80086 18.0129L6 6M4 6H20M16 6L15.7294 5.18807C15.4671 4.40125 15.3359 4.00784 15.0927 3.71698C14.8779 3.46013 14.6021 3.26132 14.2905 3.13878C13.9376 3 13.523 3 12.6936 3H11.3064C10.477 3 10.0624 3 9.70951 3.13878C9.39792 3.26132 9.12208 3.46013 8.90729 3.71698C8.66405 4.00784 8.53292 4.40125 8.27064 5.18807L8 6M14 10V17M10 10V17" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 921 B | 
							
								
								
									
										4
									
								
								public/icons/download.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,4 @@ | |||||||
|  | <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> | ||||||
|  | <svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path d="M17 17H17.01M17.4 14H18C18.9319 14 19.3978 14 19.7654 14.1522C20.2554 14.3552 20.6448 14.7446 20.8478 15.2346C21 15.6022 21 16.0681 21 17C21 17.9319 21 18.3978 20.8478 18.7654C20.6448 19.2554 20.2554 19.6448 19.7654 19.8478C19.3978 20 18.9319 20 18 20H6C5.06812 20 4.60218 20 4.23463 19.8478C3.74458 19.6448 3.35523 19.2554 3.15224 18.7654C3 18.3978 3 17.9319 3 17C3 16.0681 3 15.6022 3.15224 15.2346C3.35523 14.7446 3.74458 14.3552 4.23463 14.1522C4.60218 14 5.06812 14 6 14H6.6M12 15V4M12 15L9 12M12 15L15 12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 831 B | 
							
								
								
									
										4
									
								
								public/icons/files/archive.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,4 @@ | |||||||
|  | <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> | ||||||
|  | <svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path d="M9 14H15M4.6 10H19.4C19.9601 10 20.2401 10 20.454 9.89101C20.6422 9.79513 20.7951 9.64215 20.891 9.45399C21 9.24008 21 8.96005 21 8.4V5.6C21 5.03995 21 4.75992 20.891 4.54601C20.7951 4.35785 20.6422 4.20487 20.454 4.10899C20.2401 4 19.9601 4 19.4 4H4.6C4.03995 4 3.75992 4 3.54601 4.10899C3.35785 4.20487 3.20487 4.35785 3.10899 4.54601C3 4.75992 3 5.03995 3 5.6V8.4C3 8.96005 3 9.24008 3.10899 9.45399C3.20487 9.64215 3.35785 9.79513 3.54601 9.89101C3.75992 10 4.03995 10 4.6 10ZM5 10H19V16.8C19 17.9201 19 18.4802 18.782 18.908C18.5903 19.2843 18.2843 19.5903 17.908 19.782C17.4802 20 16.9201 20 15.8 20H8.2C7.07989 20 6.51984 20 6.09202 19.782C5.71569 19.5903 5.40973 19.2843 5.21799 18.908C5 18.4802 5 17.9201 5 16.8V10Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 1.0 KiB | 
							
								
								
									
										4
									
								
								public/icons/files/code.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,4 @@ | |||||||
|  | <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> | ||||||
|  | <svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path d="M7 8L3 11.6923L7 16M17 8L21 11.6923L17 16M14 4L10 20" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 373 B | 
							
								
								
									
										4
									
								
								public/icons/files/text-file.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,4 @@ | |||||||
|  | <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> | ||||||
|  | <svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path d="M9 17H15M9 13H15M9 9H10M13 3H8.2C7.0799 3 6.51984 3 6.09202 3.21799C5.71569 3.40973 5.40973 3.71569 5.21799 4.09202C5 4.51984 5 5.0799 5 6.2V17.8C5 18.9201 5 19.4802 5.21799 19.908C5.40973 20.2843 5.71569 20.5903 6.09202 20.782C6.51984 21 7.0799 21 8.2 21H15.8C16.9201 21 17.4802 21 17.908 20.782C18.2843 20.5903 18.5903 20.2843 18.782 19.908C19 19.4802 19 18.9201 19 17.8V9M13 3L19 9M13 3V7.4C13 7.96005 13 8.24008 13.109 8.45399C13.2049 8.64215 13.3578 8.79513 13.546 8.89101C13.7599 9 14.0399 9 14.6 9H19" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 828 B | 
							
								
								
									
										4
									
								
								public/icons/home.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,4 @@ | |||||||
|  | <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> | ||||||
|  | <svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||||||
|  | <path d="M14 21.0001V15.0001H10V21.0001M19 9.77818V16.2001C19 17.8802 19 18.7203 18.673 19.362C18.3854 19.9265 17.9265 20.3855 17.362 20.6731C16.7202 21.0001 15.8802 21.0001 14.2 21.0001H9.8C8.11984 21.0001 7.27976 21.0001 6.63803 20.6731C6.07354 20.3855 5.6146 19.9265 5.32698 19.362C5 18.7203 5 17.8802 5 16.2001V9.77753M21 12.0001L15.5668 5.96405C14.3311 4.59129 13.7133 3.9049 12.9856 3.65151C12.3466 3.42894 11.651 3.42899 11.0119 3.65165C10.2843 3.90516 9.66661 4.59163 8.43114 5.96458L3 12.0001" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||||||
|  | </svg> | ||||||
| After Width: | Height: | Size: 813 B | 
| @ -26,20 +26,7 @@ export function FileActionsContainer({ | |||||||
|         onClick={() => handleDownload(fileId, fileName)} |         onClick={() => handleDownload(fileId, fileName)} | ||||||
|         className="flex items-center justify-center rounded-full bg-blue-500 p-2 hover:bg-blue-600" |         className="flex items-center justify-center rounded-full bg-blue-500 p-2 hover:bg-blue-600" | ||||||
|       > |       > | ||||||
|         <svg |         <img src="/icons/download.svg" alt="Download" className="w-6 h-6" /> | ||||||
|           xmlns="http://www.w3.org/2000/svg" |  | ||||||
|           fill="none" |  | ||||||
|           viewBox="0 0 24 24" |  | ||||||
|           strokeWidth={2} |  | ||||||
|           stroke="currentColor" |  | ||||||
|           className="h-5 w-5 text-white" |  | ||||||
|         > |  | ||||||
|           <path |  | ||||||
|             strokeLinecap="round" |  | ||||||
|             strokeLinejoin="round" |  | ||||||
|             d="M4 16v2a2 2 0 002 2h12a2 2 0 002-2v-2M7 10l5 5m0 0l5-5m-5 5V3" |  | ||||||
|           /> |  | ||||||
|         </svg> |  | ||||||
|       </button> |       </button> | ||||||
| 
 | 
 | ||||||
|       {/* Copy URL Button */} |       {/* Copy URL Button */} | ||||||
| @ -47,20 +34,7 @@ export function FileActionsContainer({ | |||||||
|         onClick={() => handleCopyUrl(fileUrl)} |         onClick={() => handleCopyUrl(fileUrl)} | ||||||
|         className="flex items-center justify-center rounded-full bg-green-500 p-2 hover:bg-green-600" |         className="flex items-center justify-center rounded-full bg-green-500 p-2 hover:bg-green-600" | ||||||
|       > |       > | ||||||
|         <svg |         <img src="/icons/copy.svg" alt="Copy URL" className="w-6 h-6" /> | ||||||
|           xmlns="http://www.w3.org/2000/svg" |  | ||||||
|           fill="none" |  | ||||||
|           viewBox="0 0 24 24" |  | ||||||
|           strokeWidth={2} |  | ||||||
|           stroke="currentColor" |  | ||||||
|           className="h-5 w-5 text-white" |  | ||||||
|         > |  | ||||||
|           <path |  | ||||||
|             strokeLinecap="round" |  | ||||||
|             strokeLinejoin="round" |  | ||||||
|             d="M8 9h8m-6 4h4m-7 8h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v12a2 2 0 002 2z" |  | ||||||
|           /> |  | ||||||
|         </svg> |  | ||||||
|       </button> |       </button> | ||||||
| 
 | 
 | ||||||
|       {/* Remove Button */} |       {/* Remove Button */} | ||||||
| @ -68,20 +42,7 @@ export function FileActionsContainer({ | |||||||
|         onClick={() => handleRemove(fileId)} |         onClick={() => handleRemove(fileId)} | ||||||
|         className="flex items-center justify-center rounded-full bg-red-500 p-2 hover:bg-red-600" |         className="flex items-center justify-center rounded-full bg-red-500 p-2 hover:bg-red-600" | ||||||
|       > |       > | ||||||
|         <svg |         <img src="/icons/delete.svg" alt="Remove" className="w-6 h-6" /> | ||||||
|           xmlns="http://www.w3.org/2000/svg" |  | ||||||
|           fill="none" |  | ||||||
|           viewBox="0 0 24 24" |  | ||||||
|           strokeWidth={2} |  | ||||||
|           stroke="currentColor" |  | ||||||
|           className="h-5 w-5 text-white" |  | ||||||
|         > |  | ||||||
|           <path |  | ||||||
|             strokeLinecap="round" |  | ||||||
|             strokeLinejoin="round" |  | ||||||
|             d="M6 18L18 6M6 6l12 12" |  | ||||||
|           /> |  | ||||||
|         </svg> |  | ||||||
|       </button> |       </button> | ||||||
|     </div> |     </div> | ||||||
|   ); |   ); | ||||||
| @ -89,13 +50,13 @@ export function FileActionsContainer({ | |||||||
| 
 | 
 | ||||||
| export function FileDescriptionContainer({ | export function FileDescriptionContainer({ | ||||||
|   fileId, |   fileId, | ||||||
|   fileDescriprtion, |   fileDescription, | ||||||
| }: { | }: { | ||||||
|   fileId: string; |   fileId: string; | ||||||
|   fileDescriprtion?: string; |   fileDescription?: string; | ||||||
| }) { | }) { | ||||||
| 
 | 
 | ||||||
|   const [description, setDescription] = useState(fileDescriprtion || ""); // Add state for description
 |   const [description, setDescription] = useState(fileDescription || ""); // Add state for description
 | ||||||
|   const { handleDescriptionChange } = useFileActions(() => {}, (description: string) => { |   const { handleDescriptionChange } = useFileActions(() => {}, (description: string) => { | ||||||
|     setDescription(description); |     setDescription(description); | ||||||
|     return undefined; |     return undefined; | ||||||
|  | |||||||
| @ -6,6 +6,7 @@ import { useRouter } from "next/navigation"; | |||||||
| import { env } from "~/env.js"; | import { env } from "~/env.js"; | ||||||
| import { FilePreview } from "~/app/_components/FilePreview"; | import { FilePreview } from "~/app/_components/FilePreview"; | ||||||
| import { useFileActions } from "~/app/_components/FileActions"; | import { useFileActions } from "~/app/_components/FileActions"; | ||||||
|  | import { FileActionsContainer } from "./ActionButtons"; | ||||||
| 
 | 
 | ||||||
| interface FileDetails { | interface FileDetails { | ||||||
|   id: string; |   id: string; | ||||||
| @ -13,6 +14,7 @@ interface FileDetails { | |||||||
|   url: string; |   url: string; | ||||||
|   description: string; |   description: string; | ||||||
|   extension: string; |   extension: string; | ||||||
|  |   isOwner: boolean; // Indicates if the user owns the file
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| interface FileGridProps { | interface FileGridProps { | ||||||
| @ -110,68 +112,12 @@ export default function FileGrid({ session }: FileGridProps) { | |||||||
|              |              | ||||||
| 
 | 
 | ||||||
|             <div className="flex self-center gap-2"> |             <div className="flex self-center gap-2"> | ||||||
|               {/* Download Button */} |               <FileActionsContainer | ||||||
|               <button |                 fileId={file.id} | ||||||
|                 onClick={() => handleDownload(file.id, file.name)} |                 fileName={file.name} | ||||||
|                 className="flex items-center justify-center rounded-full bg-blue-500 p-2 hover:bg-blue-600" |                 fileUrl={file.url} | ||||||
|               > |                 isOwner={file.isOwner} | ||||||
|                 <svg |               /> | ||||||
|                   xmlns="http://www.w3.org/2000/svg" |  | ||||||
|                   fill="none" |  | ||||||
|                   viewBox="0 0 24 24" |  | ||||||
|                   strokeWidth={2} |  | ||||||
|                   stroke="currentColor" |  | ||||||
|                   className="h-5 w-5 text-white" |  | ||||||
|                 > |  | ||||||
|                   <path |  | ||||||
|                     strokeLinecap="round" |  | ||||||
|                     strokeLinejoin="round" |  | ||||||
|                     d="M4 16v2a2 2 0 002 2h12a2 2 0 002-2v-2M7 10l5 5m0 0l5-5m-5 5V3" |  | ||||||
|                   /> |  | ||||||
|                 </svg> |  | ||||||
|               </button> |  | ||||||
| 
 |  | ||||||
|               {/* Copy URL Button */} |  | ||||||
|               <button |  | ||||||
|                 onClick={() => handleCopyUrl(file.url)} |  | ||||||
|                 className="flex items-center justify-center rounded-full bg-green-500 p-2 hover:bg-green-600" |  | ||||||
|               > |  | ||||||
|                 <svg |  | ||||||
|                   xmlns="http://www.w3.org/2000/svg" |  | ||||||
|                   fill="none" |  | ||||||
|                   viewBox="0 0 24 24" |  | ||||||
|                   strokeWidth={2} |  | ||||||
|                   stroke="currentColor" |  | ||||||
|                   className="h-5 w-5 text-white" |  | ||||||
|                 > |  | ||||||
|                   <path |  | ||||||
|                     strokeLinecap="round" |  | ||||||
|                     strokeLinejoin="round" |  | ||||||
|                     d="M8 9h8m-6 4h4m-7 8h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v12a2 2 0 002 2z" |  | ||||||
|                   /> |  | ||||||
|                 </svg> |  | ||||||
|               </button> |  | ||||||
| 
 |  | ||||||
|               {/* Remove Button */} |  | ||||||
|               <button |  | ||||||
|                 onClick={() => handleRemove(file.id)} |  | ||||||
|                 className="flex items-center justify-center rounded-full bg-red-500 p-2 hover:bg-red-600" |  | ||||||
|               > |  | ||||||
|                 <svg |  | ||||||
|                   xmlns="http://www.w3.org/2000/svg" |  | ||||||
|                   fill="none" |  | ||||||
|                   viewBox="0 0 24 24" |  | ||||||
|                   strokeWidth={2} |  | ||||||
|                   stroke="currentColor" |  | ||||||
|                   className="h-5 w-5 text-white" |  | ||||||
|                 > |  | ||||||
|                   <path |  | ||||||
|                     strokeLinecap="round" |  | ||||||
|                     strokeLinejoin="round" |  | ||||||
|                     d="M6 18L18 6M6 6l12 12" |  | ||||||
|                   /> |  | ||||||
|                 </svg> |  | ||||||
|               </button> |  | ||||||
|             </div> |             </div> | ||||||
|           </div> |           </div> | ||||||
|         ); |         ); | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ export function HomeButton() { | |||||||
|       onClick={() => (window.location.href = "/")} |       onClick={() => (window.location.href = "/")} | ||||||
|       className="rounded-full bg-white/10 px-4 py-2 font-semibold hover:bg-white/20" |       className="rounded-full bg-white/10 px-4 py-2 font-semibold hover:bg-white/20" | ||||||
|     > |     > | ||||||
|       Home |       <img src="/icons/home.svg" alt="Home" className="w-6 h-6" /> | ||||||
|     </button> |     </button> | ||||||
|   ); |   ); | ||||||
| } | } | ||||||