forked from jsnbuchanan/crowd-funder-for-time-pwa
move push notification setup out of an App.vue Notification and into a component
This commit is contained in:
@@ -210,6 +210,7 @@
|
||||
Troubleshoot your notification setup.
|
||||
</router-link>
|
||||
</div>
|
||||
<PushNotificationPermission ref="pushNotificationPermission" />
|
||||
|
||||
<div
|
||||
id="sectionSearchLocation"
|
||||
@@ -722,6 +723,7 @@ import { useClipboard } from "@vueuse/core";
|
||||
|
||||
import EntityIcon from "@/components/EntityIcon.vue";
|
||||
import ImageMethodDialog from "@/components/ImageMethodDialog.vue";
|
||||
import PushNotificationPermission from "@/components/PushNotificationPermission.vue";
|
||||
import QuickNav from "@/components/QuickNav.vue";
|
||||
import TopMessage from "@/components/TopMessage.vue";
|
||||
import UserNameDialog from "@/components/UserNameDialog.vue";
|
||||
@@ -763,6 +765,7 @@ const inputImportFileNameRef = ref<Blob>();
|
||||
components: {
|
||||
EntityIcon,
|
||||
ImageMethodDialog,
|
||||
PushNotificationPermission,
|
||||
QuickNav,
|
||||
TopMessage,
|
||||
UserNameDialog,
|
||||
@@ -954,15 +957,9 @@ export default class AccountViewView extends Vue {
|
||||
|
||||
async showNotificationChoice() {
|
||||
if (!this.subscription) {
|
||||
this.$notify(
|
||||
{
|
||||
group: "modal",
|
||||
type: "notification-permission",
|
||||
title: "", // unused, only here to satisfy type check
|
||||
text: "", // unused, only here to satisfy type check
|
||||
},
|
||||
-1,
|
||||
);
|
||||
(
|
||||
this.$refs.pushNotificationPermission as PushNotificationPermission
|
||||
).open();
|
||||
} else {
|
||||
this.$notify(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user