fix: check for notification api #1043

Merged
konrad merged 1 commits from dpschen/frontend:feature/fix-check-for-notification-support into main 2021-11-22 19:03:27 +00:00
Member
No description provided.
dpschen added 1 commit 2021-11-19 17:31:56 +00:00
continuous-integration/drone/pr Build is passing Details
3dbf5cdac7
fix: check for notification api
Member

Hi dpschen!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://1043-featurefix-check-for-notification-support--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi dpschen! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://1043-featurefix-check-for-notification-support--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
konrad was assigned by dpschen 2021-11-21 12:49:55 +00:00
dpschen requested review from konrad 2021-11-21 12:49:58 +00:00
konrad reviewed 2021-11-22 19:03:16 +00:00
@ -7,6 +7,8 @@ import {REPEAT_MODE_DEFAULT} from './constants/taskRepeatModes'
import SubscriptionModel from '@/models/subscription'
import {parseDateOrNull} from '@/helpers/parseDateOrNull'
const SUPPORTS_TRIGGERED_NOTIFICATION = 'Notification' in window && 'showTrigger' in Notification.prototype

That's a nice check, I didn't know you could do it like that.

That's a nice check, I didn't know you could do it like that.
Author
Member

Since support probably never changes on runtime I usually check support only once =)

Or do you mean the 'Notification' in window

Since support probably never changes on runtime I usually check support only once =) Or do you mean the `'Notification' in window`

I meant the const. Makes a lot of sense to do it that way :)

I meant the `const`. Makes a lot of sense to do it that way :)
konrad approved these changes 2021-11-22 19:03:21 +00:00
konrad merged commit b029889f27 into main 2021-11-22 19:03:27 +00:00
konrad deleted branch feature/fix-check-for-notification-support 2021-11-22 19:03:28 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.