- {{ rom.name }}
+ {{ rom.r_name }}
{{ rom.file_name }}
{{ rom.p_slug }}
{{ rom.file_size }} {{ rom.file_size_units }}
diff --git a/frontend/src/views/Details.vue b/frontend/src/views/Details.vue
index d0dfd0104..8ef0c44d1 100644
--- a/frontend/src/views/Details.vue
+++ b/frontend/src/views/Details.vue
@@ -24,11 +24,13 @@ const dialogSearchRom = ref(false)
const dialogEditRom = ref(false)
const dialogDeleteRom = ref(false)
const deleteFromFs = ref(false)
-
const filesToDownload = ref([])
const tab = ref('info')
const { xs, sm, mdAndUp } = useDisplay()
+// Event listeners bus
+const emitter = inject('emitter')
+
// Functions
async function searchRomIGDB() {
searching.value = true
@@ -45,7 +47,7 @@ async function updateRom(updatedRom=Object.assign({},rom.value), newName=rom.val
updating.value = true
dialogSearchRom.value = false
if (renameAsIGDB.value) {
- updatedRom.file_name = rom.value.file_name.replace(rom.value.file_name_no_tags.trim(), updatedRom.name)
+ updatedRom.file_name = rom.value.file_name.replace(rom.value.file_name_no_tags.trim(), updatedRom.r_name)
editedRomName.value = updatedRom.file_name
renameAsIGDB.value = false
}
@@ -58,6 +60,7 @@ async function updateRom(updatedRom=Object.assign({},rom.value), newName=rom.val
}).then((response) => {
emitter.emit('snackbarScan', {'msg': rom.value.file_name+" updated successfully!", 'icon': 'mdi-check-bold', 'color': 'green'})
rom.value = response.data.data
+ router.push('/'+rom.value.p_slug+'/roms/'+rom.value.file_name)
}).catch((error) => {
console.log(error)
emitter.emit('snackbarScan', {'msg': "Couldn't updated "+rom.value.file_name+". Something went wrong...", 'icon': 'mdi-close-circle', 'color': 'red'})
@@ -153,14 +156,14 @@ onMounted(() => {