ademilter / ademilter/Frame

Notifications shouldn't be inside of the Vue app

Offen
#21 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Vue
Sterne
91
Forks
11
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Currently notification code lives under tab content side inside Vue app. Because of that, if there is an event in one hour, I'm getting the same notification whenever I open a new tab. And this is quite disturbing. I would want it to see once, not everytime I open a new tab. I think we should create a [background script][1] for the extension and check the events there every minute. (And we should use `chrome.notifications.create` inside the backround script since the Notification API won't work inside that script.)

We can communicate between background script and Vue app with that API call: `chrome.extension.getBackgroundPage()`.

We can create a background script that checks the events every minute in background script, there is a step by step walk-through here: https://developer.chrome.com/apps/app_codelab_alarms (The only difference, we shouldn't use `chrome.app.runtime.onLaunched.addListener` and use `chrome.extension.getBackgroundPage()` to call from Vue app)

**I can mentor someone who wants to work on that issue. You can leave a comment here if you want to work on that. I can provide additional information.**

[1]: https://developer.chrome.com/extensions/background_pages

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.