- add: perimssion and Send Notification to a Service Worker... -> and finally to the App

This commit is contained in:
Paolo Arena
2019-02-04 16:47:15 +01:00
parent fb099322d4
commit a66d83cb23
8 changed files with 190 additions and 3 deletions

View File

@@ -2,6 +2,21 @@
<q-page class="flex flex-center">
<logo></logo>
<q-btn v-if="getPermission() !== 'granted'" class="enable-notifications" color="primary" rounded size="lg" icon="notifications" @click="askfornotification" :label="$t('notification.ask')"/>
<q-btn v-if="getPermission() === 'granted'" class="enable-notifications" color="primary" rounded size="lg" icon="notifications" @click="showNotificationExample" label="Send Notification"/>
<br>
<div>
<q-chip square color="secondary">
Status:
</q-chip>
<q-field
v-if="getPermission() === 'granted'"
icon="notifications"
:label="$t('notification.titlegranted')"
helper="Stato Notifiche">
</q-field>
</div>
</q-page>