From db295f97e988cb2197b73dacb41ee784777e3783 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Tue, 24 Oct 2023 08:53:55 +0200 Subject: [PATCH] Re-enable items dragging --- package.json | 1 + resources/js_vue3/views/Accounts.vue | 159 ++++++++++++++------------- 2 files changed, 86 insertions(+), 74 deletions(-) diff --git a/package.json b/package.json index 5d077bda..9356e949 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "unplugin-auto-import": "^0.16.6", "vite": "^4.4.9", "vue": "^3.3.4", + "vue-draggable-plus": "^0.2.6", "vue-router": "^4.2.4" } } diff --git a/resources/js_vue3/views/Accounts.vue b/resources/js_vue3/views/Accounts.vue index 248b1de8..464878ab 100644 --- a/resources/js_vue3/views/Accounts.vue +++ b/resources/js_vue3/views/Accounts.vue @@ -17,6 +17,7 @@ import { useGroups } from '@/stores/groups' import { useAppSettingsStore } from '@/stores/appSettings' import { useDisplayablePassword } from '@/composables/helpers' + import { vDraggable } from 'vue-draggable-plus' const $2fauth = inject('2fauth') const notify = useNotifyStore() @@ -141,6 +142,22 @@ } }) } + + /** + * Dragging start + */ + function onStart() { + isDragging.value = true + } + + /** + * Dragging end + */ + function onEnd() { + isDragging.value = false + twofaccounts.saveOrder() + } +