added toast padding
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Xeovalyte 2023-01-22 20:02:53 +01:00
parent 388d989229
commit 2f16e356f7
4 changed files with 12 additions and 6 deletions

View File

@ -50,10 +50,15 @@ const messaging = ref(null)
onMounted(() => { onMounted(() => {
auth.value = getAuth() auth.value = getAuth()
Device.getInfo().then(info => {
if (info.platform === 'ios') document.getElementsByClassName('top-right')[0].classList.add('toastios')
});
if (process.client) { if (process.client) {
if ('serviceWorker' in navigator && window.isSecureContext) { if ('serviceWorker' in navigator && window.isSecureContext) {
Device.getInfo().then(info => { Device.getInfo().then(info => {
if (info.platform === 'web') registerSW() if (info.platform === 'web') registerSW()
else document.getElementsByClassName('top-right')[0].classList.add('toastios')
}); });
} }
@ -224,10 +229,13 @@ const ledenlijst = ref([])
provide('firebase', { db, ledenlijst, isAuthenticated, user, userData, userPersons, auth, users, userAllPersons, getPersons, calEvents, news, registrationToken, contestTimes, competitors, registrationToken }) provide('firebase', { db, ledenlijst, isAuthenticated, user, userData, userPersons, auth, users, userAllPersons, getPersons, calEvents, news, registrationToken, contestTimes, competitors, registrationToken })
</script> </script>
<style scoped> <style>
.body { .body {
padding-top: 10px; padding-top: 10px;
margin-bottom: env(safe-area-inset-bottom); margin-bottom: env(safe-area-inset-bottom);
} }
.toastios {
padding-top: 10px;
}
</style> </style>

View File

@ -2,5 +2,5 @@ import Toast from "vue-toastification";
import "vue-toastification/dist/index.css"; import "vue-toastification/dist/index.css";
export default defineNuxtPlugin((nuxtApp) => { export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(Toast) nuxtApp.vueApp.use(Toast)
}) })

View File

@ -39,7 +39,7 @@ export default defineEventHandler(async event => {
}, },
webpush: { webpush: {
notification: { notification: {
icon: '/ios/256.png' icon: '/ios/256.png',
} }
}, },
topic: topic, topic: topic,

View File

@ -5,8 +5,6 @@ import { getAuth } from 'firebase-admin/auth'
const config = useRuntimeConfig() const config = useRuntimeConfig()
console.log('testing', config)
export const app = initializeApp({ export const app = initializeApp({
credential: cert({ credential: cert({
"project_id": "wrbapp", "project_id": "wrbapp",