Breadcrumbs resit pres funkce
This commit is contained in:
@@ -1,44 +1,70 @@
|
|||||||
import {flightName} from "src/composables/flight";
|
import {flightName} from "src/composables/flight";
|
||||||
|
|
||||||
const homepageBreadcrumbs = () => {
|
export const homepageBreadcrumbs = () => {
|
||||||
return [{to: {name: 'homepage'}, label: "Polétání.cz"}]
|
return [{to: {name: 'homepage'}, label: "Polétání.cz"}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const publicProfileBreadcrumbs = (pilot, link = true) => {
|
||||||
|
const profile = {label: `@${pilot.publicUsername}`}
|
||||||
|
|
||||||
// TODO: dodelat
|
if (link) {
|
||||||
|
profile.to = {name: "publicProfileDetail", params: {username: pilot.publicUsername}};
|
||||||
|
}
|
||||||
|
|
||||||
const publicProfileBreadcrumbs = (pilot) => {
|
|
||||||
return [
|
return [
|
||||||
...homepageBreadcrumbs(),
|
...homepageBreadcrumbs(),
|
||||||
{to: {name: "publicProfileDetail", params: {username: pilot.publicUsername}}, label: `@${pilot.publicUsername}`},
|
profile,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const publicEventBreadcrumbs = (pilot, event) => {
|
|
||||||
|
|
||||||
|
export const publicEventBreadcrumbs = (pilot, event, link = true) => {
|
||||||
|
const eventDetail = {label: event.name}
|
||||||
|
if (link) {
|
||||||
|
eventDetail.to = {
|
||||||
|
name: 'publicEventDetail',
|
||||||
|
params: {eventSlug: event.urlSlug, username: pilot.publicUsername}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return [
|
||||||
|
...publicProfileBreadcrumbs(pilot),
|
||||||
|
{
|
||||||
|
to: {name: 'publicEventsList', username: pilot.publicUsername},
|
||||||
|
label: "Události"
|
||||||
|
},
|
||||||
|
eventDetail
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
export const flightBreadcrumbs = (pilot, flight, event) => {
|
export const publicFlightBreadcrumbs = (pilot, flight, event, link = true) => {
|
||||||
const breadcrumbs = publicProfileBreadcrumbs(pilot)
|
let breadcrumbs;
|
||||||
|
|
||||||
if (event && event.isPublic) {
|
if (event && event.isPublic) {
|
||||||
breadcrumbs.push({to: {name: 'publicEventsList', username: pilot.publicUsername}, label: "Události"});
|
breadcrumbs = publicEventBreadcrumbs(pilot, event)
|
||||||
breadcrumbs.push({
|
} else {
|
||||||
to: {
|
breadcrumbs = publicProfileBreadcrumbs(pilot)
|
||||||
name: 'publicEventDetail',
|
|
||||||
params: {eventSlug: event.urlSlug, username: pilot.publicUsername}
|
|
||||||
}, label: event.name
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
breadcrumbs.push({label: flightName(flight)})
|
const flightEntry = {label: flightName(flight)}
|
||||||
|
if (link) {
|
||||||
|
flightEntry.to = {name: "publicFlightDetail", params: {username: pilot.publicUsername, flightSlug: flight.urlSlug}}
|
||||||
|
}
|
||||||
|
breadcrumbs.push(flightEntry)
|
||||||
|
|
||||||
return breadcrumbs;
|
return breadcrumbs;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const copilotBreadcrumbs = (pilot, flight, event, copilot) => {
|
export const publicCopilotBreadcrumbs = (pilot, flight, event, copilot) => {
|
||||||
return [
|
return [
|
||||||
...flightBreadcrumbs(pilot, flight, event),
|
...publicProfileBreadcrumbs(pilot),
|
||||||
|
{label: "Kopiloti"},
|
||||||
{label: copilot.name}
|
{label: copilot.name}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const publicPOIBaseBreadcrumbs = () => {
|
||||||
|
return [
|
||||||
|
...homepageBreadcrumbs(),
|
||||||
|
{label: "Místa"},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
import {ref} from "vue";
|
import {ref} from "vue";
|
||||||
|
|
||||||
|
|
||||||
export const usePagination = () => {
|
export const usePagination = ({fetchFunction, itemsPerPage = 10}) => {
|
||||||
const paginationLimit = ref(10);
|
if (typeof fetchFunction === "undefined") {
|
||||||
|
console.error("Set fetchFunction to usePagination!");
|
||||||
|
}
|
||||||
|
|
||||||
|
const paginationLimit = ref(itemsPerPage);
|
||||||
const paginationOffset = ref(0);
|
const paginationOffset = ref(0);
|
||||||
const filters = ref({});
|
const filters = ref({});
|
||||||
const loadPage = ({fetchFunc, appendItems}) => {
|
const loadPage = ({appendItems}) => {
|
||||||
return fetchFunc({
|
return fetchFunction({
|
||||||
...filters.value,
|
...filters.value,
|
||||||
limit: paginationLimit.value,
|
limit: paginationLimit.value,
|
||||||
offset: paginationOffset.value,
|
offset: paginationOffset.value,
|
||||||
@@ -16,7 +20,6 @@ export const usePagination = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
paginationOffset, paginationLimit, filters, loadPage
|
paginationOffset, paginationLimit, filters, loadPage
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
|
<script>
|
||||||
|
import {useAircraftsStore} from "stores/Aircrafts";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
serverPrefetch({currentRoute}) {
|
||||||
|
return useAircraftsStore().fetchDetail(currentRoute.params.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import {useMeta, useQuasar} from "quasar";
|
import {useMeta, useQuasar} from "quasar";
|
||||||
@@ -6,7 +16,6 @@ import {confirmObject, successObject} from "src/composables/dialog";
|
|||||||
import {useAppStore} from "stores/App";
|
import {useAppStore} from "stores/App";
|
||||||
import FlightsList from "components/flights/FlightsList.vue";
|
import FlightsList from "components/flights/FlightsList.vue";
|
||||||
import {storeToRefs} from "pinia";
|
import {storeToRefs} from "pinia";
|
||||||
import {useAircraftsStore} from "stores/Aircrafts";
|
|
||||||
import {watch} from "vue";
|
import {watch} from "vue";
|
||||||
import {metaData} from "src/composables/meta";
|
import {metaData} from "src/composables/meta";
|
||||||
import PhotoGallery from "components/photos/PhotoGallery.vue";
|
import PhotoGallery from "components/photos/PhotoGallery.vue";
|
||||||
@@ -24,7 +33,6 @@ import PublishButton from "components/inputs/PublishButton.vue";
|
|||||||
|
|
||||||
const aircraftId = parseInt(useRoute().params.id);
|
const aircraftId = parseInt(useRoute().params.id);
|
||||||
|
|
||||||
useAircraftsStore().fetchDetail(aircraftId);
|
|
||||||
const {aircraft, isQueryRunning} = storeToRefs(useAircraftsStore());
|
const {aircraft, isQueryRunning} = storeToRefs(useAircraftsStore());
|
||||||
watch(() => aircraft.value, (newVal) => {
|
watch(() => aircraft.value, (newVal) => {
|
||||||
if (!newVal) return;
|
if (!newVal) return;
|
||||||
@@ -53,14 +61,11 @@ const togglePublicVisibility = (variables) => toggleVisibility({
|
|||||||
$q, store: useAircraftsStore(), object: aircraft.value, variables
|
$q, store: useAircraftsStore(), object: aircraft.value, variables
|
||||||
});
|
});
|
||||||
|
|
||||||
const {filters, loadPage, paginationLimit} = usePagination();
|
const {filters, loadPage, paginationLimit} = usePagination({fetchFunction: useFlightsStore().fetch});
|
||||||
filters.value = {aircraftId: aircraftId};
|
filters.value = {aircraftId: aircraftId};
|
||||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
loadPage(false);
|
||||||
fetchFunc: useFlightsStore().fetch,
|
|
||||||
appendItems
|
|
||||||
});
|
|
||||||
const {isQueryRunning: areFlightsLoading, totalItemsCount, flights} = storeToRefs(useFlightsStore());
|
const {isQueryRunning: areFlightsLoading, totalItemsCount, flights} = storeToRefs(useFlightsStore());
|
||||||
loadNextFlightsPage(false);
|
|
||||||
|
|
||||||
const loggedUser = storeToRefs(useLoggedUserStore()).user;
|
const loggedUser = storeToRefs(useLoggedUserStore()).user;
|
||||||
</script>
|
</script>
|
||||||
@@ -114,7 +119,7 @@ const loggedUser = storeToRefs(useLoggedUserStore()).user;
|
|||||||
:total-items-count="totalItemsCount"
|
:total-items-count="totalItemsCount"
|
||||||
:is-query-running="areFlightsLoading"
|
:is-query-running="areFlightsLoading"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
@load-more="loadNextFlightsPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -10,11 +10,8 @@ import {usePagination} from "src/composables/pagination";
|
|||||||
|
|
||||||
useAppStore().setPageTitle("Letadla");
|
useAppStore().setPageTitle("Letadla");
|
||||||
|
|
||||||
const {filters, loadPage, paginationLimit} = usePagination();
|
const {filters, loadPage, paginationLimit} = usePagination({fetchFunction: useAircraftsStore().fetch});
|
||||||
const loadNextAircraftsPage = (appendItems) => loadPage({
|
loadPage(false);
|
||||||
fetchFunc: useAircraftsStore().fetch, appendItems
|
|
||||||
});
|
|
||||||
loadNextAircraftsPage(false);
|
|
||||||
|
|
||||||
const {aircrafts, totalItemsCount, isQueryRunning} = storeToRefs(useAircraftsStore());
|
const {aircrafts, totalItemsCount, isQueryRunning} = storeToRefs(useAircraftsStore());
|
||||||
</script>
|
</script>
|
||||||
@@ -40,7 +37,7 @@ const {aircrafts, totalItemsCount, isQueryRunning} = storeToRefs(useAircraftsSto
|
|||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
:public="true"
|
:public="true"
|
||||||
class="q-mb-xl"
|
class="q-mb-xl"
|
||||||
@load-more="loadNextAircraftsPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FAB mode="add" :router-link="{name: 'addAircraft'}"/>
|
<FAB mode="add" :router-link="{name: 'addAircraft'}"/>
|
||||||
|
|||||||
@@ -30,12 +30,9 @@ const togglePublicVisibility = (variables) => toggleVisibility({
|
|||||||
$q, store: useCopilotsStore(), object: copilot.value, variables
|
$q, store: useCopilotsStore(), object: copilot.value, variables
|
||||||
});
|
});
|
||||||
|
|
||||||
const {filters, loadPage, paginationLimit} = usePagination();
|
const {filters, loadPage, paginationLimit} = usePagination({fetchFunction: useFlightsStore().fetch});
|
||||||
filters.value = {copilotId: copilotId};
|
filters.value = {copilotId: copilotId};
|
||||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
loadPage(false);
|
||||||
fetchFunc: useFlightsStore().fetch, appendItems
|
|
||||||
});
|
|
||||||
loadNextFlightsPage(false);
|
|
||||||
|
|
||||||
const {isQueryRunning: areFlightsLoading, totalItemsCount, flights} = storeToRefs(useFlightsStore());
|
const {isQueryRunning: areFlightsLoading, totalItemsCount, flights} = storeToRefs(useFlightsStore());
|
||||||
const {isQueryRunning, copilot} = storeToRefs(useCopilotsStore());
|
const {isQueryRunning, copilot} = storeToRefs(useCopilotsStore());
|
||||||
@@ -90,7 +87,7 @@ const loggedUser = storeToRefs(useLoggedUserStore()).user;
|
|||||||
:total-items-count="totalItemsCount"
|
:total-items-count="totalItemsCount"
|
||||||
:is-query-running="areFlightsLoading"
|
:is-query-running="areFlightsLoading"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
@load-more="loadNextFlightsPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
<q-banner v-if="flights.length === 0" class="bg-light-blue text-white">
|
<q-banner v-if="flights.length === 0" class="bg-light-blue text-white">
|
||||||
Zatím tu nemáš uložené žádné společné lety.
|
Zatím tu nemáš uložené žádné společné lety.
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ onMounted(() => {
|
|||||||
{label: event.value.name}
|
{label: event.value.name}
|
||||||
])
|
])
|
||||||
});
|
});
|
||||||
loadNextFlightsPage(false);
|
loadPage(false);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@@ -37,11 +37,8 @@ const togglePublicVisibility = (variables) => toggleVisibility({
|
|||||||
|
|
||||||
const {isQueryRunning, event} = storeToRefs(useEventsStore());
|
const {isQueryRunning, event} = storeToRefs(useEventsStore());
|
||||||
|
|
||||||
const {filters, loadPage, paginationLimit} = usePagination();
|
const {filters, loadPage, paginationLimit} = usePagination({fetchFunction: useFlightsStore().fetch});
|
||||||
filters.value = {eventId: eventId}
|
filters.value = {eventId: eventId}
|
||||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
|
||||||
fetchFunc: useFlightsStore().fetch, appendItems
|
|
||||||
});
|
|
||||||
|
|
||||||
const {isQueryRunning: areFlightsLoading, totalItemsCount, flights} = storeToRefs(useFlightsStore());
|
const {isQueryRunning: areFlightsLoading, totalItemsCount, flights} = storeToRefs(useFlightsStore());
|
||||||
const loggedUser = storeToRefs(useLoggedUserStore()).user;
|
const loggedUser = storeToRefs(useLoggedUserStore()).user;
|
||||||
@@ -65,7 +62,7 @@ const loggedUser = storeToRefs(useLoggedUserStore()).user;
|
|||||||
|
|
||||||
<article class="q-my-lg" v-html="event.description"/>
|
<article class="q-my-lg" v-html="event.description"/>
|
||||||
|
|
||||||
<EventFlightsMap :event-id="eventId" :only-public="false" />
|
<EventFlightsMap :event-id="eventId" :only-public="false"/>
|
||||||
|
|
||||||
<h3>Lety</h3>
|
<h3>Lety</h3>
|
||||||
|
|
||||||
@@ -80,7 +77,7 @@ const loggedUser = storeToRefs(useLoggedUserStore()).user;
|
|||||||
:total-items-count="totalItemsCount"
|
:total-items-count="totalItemsCount"
|
||||||
:is-query-running="areFlightsLoading"
|
:is-query-running="areFlightsLoading"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
@load-more="loadNextFlightsPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
<FAB mode="edit" :router-link="{name: 'eventEdit', params: {id: eventId}}"/>
|
<FAB mode="edit" :router-link="{name: 'eventEdit', params: {id: eventId}}"/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -11,13 +11,9 @@ import {onMounted} from "vue";
|
|||||||
|
|
||||||
useAppStore().setPageTitle("Moje lety");
|
useAppStore().setPageTitle("Moje lety");
|
||||||
|
|
||||||
const {loadPage, paginationLimit} = usePagination();
|
const {loadPage, paginationLimit} = usePagination({fetchFunction: useFlightsStore().fetch});
|
||||||
|
|
||||||
const loadNextPage = (appendItems) => loadPage({
|
|
||||||
fetchFunc: useFlightsStore().fetch, appendItems
|
|
||||||
});
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadNextPage(false);
|
loadPage(false);
|
||||||
});
|
});
|
||||||
const {flights, totalItemsCount, isQueryRunning} = storeToRefs(useFlightsStore());
|
const {flights, totalItemsCount, isQueryRunning} = storeToRefs(useFlightsStore());
|
||||||
</script>
|
</script>
|
||||||
@@ -40,7 +36,7 @@ const {flights, totalItemsCount, isQueryRunning} = storeToRefs(useFlightsStore()
|
|||||||
:is-query-running="isQueryRunning"
|
:is-query-running="isQueryRunning"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
:total-items-count="totalItemsCount"
|
:total-items-count="totalItemsCount"
|
||||||
@load-more="loadNextPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FAB mode="add" :router-link="{name: 'addFlight'}"/>
|
<FAB mode="add" :router-link="{name: 'addFlight'}"/>
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import {useOrganizationsStore} from "stores/Organizations";
|
|||||||
|
|
||||||
const organizationId = parseInt(useRoute().params.id);
|
const organizationId = parseInt(useRoute().params.id);
|
||||||
const loggedUser = storeToRefs(useLoggedUserStore()).user;
|
const loggedUser = storeToRefs(useLoggedUserStore()).user;
|
||||||
const $q = useQuasar();
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
useOrganizationsStore().fetchDetail(organizationId).then((o) => {
|
useOrganizationsStore().fetchDetail(organizationId).then((o) => {
|
||||||
|
|||||||
@@ -38,13 +38,9 @@ const togglePublicVisibility = (variables) => toggleVisibility({
|
|||||||
$q, store: usePointsOfInterestStore(), object: pointOfInterest.value, variables
|
$q, store: usePointsOfInterestStore(), object: pointOfInterest.value, variables
|
||||||
});
|
});
|
||||||
|
|
||||||
const {filters, loadPage, paginationLimit} = usePagination();
|
const {filters, loadPage, paginationLimit} = usePagination({fetchFunction: useFlightsStore().fetch});
|
||||||
filters.value = {pointOfInterestId: poiId};
|
filters.value = {pointOfInterestId: poiId};
|
||||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
loadPage(false);
|
||||||
fetchFunc: useFlightsStore().fetch,
|
|
||||||
appendItems
|
|
||||||
});
|
|
||||||
loadNextFlightsPage(false);
|
|
||||||
const {isQueryRunning: areFlightsLoading, totalItemsCount, flights} = storeToRefs(useFlightsStore());
|
const {isQueryRunning: areFlightsLoading, totalItemsCount, flights} = storeToRefs(useFlightsStore());
|
||||||
const {isQueryRunning, pointOfInterest} = storeToRefs(usePointsOfInterestStore());
|
const {isQueryRunning, pointOfInterest} = storeToRefs(usePointsOfInterestStore());
|
||||||
</script>
|
</script>
|
||||||
@@ -114,7 +110,7 @@ const {isQueryRunning, pointOfInterest} = storeToRefs(usePointsOfInterestStore()
|
|||||||
:total-items-count="totalItemsCount"
|
:total-items-count="totalItemsCount"
|
||||||
:is-query-running="areFlightsLoading"
|
:is-query-running="areFlightsLoading"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
@load-more="loadNextFlightsPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
<BasicInfoBanner v-else>
|
<BasicInfoBanner v-else>
|
||||||
Na tomto místě jsi zatím nebyl/a.
|
Na tomto místě jsi zatím nebyl/a.
|
||||||
|
|||||||
@@ -12,16 +12,15 @@ import ListFilters from "components/ListFilters.vue";
|
|||||||
useAppStore().setPageTitle("Zajímavá místa");
|
useAppStore().setPageTitle("Zajímavá místa");
|
||||||
|
|
||||||
|
|
||||||
const {filters, loadPage, paginationLimit, paginationOffset} = usePagination();
|
const {filters, loadPage, paginationLimit, paginationOffset} = usePagination({
|
||||||
paginationLimit.value = 15;
|
fetchFunction: usePointsOfInterestStore().fetch,
|
||||||
const loadNextPage = (appendItems) => loadPage({
|
itemsPerPage: 1 // nefunguje
|
||||||
fetchFunc: usePointsOfInterestStore().fetch, appendItems
|
|
||||||
});
|
});
|
||||||
loadNextPage(false);
|
loadPage(false);
|
||||||
const handleFiltersChanged = (newFilters) => {
|
const handleFiltersChanged = (newFilters) => {
|
||||||
paginationOffset.value = 0;
|
paginationOffset.value = 0;
|
||||||
filters.value = newFilters;
|
filters.value = newFilters;
|
||||||
loadNextPage(false);
|
loadPage(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const {isQueryRunning, totalItemsCount, pointsOfInterest} = storeToRefs(usePointsOfInterestStore());
|
const {isQueryRunning, totalItemsCount, pointsOfInterest} = storeToRefs(usePointsOfInterestStore());
|
||||||
@@ -47,7 +46,7 @@ const {isQueryRunning, totalItemsCount, pointsOfInterest} = storeToRefs(usePoint
|
|||||||
:total-items-count="totalItemsCount"
|
:total-items-count="totalItemsCount"
|
||||||
:is-query-running="isQueryRunning"
|
:is-query-running="isQueryRunning"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
@load-more="loadNextPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
<FAB :router-link="{name: 'addPOI'}" mode="add"/>
|
<FAB :router-link="{name: 'addPOI'}" mode="add"/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ import {useAppStore} from "stores/App";
|
|||||||
import {useMeta} from "quasar";
|
import {useMeta} from "quasar";
|
||||||
import {metaData} from "src/composables/meta";
|
import {metaData} from "src/composables/meta";
|
||||||
import ContentCard from "components/ContentCard.vue";
|
import ContentCard from "components/ContentCard.vue";
|
||||||
|
import {homepageBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
useAppStore().setPageTitle("O projektu");
|
useAppStore().setPageTitle("O projektu");
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs([
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
...homepageBreadcrumbs(),
|
||||||
{label: "O projektu"}
|
{label: "O projektu"}
|
||||||
]);
|
]);
|
||||||
useMeta(() => metaData({
|
useMeta(() => metaData({
|
||||||
|
|||||||
@@ -6,10 +6,11 @@ import {commonProps} from "src/composables/inputs";
|
|||||||
import {useQuasar} from "quasar";
|
import {useQuasar} from "quasar";
|
||||||
import {errorObject, successObject} from "src/composables/dialog";
|
import {errorObject, successObject} from "src/composables/dialog";
|
||||||
import {api, axios} from "boot/axios";
|
import {api, axios} from "boot/axios";
|
||||||
|
import {homepageBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
useAppStore().setPageTitle("Kontakt");
|
useAppStore().setPageTitle("Kontakt");
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs([
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
...homepageBreadcrumbs(),
|
||||||
{label: "Kontakt"}
|
{label: "Kontakt"}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {useAppStore} from "stores/App";
|
import {useAppStore} from "stores/App";
|
||||||
import ContentCard from "components/ContentCard.vue";
|
import ContentCard from "components/ContentCard.vue";
|
||||||
|
import {homepageBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
useAppStore().setPageTitle("Co Polétání.cz umí?");
|
useAppStore().setPageTitle("Co Polétání.cz umí?");
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs([
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
...homepageBreadcrumbs(),
|
||||||
{label: "Funkce"}
|
{label: "Funkce"}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {useAppStore} from "stores/App";
|
|||||||
import {onMounted, ref} from "vue";
|
import {onMounted, ref} from "vue";
|
||||||
import {useMeta} from "quasar";
|
import {useMeta} from "quasar";
|
||||||
import {metaData} from "src/composables/meta";
|
import {metaData} from "src/composables/meta";
|
||||||
|
import {homepageBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
const $route = useRoute();
|
const $route = useRoute();
|
||||||
const help = {
|
const help = {
|
||||||
@@ -50,7 +51,6 @@ const help = {
|
|||||||
const opened = ref({});
|
const opened = ref({});
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
opened.value[$route.query.h] = true;
|
opened.value[$route.query.h] = true;
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
useAppStore().setPageTitle("Nápověda");
|
useAppStore().setPageTitle("Nápověda");
|
||||||
@@ -58,7 +58,7 @@ useMeta(() => metaData({
|
|||||||
title: "Nápověda",
|
title: "Nápověda",
|
||||||
}));
|
}));
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs([
|
||||||
{label: "Polétání.cz", to: {name: "homepage"}},
|
...homepageBreadcrumbs(),
|
||||||
{label: "Nápověda"},
|
{label: "Nápověda"},
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import ContentCard from "components/ContentCard.vue";
|
import ContentCard from "components/ContentCard.vue";
|
||||||
import {useAppStore} from "stores/App";
|
import {useAppStore} from "stores/App";
|
||||||
|
import {homepageBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
useAppStore().setPageTitle("Správa osobních údajů");
|
useAppStore().setPageTitle("Správa osobních údajů");
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs([
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
...homepageBreadcrumbs(),
|
||||||
{label: "Správa osobních údajů"}
|
{label: "Správa osobních údajů"}
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import ContentCard from "components/ContentCard.vue";
|
import ContentCard from "components/ContentCard.vue";
|
||||||
import {useAppStore} from "stores/App";
|
import {useAppStore} from "stores/App";
|
||||||
|
import {homepageBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
useAppStore().setPageTitle("Podmínky používání");
|
useAppStore().setPageTitle("Podmínky používání");
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs([
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
...homepageBreadcrumbs(),
|
||||||
{label: "Podmínky používání"}
|
{label: "Podmínky používání"}
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {useRouter} from "vue-router";
|
import {useMeta} from "quasar";
|
||||||
import {useMeta, useQuasar} from "quasar";
|
|
||||||
import AircraftDetailSkeleton from "components/aircrafts/skeletons/AircraftDetailSkeleton.vue";
|
import AircraftDetailSkeleton from "components/aircrafts/skeletons/AircraftDetailSkeleton.vue";
|
||||||
import {useAppStore} from "stores/App";
|
import {useAppStore} from "stores/App";
|
||||||
import FlightsList from "components/flights/FlightsList.vue";
|
import FlightsList from "components/flights/FlightsList.vue";
|
||||||
@@ -25,9 +24,7 @@ import FlightsListSkeleton from "components/flights/skeletons/FlightsListSkeleto
|
|||||||
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
||||||
import PhotoGallerySkeleton from "components/photos/skeletons/PhotoGallerySkeleton.vue";
|
import PhotoGallerySkeleton from "components/photos/skeletons/PhotoGallerySkeleton.vue";
|
||||||
import {usePagination} from "src/composables/pagination";
|
import {usePagination} from "src/composables/pagination";
|
||||||
|
import {homepageBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
const $q = useQuasar();
|
|
||||||
const $router = useRouter();
|
|
||||||
|
|
||||||
const {aircraft, isQueryRunning} = storeToRefs(useAircraftsStore());
|
const {aircraft, isQueryRunning} = storeToRefs(useAircraftsStore());
|
||||||
const {photos, isQueryRunning: arePhotosLoading} = storeToRefs(usePhotosStore());
|
const {photos, isQueryRunning: arePhotosLoading} = storeToRefs(usePhotosStore());
|
||||||
@@ -43,20 +40,15 @@ useMeta(() => metaData({
|
|||||||
description: aircraft.value.description || `Detail letadla ${aircraft.value.callSign}.`
|
description: aircraft.value.description || `Detail letadla ${aircraft.value.callSign}.`
|
||||||
}));
|
}));
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs([
|
||||||
{label: "Polétání.cz", to: {name: "homepage"}},
|
...homepageBreadcrumbs(),
|
||||||
{label: "Letadla"},
|
{label: "Letadla"},
|
||||||
{label: aircraft.value.callSign}
|
{label: aircraft.value.callSign}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const {filters, loadPage, paginationLimit} = usePagination();
|
const {filters, loadPage, paginationLimit} = usePagination({fetchFunction: useFlightsStore().fetchPublic});
|
||||||
|
|
||||||
filters.value = {aircraftId: aircraft.value.id};
|
filters.value = {aircraftId: aircraft.value.id};
|
||||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
|
||||||
fetchFunc: useFlightsStore().fetchPublic, appendItems
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadNextFlightsPage(false);
|
loadPage(false);
|
||||||
usePhotosStore().fetchPublic({aircraftId: aircraft.value.id});
|
usePhotosStore().fetchPublic({aircraftId: aircraft.value.id});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -85,7 +77,7 @@ onMounted(() => {
|
|||||||
:total-items-count="totalItemsCount"
|
:total-items-count="totalItemsCount"
|
||||||
:is-query-running="areFlightsLoading"
|
:is-query-running="areFlightsLoading"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
@load-more="loadNextFlightsPage(true)"
|
@load-more="loadPage(true)"
|
||||||
:public="true"
|
:public="true"
|
||||||
/>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import {metaData} from "src/composables/meta";
|
|||||||
import PhotoGallerySkeleton from "components/photos/skeletons/PhotoGallerySkeleton.vue";
|
import PhotoGallerySkeleton from "components/photos/skeletons/PhotoGallerySkeleton.vue";
|
||||||
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
||||||
import {usePagination} from "src/composables/pagination";
|
import {usePagination} from "src/composables/pagination";
|
||||||
|
import {publicCopilotBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
pilot: {
|
pilot: {
|
||||||
@@ -38,11 +39,7 @@ const {flights, totalItemsCount, isQueryRunning: areFlightsLoading} = storeToRef
|
|||||||
const {photos, isQueryRunning: arePhotosLoading} = storeToRefs(usePhotosStore());
|
const {photos, isQueryRunning: arePhotosLoading} = storeToRefs(usePhotosStore());
|
||||||
|
|
||||||
useAppStore().setPageTitle(`${props.pilot.name} + ${copilot.value.name}`);
|
useAppStore().setPageTitle(`${props.pilot.name} + ${copilot.value.name}`);
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs(publicCopilotBreadcrumbs(props.pilot));
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
|
||||||
{to: {name: "publicProfileDetail", params: {username: props.pilot.publicUsername}}, label: `@${props.pilot.publicUsername}`},
|
|
||||||
{label: copilot.value.name}
|
|
||||||
]);
|
|
||||||
|
|
||||||
useMeta(() => metaData({
|
useMeta(() => metaData({
|
||||||
title: copilot.value.name,
|
title: copilot.value.name,
|
||||||
@@ -51,14 +48,10 @@ useMeta(() => metaData({
|
|||||||
image: copilot.value.titleImage?.url
|
image: copilot.value.titleImage?.url
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const {filters, loadPage, paginationLimit} = usePagination();
|
const {filters, loadPage, paginationLimit} = usePagination({fetchFunction: useFlightsStore().fetchPublic});
|
||||||
filters.value = {copilotId: copilot.value.id};
|
filters.value = {copilotId: copilot.value.id};
|
||||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
|
||||||
fetchFunc: useFlightsStore().fetchPublic, appendItems
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadNextFlightsPage(false);
|
loadPage(false);
|
||||||
usePhotosStore().fetchPublic({copilotId: copilot.value.id})
|
usePhotosStore().fetchPublic({copilotId: copilot.value.id})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -82,7 +75,7 @@ onMounted(() => {
|
|||||||
:is-query-running="areFlightsLoading"
|
:is-query-running="areFlightsLoading"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
:public="true"
|
:public="true"
|
||||||
@load-more="loadNextFlightsPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ export default {
|
|||||||
import {storeToRefs} from "pinia";
|
import {storeToRefs} from "pinia";
|
||||||
import ContentCard from "components/ContentCard.vue";
|
import ContentCard from "components/ContentCard.vue";
|
||||||
import {useAppStore} from "stores/App";
|
import {useAppStore} from "stores/App";
|
||||||
import {useMeta, useQuasar} from "quasar";
|
import {useMeta} from "quasar";
|
||||||
import {metaData} from "src/composables/meta";
|
import {metaData} from "src/composables/meta";
|
||||||
import {flightName} from "src/composables/flight";
|
import {flightName} from "src/composables/flight";
|
||||||
import {usePhotosStore} from "stores/Photos";
|
import {usePhotosStore} from "stores/Photos";
|
||||||
import {onMounted, ref} from "vue";
|
import {onMounted} from "vue";
|
||||||
import PhotosEditorListSimple from "components/photos/PhotosEditorListSimple.vue";
|
import PhotosEditorListSimple from "components/photos/PhotosEditorListSimple.vue";
|
||||||
import {copilotBreadcrumbs} from "src/composables/breadcrumbs";
|
import {publicCopilotBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
import FlightFormPhotos from "components/flights/form/FlightFormPhotos.vue";
|
import FlightFormPhotos from "components/flights/form/FlightFormPhotos.vue";
|
||||||
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
||||||
import {useRoute} from "vue-router";
|
import {useRoute} from "vue-router";
|
||||||
@@ -47,7 +47,7 @@ const {photos, isQueryRunning: arePhotosLoading} = storeToRefs(usePhotosStore())
|
|||||||
|
|
||||||
useAppStore().setPageTitle(`Nahraj fotky - ${props.pilot.name} - ${flightName(flight.value)}`);
|
useAppStore().setPageTitle(`Nahraj fotky - ${props.pilot.name} - ${flightName(flight.value)}`);
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs([
|
||||||
...copilotBreadcrumbs(props.pilot, flight.value, flight.value.event, copilot.value),
|
...publicCopilotBreadcrumbs(props.pilot, flight.value, flight.value.event, copilot.value),
|
||||||
{label: "Nahraj fotky"},
|
{label: "Nahraj fotky"},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ import {useMeta} from "quasar";
|
|||||||
import {metaData} from "src/composables/meta";
|
import {metaData} from "src/composables/meta";
|
||||||
import EventBasicInfo from "components/event/EventBasicInfo.vue";
|
import EventBasicInfo from "components/event/EventBasicInfo.vue";
|
||||||
import EventFlightsMap from "components/event/EventFlightsMap.vue";
|
import EventFlightsMap from "components/event/EventFlightsMap.vue";
|
||||||
|
import {publicEventBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
import {onMounted} from "vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
pilot: {
|
pilot: {
|
||||||
@@ -31,23 +33,18 @@ const props = defineProps({
|
|||||||
const {isQueryRunning, event} = storeToRefs(useEventsStore());
|
const {isQueryRunning, event} = storeToRefs(useEventsStore());
|
||||||
|
|
||||||
useAppStore().setPageTitle(event.value.name);
|
useAppStore().setPageTitle(event.value.name);
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs(publicEventBreadcrumbs(props.pilot, event.value, false));
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
|
||||||
{to: {name: "publicProfileDetail", params: {username: props.pilot.publicUsername}}, label: `@${props.pilot.publicUsername}`},
|
|
||||||
{to: {name: "publicEventsList", params: {username: props.pilot.publicUsername}}, label: "Události"},
|
|
||||||
{label: event.value.name}
|
|
||||||
]);
|
|
||||||
useMeta(() => metaData({
|
useMeta(() => metaData({
|
||||||
title: event.value.name,
|
title: event.value.name,
|
||||||
description: event.value.description
|
description: event.value.description
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const {filters, loadPage, paginationLimit} = usePagination();
|
const {filters, loadPage, paginationLimit} = usePagination({fetchFunction: useFlightsStore().fetchPublic});
|
||||||
filters.value = {username: props.pilot.publicUsername, eventId: event.value.id};
|
filters.value = {username: props.pilot.publicUsername, eventId: event.value.id};
|
||||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
|
||||||
fetchFunc: useFlightsStore().fetchPublic, appendItems
|
onMounted(() => {
|
||||||
});
|
loadPage(false);
|
||||||
loadNextFlightsPage(false);
|
})
|
||||||
|
|
||||||
const {flights, totalItemsCount, isQueryRunning: areFlightsLoading} = storeToRefs(useFlightsStore());
|
const {flights, totalItemsCount, isQueryRunning: areFlightsLoading} = storeToRefs(useFlightsStore());
|
||||||
</script>
|
</script>
|
||||||
@@ -80,7 +77,7 @@ const {flights, totalItemsCount, isQueryRunning: areFlightsLoading} = storeToRef
|
|||||||
:is-query-running="areFlightsLoading"
|
:is-query-running="areFlightsLoading"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
:public="true"
|
:public="true"
|
||||||
@load-more="loadNextFlightsPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {useEventsStore} from "stores/Events";
|
|||||||
import {storeToRefs} from "pinia";
|
import {storeToRefs} from "pinia";
|
||||||
import {useMeta} from "quasar";
|
import {useMeta} from "quasar";
|
||||||
import {commonKeywords, metaData} from "src/composables/meta";
|
import {commonKeywords, metaData} from "src/composables/meta";
|
||||||
|
import {publicProfileBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
pilot: {
|
pilot: {
|
||||||
@@ -23,8 +24,7 @@ useMeta(() => metaData({
|
|||||||
|
|
||||||
useAppStore().setPageTitle(`${props.pilot.publicUsername}`);
|
useAppStore().setPageTitle(`${props.pilot.publicUsername}`);
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs([
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
...publicProfileBreadcrumbs(props.pilot),
|
||||||
{to: {name: "publicProfileDetail", params: {username: props.pilot.publicUsername}}, label: `@${props.pilot.publicUsername}`},
|
|
||||||
{label: "Události"}
|
{label: "Události"}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import {aircraftKeywords, flightEventKeywords, flightKeywords, metaData} from "s
|
|||||||
import ContentCard from "components/ContentCard.vue";
|
import ContentCard from "components/ContentCard.vue";
|
||||||
import {usePhotosStore} from "stores/Photos";
|
import {usePhotosStore} from "stores/Photos";
|
||||||
import {computed} from "vue";
|
import {computed} from "vue";
|
||||||
|
import {publicFlightBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
const {isQueryRunning, flight} = storeToRefs(useFlightsStore());
|
const {isQueryRunning, flight} = storeToRefs(useFlightsStore());
|
||||||
|
|
||||||
@@ -37,24 +38,10 @@ usePhotosStore().fetchPublic({flightId: flight.value.id});
|
|||||||
const {isQueryRunning: arePhotosLoading, photos: flightPhotos} = storeToRefs(usePhotosStore());
|
const {isQueryRunning: arePhotosLoading, photos: flightPhotos} = storeToRefs(usePhotosStore());
|
||||||
|
|
||||||
const flightNameFormatted = flightName(flight.value);
|
const flightNameFormatted = flightName(flight.value);
|
||||||
useAppStore().setPageTitle(flightNameFormatted);
|
|
||||||
|
|
||||||
const event = computed(() => flight.value.event);
|
const event = computed(() => flight.value.event);
|
||||||
const breadcrumbs = [
|
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
useAppStore().setPageTitle(flightNameFormatted);
|
||||||
{to: {name: "publicProfileDetail", params: {username: props.pilot.publicUsername}}, label: `@${props.pilot.publicUsername}`},
|
useAppStore().setBreadcrumbs(publicFlightBreadcrumbs(props.pilot, flight.value, event.value, false));
|
||||||
]
|
|
||||||
if (event.value && event.value.isPublic) {
|
|
||||||
breadcrumbs.push({to: {name: 'publicEventsList', username: props.pilot.publicUsername}, label: "Události"});
|
|
||||||
breadcrumbs.push({
|
|
||||||
to: {
|
|
||||||
name: 'publicEventDetail',
|
|
||||||
params: {eventSlug: event.value.urlSlug, username: props.pilot.publicUsername}
|
|
||||||
}, label: event.value.name
|
|
||||||
});
|
|
||||||
}
|
|
||||||
breadcrumbs.push({label: flightNameFormatted})
|
|
||||||
useAppStore().setBreadcrumbs(breadcrumbs);
|
|
||||||
|
|
||||||
useMeta(() => metaData({
|
useMeta(() => metaData({
|
||||||
title: `${flightNameFormatted} - ${props.pilot.name}`,
|
title: `${flightNameFormatted} - ${props.pilot.name}`,
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import {storeToRefs} from "pinia";
|
|||||||
import {commonKeywords, metaData} from "src/composables/meta";
|
import {commonKeywords, metaData} from "src/composables/meta";
|
||||||
import {useMeta} from "quasar";
|
import {useMeta} from "quasar";
|
||||||
import {usePagination} from "src/composables/pagination";
|
import {usePagination} from "src/composables/pagination";
|
||||||
|
import {publicProfileBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
import {onMounted} from "vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
pilot: {
|
pilot: {
|
||||||
@@ -24,18 +26,13 @@ useMeta(() => metaData({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
useAppStore().setPageTitle(props.pilot.publicUsername);
|
useAppStore().setPageTitle(props.pilot.publicUsername);
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs(publicProfileBreadcrumbs(props.pilot, false))
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
|
||||||
{label: `@${props.pilot.publicUsername}`},
|
|
||||||
])
|
|
||||||
|
|
||||||
const {filters, loadPage, paginationLimit} = usePagination();
|
const {filters, loadPage, paginationLimit} = usePagination({fetchFunction: useFlightsStore().fetchPublic});
|
||||||
filters.value = {username: props.pilot.publicUsername};
|
filters.value = {username: props.pilot.publicUsername};
|
||||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
onMounted(() => {
|
||||||
fetchFunc: useFlightsStore().fetchPublic,
|
loadPage(false);
|
||||||
appendItems
|
|
||||||
});
|
});
|
||||||
loadNextFlightsPage(false);
|
|
||||||
|
|
||||||
const {flights, totalItemsCount, isQueryRunning: areFlightsLoading} = storeToRefs(useFlightsStore());
|
const {flights, totalItemsCount, isQueryRunning: areFlightsLoading} = storeToRefs(useFlightsStore());
|
||||||
</script>
|
</script>
|
||||||
@@ -56,6 +53,6 @@ const {flights, totalItemsCount, isQueryRunning: areFlightsLoading} = storeToRef
|
|||||||
:is-query-running="areFlightsLoading"
|
:is-query-running="areFlightsLoading"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
:public="true"
|
:public="true"
|
||||||
@load-more="loadNextFlightsPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
|||||||
import {onMounted} from "vue";
|
import {onMounted} from "vue";
|
||||||
import PhotoGallerySkeleton from "components/photos/skeletons/PhotoGallerySkeleton.vue";
|
import PhotoGallerySkeleton from "components/photos/skeletons/PhotoGallerySkeleton.vue";
|
||||||
import {usePagination} from "src/composables/pagination";
|
import {usePagination} from "src/composables/pagination";
|
||||||
|
import {publicPOIBaseBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
const {pointOfInterest, isQueryRunning} = storeToRefs(usePointsOfInterestStore());
|
const {pointOfInterest, isQueryRunning} = storeToRefs(usePointsOfInterestStore());
|
||||||
const {photos, isQueryRunning: arePhotosLoading} = storeToRefs(usePhotosStore());
|
const {photos, isQueryRunning: arePhotosLoading} = storeToRefs(usePhotosStore());
|
||||||
@@ -36,23 +37,16 @@ useMeta(() => metaData({
|
|||||||
description: pointOfInterest.value.description,
|
description: pointOfInterest.value.description,
|
||||||
}));
|
}));
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs([
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
...publicPOIBaseBreadcrumbs(),
|
||||||
{to: {name: 'publicPOIs'}, label: "Místa"},
|
|
||||||
{label: pointOfInterest.value.name}
|
{label: pointOfInterest.value.name}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const {filters, loadPage, paginationLimit} = usePagination();
|
const {filters, loadPage, paginationLimit} = usePagination({fetchFunction: useFlightsStore().fetchPublic});
|
||||||
filters.value = {pointOfInterestId: pointOfInterest.value.id};
|
filters.value = {pointOfInterestId: pointOfInterest.value.id};
|
||||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
|
||||||
fetchFunc: useFlightsStore().fetchPublic,
|
|
||||||
appendItems
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
usePhotosStore().fetchPublic({pointOfInterestId: pointOfInterest.value.id});
|
usePhotosStore().fetchPublic({pointOfInterestId: pointOfInterest.value.id});
|
||||||
loadNextFlightsPage(false);
|
loadPage(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -85,7 +79,7 @@ onMounted(() => {
|
|||||||
:is-query-running="areFlightsLoading"
|
:is-query-running="areFlightsLoading"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
:public="true"
|
:public="true"
|
||||||
@load-more="loadNextFlightsPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -8,26 +8,23 @@ import {useMeta} from "quasar";
|
|||||||
import {metaData} from "src/composables/meta";
|
import {metaData} from "src/composables/meta";
|
||||||
import {usePagination} from "src/composables/pagination";
|
import {usePagination} from "src/composables/pagination";
|
||||||
import ListFilters from "components/ListFilters.vue";
|
import ListFilters from "components/ListFilters.vue";
|
||||||
|
import {homepageBreadcrumbs, publicPOIBaseBreadcrumbs} from "src/composables/breadcrumbs";
|
||||||
|
|
||||||
useAppStore().setPageTitle("Místa");
|
useAppStore().setPageTitle("Místa");
|
||||||
useAppStore().setBreadcrumbs([
|
useAppStore().setBreadcrumbs(publicPOIBaseBreadcrumbs());
|
||||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
|
||||||
{label: "Místa"},
|
|
||||||
]);
|
|
||||||
useMeta(() => metaData({
|
useMeta(() => metaData({
|
||||||
title: "Místa"
|
title: "Místa"
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const {filters, loadPage, paginationOffset, paginationLimit} = usePagination();
|
const {filters, loadPage, paginationOffset, paginationLimit} = usePagination({
|
||||||
const loadNextPage = (appendItems) => loadPage({
|
fetchFunction: usePointsOfInterestStore().fetchPublic
|
||||||
fetchFunc: usePointsOfInterestStore().fetchPublic, appendItems
|
|
||||||
});
|
});
|
||||||
loadNextPage(false);
|
loadPage(false);
|
||||||
|
|
||||||
const handleFiltersChanged = (newFilters) => {
|
const handleFiltersChanged = (newFilters) => {
|
||||||
paginationOffset.value = 0;
|
paginationOffset.value = 0;
|
||||||
filters.value = newFilters;
|
filters.value = newFilters;
|
||||||
loadNextPage(false);
|
loadPage(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const {pointsOfInterest, totalItemsCount, isQueryRunning} = storeToRefs(usePointsOfInterestStore());
|
const {pointsOfInterest, totalItemsCount, isQueryRunning} = storeToRefs(usePointsOfInterestStore());
|
||||||
@@ -45,7 +42,7 @@ const {pointsOfInterest, totalItemsCount, isQueryRunning} = storeToRefs(usePoint
|
|||||||
:total-items-count="totalItemsCount"
|
:total-items-count="totalItemsCount"
|
||||||
:is-query-running="isQueryRunning"
|
:is-query-running="isQueryRunning"
|
||||||
:items-per-page="paginationLimit"
|
:items-per-page="paginationLimit"
|
||||||
@load-more="loadNextPage(true)"
|
@load-more="loadPage(true)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ const $q = useQuasar();
|
|||||||
useAppStore().setPageTitle("Zapomenuté heslo");
|
useAppStore().setPageTitle("Zapomenuté heslo");
|
||||||
useMeta(() => metaData({
|
useMeta(() => metaData({
|
||||||
title: "Zapomenuté heslo",
|
title: "Zapomenuté heslo",
|
||||||
|
index: false
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const requestPasswordChange = () => {
|
const requestPasswordChange = () => {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ const $q = useQuasar();
|
|||||||
useAppStore().setPageTitle("Přihlášení");
|
useAppStore().setPageTitle("Přihlášení");
|
||||||
useMeta(() => metaData({
|
useMeta(() => metaData({
|
||||||
title: "Přihlášení",
|
title: "Přihlášení",
|
||||||
|
index: false
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const logUser = () => {
|
const logUser = () => {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ const $q = useQuasar();
|
|||||||
useAppStore().setPageTitle("Změna hesla");
|
useAppStore().setPageTitle("Změna hesla");
|
||||||
useMeta(() => metaData({
|
useMeta(() => metaData({
|
||||||
title: "Změna hesla",
|
title: "Změna hesla",
|
||||||
|
index: false
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const tokenInfo = reactive({
|
const tokenInfo = reactive({
|
||||||
|
|||||||
Reference in New Issue
Block a user