forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgdpr.js
More file actions
31 lines (29 loc) · 823 Bytes
/
gdpr.js
File metadata and controls
31 lines (29 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { Cookies, Notify, openURL } from 'quasar'
if (Cookies.has('gdpr') !== true) {
const policyUrl = 'https://www.iubenda.com/privacy-policy/40685560/cookie-policy?an=no&s_ck=false&newmarkup=yes'
Notify.create({
message: 'Our third-party tools use cookies, which are necessary for its functioning' +
' and required to achieve the purposes illustrated in the cookie policy.',
multiline: true,
classes: 'doc-gdpr',
timeout: 0,
position: 'bottom-right',
actions: [
{
label: 'Accept',
color: 'yellow',
handler () {
Cookies.set('gdpr', true, { expires: 5 * 365 })
}
},
{
label: 'Learn more',
color: 'grey',
noDismiss: true,
handler () {
openURL(policyUrl)
}
}
]
})
}