added token notifier
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
xeovalyte 2022-11-13 19:48:40 +01:00
parent c2ef9797f8
commit 4d3bdcbb6e
2 changed files with 6 additions and 3 deletions

View File

@ -29,6 +29,7 @@ const route = useRoute()
const isAuthenticated = ref(false)
const user = ref('frikandel')
const registrationToken = ref('')
const auth = ref(null)
const userLoaded = ref(false)
const userData = ref(null)
@ -118,6 +119,7 @@ const setupNotifications = () => {
PushNotifications.addListener('registration',
(token) => {
// alert('Push registration success, token: ' + token.value);
registrationToken.value = token
}
);
@ -223,5 +225,5 @@ const logDeviceInfo = async () => {
const ledenlijst = ref([])
provide('firebase', { db, ledenlijst, isAuthenticated, user, userData, userPersons, auth, userAllPersons, getPersons, calEvents, news })
provide('firebase', { db, ledenlijst, isAuthenticated, user, userData, userPersons, auth, userAllPersons, getPersons, calEvents, news, registrationToken })
</script>

View File

@ -17,6 +17,7 @@
<span>Settings</span>
<Icon class="ml-auto" size="2em" name="ion:arrow-forward"/>
</NuxtLink>
{{ registrationToken }}
</div>
</div>
@ -27,5 +28,5 @@ definePageMeta({
title: 'Home',
})
const { userPersons } = inject('firebase')
const { userPersons, registrationToken } = inject('firebase')
</script>