Aktualizace balicku, strnakovani, uprava hlavni stranky

This commit is contained in:
Michal Kváček
2023-12-12 23:42:16 +01:00
parent 8c7e237053
commit c8ea17c1ec
67 changed files with 1372 additions and 774 deletions
+18 -8
View File
@@ -6,28 +6,38 @@ import BasicListSkeleton from "components/basicSkeletons/BasicListSkeleton.vue";
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
import {usePointsOfInterestStore} from "stores/PointsOfInterest";
import {storeToRefs} from "pinia";
import {loadPage, paginationLimit} from "src/composables/pagination";
usePointsOfInterestStore().fetch();
useAppStore().setPageTitle("Zajímavá místa");
const {isQueryRunning, pointsOfInterest} = storeToRefs(usePointsOfInterestStore());
const loadNextPage = (appendItems) => loadPage({
fetchFunc: usePointsOfInterestStore().fetch,
appendItems
});
loadNextPage(false);
const {isQueryRunning, totalItemsCount, pointsOfInterest} = storeToRefs(usePointsOfInterestStore());
</script>
<template>
<BasicListSkeleton :items="10" v-if="isQueryRunning && !pointsOfInterest.length"/>
<BasicInfoBanner
v-else-if="!isQueryRunning && pointsOfInterest.length === 0"
:route-add="{name: 'addPoi'}"
label-add="Přidat"
v-else-if="!isQueryRunning && pointsOfInterest.length === 0"
:route-add="{name: 'addPoi'}"
label-add="Přidat"
>
Nemáš tu uložené žádné zajímavé místo. Přidej si let, nastav si tam ručně trasu a jednotlivé body se zobrazí
i v tomto seznamu.
</BasicInfoBanner>
<POIList
v-else
:public="false"
:items="pointsOfInterest"
v-else
:public="false"
:items="pointsOfInterest"
:total-items-count="totalItemsCount"
:is-query-running="isQueryRunning"
:items-per-page="paginationLimit"
@load-more="loadNextPage(true)"
/>
<FAB :router-link="{name: 'addPOI'}" mode="add"/>