mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-10 09:02:20 +01:00
Fix scroll bug and add success/error messages
This commit is contained in:
@ -93,17 +93,22 @@
|
|||||||
</template>
|
</template>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#" v-if="song.can_move_up" v-on:click="move_down(queue[index-1].id)"><i
|
<div class="d-flex flex-column">
|
||||||
class="fa-solid fa-arrow-up"></i></a>
|
<div class="d-flex flex-row">
|
||||||
<a href="#" v-else class="invisible"><i class="fa-solid fa-arrow-up"></i></a>
|
<button v-if="song.can_move_up" v-on:click="move_down(queue[index-1].id)" class="btn btn-link"><i
|
||||||
|
class="fa-solid fa-arrow-up"></i></button>
|
||||||
|
<button v-else class="btn btn-link invisible"><i class="fa-solid fa-arrow-up"></i></button>
|
||||||
|
|
||||||
<a href="#" v-if="song.can_move_down" v-on:click="move_down(song.id)"><i
|
<button v-if="song.can_move_down" v-on:click="move_down(song.id)" class="btn btn-link"><i
|
||||||
class="fa-solid fa-arrow-down"></i></a>
|
class="fa-solid fa-arrow-down"></i></button>
|
||||||
<a href="#" v-else class="invisible"><i class="fa-solid fa-arrow-down"></i></a>
|
<button v-else class="btn btn-link invisible"><i class="fa-solid fa-arrow-down"></i></button>
|
||||||
|
</div>
|
||||||
<a href="#" v-if="song.can_delete" v-on:click="cancel_song(song.id)"><i
|
<div class="d-flex flex-row">
|
||||||
class="fa-solid fa-trash-can"></i></a>
|
<button v-if="song.can_delete" v-on:click="cancel_song(song.id)" class="btn btn-link"><i
|
||||||
<a href="#" v-else class="invisible"><i class="fa-solid fa-trash-can"></i></a>
|
class="fa-solid fa-trash-can"></i></button>
|
||||||
|
<button v-else class="btn btn-link invisible"><i class="fa-solid fa-trash-can"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
@ -352,7 +357,11 @@
|
|||||||
"Content-Type": 'application/json',
|
"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();
|
this.refresh();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -367,7 +376,11 @@
|
|||||||
"Content-Type": 'application/json',
|
"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();
|
this.refresh();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user