Dominik Milacher 0dc24c4db7
Some checks failed
Build and deploy updated apps / Build & deploy (push) Failing after 50s
Extend ux layer and overhaul panoramablick-saalbach.at
2025-11-21 21:17:52 +01:00

46 lines
1.1 KiB
Vue

<script setup lang="ts">
const config = useContentConfig()
const { preferLocale } = useContentPreference()
const { locale, path } = useContentInjected()
const locales = config.locale?.list ?? []
const candidates = computed(() => locales.filter((l) => l.code !== locale.value))
const props = defineProps<{
class?: string
ux?: any
}>()
const classes = useStyling(
'contentLocaleSwitcher',
{
slots: {
base: '',
},
},
props
)
</script>
<template>
<XText
as="link"
:class="classes.base"
:link-props="{
to: { path: path(undefined, { locale: candidate.code }).value, query: { freeze: 'true' } },
'@click': preferLocale(candidate.code),
active: false,
}"
:text="candidate.code.toUpperCase()"
v-for="candidate in candidates"
/>
<!-- <ULink-->
<!-- :key="candidate.code"-->
<!-- :to="{ path: path(undefined, { locale: candidate.code }).value, query: { freeze: 'true' } }"-->
<!-- @click="preferLocale(candidate.code)"-->
<!-- >-->
<!-- {{ candidate.code.toUpperCase() }}-->
<!-- </ULink>-->
</template>