diff --git a/emulation/3ds/roms/pokemon moon.3ds b/emulation/3ds/roms/pokemon moon.3ds new file mode 100644 index 000000000..e69de29bb diff --git a/emulation/3ds/roms/pokemon sun.3ds b/emulation/3ds/roms/pokemon sun.3ds new file mode 100644 index 000000000..e69de29bb diff --git a/emulation/nes/roms/castlevania.nes b/emulation/nes/roms/castlevania.nes new file mode 100644 index 000000000..e69de29bb diff --git a/emulation/resources/3ds/Metroid - Samus Returns_l.png b/emulation/resources/3ds/Metroid - Samus Returns_l.png index 2ab1689e1..0898cfe78 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 5c53b703c..2027cbd7c 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/emulation/resources/3ds/pokemon moon_l.png b/emulation/resources/3ds/pokemon moon_l.png new file mode 100644 index 000000000..ba7b9d506 Binary files /dev/null and b/emulation/resources/3ds/pokemon moon_l.png differ diff --git a/emulation/resources/3ds/pokemon moon_s.png b/emulation/resources/3ds/pokemon moon_s.png new file mode 100644 index 000000000..e9335c86b Binary files /dev/null and b/emulation/resources/3ds/pokemon moon_s.png differ diff --git a/emulation/resources/3ds/pokemon sun_l.png b/emulation/resources/3ds/pokemon sun_l.png new file mode 100644 index 000000000..99d4084cc Binary files /dev/null and b/emulation/resources/3ds/pokemon sun_l.png differ diff --git a/emulation/resources/3ds/pokemon sun_s.png b/emulation/resources/3ds/pokemon sun_s.png new file mode 100644 index 000000000..ff6a77601 Binary files /dev/null and b/emulation/resources/3ds/pokemon sun_s.png differ diff --git a/emulation/resources/gba/castlevania - aria of sorrow_l.png b/emulation/resources/gba/castlevania - aria of sorrow_l.png index 0b506e2e7..9050e6ab6 100644 Binary files a/emulation/resources/gba/castlevania - aria of sorrow_l.png and b/emulation/resources/gba/castlevania - aria of sorrow_l.png differ diff --git a/emulation/resources/gba/castlevania - aria of sorrow_s.png b/emulation/resources/gba/castlevania - aria of sorrow_s.png index b84bbbc40..45a1d4f1c 100644 Binary files a/emulation/resources/gba/castlevania - aria of sorrow_s.png and b/emulation/resources/gba/castlevania - aria of sorrow_s.png differ diff --git a/emulation/resources/nes/Castlevania_l.png b/emulation/resources/nes/Castlevania_l.png new file mode 100644 index 000000000..5aae6a634 Binary files /dev/null and b/emulation/resources/nes/Castlevania_l.png differ diff --git a/emulation/resources/nes/Castlevania_s.png b/emulation/resources/nes/Castlevania_s.png new file mode 100644 index 000000000..8b72e1dc5 Binary files /dev/null and b/emulation/resources/nes/Castlevania_s.png differ diff --git a/emulation/resources/nes/castlevania_l.png b/emulation/resources/nes/castlevania_l.png new file mode 100644 index 000000000..5aae6a634 Binary files /dev/null and b/emulation/resources/nes/castlevania_l.png differ diff --git a/emulation/resources/nes/castlevania_s.png b/emulation/resources/nes/castlevania_s.png new file mode 100644 index 000000000..8b72e1dc5 Binary files /dev/null and b/emulation/resources/nes/castlevania_s.png differ diff --git a/frontend/src/App.vue b/frontend/src/App.vue index e59e174aa..0d78b82e1 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -6,10 +6,18 @@ import Navigation from '@/components/Navigation.vue' // Props useTheme().global.name.value = localStorage.getItem('theme') || 'dark' const refresh = ref(false) +const refreshRoms = ref(false) +const snackbarShow = ref(false) +const snackbarStatus = ref({}) // Event listeners bus const emitter = inject('emitter') -emitter.on('scanning', () => { refresh.value = !refresh.value }) +emitter.on('refresh', () => { refresh.value = !refresh.value }) +emitter.on('refreshRoms', () => { refreshRoms.value = !refreshRoms.value }) +emitter.on('snackbarScan', (snackbar) => { + snackbarShow.value = true + snackbarStatus.value = snackbar +}) diff --git a/frontend/src/components/Navigation.vue b/frontend/src/components/Navigation.vue index e9b8f25ec..0ebe8615d 100644 --- a/frontend/src/components/Navigation.vue +++ b/frontend/src/components/Navigation.vue @@ -67,9 +67,13 @@ async function scan() { await axios.get('/api/scan?overwrite='+scanOverwrite.value).then((response) => { console.log("scan completed") console.log(response.data) - }).catch((error) => {console.log(error)}) + emitter.emit('snackbarScan', {'msg': 'Scan completed successfully!', 'icon': 'mdi-check-bold', 'color': 'green'}) + }).catch((error) => { + console.log(error) + emitter.emit('snackbarScan', {'msg': "Couldn't complete scan. Something went wrong...", 'icon': 'mdi-close-circle', 'color': 'red'}) + }) scanning.value = false - emitter.emit('scanning') + emitter.emit('refresh') } else{ platforms.forEach(async p => { @@ -80,9 +84,13 @@ async function scan() { }).then((response) => { console.log("scan "+p.name+" completed") console.log(response.data) - }).catch((error) => {console.log(error)}) + emitter.emit('snackbarScan', {'msg': p.name+' scan completed successfully!', 'icon': 'mdi-check-bold', 'color': 'green'}) + }).catch((error) => { + console.log(error) + emitter.emit('snackbarScan', {'msg': "Couldn't complete "+p.name+" scan. Something went wrong...", 'icon': 'mdi-close-circle', 'color': 'red'}) + }) scanning.value = false - emitter.emit('scanning') + emitter.emit('refreshRoms') }); } } diff --git a/frontend/src/components/RomDetails.vue b/frontend/src/components/RomDetails.vue index 2c9609b3d..b9ccb98b8 100644 --- a/frontend/src/components/RomDetails.vue +++ b/frontend/src/components/RomDetails.vue @@ -8,10 +8,8 @@ const searching = ref(false) 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) - +const snackbarShow = ref(false) +const snackbarStatus = ref({}) // Event listeners bus const emitter = inject('emitter') emitter.on('currentRom', (currentRom) => { rom.value = currentRom }) @@ -48,27 +46,28 @@ async function changeRom(newRomRaw) { }).then((response) => { console.log("update "+rom.value.filename+" completed") localStorage.setItem('currentRom', JSON.stringify(response.data.data)) + snackbarStatus.value = {'msg': rom.value.filename+" changed successfully!", 'icon': 'mdi-check-bold', 'color': 'green'} rom.value = response.data.data - snackbarOK.value = true }).catch((error) => { console.log(error) - snackbarKO.value = true + snackbarStatus.value = {'msg': "Couldn't change "+rom.value.filename+". Something went wrong...", 'icon': 'mdi-close-circle', 'color': 'red'} }) + snackbarShow.value = true changing.value = false } 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 - snackbarOK.value = true + snackbarStatus.value = {'msg': romNewName.value+" edited successfully!", 'icon': 'mdi-check-bold', 'color': 'green'} }).catch((error) => { console.log(error) - snackbarKO.value = true + snackbarStatus.value = {'msg': "Couldn't edit "+rom.value.filename+". Something went wrong...", 'icon': 'mdi-close-circle', 'color': 'red'} }) + snackbarShow.value = true } @@ -163,19 +162,15 @@ async function editRom() { + - - - {{ rom.filename }} edited successfully! + + + + {{ snackbarStatus.msg }} - - - - Couldn't edit {{ rom.filename }}. Something went wrong... - + \ No newline at end of file