tristan-wip #2

Merged
TristanBrault merged 34 commits from tristan-wip into main 2025-07-19 19:58:58 +00:00
3 changed files with 3 additions and 3 deletions
Showing only changes of commit 77e1ee0c73 - Show all commits

View File

@ -50,7 +50,7 @@ const optionsOpen = ref(false);
onMounted(async () => {
games.value = await fetchGames();
tags.value = [...new Set(games.value.flatMap(game => game.Genres))];
tags.value = [...new Set(games.value.flatMap(game => game.Genres.split(",")))];
selectedTag.value = tags.value[0];
selectedGame.value = store.filteredGames[0];
});

View File

@ -45,7 +45,7 @@ export async function fetchGames(): Promise<Game[]> {
// TODO games should be loaded from and started from the wails/go code
const games = await LoadGames();
for (const game in games) {
for (const game of games) {
console.log(game)
}
return games;

View File

@ -14,7 +14,7 @@ export const useAppStore = defineStore('app', {
}),
getters: {
filteredGames(state): Game[] {
return state.games.filter(game => game.Genres.includes(state.selectedTag ?? ''));
return state.games.filter(game => game.Genres.split(",").includes(state.selectedTag ?? ''));
}
},
actions: {