diff --git a/docker-compose.yml b/docker-compose.yml
index 37bbaee..240d5dc 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -36,7 +36,7 @@ services:
- ./src-ssr:/app/src-ssr
- ./public:/app/public
# - ./node_modules:/app/node_modules:delegated
- command: quasar dev -m ssr
+ command: quasar dev # -m ssr
environment:
API_URL: "http://127.0.0.1:8000"
diff --git a/public/hp/app_screenshot.png b/public/hp/app_screenshot.png
deleted file mode 100644
index 6eb6517..0000000
Binary files a/public/hp/app_screenshot.png and /dev/null differ
diff --git a/public/hp/bg.jpg b/public/hp/bg.jpg
deleted file mode 100644
index 3850bf5..0000000
Binary files a/public/hp/bg.jpg and /dev/null differ
diff --git a/public/hp/desktop-preview-350.png b/public/hp/desktop-preview-350.png
new file mode 100644
index 0000000..a2b7b13
Binary files /dev/null and b/public/hp/desktop-preview-350.png differ
diff --git a/public/hp/desktop-preview-350.webp b/public/hp/desktop-preview-350.webp
new file mode 100644
index 0000000..de0462d
Binary files /dev/null and b/public/hp/desktop-preview-350.webp differ
diff --git a/public/hp/desktop-preview.png b/public/hp/desktop-preview.png
new file mode 100644
index 0000000..f57a70a
Binary files /dev/null and b/public/hp/desktop-preview.png differ
diff --git a/public/hp/mobile-preview-200.png b/public/hp/mobile-preview-200.png
new file mode 100644
index 0000000..a09870d
Binary files /dev/null and b/public/hp/mobile-preview-200.png differ
diff --git a/public/hp/mobile-preview-200.webp b/public/hp/mobile-preview-200.webp
new file mode 100644
index 0000000..687f450
Binary files /dev/null and b/public/hp/mobile-preview-200.webp differ
diff --git a/public/hp/mobile-preview.png b/public/hp/mobile-preview.png
new file mode 100644
index 0000000..50fe695
Binary files /dev/null and b/public/hp/mobile-preview.png differ
diff --git a/src-ssr/middlewares/render.js b/src-ssr/middlewares/render.js
index 2397f83..e70c9c5 100644
--- a/src-ssr/middlewares/render.js
+++ b/src-ssr/middlewares/render.js
@@ -30,7 +30,8 @@ export default ssrMiddleware(({ app, resolve, render, serve }) => {
// Should reach here only if no "catch-all" route
// is defined in /src/routes
- res.status(404).send('404 | Page Not Found')
+ // res.status(404).send('404 | Page Not Found')
+ res.redirect(resolve.urlPath('404'))
} else if (process.env.DEV) {
// well, we treat any other code as error;
// if we're in dev mode, then we can use Quasar CLI
@@ -39,6 +40,7 @@ export default ssrMiddleware(({ app, resolve, render, serve }) => {
// serve.error is available on dev only
serve.error({ err, req, res })
+
} else {
// we're in production, so we should have another method
// to display something to the client when we encounter an error
@@ -47,8 +49,7 @@ export default ssrMiddleware(({ app, resolve, render, serve }) => {
// Render Error Page on production or
// create a route (/src/routes) for an error page and redirect to it
- res.status(500).send('500 | Internal Server Error')
- // console.error(err.stack)
+ res.redirect(resolve.urlPath('500'))
}
})
})
diff --git a/src/App.vue b/src/App.vue
index 17dfbe1..146e207 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,7 +1,7 @@
+
+
+
+
+
Fotogalerie ze vzduchu
+
+
Polétání.cz je aplikace pro piloty, kteří si chtějí spravovat fotografie ze svých výletů, zobrazovat je na mapě a ukládat si trasy svých výletů.
+
+
+ Založit účet
+
+
+
+
+
+
+
diff --git a/src/graphql/queries/user.js b/src/graphql/queries/user.js
index 2319270..70463c4 100644
--- a/src/graphql/queries/user.js
+++ b/src/graphql/queries/user.js
@@ -1,8 +1,8 @@
import gql from "graphql-tag";
import {FRAGMENT_USER_FULL_INFO} from "src/graphql/fragments/user";
-export const USER_DETAIL = gql`
-query userDetail($username: String!) {
+export const PILOT_DETAIL = gql`
+query pilotDetail($username: String!) {
user(username: $username) {
...userFullInfo
}
diff --git a/src/layouts/PublicLayout.vue b/src/layouts/PublicLayout.vue
index 73af82f..9f45e32 100644
--- a/src/layouts/PublicLayout.vue
+++ b/src/layouts/PublicLayout.vue
@@ -38,8 +38,7 @@ import {useLoggedUserStore} from "stores/LoggedUser";
export default {
preFetch() {
- // todo: nevim proc tu nefunguje refresh, neposila se credentials
- return useLoggedUserStore().fetchLoggedUserDetail({refresh: false});
+ return useLoggedUserStore().fetchLoggedUserDetail({refresh: false}).catch(e => {});
}
}
@@ -51,6 +50,6 @@ import AvatarFromPhoto from "components/avatars/AvatarFromPhoto.vue";
import BreadcrumbsSkeleton from "components/navigation/BreadcrumbsSkeleton.vue";
import AppFooter from "components/AppFooter.vue";
-const {pageTitle, breadcrumbs} = storeToRefs(useAppStore());
+const {pageTitle, breadcrumbs, appStatus} = storeToRefs(useAppStore());
const loggedUser = storeToRefs(useLoggedUserStore()).user;
diff --git a/src/pages/ErrorNotFound.vue b/src/pages/errors/ErrorNotFound.vue
similarity index 68%
rename from src/pages/ErrorNotFound.vue
rename to src/pages/errors/ErrorNotFound.vue
index b227151..9a7691f 100644
--- a/src/pages/ErrorNotFound.vue
+++ b/src/pages/errors/ErrorNotFound.vue
@@ -2,10 +2,12 @@
-
+
+ Tohle jsme tu nenašli...
+
-
- 404
+
+ ... zkus si srovnat mapu podle kurzu, najít významnou linii bezpečně před sebou a tu vyhlížej...
+
+
+
+
+
+
+ Uups…
+
+ Něco tu havarovalo...
+
+ Pro další letecké nehody zatím koukni
sem. Za chvíli to tu snad bude fungovat.
+
+
+
+
+
diff --git a/src/pages/public/IndexPage.vue b/src/pages/public/IndexPage.vue
index 1f3ffa8..8189991 100644
--- a/src/pages/public/IndexPage.vue
+++ b/src/pages/public/IndexPage.vue
@@ -7,6 +7,7 @@ import {onMounted} from "vue";
import {useFlightsStore} from "stores/Flights";
import {storeToRefs} from "pinia";
import TimelineDescription from "components/indexPage/TimelineDescription.vue";
+import IntroBlock from "components/indexPage/IntroBlock.vue";
useMeta(() => metaData({
title: "Polétání.cz",
@@ -21,7 +22,7 @@ const {flights, isQueryRunning} = storeToRefs(useFlightsStore());
-
+
Polétání.cz
@@ -34,22 +35,8 @@ const {flights, isQueryRunning} = storeToRefs(useFlightsStore());
-
-
-
-
Fotogalerie ze vzduchu
-
Polétání.cz je aplikace pro piloty, kteří si chtějí spravovat fotografie ze svých výletů, zobrazovat je na mapě a ukládat si trasy svých výletů.
-
-
- Založit účet
-
-
-
-
-
-
-
+
Poslední lety
@@ -59,26 +46,9 @@ const {flights, isQueryRunning} = storeToRefs(useFlightsStore());
-
-
-
+
-
diff --git a/src/pages/public/PilotProfileWrapper.vue b/src/pages/public/PilotProfileWrapper.vue
index 706ab0b..77280d3 100644
--- a/src/pages/public/PilotProfileWrapper.vue
+++ b/src/pages/public/PilotProfileWrapper.vue
@@ -1,9 +1,10 @@
diff --git a/src/pages/public/pilotProfile/FlightDetailPage.vue b/src/pages/public/pilotProfile/FlightDetailPage.vue
index f414b08..3bb4fbe 100644
--- a/src/pages/public/pilotProfile/FlightDetailPage.vue
+++ b/src/pages/public/pilotProfile/FlightDetailPage.vue
@@ -43,8 +43,8 @@ useAppStore().setBreadcrumbs([
useMeta(() => metaData({
title: `${flightNameFormatted} - ${props.pilot.name}`,
keywords: ["let", "výlet", "letadlo", props.pilot.name, flight.value.aircraft.callSign],
- description: flight.description,
- image: flight.titlePhoto?.url
+ description: flight.value.description,
+ image: flight.value.titlePhoto?.url
}
));
diff --git a/src/router/index.js b/src/router/index.js
index e14e33a..d9cb8a3 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -16,7 +16,7 @@ export default route(function ({ store }) {
history: createHistory(process.env.VUE_ROUTER_BASE)
})
- Router.afterEach(async (to, from) => {
+ Router.beforeEach(async (to, from) => {
if (from.name !== to.name) {
useAppStore(store).resetAfterRouteChange();
}
diff --git a/src/router/routes.js b/src/router/routes.js
index 7ed79cc..2061177 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -27,7 +27,6 @@ const routes = [
{path: 'letadlo/:id', name: "publicAircraftDetail", component: () => import('pages/public/aircraft/AircraftDetailPage.vue')},
{path: 'mista', name: "publicPOIs", component: () => import('pages/public/poi/PointsOfInterestPage.vue')},
{path: 'mista/:id', name: "publicPOIDetail", component: () => import('pages/public/poi/PointOfInterestDetailPage.vue')},
-
]
},
{
@@ -69,8 +68,16 @@ const routes = [
]
},
- {path: '/refresh', name: "profileRefresh", component: () => import('pages/profile/ProfileRefreshPage.vue')},
+ {
+ path: '/errors',
+ children: [
+ {path: '404', name: "404", component: () => import('pages/errors/ErrorNotFound.vue')},
+ {path: '500', name: "500", component: () => import('pages/errors/ServerError.vue')},
+ ]
+ },
+
+ {path: '/refresh', name: "profileRefresh", component: () => import('pages/profile/ProfileRefreshPage.vue')},
// Always leave this as last one,
diff --git a/src/stores/App.js b/src/stores/App.js
index e83e876..3c62568 100644
--- a/src/stores/App.js
+++ b/src/stores/App.js
@@ -1,6 +1,6 @@
import {defineStore} from 'pinia'
import {ref} from "vue";
-import {paginationOffset} from "src/composables/pagination";
+import {paginationLimit, paginationOffset} from "src/composables/pagination";
export const useAppStore = defineStore('App', () => {
const pageTitle = ref(null);
@@ -8,10 +8,13 @@ export const useAppStore = defineStore('App', () => {
const appStatus = ref(200); // TODO: toto nejspis nebude potreba!
const resetAfterRouteChange = () => {
+ console.log("reset after route change");
pageTitle.value = null;
appStatus.value = 200;
breadcrumbs.value = null;
+ // reset strankovani po prechodu na strankach
+ paginationLimit.value = 10;
paginationOffset.value = 0;
};
diff --git a/src/stores/LoggedUser.js b/src/stores/LoggedUser.js
index a5b9770..66d329d 100644
--- a/src/stores/LoggedUser.js
+++ b/src/stores/LoggedUser.js
@@ -1,7 +1,7 @@
import {defineStore} from 'pinia'
import {api} from "boot/axios";
import {EDIT_USER} from "src/graphql/mutations/user";
-import {LOGGED_USER_DETAIL, USER_DETAIL} from "src/graphql/queries/user";
+import {LOGGED_USER_DETAIL, PILOT_DETAIL} from "src/graphql/queries/user";
import {ref} from "vue";
import {mutate, query} from "stores/helpers";
import {cookies} from "boot/cookies";
diff --git a/src/stores/Pilots.js b/src/stores/Pilots.js
index 15ff484..5d93ea0 100644
--- a/src/stores/Pilots.js
+++ b/src/stores/Pilots.js
@@ -1,7 +1,7 @@
import {defineStore} from 'pinia'
import {api} from "boot/axios";
import {EDIT_USER} from "src/graphql/mutations/user";
-import {LOGGED_USER_DETAIL, USER_DETAIL} from "src/graphql/queries/user";
+import {LOGGED_USER_DETAIL, PILOT_DETAIL} from "src/graphql/queries/user";
import {ref} from "vue";
import {mutate, query} from "stores/helpers";
import {cookies} from "boot/cookies";
@@ -12,7 +12,7 @@ export const usePilotsStore = defineStore('Pilots', () => {
const fetchPublicPilotDetail = (username) => query({
isQueryRunning,
- query: USER_DETAIL,
+ query: PILOT_DETAIL,
variables: {username}
}).then(item => {
pilot.value = item;
diff --git a/src/stores/helpers.js b/src/stores/helpers.js
index 8386343..5f4c166 100644
--- a/src/stores/helpers.js
+++ b/src/stores/helpers.js
@@ -40,6 +40,7 @@ export const query = ({isQueryRunning, query, variables, refreshUnauthorized}) =
}
return result.data[queryName]
})
+ .catch(e => Promise.reject(e))
.finally(() => isQueryRunning.value = false);
}