mirror of
https://github.com/D4M13N-D3V/neroshitron.git
synced 2025-03-14 10:05:04 +00:00
cleanup
This commit is contained in:
parent
ca13aa4ae9
commit
b8146d70a0
components/ui
supabase/volumes/db/data
PG_VERSION
base/1
11211312471247_fsm1247_vm12491249_fsm1249_vm12551255_fsm1255_vm12591259_fsm1259_vm1333913339_fsm13339_vm13342133431334413344_fsm13344_vm13347133481334913349_fsm13349_vm13352133531335413354_fsm13354_vm133571335814171418174175218722242228232823362337257926002600_fsm2600_vm26012601_fsm2601_vm26022602_fsm2602_vm26032603_fsm2603_vm260426052605_fsm2605_vm26062606_fsm2606_vm26072607_fsm2607_vm26082608_fsm2608_vm26092609_fsm2609_vm26102610_fsm2610_vm261126122612_fsm2612_vm261326152615_fsm2615_vm26162616_fsm2616_vm26172617_fsm2617_vm26182618_fsm2618_vm26192619_fsm2619_vm26202650
@ -1,5 +1,6 @@
|
|||||||
import { use, useState } from 'react';
|
import { use, useState } from 'react';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
import { render } from 'react-dom';
|
||||||
import Masonry from 'react-masonry-css';
|
import Masonry from 'react-masonry-css';
|
||||||
|
|
||||||
interface GalleryProps {
|
interface GalleryProps {
|
||||||
@ -29,6 +30,29 @@ const Gallery = ({ id, closeMenu }: GalleryProps) => {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const renderButtons = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="z-10 fixed left-6 bottom-4 w-96 h-32 bg-purple-900 bg-opacity-10 flex justify-center h-16 animate-in rounded-3xl" style={{ backdropFilter: 'blur(10px)' }}>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
className={`fixed left-40 bottom-5 text-center w-56 animate-in animate-once animate-duration-1000 animate-ease-out animate-reverse mb-4 py-2 px-4 rounded-lg no-underline flex items-center z-50 ${!selectedImage ? 'opacity-50 cursor-not-allowed bg-gray-800' : 'bg-neroshi-blue-800'}`}
|
||||||
|
onClick={() => selectedImage && handleDownload(selectedImage)}
|
||||||
|
disabled={!selectedImage}
|
||||||
|
>
|
||||||
|
Download Current Image
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className={`fixed left-40 bottom-16 w-56 text-center animate-in animate-once animate-duration-1000 animate-ease-out animate-reverse mb-4 py-2 px-4 rounded-lg no-underline flex items-center z-50 ${!selectedImage ? 'opacity-50 cursor-not-allowed bg-gray-800' : 'bg-neroshi-blue-800'}`}
|
||||||
|
onClick={() => selectedImage && open()}
|
||||||
|
disabled={!selectedImage}
|
||||||
|
>
|
||||||
|
Open Image in New Tab
|
||||||
|
</button>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
const handleDownload = (image: string) => {
|
const handleDownload = (image: string) => {
|
||||||
const link = document.createElement('a');
|
const link = document.createElement('a');
|
||||||
link.href = image;
|
link.href = image;
|
||||||
@ -67,7 +91,7 @@ const Gallery = ({ id, closeMenu }: GalleryProps) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<button
|
<button
|
||||||
className="fixed bg-purple-800 left-10 bottom-5 animate-ping animate-once animate-duration-1000 animate-ease-out animate-reverse mb-4 py-2 px-4 rounded-lg no-underline flex items-center z-50"
|
className="fixed bg-purple-800 left-10 bottom-5 animate-in animate-once animate-duration-1000 animate-ease-out animate-reverse mb-4 py-2 px-4 rounded-lg no-underline flex items-center z-50"
|
||||||
onClick={()=> closeMenu()}
|
onClick={()=> closeMenu()}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
@ -90,56 +114,34 @@ const Gallery = ({ id, closeMenu }: GalleryProps) => {
|
|||||||
|
|
||||||
<div className='z-10 pt-10' style={{ display: selectedImage ? 'flex' : 'block', alignItems: 'flex-start' }}>
|
<div className='z-10 pt-10' style={{ display: selectedImage ? 'flex' : 'block', alignItems: 'flex-start' }}>
|
||||||
{isSingle ? (
|
{isSingle ? (
|
||||||
<div className='w-full h-full flex items-center'>
|
<div className='w-full h-full flex items-center'>
|
||||||
{selectedImage &&
|
<>
|
||||||
<>
|
|
||||||
|
|
||||||
<button
|
|
||||||
className="fixed bg-neroshi-blue-800 left-40 bottom-5 text-center w-56 animate-ping animate-once animate-duration-1000 animate-ease-out animate-reverse mb-4 py-2 px-4 rounded-lg no-underline flex items-center z-50"
|
|
||||||
onClick={() => handleDownload(selectedImage)}
|
|
||||||
>
|
|
||||||
Download Current Image
|
|
||||||
</button><button
|
|
||||||
className="fixed bg-neroshi-blue-800 left-40 bottom-16 w-56 text-center animate-ping animate-once animate-duration-1000 animate-ease-out animate-reverse mb-4 py-2 px-4 rounded-lg no-underline flex items-center z-50"
|
|
||||||
onClick={() => open()}
|
|
||||||
>
|
|
||||||
Open Image in New Tab
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<img
|
|
||||||
src={selectedImage}
|
|
||||||
style={{ objectFit: 'contain' }}
|
|
||||||
className="cursor-pointer animate-in w-full h-auto"
|
|
||||||
onClick={() => setSelectedImage(null)}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
{selectedImage &&
|
{selectedImage &&
|
||||||
<>
|
|
||||||
|
|
||||||
<img
|
<img
|
||||||
src={selectedImage}
|
src={selectedImage}
|
||||||
style={{ objectFit: 'contain' }}
|
style={{ objectFit: 'contain' }}
|
||||||
key={generateRandomString(3)}
|
className="cursor-pointer animate-in w-full h-auto"
|
||||||
className="cursor-pointer animate-in w-4/6 pr-20 h-auto animate-ping animate-once animate-duration-1000 animate-ease-out animate-reverse"
|
|
||||||
onClick={() => setSelectedImage(null)}
|
onClick={() => setSelectedImage(null)}
|
||||||
/>
|
/>
|
||||||
<button
|
|
||||||
className="fixed bg-neroshi-blue-800 left-40 bottom-5 text-center w-56 animate-ping animate-once animate-duration-1000 animate-ease-out animate-reverse mb-4 py-2 px-4 rounded-lg no-underline flex items-center z-50"
|
|
||||||
onClick={() => handleDownload(selectedImage)}
|
|
||||||
>
|
|
||||||
Download Current Image
|
|
||||||
</button><button
|
|
||||||
className="fixed bg-neroshi-blue-800 left-40 bottom-16 w-56 text-center animate-ping animate-once animate-duration-1000 animate-ease-out animate-reverse mb-4 py-2 px-4 rounded-lg no-underline flex items-center z-50"
|
|
||||||
onClick={() => open()}
|
|
||||||
>
|
|
||||||
Open Image in New Tab
|
|
||||||
</button>
|
|
||||||
</>
|
|
||||||
}
|
}
|
||||||
|
{renderButtons()}
|
||||||
|
</>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<div className='w-full h-full flex items-center'>
|
||||||
|
<>
|
||||||
|
{renderButtons()}
|
||||||
|
{selectedImage &&
|
||||||
|
<img
|
||||||
|
src={selectedImage}
|
||||||
|
style={{ objectFit: 'contain' }}
|
||||||
|
className="cursor-pointer animate-in w-full h-auto"
|
||||||
|
onClick={() => setSelectedImage(null)}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
</>
|
||||||
|
</div>
|
||||||
<Masonry
|
<Masonry
|
||||||
breakpointCols={selectedImage==null ? 4 : 2}
|
breakpointCols={selectedImage==null ? 4 : 2}
|
||||||
className="my-masonry-grid"
|
className="my-masonry-grid"
|
||||||
@ -150,7 +152,7 @@ const Gallery = ({ id, closeMenu }: GalleryProps) => {
|
|||||||
key={generateRandomString(3)}
|
key={generateRandomString(3)}
|
||||||
src={image}
|
src={image}
|
||||||
onClick={() => handleClick(image)}
|
onClick={() => handleClick(image)}
|
||||||
className={`animate-ping animate-once animate-duration-1000 animate-ease-out animate-reverse hover:scale-105 p-2 cursor-pointer my-2 transition-all opacity-100 duration-500 ease-in-out transform`}
|
className={`animate-in animate-once animate-duration-1000 animate-ease-out animate-reverse hover:scale-105 p-2 cursor-pointer my-2 transition-all opacity-100 duration-500 ease-in-out transform`}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Masonry>
|
</Masonry>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
15
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user