Notifications shouldn't be inside of the Vue app
- 主要语言
- Vue
- 星标
- 91
- 派生
- 11
- PR 合并指标
- 30 天内没有已合并 PR
描述
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
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。