-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
50 lines (42 loc) · 1.15 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>
<app-layout>
<nuxt-layout>
<nuxt-loading-indicator color="rgb(var(--c-accent-primary))" />
<nuxt-page v-if="isOnline" />
<div v-else>
{{ $t('errors.noConnection') }}.
</div>
</nuxt-layout>
</app-layout>
</template>
<script setup lang="ts">
import { useSeoMeta } from '@unhead/vue'
import { storeToRefs } from 'pinia'
import { useClientStore } from './stores'
const { isOnline } = useNetwork()
// Set up meta tags
const { BASE_URL } = useRuntimeConfig()
useHead({
titleTemplate: 'tokenpass / %s',
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
],
})
useSeoMeta({
ogImage: `${BASE_URL}/banner.jpg`,
ogType: 'website',
twitterCard: 'summary_large_image',
})
// Init WalletConnect things
const clientStore = useClientStore()
const { init: initAuthClient } = clientStore
const { error: initializationError } = storeToRefs(clientStore)
onMounted(initAuthClient)
whenever(initializationError, (firedError) => {
if (typeof firedError === 'string') {
createError({ message: firedError, fatal: true })
} else {
createError({ ...firedError, fatal: true })
}
})
</script>