Bugfixing
This commit is contained in:
@@ -6,13 +6,10 @@ TAG="latest"
|
|||||||
DOCKER_REGISTRY="docker.kvacek.cz"
|
DOCKER_REGISTRY="docker.kvacek.cz"
|
||||||
CONTAINER_IMAGE="$DOCKER_REGISTRY/$IMAGE_NAME:$TAG"
|
CONTAINER_IMAGE="$DOCKER_REGISTRY/$IMAGE_NAME:$TAG"
|
||||||
|
|
||||||
docker login $DOCKER_REGISTRY
|
|
||||||
# na Ubuntu je potreba sudo apt install gnupg2 pass
|
# na Ubuntu je potreba sudo apt install gnupg2 pass
|
||||||
|
docker login $DOCKER_REGISTRY
|
||||||
docker build -t $CONTAINER_IMAGE .
|
docker build -t $CONTAINER_IMAGE .
|
||||||
docker push $CONTAINER_IMAGE
|
docker push $CONTAINER_IMAGE
|
||||||
|
|
||||||
# TODO: nahrat docker-compose.prod.yml
|
scp docker-compose.prod.yml michal@kvacek.cz:/var/www/poletani.cz/app/docker-compose.yml
|
||||||
# TODO: spustit dc down && dc up
|
ssh michal@kvacek.cz "cd /var/www/poletani.cz/app && docker-compose pull && docker-compose down --remove-orphans && docker-compose up -d"
|
||||||
# TODO: nahravat i config pro apache?
|
|
||||||
# TODO: api -> alembic
|
|
||||||
|
|||||||
@@ -2,5 +2,6 @@ version: "3.3"
|
|||||||
services:
|
services:
|
||||||
poletani-app:
|
poletani-app:
|
||||||
image: "docker.kvacek.cz/poletani/app:latest"
|
image: "docker.kvacek.cz/poletani/app:latest"
|
||||||
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 9000:80
|
- 9000:80
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const props = defineProps({
|
|||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<div>
|
<div>
|
||||||
<strong>{{ flight.takeoffAirport.name }}</strong>,
|
<strong>{{flight.takeoffAirport.icaoCode}}</strong> ({{ flight.takeoffAirport.name }}),
|
||||||
čas vzletu: {{ formatDatetime(flight.takeoffDatetime, FORMAT_TIME) }}
|
čas vzletu: {{ formatDatetime(flight.takeoffDatetime, FORMAT_TIME) }}
|
||||||
|
|
||||||
<WeatherInfo class="q-mx-sm" v-if="flight.takeoffWeatherInfo" :weather="flight.takeoffWeatherInfo"/>
|
<WeatherInfo class="q-mx-sm" v-if="flight.takeoffWeatherInfo" :weather="flight.takeoffWeatherInfo"/>
|
||||||
@@ -67,7 +67,7 @@ const props = defineProps({
|
|||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<div>
|
<div>
|
||||||
<strong>{{ flight.landingAirport.name }}</strong>,
|
<strong>{{ flight.landingAirport.icaoCode }}</strong> ({{ flight.landingAirport.name }}),
|
||||||
čas přistání: {{ formatDatetime(flight.landingDatetime, FORMAT_TIME) }}
|
čas přistání: {{ formatDatetime(flight.landingDatetime, FORMAT_TIME) }}
|
||||||
<WeatherInfo class="q-mx-sm" v-if="flight.landingWeatherInfo" :weather="flight.landingWeatherInfo"/>
|
<WeatherInfo class="q-mx-sm" v-if="flight.landingWeatherInfo" :weather="flight.landingWeatherInfo"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -42,11 +42,14 @@ onMounted(() => {
|
|||||||
const photo = computed(() => props.photos[photoIndex.value]);
|
const photo = computed(() => props.photos[photoIndex.value]);
|
||||||
|
|
||||||
const nextPhoto = () => {
|
const nextPhoto = () => {
|
||||||
|
if (imageFullscreen.value) return;
|
||||||
|
|
||||||
if (photoIndex.value < props.photos.length - 1)
|
if (photoIndex.value < props.photos.length - 1)
|
||||||
photoIndex.value++
|
photoIndex.value++
|
||||||
}
|
}
|
||||||
|
|
||||||
const prevPhoto = () => {
|
const prevPhoto = () => {
|
||||||
|
if (imageFullscreen.value) return;
|
||||||
if (photoIndex.value > 0) photoIndex.value--;
|
if (photoIndex.value > 0) photoIndex.value--;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,8 +88,8 @@ const imageFullscreen = ref(false);
|
|||||||
<div :class="{'relative-position': true, 'image-full-height': imageFullscreen}">
|
<div :class="{'relative-position': true, 'image-full-height': imageFullscreen}">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<inner-image-zoom
|
<inner-image-zoom
|
||||||
move-type="pan"
|
move-type="drag"
|
||||||
:zoomScale="0.75"
|
:zoomScale="0.5"
|
||||||
:hide-hint="true"
|
:hide-hint="true"
|
||||||
:after-zoom-in="() => imageFullscreen = true"
|
:after-zoom-in="() => imageFullscreen = true"
|
||||||
:after-zoom-out="() => imageFullscreen = false"
|
:after-zoom-out="() => imageFullscreen = false"
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ export const FORMAT_DATE = "DD. MM. YYYY";
|
|||||||
export const FORMAT_TIME = "HH:mm"
|
export const FORMAT_TIME = "HH:mm"
|
||||||
|
|
||||||
export const minutesToHumanReadable = (totalMinutes) => {
|
export const minutesToHumanReadable = (totalMinutes) => {
|
||||||
const hours = Math.round(totalMinutes / 60);
|
const hours = Math.floor(totalMinutes / 60);
|
||||||
const minutes = totalMinutes % 60;
|
const minutes = totalMinutes % 60;
|
||||||
return `${hours}h ${minutes}min`
|
|
||||||
|
const hoursPart = hours > 0 ? `${hours}h ` : "";
|
||||||
|
return `${hoursPart}${minutes}min`
|
||||||
}
|
}
|
||||||
|
|
||||||
export const formatDatetimeNative = (date, format = "DD. MM. YYYY") => {
|
export const formatDatetimeNative = (date, format = "DD. MM. YYYY") => {
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ export const flightName = (flight) => {
|
|||||||
if (flight.name !== '') {
|
if (flight.name !== '') {
|
||||||
return `${flight.name} (${date})`
|
return `${flight.name} (${date})`
|
||||||
} else {
|
} else {
|
||||||
return `${flight.takeoffAirport.icaoCode} - ${flight.takeoffAirport.icaoCode} (${date})`;
|
const track = flight.track ? flight.track.map(t => t.pointOfInterest.name) : [];
|
||||||
|
const trackStr = track.length > 0 ? ` - ${track.join(" - ")} - ` : ' - ';
|
||||||
|
|
||||||
|
return `${flight.takeoffAirport.icaoCode} ${trackStr} ${flight.landingAirport.icaoCode} (${date})`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,12 @@ fragment flightListInfo on Flight {
|
|||||||
thumbnailUrl
|
thumbnailUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
track {
|
||||||
|
pointOfInterest {
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
takeoffAirport {
|
takeoffAirport {
|
||||||
...airportInfo
|
...airportInfo
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user