diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 0c9a31c..0d4024f 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,5 +1,14 @@ # Change Log +## [Version 1.0.3] + +- change some user error messages +- case detection if there's no active tab +- always show rating website even if tab is not active +- change header to fixed size to not overflow if extension is installed on a mobile device +- added link to mobile APP version of yup live +- replaced seting for notification when refil to auto refill if you are online + ## [Version 1.0.2] - small url fix diff --git a/manifest.json b/manifest.json index b2ce4d9..7e141a8 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "yup live", "description": "Light alternative extension for yup protocol", - "version": "1.0.2", + "version": "1.0.3", "manifest_version": 3, "icons": { "16": "src/assets/icons/yup_ext_16.png", diff --git a/src/background/index.ts b/src/background/index.ts index 8d7f42b..c3313b1 100644 --- a/src/background/index.ts +++ b/src/background/index.ts @@ -60,6 +60,7 @@ const alarmHandler = async () => { setBadge('') updateSettings.hasNewNotifications = false } + setSettings(updateSettings).catch(console.error) if (store.settings?.chromeNotifWhenReward && notSeen.some(notif => notif.action === 'reward')) { const rewardNotif = notSeen.find(notif => notif.action === 'reward') @@ -82,23 +83,9 @@ const alarmHandler = async () => { } if (store.settings?.chromeNotifWhenAbleToVote) { - const lastReset = (await getActionUsage(store?.user?.auth?.userId))?.data?.lastReset - const storeTs = store?.settings?.refilNotifTimestamp ?? 0 - - if (lastReset) { - const isReset = getTimeRemaining(lastReset).total <= 0; - if (!closeTo(new Date(lastReset), new Date(storeTs), 36e5) && isReset) { - updateSettings.refilNotifTimestamp = lastReset - chrome.notifications.create({ - type: 'basic', - iconUrl: chrome.runtime.getURL('src/assets/icons/yup_ext_128.png'), - title: 'Yup Live Extension', - message: `You can curate now again`, - }) - } - } + await getActionUsage(store?.user?.auth?.userId) } - setSettings(updateSettings).catch(console.error) + } catch (error) { console.error('Error fetching notifications', error) } diff --git a/src/components/RateWebsite.svelte b/src/components/RateWebsite.svelte index b181236..85f94e8 100644 --- a/src/components/RateWebsite.svelte +++ b/src/components/RateWebsite.svelte @@ -7,7 +7,7 @@ import { isUrlInvalid } from '@/utils/misc'; let tab = null - let url + let url = new URL('http://127.0.0.1') let isValid = true let loading = true let loader: ImgLoader @@ -16,11 +16,14 @@ tab = (await getCurrentTab())[0] isValid = !isUrlInvalid(tab?.url) try { - url = new URL(tab.url) - } catch (error) { - console.log(error) + if(tab?.url) { + url = new URL(tab?.url) + } else { + isValid = false + } + } catch { + isValid = false } - console.log(url) loading = false }) @@ -32,14 +35,13 @@ $: { -{#if tab}