diff --git a/emulation/resources/3ds/Metroid - Samus Returns_l.png b/emulation/resources/3ds/Metroid - Samus Returns_l.png
index 0898cfe78..2ab1689e1 100644
Binary files a/emulation/resources/3ds/Metroid - Samus Returns_l.png and b/emulation/resources/3ds/Metroid - Samus Returns_l.png differ
diff --git a/emulation/resources/3ds/Metroid - Samus Returns_s.png b/emulation/resources/3ds/Metroid - Samus Returns_s.png
index 2027cbd7c..5c53b703c 100644
Binary files a/emulation/resources/3ds/Metroid - Samus Returns_s.png and b/emulation/resources/3ds/Metroid - Samus Returns_s.png differ
diff --git a/frontend/src/components/RomsDetail.vue b/frontend/src/components/RomDetails.vue
similarity index 83%
rename from frontend/src/components/RomsDetail.vue
rename to frontend/src/components/RomDetails.vue
index b32662ecc..2c9609b3d 100644
--- a/frontend/src/components/RomsDetail.vue
+++ b/frontend/src/components/RomDetails.vue
@@ -9,6 +9,8 @@ const matchedRoms = ref([])
const changing = ref(false)
const romNewName = ref(rom.value.filename)
const submitted = ref(false)
+const snackbarOK = ref(false)
+const snackbarKO = ref(false)
// Event listeners bus
const emitter = inject('emitter')
@@ -47,18 +49,26 @@ async function changeRom(newRomRaw) {
console.log("update "+rom.value.filename+" completed")
localStorage.setItem('currentRom', JSON.stringify(response.data.data))
rom.value = response.data.data
- }).catch((error) => {console.log(error)})
+ snackbarOK.value = true
+ }).catch((error) => {
+ console.log(error)
+ snackbarKO.value = true
+ })
changing.value = false
}
-async function submitEdit() {
+async function editRom() {
submitted.value = true
await axios.patch('/api/platforms/'+rom.value.p_slug+'/roms/'+rom.value.filename, {
filename: romNewName.value
}).then((response) => {
console.log("update "+rom.value.filename+" to "+romNewName.value)
rom.value.filename = romNewName.value
- }).catch((error) => {console.log(error)})
+ snackbarOK.value = true
+ }).catch((error) => {
+ console.log(error)
+ snackbarKO.value = true
+ })
}
@@ -121,10 +131,10 @@ async function submitEdit() {
-
-
-
- Submit
+
+
+
+ Apply
@@ -154,4 +164,18 @@ async function submitEdit() {
+
+
+ {{ rom.filename }} edited successfully!
+
+
+
+
+
+
+ Couldn't edit {{ rom.filename }}. Something went wrong...
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js
index 188d80b28..0f255f8d3 100644
--- a/frontend/src/router/index.js
+++ b/frontend/src/router/index.js
@@ -8,7 +8,7 @@ const routes = [
},
{
path: '/details',
- component: () => import('@/components/RomsDetail.vue')
+ component: () => import('@/components/RomDetails.vue')
}
]