Added Notifications
This commit is contained in:
@@ -7,6 +7,8 @@ import PanelHeader from '@/Components/FlightsGoneBy/Panels/PanelHeader.vue'
|
||||
import BadgeTable from '@/Components/FlightsGoneBy/GenericBadgeTable.vue'
|
||||
import FlightBadge from '@/Components/FlightsGoneBy/FlightBadge.vue'
|
||||
|
||||
defineOptions({ inheritAttrs: false })
|
||||
|
||||
const props = defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
@@ -7,7 +7,7 @@ import PanelHeader from '@/Components/FlightsGoneBy/Panels/PanelHeader.vue'
|
||||
import PanelSubHeader from '@/Components/FlightsGoneBy/Panels/PanelSubHeader.vue'
|
||||
import BadgeTable from '@/Components/FlightsGoneBy/GenericBadgeTable.vue'
|
||||
import FlightBadge from '@/Components/FlightsGoneBy/FlightBadge.vue'
|
||||
|
||||
defineOptions({ inheritAttrs: false })
|
||||
const props = defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { Achievement, Airline, Alliance, Flight, User } from '@/Types/types'
|
||||
import AllianceChallenge from '@/Components/FlightsGoneBy/AllianceChallenge.vue'
|
||||
|
||||
defineOptions({ inheritAttrs: false })
|
||||
defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { Achievement, Airline, Alliance, Flight, User } from '@/Types/types'
|
||||
import AllianceChallenge from '@/Components/FlightsGoneBy/AllianceChallenge.vue'
|
||||
|
||||
defineOptions({ inheritAttrs: false })
|
||||
defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { Achievement, Airline, Alliance, Flight, User } from '@/Types/types'
|
||||
import AllianceChallenge from '@/Components/FlightsGoneBy/AllianceChallenge.vue'
|
||||
|
||||
defineOptions({ inheritAttrs: false })
|
||||
defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { Achievement, Airline, Alliance, Flight, User } from '@/Types/types'
|
||||
import AllianceChallenge from '@/Components/FlightsGoneBy/AllianceChallenge.vue'
|
||||
|
||||
defineOptions({ inheritAttrs: false })
|
||||
defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import PanelHeader from '@/Components/FlightsGoneBy/Panels/PanelHeader.vue'
|
||||
import PanelSubHeader from '@/Components/FlightsGoneBy/Panels/PanelSubHeader.vue'
|
||||
import BadgeTable from '@/Components/FlightsGoneBy/GenericBadgeTable.vue'
|
||||
import FlightBadge from '@/Components/FlightsGoneBy/FlightBadge.vue'
|
||||
|
||||
defineOptions({ inheritAttrs: false })
|
||||
const props = defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import Panel from '@/Components/FlightsGoneBy/Panels/Panel.vue'
|
||||
import PanelHeader from '@/Components/FlightsGoneBy/Panels/PanelHeader.vue'
|
||||
import BadgeTable from '@/Components/FlightsGoneBy/GenericBadgeTable.vue'
|
||||
import FlightBadge from '@/Components/FlightsGoneBy/FlightBadge.vue'
|
||||
|
||||
defineOptions({ inheritAttrs: false })
|
||||
const props = defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
@@ -6,7 +6,9 @@ import PanelSubHeader from '@/Components/FlightsGoneBy/Panels/PanelSubHeader.vue
|
||||
import AirlineAlphabetTable from '@/Components/FlightsGoneBy/AirlineAlphabetTable.vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import { useAlphabetAirlines, type CodeType } from '@/Composables/useAlphabetAirlines'
|
||||
|
||||
import {copyToClipboard} from "@/Composables/useClipboard";
|
||||
import CopyButton from "@/Components/FlightsGoneBy/CopyButton.vue";
|
||||
defineOptions({ inheritAttrs: false })
|
||||
|
||||
const props = defineProps<{
|
||||
achievement: Achievement
|
||||
@@ -47,28 +49,7 @@ const selectedYear = ref<number | null>(
|
||||
|
||||
// Copy BBCode
|
||||
const airlineTable = ref<InstanceType<typeof AirlineAlphabetTable> | null>(null)
|
||||
const copied = ref(false)
|
||||
|
||||
async function copyBBCode() {
|
||||
const text = airlineTable.value?.toBBCode()
|
||||
if (text == null) return
|
||||
|
||||
try {
|
||||
await navigator.clipboard.writeText(text)
|
||||
} catch {
|
||||
const el = document.createElement('textarea')
|
||||
el.value = text
|
||||
el.style.cssText = 'position:fixed;top:-9999px;left:-9999px;opacity:0'
|
||||
document.body.appendChild(el)
|
||||
el.focus()
|
||||
el.select()
|
||||
document.execCommand('copy')
|
||||
document.body.removeChild(el)
|
||||
}
|
||||
|
||||
copied.value = true
|
||||
setTimeout(() => (copied.value = false), 2000)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -133,13 +114,10 @@ async function copyBBCode() {
|
||||
class="year-select"
|
||||
/>
|
||||
|
||||
<v-btn
|
||||
:icon="copied ? 'mdi-check' : 'mdi-content-copy'"
|
||||
:color="copied ? 'success' : undefined"
|
||||
density="compact"
|
||||
variant="text"
|
||||
<CopyButton
|
||||
title="Copy as BBCode"
|
||||
@click="copyBBCode"
|
||||
size="large"
|
||||
:text="airlineTable?.bbCode ?? ''"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,8 @@ import AlphabetTable from '@/Components/FlightsGoneBy/AlphabetTable.vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import { useAlphabetFlights, type CodeType } from '@/Composables/useAlphabetFlights'
|
||||
import InlineBadge from "@/Components/FlightsGoneBy/InlineBadge.vue";
|
||||
|
||||
import CopyButton from "@/Components/FlightsGoneBy/CopyButton.vue";
|
||||
defineOptions({ inheritAttrs: false })
|
||||
|
||||
const props = defineProps<{
|
||||
achievement: Achievement
|
||||
@@ -45,27 +46,6 @@ const selectedYear = ref<number | null>(
|
||||
const alphabetTable = ref<InstanceType<typeof AlphabetTable> | null>(null)
|
||||
const copied = ref(false)
|
||||
|
||||
async function copyBBCode() {
|
||||
const text = alphabetTable.value?.toBBCode()
|
||||
if (text == null) return
|
||||
|
||||
try {
|
||||
await navigator.clipboard.writeText(text)
|
||||
} catch {
|
||||
// Fallback for non-HTTPS or browsers that block clipboard API
|
||||
const el = document.createElement('textarea')
|
||||
el.value = text
|
||||
el.style.cssText = 'position:fixed;top:-9999px;left:-9999px;opacity:0'
|
||||
document.body.appendChild(el)
|
||||
el.focus()
|
||||
el.select()
|
||||
document.execCommand('copy')
|
||||
document.body.removeChild(el)
|
||||
}
|
||||
|
||||
copied.value = true
|
||||
setTimeout(() => (copied.value = false), 2000)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -124,13 +104,10 @@ async function copyBBCode() {
|
||||
class="year-select"
|
||||
/>
|
||||
|
||||
<v-btn
|
||||
:icon="copied ? 'mdi-check' : 'mdi-content-copy'"
|
||||
:color="copied ? 'success' : undefined"
|
||||
density="compact"
|
||||
variant="text"
|
||||
<CopyButton
|
||||
title="Copy as BBCode"
|
||||
@click="copyBBCode"
|
||||
size="large"
|
||||
:text="alphabetTable?.bbCode ?? ''"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@ import {useRegionFlights} from "@/Composables/useRegionFlights";
|
||||
import RegionLegend from "@/Components/FlightsGoneBy/Panels/RegionLegend.vue";
|
||||
|
||||
|
||||
defineOptions({ layout: MainLayout })
|
||||
defineOptions({ inheritAttrs: false })
|
||||
const props = defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
@@ -12,7 +12,7 @@ import RegionLegend from "@/Components/FlightsGoneBy/Panels/RegionLegend.vue";
|
||||
import Brazil from "@/Components/Maps/Brazil.vue";
|
||||
|
||||
|
||||
defineOptions({ layout: MainLayout })
|
||||
defineOptions({ inheritAttrs: false })
|
||||
const props = defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
@@ -13,7 +13,7 @@ import RegionLegend from "@/Components/FlightsGoneBy/Panels/RegionLegend.vue";
|
||||
import Canada from "@/Components/Maps/Canada.vue";
|
||||
|
||||
|
||||
defineOptions({ layout: MainLayout })
|
||||
defineOptions({ inheritAttrs: false })
|
||||
const props = defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
@@ -12,7 +12,7 @@ import China from "@/Components/Maps/China.vue";
|
||||
import RegionLegend from "@/Components/FlightsGoneBy/Panels/RegionLegend.vue";
|
||||
|
||||
|
||||
defineOptions({ layout: MainLayout })
|
||||
defineOptions({ inheritAttrs: false })
|
||||
const props = defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
@@ -11,9 +11,8 @@ import FlightRegionTable from "@/Components/FlightsGoneBy/FlightRegionTable.vue"
|
||||
import {useRegionFlights} from "@/Composables/useRegionFlights";
|
||||
import RegionLegend from "@/Components/FlightsGoneBy/Panels/RegionLegend.vue";
|
||||
import USA from "@/Components/Maps/USA.vue";
|
||||
defineOptions({ inheritAttrs: false })
|
||||
|
||||
|
||||
defineOptions({ layout: MainLayout })
|
||||
const props = defineProps<{
|
||||
achievement: Achievement
|
||||
user: User
|
||||
|
||||
Reference in New Issue
Block a user