@dargmuesli/nuxt-vio 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- package/app.config.ts +19 -0
- package/app.vue +42 -0
- package/package.json +3 -1
package/app.config.ts
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
import { useSeoMeta } from '@unhead/vue'
|
2
|
+
|
3
|
+
import { SITE_NAME } from './utils/constants'
|
4
|
+
|
5
|
+
export default defineAppConfig({
|
6
|
+
seoMeta: {
|
7
|
+
twitterSite: '@dargmuesli',
|
8
|
+
},
|
9
|
+
siteName: SITE_NAME,
|
10
|
+
themeColor: '#202020',
|
11
|
+
})
|
12
|
+
|
13
|
+
declare module '@nuxt/schema' {
|
14
|
+
interface AppConfigInput {
|
15
|
+
seoMeta?: Parameters<typeof useSeoMeta>[0]
|
16
|
+
siteName: string
|
17
|
+
themeColor?: string
|
18
|
+
}
|
19
|
+
}
|
package/app.vue
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
<template>
|
2
|
+
<div :data-is-loading="isLoading">
|
3
|
+
<NuxtLayout>
|
4
|
+
<!-- <SeoKit
|
5
|
+
:site-description="t('globalOgSeoDescription')"
|
6
|
+
:language="locale"
|
7
|
+
/>
|
8
|
+
<OgImageStatic :alt="t('globalOgImageAlt')" component="OgImage" /> -->
|
9
|
+
<NuxtPage />
|
10
|
+
<CookieControl :locale="locale" />
|
11
|
+
</NuxtLayout>
|
12
|
+
</div>
|
13
|
+
</template>
|
14
|
+
|
15
|
+
<script setup lang="ts">
|
16
|
+
// const { t } = useI18n()
|
17
|
+
const { locale } = useI18n()
|
18
|
+
const cookieControl = useCookieControl()
|
19
|
+
|
20
|
+
const { loadingIds, indicateLoadingDone } = useLoadingDoneIndicator('app')
|
21
|
+
|
22
|
+
// computations
|
23
|
+
const isLoading = computed(() => !!loadingIds.value.length)
|
24
|
+
|
25
|
+
// lifecycle
|
26
|
+
onMounted(() => indicateLoadingDone())
|
27
|
+
watch(
|
28
|
+
() => cookieControl.cookiesEnabledIds.value,
|
29
|
+
(current, previous) => {
|
30
|
+
if (
|
31
|
+
(!previous?.includes('ga') && current?.includes('ga')) ||
|
32
|
+
(previous?.includes('ga') && !current?.includes('ga'))
|
33
|
+
) {
|
34
|
+
window.location.reload()
|
35
|
+
}
|
36
|
+
},
|
37
|
+
{ deep: true }
|
38
|
+
)
|
39
|
+
// initialization
|
40
|
+
useAppLayout()
|
41
|
+
useFavicons()
|
42
|
+
</script>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "1.8.
|
3
|
+
"version": "1.8.1",
|
4
4
|
"type": "module",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -18,6 +18,8 @@
|
|
18
18
|
"pages",
|
19
19
|
"plugins",
|
20
20
|
"utils",
|
21
|
+
"app.config.ts",
|
22
|
+
"app.vue",
|
21
23
|
"error.vue",
|
22
24
|
"nuxt.config.ts",
|
23
25
|
"tailwind.config.ts"
|