Skip to content

Commit

Permalink
Fix playing emulatorjs + better platform icon loading
Browse files Browse the repository at this point in the history
  • Loading branch information
gantoine committed Aug 13, 2024
1 parent dff554b commit 3d96382
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Details/ActionBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async function copyDownloadLink(rom: DetailedRom) {
class="flex-grow-1"
@click="
$router.push({
name: 'ejs',
name: 'emulatorjs',
params: { rom: rom?.id },
})
"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/common/Game/Card/ActionBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const downloadStore = storeDownload();
size="x-small"
@click="
$router.push({
name: 'ejs',
name: 'emulatorjs',
params: { rom: rom?.id },
})
"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/common/Game/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ onMounted(() => {
size="small"
@click.stop="
$router.push({
name: 'ejs',
name: 'emulatorjs',
params: { rom: item?.id },
})
"
Expand Down
17 changes: 9 additions & 8 deletions frontend/src/components/common/Platform/Icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ const { config } = storeToRefs(configStore);

<template>
<v-avatar :size="size" :rounded="rounded">
<v-img
:src="`/assets/platforms/${
config.PLATFORMS_VERSIONS?.[props.slug]?.toLowerCase() ??
props.slug.toLowerCase()
}.ico`"
><template #error
><v-img src="/assets/platforms/default.ico"></v-img></template
></v-img>
<v-img :src="`/assets/platforms/${config.PLATFORMS_VERSIONS?.[props.slug]?.toLowerCase()}.ico`">
<template #error>
<v-img :src="`/assets/platforms/${props.slug.toLowerCase()}.ico`">
<template #error>
<v-img src="/assets/platforms/default.ico"></v-img>
</template>
</v-img>
</template>
</v-img>
</v-avatar>
</template>
2 changes: 1 addition & 1 deletion frontend/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,5 +350,5 @@ export function isEJSEmulationSupported(platformSlug: string) {
}

export function isRuffleEmulationSupported(platformSlug: string) {
return platformSlug.toLowerCase() === "flash";
return platformSlug.toLowerCase() in ["flash", "browser"];
}

0 comments on commit 3d96382

Please sign in to comment.