From c061d1c3044be52c59ce72aa436278bac9e21c05 Mon Sep 17 00:00:00 2001 From: Lars van Rhijn Date: Wed, 4 Oct 2023 20:21:43 +0200 Subject: [PATCH] Fix scroll bug and add success/error messages --- marietje/queues/templates/queues/queue.html | 37 ++++++++++++++------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/marietje/queues/templates/queues/queue.html b/marietje/queues/templates/queues/queue.html index be7c2ad..f9e857e 100644 --- a/marietje/queues/templates/queues/queue.html +++ b/marietje/queues/templates/queues/queue.html @@ -93,17 +93,22 @@ - - +
+
+ + - - - - - + + +
+
+ + +
+
@@ -352,7 +357,11 @@ "Content-Type": 'application/json', }, } - ).finally(() => { + ).then(() => { + tata.success("", "Removed song from the queue."); + }).catch(() => { + tata.error("", "An error occurred while removing the song, please try again."); + }).finally(() => { this.refresh(); }); }, @@ -367,7 +376,11 @@ "Content-Type": 'application/json', }, } - ).finally(() => { + ).then(() => { + tata.success("", "Song was moved successfully."); + }).catch(() => { + tata.error("", "An error occurred while moving the song, please try again."); + }).finally(() => { this.refresh(); }); }