Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions src/pages/GameSelectionScreen.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<template>
<div id="game-selection-screen">
<div id="game-list-loading" v-if="!visible">
<div class="fa-3x">
<i class="fas fa-circle-notch fa-spin"></i>
</div>
<p>Preparing games</p>
</div>
<div id="game-selection-screen" v-else>
<EcosystemUpdateIndicator />
<ModalCard id="select-platform-modal" v-show="showPlatformModal" :is-active="showPlatformModal" @close-modal="() => {showPlatformModal = false;}" class="z-max z-top">
<template v-slot:header>
Expand Down Expand Up @@ -105,6 +111,8 @@ import { State } from '../store';

const store = getStore<State>();

const visible = ref<boolean>(false);

const gameSelection = useGameSelectionComposable();
provide(gameSelectionKey, gameSelection);

Expand Down Expand Up @@ -164,8 +172,12 @@ function selectPlatform() {

onMounted(async () => {
window.app.checkForApplicationUpdates();
await initialize();
void store.dispatch('ecosystemUpdate/updateEcosystemSchema');
try {
await initialize();
} finally {
visible.value = true;
void store.dispatch('ecosystemUpdate/updateEcosystemSchema');
}
});
</script>

Expand All @@ -186,4 +198,12 @@ onMounted(async () => {
#game-selection-search {
min-width: 100px;
}

#game-list-loading {
display: flex;
flex: 1;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>
Loading