From d24b6fa9af403ba0f47a0c396e1771b7b2ad8364 Mon Sep 17 00:00:00 2001 From: Jannik Streidl Date: Tue, 27 Feb 2024 15:05:38 +0100 Subject: [PATCH 1/3] link fix --- src/lib/components/layout/Sidebar.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index e0965b08..6edc7788 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -372,6 +372,7 @@ ? 'bg-gray-900' : ''} transition whitespace-nowrap text-ellipsis" href="/c/{chat.id}" + draggable="false" >
Date: Tue, 27 Feb 2024 15:34:00 +0100 Subject: [PATCH 2/3] keep the functionality to drag a chat --- src/lib/components/layout/Sidebar.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 6edc7788..499e0db0 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -31,6 +31,7 @@ let chatTitle = ''; let showDropdown = false; + let isEditing = false; onMount(async () => { if (window.innerWidth > 1280) { @@ -372,7 +373,7 @@ ? 'bg-gray-900' : ''} transition whitespace-nowrap text-ellipsis" href="/c/{chat.id}" - draggable="false" + draggable={isEditing ? 'false' : null} >
{ chatTitle = chat.title; chatTitleEditId = chat.id; - // editChatTitle(chat.id, 'a'); + isEditing = true; }} > Date: Tue, 27 Feb 2024 16:00:58 +0100 Subject: [PATCH 3/3] more readable --- src/lib/components/layout/Sidebar.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 499e0db0..f9d87e5d 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -373,7 +373,7 @@ ? 'bg-gray-900' : ''} transition whitespace-nowrap text-ellipsis" href="/c/{chat.id}" - draggable={isEditing ? 'false' : null} + draggable={isEditing ? 'false' : 'true'} >