Skip to content

Commit

Permalink
1.0.1-rc.2
Browse files Browse the repository at this point in the history
  • Loading branch information
daniluk4000 committed Jan 19, 2025
1 parent 2af583c commit 35be58a
Show file tree
Hide file tree
Showing 10 changed files with 165 additions and 76 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

# [1.0.1-rc.2]

- Disabled v1 update popup
- Renamed Navigraph Layers to Navigraph Airports Layouts
- Layouts option will now always show in visibility to highlight that you can have it if you link Navigraph
- Fixed error when disabling Airports Layouts also made gates data worse
- Added contact email to privacy policy and about page
- Added weekday to events page
- You can now switch timezones in events page

# [1.0.1-rc.1]

- VA callsign parse will now also accept `-` and `=`, not only `/` as separator (ex. `CS-JERSEY-VFLYBE`, `CS=JERSEY=VFLYBE`)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vatsim-radar",
"version": "1.0.1-rc.1",
"version": "1.0.1-rc.2",
"private": true,
"type": "module",
"scripts": {
Expand Down
9 changes: 8 additions & 1 deletion src/components/common/vatsim/CommonEventCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import type { VatsimEvent } from '~/types/data/vatsim';
import CommonEventDetails from '~/components/common/vatsim/CommonEventDetails.vue';
import CommonButton from '~/components/common/basic/CommonButton.vue';
import { useStore } from '~/store';
const props = defineProps({
event: {
Expand All @@ -50,24 +51,30 @@ const props = defineProps({
});
const details = ref(false);
const store = useStore();
const timeZone = store.localSettings.eventsLocalTimezone ? 'UTC' : undefined;
const formatter = new Intl.DateTimeFormat(['en-DE'], {
hour: '2-digit',
minute: '2-digit',
timeZone,
});
const formatterWithDate = new Intl.DateTimeFormat(['de-DE'], {
day: '2-digit',
month: '2-digit',
hour: '2-digit',
minute: '2-digit',
timeZone,
});
const formattedStart = computed(() => formatter.format(new Date(props.event.start_time)));
const formattedEnd = computed(() => {
const date = new Date(props.event.end_time);
if (date.getDate() !== new Date(props.event.start_time).getDate()) return formatterWithDate.format(date);
const method = store.localSettings.eventsLocalTimezone ? 'getUTCDate' : 'getDate';
if (date[method]() !== new Date(props.event.start_time)[method]()) return formatterWithDate.format(date);
return formatter.format(date);
});
Expand Down
139 changes: 82 additions & 57 deletions src/components/map/filters/settings/MapSettingsVisibility.vue
Original file line number Diff line number Diff line change
Expand Up @@ -202,63 +202,6 @@
</common-toggle>
</div>

<template v-if="store.user?.hasCharts && store.user.hasFms">
<common-block-title>
Navigraph Layers
</common-block-title>

<div class="__section-group __section-group--even">
<common-toggle
:model-value="!store.mapSettings.navigraphLayers?.disable"
@update:modelValue="setUserMapSettings({ navigraphLayers: { disable: !$event } })"
>
Enabled
</common-toggle>

<common-toggle
:disabled="!!store.mapSettings.navigraphLayers?.disable"
:model-value="!store.mapSettings.navigraphLayers?.gatesFallback"
@update:modelValue="setUserMapSettings({ navigraphLayers: { gatesFallback: !$event } })"
>
New gates system
</common-toggle>
</div>

<div class="__section-group __section-group--even">
<common-toggle
:disabled="!!store.mapSettings.navigraphLayers?.disable"
:model-value="!store.mapSettings.navigraphLayers?.hideTaxiways"
@update:modelValue="setUserMapSettings({ navigraphLayers: { hideTaxiways: !$event } })"
>
Taxiways
</common-toggle>

<common-toggle
:disabled="!!store.mapSettings.navigraphLayers?.disable"
:model-value="!store.mapSettings.navigraphLayers?.hideRunwayExit"
@update:modelValue="setUserMapSettings({ navigraphLayers: { hideRunwayExit: !$event } })"
>
Runway Exits
</common-toggle>

<common-toggle
:disabled="!!store.mapSettings.navigraphLayers?.disable"
:model-value="!store.mapSettings.navigraphLayers?.hideGateGuidance"
@update:modelValue="setUserMapSettings({ navigraphLayers: { hideGateGuidance: !$event } })"
>
Gate Guidance
</common-toggle>

<common-toggle
:disabled="!!store.mapSettings.navigraphLayers?.disable"
:model-value="!store.mapSettings.navigraphLayers?.hideDeicing"
@update:modelValue="setUserMapSettings({ navigraphLayers: { hideDeicing: !$event } })"
>
Deicing Pads
</common-toggle>
</div>
</template>

<common-block-title>
Personal Info
</common-block-title>
Expand All @@ -278,6 +221,87 @@
Controllers
</common-toggle>
</div>

<common-block-title>
Navigraph Airports Layouts
</common-block-title>

<common-notification
v-if="!store.user?.hasCharts"
cookie-name="navigraph-connect-warning"
>
Airports Layouts are available to Navigraph Unlimited subscribers only.<br>

<template v-if="store.user">
<a
class="__link"
href="/api/auth/navigraph/redirect"
>Link your account</a> or view
</template>
<template v-else>
View
</template>
<a
class="__link"
href="https://navigraph.com/pricing?utm_source=vatsimradar&utm_medium=referral&utm_campaign=subscribe"
target="_blank"
>subscription options</a>.
</common-notification>

<div class="__section-group __section-group--even">
<common-toggle
:disabled="!store.user?.hasCharts"
:model-value="!store.user?.hasCharts ? false : !store.mapSettings.navigraphLayers?.disable"
@update:modelValue="setUserMapSettings({ navigraphLayers: { disable: !$event } })"
>
Enabled
</common-toggle>

<common-toggle
:disabled="!store.user?.hasCharts"
:model-value="!store.user?.hasCharts ? false : !store.mapSettings.navigraphLayers?.gatesFallback"
@update:modelValue="setUserMapSettings({ navigraphLayers: { gatesFallback: !$event } })"
>
New gates system
</common-toggle>
</div>

<div
v-if="store.user?.hasCharts"
class="__section-group __section-group--even"
>
<common-toggle
:disabled="!!store.mapSettings.navigraphLayers?.disable"
:model-value="!store.mapSettings.navigraphLayers?.hideTaxiways"
@update:modelValue="setUserMapSettings({ navigraphLayers: { hideTaxiways: !$event } })"
>
Taxiways
</common-toggle>

<common-toggle
:disabled="!!store.mapSettings.navigraphLayers?.disable"
:model-value="!store.mapSettings.navigraphLayers?.hideRunwayExit"
@update:modelValue="setUserMapSettings({ navigraphLayers: { hideRunwayExit: !$event } })"
>
Runway Exits
</common-toggle>

<common-toggle
:disabled="!!store.mapSettings.navigraphLayers?.disable"
:model-value="!store.mapSettings.navigraphLayers?.hideGateGuidance"
@update:modelValue="setUserMapSettings({ navigraphLayers: { hideGateGuidance: !$event } })"
>
Gate Guidance
</common-toggle>

<common-toggle
:disabled="!!store.mapSettings.navigraphLayers?.disable"
:model-value="!store.mapSettings.navigraphLayers?.hideDeicing"
@update:modelValue="setUserMapSettings({ navigraphLayers: { hideDeicing: !$event } })"
>
Deicing Pads
</common-toggle>
</div>
</template>
</div>
</template>
Expand All @@ -290,6 +314,7 @@ import CommonSelect from '~/components/common/basic/CommonSelect.vue';
import CommonTabs from '~/components/common/basic/CommonTabs.vue';
import type { SelectItem } from '~/types/components/select';
import type { IUserMapSettings } from '~/utils/backend/handlers/map-settings';
import CommonNotification from '~/components/common/basic/CommonNotification.vue';
const store = useStore();
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/ViewUpdatePopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const update: Update = {
],
},
],
active: true,
active: false,
};
if (!store.user?.hasCharts) {
Expand Down
5 changes: 5 additions & 0 deletions src/pages/about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

Project does not aim to replace VatGlasses or Volanta for example, or create it's own database of custom data (except for gates maybe).<br><br>

Contact Email: <a
class="__link"
href="mailto:[email protected]"
>[email protected]</a><br><br>

Project would also be impossible without community libraries and data collections:

<ul>
Expand Down
44 changes: 39 additions & 5 deletions src/pages/events/index.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<template>
<common-page-block>
<template #title>VATSIM Events (Beta)</template>
<template #title>VATSIM Events</template>

<client-only>
Timezone is set for {{ timezone.format(new Date()).slice(4, 100) }}.
<common-toggle
:model-value="!!store.localSettings.eventsLocalTimezone"
@update:modelValue="setUserLocalSettings({ eventsLocalTimezone: $event })"
>
Use Zulu time instead of {{ timezone.format(new Date()).slice(4, 100) }}
</common-toggle>

<template
v-for="(events, day) in groupedEventData"
:key="day"
:key="day+String(store.localSettings.eventsLocalTimezone)"
>
<h2 class="common-event__title">{{ datetime.format(new Date(events![0].start_time)) }}</h2>
<h2 class="common-event__title">{{ getDate(events![0].start_time) }}</h2>

<common-event-card
v-for="event in events"
Expand All @@ -27,21 +32,40 @@ import CommonPageBlock from '~/components/common/blocks/CommonPageBlock.vue';
import CommonEventCard from '~/components/common/vatsim/CommonEventCard.vue';
import type { VatsimEventData } from '~/server/api/data/vatsim/events';
import type { VatsimEvent } from '~/types/data/vatsim';
import CommonToggle from '~/components/common/basic/CommonToggle.vue';
import { useStore } from '~/store';
const { data } = await useAsyncData('events', async () => {
return $fetch<VatsimEventData>('/api/data/vatsim/events');
});
const store = useStore();
const timeZone = store.localSettings.eventsLocalTimezone ? 'UTC' : undefined;
const datetime = new Intl.DateTimeFormat(['ru-RU', 'de-DE', 'en-GB', 'en-US'], {
localeMatcher: 'best fit',
day: 'numeric',
month: 'numeric',
year: 'numeric',
timeZone,
});
const weekday = new Intl.DateTimeFormat(['en-US'], {
weekday: 'long',
timeZone,
});
function getDate(_date: string) {
const date = new Date(_date);
return `${ weekday.format(date) }, ${ datetime.format(date) }`;
}
const timezone = new Intl.DateTimeFormat(['de-DE'], {
day: '2-digit',
timeZoneName: 'shortOffset',
timeZone,
});
const groupedEventData = computed(() => {
Expand All @@ -50,7 +74,9 @@ const groupedEventData = computed(() => {
data.value?.events.forEach(event => {
if (new Date(event.end_time) < new Date()) return;
const date = new Date(event.start_time);
const key = parseInt(date.getFullYear().toString() + `0${ date.getMonth() }`.slice(-2) + `0${ date.getDate() }`.slice(-2));
const key = store.localSettings.eventsLocalTimezone
? parseInt(date.getUTCFullYear().toString() + `0${ date.getUTCMonth() }`.slice(-2) + `0${ date.getUTCDate() }`.slice(-2))
: parseInt(date.getFullYear().toString() + `0${ date.getMonth() }`.slice(-2) + `0${ date.getDate() }`.slice(-2));
events[key] ??= [];
events[key].push(event);
Expand Down Expand Up @@ -88,4 +114,12 @@ useHead({
}
}
}
.events_timezone {
display: inline-block;
&:empty {
display: none;
}
}
</style>
5 changes: 5 additions & 0 deletions src/pages/privacy-policy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
About Page
</nuxt-link> to know more about service goals and used libraries & data.

Contact Email: <a
class="__link"
href="mailto:[email protected]"
>[email protected]</a><br><br>

<ol>
<li>
General terms
Expand Down
Loading

0 comments on commit 35be58a

Please sign in to comment.