feat(filter): allow dragging tasks in saved filter

Since migrating to views, this was already possible. This change only updates the API to make it actually work.

Resolves https://kolaente.dev/vikunja/vikunja/issues/1659
This commit is contained in:
kolaente 2025-01-20 17:51:48 +01:00
parent f25f983417
commit dbcd72fc40
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 4 deletions

View File

@ -50,13 +50,13 @@
v-model="tasks"
group="tasks"
handle=".handle"
:disabled="!canWrite"
:disabled="!canDragTasks"
item-key="id"
tag="ul"
:component-data="{
class: {
tasks: true,
'dragging-disabled': !canWrite || isAlphabeticalSorting
'dragging-disabled': !canDragTasks || isAlphabeticalSorting
},
type: 'transition-group'
}"
@ -68,13 +68,13 @@
<template #item="{element: t}">
<SingleTaskInProject
:show-list-color="false"
:disabled="!canWrite"
:disabled="!canDragTasks"
:can-mark-as-done="canWrite || isPseudoProject"
:the-task="t"
:all-tasks="allTasks"
@taskUpdated="updateTasks"
>
<template v-if="canWrite">
<template v-if="canDragTasks">
<span class="icon handle">
<Icon icon="grip-lines" />
</span>
@ -206,6 +206,8 @@ onMounted(async () => {
ctaVisible.value = true
})
const canDragTasks = computed(() => canWrite.value || isSavedFilter(project.value))
const addTaskRef = ref<typeof AddTask | null>(null)
function focusNewTaskInput() {