-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathapp.vue
More file actions
43 lines (34 loc) · 1.2 KB
/
app.vue
File metadata and controls
43 lines (34 loc) · 1.2 KB
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
<script setup lang="ts">
import { computed, defineAsyncComponent } from "vue";
import { polyfillCountryFlagEmojis } from "country-flag-emoji-polyfill";
import { useBranding } from "~/composables/useBranding";
import { useApplicationSettingsStore } from "~/stores/ApplicationSettings";
import { useAuthStore } from "~/stores/AuthStore";
const MatchmakingConfirm = defineAsyncComponent(
() => import("~/components/matchmaking/MatchmakingConfirm.vue"),
);
const PlayerNameRegistration = defineAsyncComponent(
() => import("~/components/PlayerNameRegistration.vue"),
);
const StreamGlobal = defineAsyncComponent(
() => import("~/components/StreamGlobal.vue"),
);
polyfillCountryFlagEmojis();
useBranding();
const authStore = useAuthStore();
const applicationSettingsStore = useApplicationSettingsStore();
const me = computed(() => authStore.me);
const hasGlobalStream = computed(() => !!applicationSettingsStore.globalStream);
</script>
<template>
<NuxtPwaManifest />
<StreamGlobal v-if="hasGlobalStream" />
<template v-if="me">
<PlayerNameRegistration />
<MatchmakingConfirm />
</template>
<NuxtLayout>
<NuxtPage :page-key="(route) => route.fullPath" />
</NuxtLayout>
<Toaster />
</template>