diff --git a/manifest.json b/manifest.json index 6b6517f..b890c77 100644 --- a/manifest.json +++ b/manifest.json @@ -1,28 +1,27 @@ { - "manifest_version": 2, - "name": "Screentime", - "description": "To keep track and manage your time on sites that reduce productivity. You can set the number of minutes you want and time frames", - "short_name": "screentime", - "version": "5.0.4", - "browser_action": { - "default_popup": "index.html", - "default_icon" : "images/icon_128.png" - }, - "icons": { - "16": "images/icon_16.png", - "48": "images/icon_48.png", - "128": "images/icon_128.png" - }, - "background": { - "scripts": [ - "js/background/main.js" - ] - }, - "permissions": [ - "storage", - "notifications", - "tabs" - ], - "content_security_policy": "script-src 'self'; object-src 'self'" + "manifest_version": 3, + "name": "Screentime", + "description": "To keep track and manage your time on sites that reduce productivity. You can set the number of minutes you want and time frames", + "short_name": "screentime", + "version": "5.0.5", + "icons": { + "16": "images/icon_16.png", + "48": "images/icon_48.png", + "128": "images/icon_128.png" + }, + "background": { + "service_worker": "js/background/main.js" + }, + "permissions": [ + "storage", + "notifications", + "tabs" + ], + "content_security_policy": { + "extension_pages": "script-src 'self'; object-src 'self'" + }, + "action": { + "default_popup": "index.html", + "default_icon": "images/icon_128.png" } - +} \ No newline at end of file diff --git a/package.json b/package.json index 18941d2..9e3f21e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "screentime", - "version": "5.0.2", + "version": "5.0.5", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/src/assets/js/dev_storage.js b/src/assets/js/dev_storage.js index e4f89d7..50ec278 100644 --- a/src/assets/js/dev_storage.js +++ b/src/assets/js/dev_storage.js @@ -1,6 +1,6 @@ const data = { timer: { - '2021-10-03': { + '2023-09-27': { instagram: 2000, youtube: 2240, twitter: 2000, diff --git a/src/assets/js/utils.js b/src/assets/js/utils.js index ce5eb1e..1c404ec 100644 --- a/src/assets/js/utils.js +++ b/src/assets/js/utils.js @@ -135,7 +135,7 @@ export default { notify(message, action) { const notificationObject = { type: 'basic', - iconUrl: 'images/icon_128.png', + iconUrl: chrome.runtime.getURL('images/icon_128.png'), title: 'SCREENTIME', message }; @@ -146,8 +146,7 @@ export default { notificationObject.requireInteraction = true; } // eslint-disable-next-line - chrome.notifications.create(notificationObject, () => { - }); + chrome.notifications.create(notificationObject); }, saveConfiguration(key, data) { diff --git a/src/components/Advanced/TimeBlocks.vue b/src/components/Advanced/TimeBlocks.vue index 32d8ce5..6618625 100644 --- a/src/components/Advanced/TimeBlocks.vue +++ b/src/components/Advanced/TimeBlocks.vue @@ -22,33 +22,41 @@
-
- -
- - +
+
+ +
+ + +
-
-
- -
- - +
+ +
+ + +
+
- + *Invalid time frame