feat(localelinks): path the optional localelinks

Signed-off-by: Sepush <sepush@outlook.com>
pull/957/head
Sepush 3 years ago
parent dea70e1d5f
commit 3bf6e88202

@ -11,7 +11,7 @@ const { site, theme } = useData()
<template>
<VPFlyout class="VPNavBarExtra" label="extra navigation">
<div v-if="theme.localeLinks" class="group">
<p class="trans-title">{{ theme.localeLinks.text }}</p>
<p v-if="theme.localeLinks.text" class="trans-title">{{ theme.localeLinks.text }}</p>
<template v-for="locale in theme.localeLinks.items" :key="locale.link">
<VPMenuLink :item="locale" />

@ -14,7 +14,7 @@ const { theme } = useData()
:icon="VPIconLanguages"
>
<div class="items">
<p class="title">{{ theme.localeLinks.text }}</p>
<p v-if="theme.localeLinks.text" class="title">{{ theme.localeLinks.text }}</p>
<template v-for="locale in theme.localeLinks.items" :key="locale.link">
<VPMenuLink :item="locale" />

@ -17,7 +17,7 @@ function toggle() {
<div v-if="theme.localeLinks" class="VPNavScreenTranslations" :class="{ open: isOpen }">
<button class="title" @click="toggle">
<VPIconLanguages class="icon lang" />
{{ theme.localeLinks.text }}
{{ theme.localeLinks?.text }}
<VPIconChevronDown class="icon chevron" />
</button>

Loading…
Cancel
Save