diff --git a/frontend/src/components/Dialog/Rom/DeleteRom.vue b/frontend/src/components/Dialog/Rom/DeleteRom.vue
index 027d28df4..5b1706316 100644
--- a/frontend/src/components/Dialog/Rom/DeleteRom.vue
+++ b/frontend/src/components/Dialog/Rom/DeleteRom.vue
@@ -84,18 +84,19 @@ async function deleteRoms() {
- Deleting the following{{ roms.length }}games. Do you confirm?
+ Deleting the following
+ {{ roms.length }}
+ games. Do you confirm?
- {{ rom.r_name }} - [
- {{ rom.file_name }}
- ]{{ rom.r_name }} - [{{
+ rom.file_name
+ }}]
diff --git a/frontend/src/components/Game/Card/Cover.vue b/frontend/src/components/Game/Card/Cover.vue
index 986f5e035..bfa3fd6c2 100644
--- a/frontend/src/components/Game/Card/Cover.vue
+++ b/frontend/src/components/Game/Card/Cover.vue
@@ -1,21 +1,39 @@
{
a - b);
+
+ for (let i = startIndex; i <= endIndex; i++) {
+ const currentRom = filteredRoms.value[i];
+ if (!selectedRoms.value.includes(currentRom)) {
+ selectedRoms.value.push(currentRom);
+ } else if (isSelected) {
+ selectedRoms.value.splice(selectedRoms.value.indexOf(currentRom), 1);
+ }
+
+ if (i === endIndex) {
+ lastSelectedRom.value = currentRom;
+ }
+ }
+ } else if (!isSelected) {
+ selectedRoms.value.push(rom);
+
+ // Allows to select multiple roms with shift key
+ lastSelectedRom.value = rom;
+ } else {
+ selectedRoms.value.splice(selectedRoms.value.indexOf(rom), 1);
+ }
+}
+
onMounted(async () => {
fetchRoms(route.params.platform);
});
@@ -163,6 +194,7 @@ onBeforeUnmount(() => {
socket.off("scan:scanning_rom");
socket.off("scan:done");
socket.off("scan:done_ko");
+ romsStore.updateSelectedRoms([]);
});
onBeforeRouteUpdate(async (to, _) => {
@@ -171,6 +203,7 @@ onBeforeRouteUpdate(async (to, _) => {
roms.value = [];
searchRoms.value = [];
filteredRoms.value = [];
+ romsStore.updateSelectedRoms([]);
fetchRoms(to.params.platform);
});