mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 14:56:01 +00:00
[ROMM-396] Hide platforms with no roms in dashboard and drawer
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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']"
|
||||
|
||||
Reference in New Issue
Block a user