Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

improve drag n drop on touch devices

Kha Nguyen35eec60ac9e2
diff --git a/apps/web/components/DashboardLinks.tsx b/apps/web/components/DashboardLinks.tsx
index 03d0250a..aa83106e 100644
--- a/apps/web/components/DashboardLinks.tsx
+++ b/apps/web/components/DashboardLinks.tsx
@@ -150,11 +150,10 @@ export function Card({ link, editMode, dashboardType }: Props) {
<span
{...listeners}
{...attributes}
- className="absolute z-50 opacity-0 top-3 left-2 group-hover:opacity-60 w-6 h-6 transition-opacity duration-200 cursor-grab p-1 rounded bg-base-100/80 group-hover:hover:opacity-100 inline-flex items-center justify-center"
+ className="absolute z-50 opacity-0 top-3 left-2 group-hover:opacity-60 w-8 h-8 transition-opacity duration-200 cursor-grab p-1 rounded bg-base-100/80 group-hover:hover:opacity-100 inline-flex items-center justify-center touch-none"
title="Drag to reorder"
>
- {/* <GripIcon className="h-4 w-4" /> */}
- <i className="bi-grip-vertical" />
+ <i className="bi-grip-vertical text-xl" />
</span>
<div
ref={ref}
diff --git a/apps/web/pages/dashboard.tsx b/apps/web/pages/dashboard.tsx
index d7696427..ab469c5a 100644
--- a/apps/web/pages/dashboard.tsx
+++ b/apps/web/pages/dashboard.tsx
@@ -126,8 +126,8 @@ export default function Dashboard() {
return (
<div className="w-60 border border-solid border-neutral-content bg-base-200 rounded-xl shadow-lg relative">
- <span className="absolute z-50 top-3 left-2 w-6 h-6 p-1 rounded bg-base-100/80 inline-flex items-center justify-center">
- <i className="bi-grip-vertical" />
+ <span className="absolute z-50 top-3 left-2 w-8 h-8 p-1 rounded bg-base-100/80 inline-flex items-center justify-center">
+ <i className="bi-grip-vertical text-xl" />
</span>
<Card link={linkToRender} />
</div>
@@ -246,7 +246,7 @@ export default function Dashboard() {
});
}
- const load = toast.loading(t("moving"));
+ const load = toast.loading(t("updating"));
await updateLink.mutateAsync(updatedLink, {
onSettled: (_, error) => {
toast.dismiss(load);
@@ -379,6 +379,7 @@ const Section = ({
collectionLinks,
setNewLinkModal,
}: SectionProps) => {
+ console.log("links", links);
switch (sectionData.type) {
case DashboardSectionType.STATS:
return (