added token notifier
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
c2ef9797f8
commit
4d3bdcbb6e
@ -29,6 +29,7 @@ const route = useRoute()
|
|||||||
|
|
||||||
const isAuthenticated = ref(false)
|
const isAuthenticated = ref(false)
|
||||||
const user = ref('frikandel')
|
const user = ref('frikandel')
|
||||||
|
const registrationToken = ref('')
|
||||||
const auth = ref(null)
|
const auth = ref(null)
|
||||||
const userLoaded = ref(false)
|
const userLoaded = ref(false)
|
||||||
const userData = ref(null)
|
const userData = ref(null)
|
||||||
@ -118,6 +119,7 @@ const setupNotifications = () => {
|
|||||||
PushNotifications.addListener('registration',
|
PushNotifications.addListener('registration',
|
||||||
(token) => {
|
(token) => {
|
||||||
// alert('Push registration success, token: ' + token.value);
|
// alert('Push registration success, token: ' + token.value);
|
||||||
|
registrationToken.value = token
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -223,5 +225,5 @@ const logDeviceInfo = async () => {
|
|||||||
|
|
||||||
const ledenlijst = ref([])
|
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>
|
</script>
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
<span>Settings</span>
|
<span>Settings</span>
|
||||||
<Icon class="ml-auto" size="2em" name="ion:arrow-forward"/>
|
<Icon class="ml-auto" size="2em" name="ion:arrow-forward"/>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
|
{{ registrationToken }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -27,5 +28,5 @@ definePageMeta({
|
|||||||
title: 'Home',
|
title: 'Home',
|
||||||
})
|
})
|
||||||
|
|
||||||
const { userPersons } = inject('firebase')
|
const { userPersons, registrationToken } = inject('firebase')
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user