-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
55 lines (44 loc) · 1.1 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
51
52
53
54
55
<template>
<VitePwaManifest />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>
<script lang="ts" setup>
import { useQuasar } from 'quasar';
import { onMounted } from 'vue';
import unmuteAudio from "unmute-ios-audio";
import posthog from 'posthog-js';
useServerSeoMeta({
title: "MestreJS",
description: "The place where brazilian music born",
ogTitle: "MestreJS",
ogDescription: "The place where brazilian music born",
themeColor: "#E47C44"
})
let $q = useQuasar()
let songStore = useSongStore()
$q.iconMapFn = (iconName: string) => {
if (iconName.startsWith('app:')) {
let icon = iconName.replace('app:', '');
return { icon: `svguse:/app-icons/${icon}.svg#${icon}` };
}
};
onMounted(async () => {
unmuteAudio();
const { token } = useDirectusToken();
const { fetchUser } = useDirectusAuth();
if (songStore.user === undefined && token) {
songStore.user = (await useDirectusUser()).value
posthog.identify(songStore.user?.id, { email: songStore.user?.email })
}
})
</script>
<style>
* {
box-sizing: border-box;
border-width: 0;
border-style: solid;
border-color: #e5e7eb
}
</style>