From b41d89f2372cb0e5efe0ee6d904b3bc62e315afb Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Mon, 18 Nov 2024 17:00:06 -0700 Subject: [PATCH] move push notification setup out of an App.vue Notification and into a component --- src/App.vue | 495 +----------------- src/components/ContactNameDialog.vue | 2 +- src/components/OfferDialog.vue | 4 +- src/components/PushNotificationPermission.vue | 481 +++++++++++++++++ src/views/AccountViewView.vue | 15 +- 5 files changed, 491 insertions(+), 506 deletions(-) create mode 100644 src/components/PushNotificationPermission.vue diff --git a/src/App.vue b/src/App.vue index 98f5ea716..4210b890f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -238,70 +238,6 @@ -
-
-
-

- Would you like to be notified of new activity once a day? -

-

- Waiting for system initialization, which may take up to 10 - seconds... - -

- -
- - Yes, tell me at: - - - - AM - PM - - - -
- - -
-
-
+ + diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index fe1bb6739..a147febbe 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -210,6 +210,7 @@ Troubleshoot your notification setup.
+
(); 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( {