Fix list view

This commit is contained in:
Georges-Antoine Assi
2023-09-02 12:57:48 -04:00
parent f8a8bc7ad4
commit 17180ab8f3
2 changed files with 13 additions and 12 deletions

View File

@@ -7,15 +7,6 @@ import storeRoms from "@/stores/roms";
import { VDataTable } from "vuetify/labs/VDataTable";
import AdminMenu from "@/components/AdminMenu/Base.vue";
// Props
const emitter = inject("emitter");
const props = defineProps(["filteredRoms"]);
const location = window.location.origin;
const router = useRouter();
const downloadStore = storeDownload();
const romsStore = storeRoms();
const saveFiles = ref(false);
const romsPerPage = ref(-1);
const HEADERS = [
{
title: "",
@@ -59,6 +50,16 @@ const PER_PAGE_OPTIONS = [
{ value: -1, title: "$vuetify.dataFooter.itemsPerPageAll" },
];
// Props
const location = window.location.origin;
const props = defineProps(["filteredRoms"]);
const router = useRouter();
const downloadStore = storeDownload();
const romsStore = storeRoms();
const saveFiles = ref(false);
const romsPerPage = ref(-1);
// Functions
function rowClick(_, row) {
router.push(
`/platform/${row.item.selectable.p_slug}/${row.item.selectable.id}`
@@ -76,7 +77,7 @@ function rowClick(_, row) {
:items="filteredRoms"
@click:row="rowClick"
show-select
v-model="romsStore.selectedRoms"
v-model="romsStore._selectedIDs"
>
<template v-slot:item.path_cover_s="{ item }">
<v-avatar :rounded="0">

View File

@@ -281,13 +281,13 @@ onBeforeRouteUpdate(async (to, _) => {
<template v-slot:activator="{ props }">
<v-fab-transition>
<v-btn
v-show="selectedRoms.length > 0"
v-show="romsStore._selectedIDs.length > 0"
color="romm-accent-1"
v-bind="props"
elevation="8"
icon
size="large"
>{{ selectedRoms.length }}</v-btn
>{{ romsStore._selectedIDs.length }}</v-btn
>
</v-fab-transition>
</template>