mirror of
https://github.com/ClipFusion-org/clipfusion.git
synced 2025-08-07 19:44:20 +00:00
some swipe to delete little changes
This commit is contained in:
parent
b5f6a1ee8c
commit
453aef5bfa
@ -441,7 +441,7 @@ const ProjectContainer = ({
|
||||
<div className="absolute bottom-0 left-0 p-2 w-[85%] flex flex-col" data-selectable="true" >
|
||||
<h3 className="text-sm sm:text-sm md:text-md lg:text-lg font-semibold line-clamp-1" data-selectable="true">{project.title}</h3>
|
||||
{project.description && <p className="text-sm text-secondary-foreground line-clamp-1" data-selectable="true">{project.description}</p>}
|
||||
{project.editDate && <p className="text-sm text-secondary-foreground" data-selectable="true">Last Edit Date: {date.toLocaleDateString()}, {date.toLocaleTimeString([], { timeStyle: "short" })}</p>}
|
||||
{project.editDate && <time dateTime={date.toISOString()} className="text-sm text-secondary-foreground" data-selectable="true">Last Edit Date: {date.toLocaleDateString()}, {date.toLocaleTimeString([], { timeStyle: "short" })}</time>}
|
||||
</div>
|
||||
</div>
|
||||
</LinkComponent>
|
||||
|
@ -141,10 +141,10 @@ const SwipeToDelete: FC<SwipeToDeleteProps> = ({
|
||||
text.current?.classList.add('ios-ease');
|
||||
const textWidth = text.current ? text.current.getBoundingClientRect().width : 0;
|
||||
if (((velocity < 0 && Math.abs(velocity) > 10) || dragX < -textWidth * 1.5 && velocity > 0) && text.current) {
|
||||
if (velocity < -10) {
|
||||
setDragX(-textWidth * 1.5);
|
||||
} else {
|
||||
if (velocity > window.innerWidth * 0.15) {
|
||||
setDragX(0);
|
||||
} else {
|
||||
setDragX(-textWidth * 1.5);
|
||||
}
|
||||
} else if (allowOverscroll && dragX > 0 && velocity > 0) {
|
||||
setDragX(0);
|
||||
|
Loading…
Reference in New Issue
Block a user