Add more airlines and fix edit bugs

This commit is contained in:
2026-04-20 13:48:15 +10:00
parent 5deefcbfb3
commit 061ee9dd07
5 changed files with 9 additions and 4 deletions
@@ -18,6 +18,7 @@ const chartOptions = computed(() => ({
type: 'donut', type: 'donut',
background: 'transparent', background: 'transparent',
fontFamily: 'inherit', fontFamily: 'inherit',
lazy: true,
}, },
theme: { mode: 'dark' }, theme: { mode: 'dark' },
labels: props.labels, labels: props.labels,
@@ -37,6 +37,7 @@ const chartOptions = computed(() => ({
toolbar: { show: false }, toolbar: { show: false },
animations: { enabled: false }, animations: { enabled: false },
stacked: true, stacked: true,
lazy: true,
}, },
theme: { mode: 'dark' }, theme: { mode: 'dark' },
plotOptions: { plotOptions: {
@@ -20,6 +20,7 @@ const chartOptions = computed(() => ({
toolbar: { show: false }, toolbar: { show: false },
background: 'transparent', background: 'transparent',
fontFamily: 'inherit', fontFamily: 'inherit',
lazy: true,
}, },
theme: { mode: 'dark' }, theme: { mode: 'dark' },
plotOptions: { plotOptions: {
@@ -27,7 +27,7 @@ const emit = defineEmits<{
const chartsVisible = ref(false) const chartsVisible = ref(false)
onMounted(async () => { onMounted(async () => {
setTimeout(() => { chartsVisible.value = true }, 10) setTimeout(() => { chartsVisible.value = true }, 1)
}) })
const mappedFlights = computed(() => [ const mappedFlights = computed(() => [
@@ -37,6 +37,7 @@ const mappedFlights = computed(() => [
</script> </script>
<template> <template>
<div>
<FlightMap :flights="mappedFlights" /> <FlightMap :flights="mappedFlights" />
<FlightFilter :flights="mappedFlights" @change="$emit('filtersChange', $event)" /> <FlightFilter :flights="mappedFlights" @change="$emit('filtersChange', $event)" />
<FlightStatsBar :flights="stats.pastFlights.value" :upcoming-flights="stats.upcomingFlights.value" /> <FlightStatsBar :flights="stats.pastFlights.value" :upcoming-flights="stats.upcomingFlights.value" />
@@ -44,4 +45,5 @@ const mappedFlights = computed(() => [
<div v-else style="width:100%; display:flex; align-items: center;justify-content: center"> <div v-else style="width:100%; display:flex; align-items: center;justify-content: center">
<PlaneLoader /> <PlaneLoader />
</div> </div>
</div>
</template> </template>
+3 -3
View File
@@ -86,10 +86,10 @@ function switchView(view: ProfileView) {
<Head :title="`${user.name}'s Flights`" /> <Head :title="`${user.name}'s Flights`" />
<ProfileLayout :flights="flights" :user="user"> <ProfileLayout :flights="flights" :user="user">
<ProfileViewSwitcher :active-view="activeView" @update:active-view="switchView" /> <ProfileViewSwitcher :active-view="activeView" @update:active-view="switchView" />
<DepartureBoard v-if="activeView === 'board'" :flight-stats="stats" :canEdit="canEdit" /> <DepartureBoard v-show="activeView === 'board'" :flight-stats="stats" :canEdit="canEdit" />
<BoardingPasses v-else-if="activeView === 'passes'" :flight-stats="stats" :canEdit="canEdit" /> <BoardingPasses v-show="activeView === 'passes'" :flight-stats="stats" :canEdit="canEdit" />
<FlightMapAndCharts <FlightMapAndCharts
v-else-if="activeView === 'map'" v-show="activeView === 'map'"
:stats="stats" :stats="stats"
:canEdit="canEdit" :canEdit="canEdit"
@filters-change="onFiltersChange" @filters-change="onFiltersChange"