-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapp.vue
50 lines (43 loc) · 1.13 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<template>
<v-app>
<v-app-bar color="transparent" flat>
<div class="flex-grow-1"></div>
<v-btn
:to="localePath('license-information')"
:icon="mdiFileDocumentCheckOutline"
:title="i18n.t('nuxt-bundle.license-information.title')"
nuxt
>
</v-btn>
<v-btn
:to="switchLocalePath(getNextLanguage())"
:icon="mdiTranslate"
:title="i18n.t('change')"
nuxt
>
</v-btn>
</v-app-bar>
<NuxtPage />
</v-app>
</template>
<script setup lang="ts">
import { mdiTranslate, mdiFileDocumentCheckOutline } from "@mdi/js";
const i18n = useI18n();
const localePath = useLocalePath();
useHead({ htmlAttrs: { lang: i18n.locale.value } });
useSeoMeta({
ogImage: "/assets/jojomatik.png",
});
/**
* Returns the next language available.
*/
function getNextLanguage(): string {
const currentLocale = i18n.locale.value;
let index = i18n.availableLocales.indexOf(currentLocale);
if (i18n.availableLocales.length - 1 === index) index = -1;
return i18n.availableLocales[index + 1];
}
</script>
<style lang="scss">
@use "assets/style/main";
</style>