mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
dashboard view revamped
This commit is contained in:
@@ -14,7 +14,4 @@ useTheme().global.name.value = localStorage.getItem("theme") || "rommDark";
|
||||
|
||||
<style>
|
||||
@import "@/styles/scrollbar.css";
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
@@ -9,15 +9,16 @@ const props = defineProps(["platform"]);
|
||||
<v-hover v-slot="{ isHovering, props }">
|
||||
<v-card
|
||||
v-bind="props"
|
||||
class="bg-terciary"
|
||||
:class="{ 'on-hover': isHovering }"
|
||||
:elevation="isHovering ? 20 : 3"
|
||||
>
|
||||
<v-card-text>
|
||||
<v-row class="pa-1 justify-center bg-secondary">
|
||||
<span class="text-truncate text-overline">{{ platform.slug }}</span>
|
||||
<v-row class="pa-1 justify-center bg-primary">
|
||||
<div class="px-2 text-truncate text-overline">{{ platform.slug }}</div>
|
||||
</v-row>
|
||||
<v-row class="pa-1 justify-center">
|
||||
<v-avatar :rounded="0" size="100%" class="mt-2">
|
||||
<v-avatar :rounded="0" size="105" class="mt-2">
|
||||
<platform-icon :platform="platform"></platform-icon>
|
||||
</v-avatar>
|
||||
<v-chip
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
import { createApp } from "vue";
|
||||
import { createVuetify } from "vuetify";
|
||||
import { registerPlugins } from "@/plugins";
|
||||
|
||||
import App from "./App.vue";
|
||||
|
||||
// Event bus
|
||||
import mitt from "mitt";
|
||||
const emitter = mitt();
|
||||
|
||||
export default createVuetify({
|
||||
defaults: {
|
||||
VBtn: {
|
||||
rounded: 0, // TODO: Vuetify global configuration not working
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
registerPlugins(app);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* Firefox */
|
||||
* {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-width: None;
|
||||
scrollbar-color: #6e6e6e rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
/* Chrome, Edge, and Safari */
|
||||
*::-webkit-scrollbar {
|
||||
width: 3px;
|
||||
width: 0px;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-track {
|
||||
@@ -15,5 +15,5 @@
|
||||
|
||||
*::-webkit-scrollbar-thumb {
|
||||
background-color: #808080;
|
||||
border-radius: 5px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
@@ -11,72 +11,56 @@ const { lgAndUp } = useDisplay();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- Header logo -->
|
||||
<!-- <v-row class="pa-2" no-gutters>
|
||||
<v-spacer />
|
||||
<v-col cols="12" xs="12" sm="10" md="10" lg="10">
|
||||
<v-img
|
||||
:height="lgAndUp ? 200 : 150"
|
||||
src="/assets/romm_complete.svg"
|
||||
cover
|
||||
/>
|
||||
</v-col>
|
||||
<v-spacer />
|
||||
</v-row> -->
|
||||
<!-- Summary -->
|
||||
<v-row class="pa-2" no-gutters>
|
||||
<v-avatar :rounded="0" size="auto">
|
||||
<v-icon>mdi-text-box-outline</v-icon>
|
||||
</v-avatar>
|
||||
<span class="text-h6 ml-2">Summary</span>
|
||||
<v-divider class="border-opacity-25" />
|
||||
</v-row>
|
||||
|
||||
<v-row class="pa-2" no-gutters>
|
||||
<v-col
|
||||
cols="12"
|
||||
xs="12"
|
||||
sm="10"
|
||||
md="10"
|
||||
lg="10"
|
||||
class="d-flex"
|
||||
>
|
||||
<v-chip-group>
|
||||
<v-chip class="bg-chip" label>
|
||||
<span class="text-overline">
|
||||
{{ platforms.value.length }} platforms
|
||||
</span>
|
||||
</v-chip>
|
||||
<v-chip class="bg-chip" label>
|
||||
<span class="text-overline">{{ totalGames }} games</span>
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
<v-row class="pa-1" no-gutters>
|
||||
<v-col>
|
||||
<v-card rounded="0">
|
||||
<v-card-title
|
||||
><v-icon class="mr-2">mdi-text-box-outline</v-icon
|
||||
>Summary</v-card-title
|
||||
>
|
||||
<v-divider class="border-opacity-25" />
|
||||
<v-card-text>
|
||||
<v-chip-group>
|
||||
<v-chip class="text-overline bg-chip" label>
|
||||
<v-icon class="mr-2">mdi-controller</v-icon
|
||||
>{{ platforms.value.length }} Platforms
|
||||
</v-chip>
|
||||
<v-chip class="text-overline bg-chip" label>
|
||||
<v-icon class="mr-2">mdi-disc</v-icon>{{ totalGames }} Games
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<!-- Platforms -->
|
||||
<template v-if="platforms.value.length > 0">
|
||||
<!-- Platforms section title -->
|
||||
<v-row class="pa-2 mt-2" no-gutters>
|
||||
<v-avatar :rounded="0" size="auto">
|
||||
<v-icon>mdi-controller</v-icon>
|
||||
</v-avatar>
|
||||
<span class="text-h6 ml-2">Platforms</span>
|
||||
<v-divider class="border-opacity-25" />
|
||||
</v-row>
|
||||
|
||||
<!-- Platforms cards -->
|
||||
<v-row class="pa-2" no-gutters>
|
||||
<v-col
|
||||
v-for="platform in platforms.value"
|
||||
class="pa-1"
|
||||
:key="platform.slug"
|
||||
:cols="views[0]['size-cols']"
|
||||
:xs="views[0]['size-xs']"
|
||||
:sm="views[0]['size-sm']"
|
||||
:md="views[0]['size-md']"
|
||||
:lg="views[0]['size-lg']"
|
||||
>
|
||||
<platform-card :platform="platform" :key="platform.slug" />
|
||||
<v-row class="pa-1" no-gutters>
|
||||
<v-col>
|
||||
<v-card rounded="0">
|
||||
<v-card-title
|
||||
><v-icon class="mr-2">mdi-controller</v-icon>Platforms</v-card-title
|
||||
>
|
||||
<v-divider class="border-opacity-25" />
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col
|
||||
v-for="platform in platforms.value"
|
||||
class="pa-1"
|
||||
:key="platform.slug"
|
||||
:cols="views[0]['size-cols']"
|
||||
:xs="views[0]['size-xs']"
|
||||
:sm="views[0]['size-sm']"
|
||||
:md="views[0]['size-md']"
|
||||
:lg="views[0]['size-lg']"
|
||||
>
|
||||
<platform-card :platform="platform" :key="platform.slug" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<script setup>
|
||||
import { ref, inject, onMounted } from "vue";
|
||||
import { useDisplay } from "vuetify";
|
||||
import Drawer from "@/components/Drawer/Base.vue";
|
||||
import AppBar from "@/components/AppBar/Base.vue";
|
||||
import Notification from "@/components/Notification.vue";
|
||||
import { fetchPlatformsApi } from "@/services/api.js";
|
||||
import storePlatforms from "@/stores/platforms.js";
|
||||
import storeScanning from "@/stores/scanning.js";
|
||||
import Drawer from "@/components/Drawer/Base.vue";
|
||||
import AppBar from "@/components/AppBar/Base.vue";
|
||||
import Notification from "@/components/Notification.vue";
|
||||
|
||||
// Props
|
||||
const { mdAndDown } = useDisplay();
|
||||
@@ -35,7 +35,7 @@ onMounted(async () => {
|
||||
<notification class="mt-6" />
|
||||
|
||||
<v-progress-linear
|
||||
class="scan-progress-bar"
|
||||
id="scan-progress-bar"
|
||||
color="rommAccent1"
|
||||
:active="scanning.value"
|
||||
:indeterminate="true"
|
||||
@@ -44,14 +44,16 @@ onMounted(async () => {
|
||||
/>
|
||||
|
||||
<drawer :key="refreshPlatforms" />
|
||||
|
||||
<app-bar v-if="mdAndDown" />
|
||||
<v-main class="pa-1">
|
||||
|
||||
<v-container class="pa-1" fluid>
|
||||
<router-view :key="refreshGallery" />
|
||||
</v-main>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.scan-progress-bar {
|
||||
#scan-progress-bar {
|
||||
z-index: 1000 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user