From 2f16e356f7237ffcd42231f4235c505ce32e3765 Mon Sep 17 00:00:00 2001 From: Xeovalyte Date: Sun, 22 Jan 2023 20:02:53 +0100 Subject: [PATCH] added toast padding --- frontend/app.vue | 10 +++++++++- frontend/plugins/toast.js | 4 ++-- frontend/server/api/sendmessage.post.js | 2 +- frontend/server/utils/firebase.js | 2 -- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/frontend/app.vue b/frontend/app.vue index 457fb93..e761750 100644 --- a/frontend/app.vue +++ b/frontend/app.vue @@ -50,10 +50,15 @@ const messaging = ref(null) onMounted(() => { auth.value = getAuth() + Device.getInfo().then(info => { + if (info.platform === 'ios') document.getElementsByClassName('top-right')[0].classList.add('toastios') + }); + if (process.client) { if ('serviceWorker' in navigator && window.isSecureContext) { Device.getInfo().then(info => { 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 }) - diff --git a/frontend/plugins/toast.js b/frontend/plugins/toast.js index 8ec7f9b..339deb9 100644 --- a/frontend/plugins/toast.js +++ b/frontend/plugins/toast.js @@ -2,5 +2,5 @@ import Toast from "vue-toastification"; import "vue-toastification/dist/index.css"; export default defineNuxtPlugin((nuxtApp) => { - nuxtApp.vueApp.use(Toast) -}) \ No newline at end of file + nuxtApp.vueApp.use(Toast) +}) diff --git a/frontend/server/api/sendmessage.post.js b/frontend/server/api/sendmessage.post.js index 7b6991f..4375bb7 100644 --- a/frontend/server/api/sendmessage.post.js +++ b/frontend/server/api/sendmessage.post.js @@ -39,7 +39,7 @@ export default defineEventHandler(async event => { }, webpush: { notification: { - icon: '/ios/256.png' + icon: '/ios/256.png', } }, topic: topic, diff --git a/frontend/server/utils/firebase.js b/frontend/server/utils/firebase.js index 1f82055..000f590 100644 --- a/frontend/server/utils/firebase.js +++ b/frontend/server/utils/firebase.js @@ -5,8 +5,6 @@ import { getAuth } from 'firebase-admin/auth' const config = useRuntimeConfig() -console.log('testing', config) - export const app = initializeApp({ credential: cert({ "project_id": "wrbapp",