[ROMM-396] Hide platforms with no roms in dashboard and drawer

This commit is contained in:
zurdi
2023-10-29 21:14:41 +01:00
parent bd216140fb
commit f0f661c7f7
4 changed files with 5 additions and 4 deletions

View File

@@ -40,9 +40,9 @@ services:
restart: "unless-stopped"
# [Optional] Only required if using MariaDB as the database
mariadb:
romm_db:
image: mariadb:latest
container_name: mariadb
container_name: romm_db
environment:
- MYSQL_ROOT_PASSWORD=<root password>
- MYSQL_DATABASE=romm

View File

@@ -50,7 +50,7 @@ emitter.on("toggleDrawerRail", () => {
</v-list-item>
</template>
<platform-list-item
v-for="platform in platforms.value"
v-for="platform in platforms.filledPlatforms"
:platform="platform"
:rail="rail"
:key="platform.slug"

View File

@@ -8,6 +8,7 @@ export default defineStore("platforms", {
},
getters: {
totalGames: ({ value }) => value.reduce((count, p) => count + p.n_roms, 0),
filledPlatforms: ({ value }) => value.filter((p) => p.n_roms > 0),
},
actions: {
set(platforms) {

View File

@@ -17,7 +17,7 @@ const platforms = storePlatforms();
<v-card-text>
<v-row>
<v-col
v-for="platform in platforms.value"
v-for="platform in platforms.filledPlatforms"
class="pa-1"
:key="platform.slug"
:cols="views[0]['size-cols']"