Skip to content

Commit

Permalink
feat(cookie-consent): include Polish translation and update Yarn lock…
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
thorsten committed Apr 19, 2024
1 parent a16850b commit afddf11
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 27 deletions.
40 changes: 17 additions & 23 deletions phpmyfaq/assets/src/utils/cookie-consent.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import * as cc from 'vanilla-cookieconsent';

cc.run({

// root: 'body',
autoShow: true,
// disablePageInteraction: true,
Expand All @@ -36,53 +35,48 @@ cc.run({
layout: 'box inline',
position: 'top center',
equalWeightButtons: true,
flipButtons: false
flipButtons: false,
},
preferencesModal: {
layout: 'box',
equalWeightButtons: true,
flipButtons: false
}
flipButtons: false,
},
},

onFirstConsent: ({cookie}) => {
},
onFirstConsent: ({ cookie }) => {},

onConsent: ({cookie}) => {
},
onConsent: ({ cookie }) => {},

onChange: ({changedCategories, changedServices}) => {
},
onChange: ({ changedCategories, changedServices }) => {},

onModalReady: ({modalName}) => {
},
onModalReady: ({ modalName }) => {},

onModalShow: ({modalName}) => {
},
onModalShow: ({ modalName }) => {},

onModalHide: ({modalName}) => {
},
onModalHide: ({ modalName }) => {},

categories: {
necessary: {
enabled: true, // this category is enabled by default
readOnly: true // this category cannot be disabled
}
enabled: true, // this category is enabled by default
readOnly: true, // this category cannot be disabled
},
},

language: {
default: 'en',
autoDetect: 'document',
translations: {
de: './lang/cookie-consent/de.json',
en: './lang/cookie-consent/en.json',
de: './lang/cookie-consent/de.json'
pl: './lang/cookie-consent/pl.json',
},
}
},
});

const cookiePreferences = document.getElementById('showCookieConsent');
if(cookiePreferences) {
cookiePreferences.addEventListener('click', function(event) {
if (cookiePreferences) {
cookiePreferences.addEventListener('click', function (event) {
event.preventDefault();
cc.showPreferences();
});
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7252,10 +7252,10 @@ validate-npm-package-license@^3.0.1:
spdx-correct "^3.0.0"
spdx-expression-parse "^3.0.0"

vanilla-cookieconsent@^2.8.9:
version "2.9.2"
resolved "https://registry.yarnpkg.com/vanilla-cookieconsent/-/vanilla-cookieconsent-2.9.2.tgz#d4ac2169fdde5e76f7b8345d0dbfb9b946fe99f0"
integrity sha512-SHAS5W0DBvvcUtjmVvvYkhmLPmTlgwKzFvViUp5mBimbZCdZKbDQzwyk/TgYq02+61RrtxmDdLGzDWNFpSbsGQ==
vanilla-cookieconsent@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/vanilla-cookieconsent/-/vanilla-cookieconsent-3.0.1.tgz#059d1b2c712476ae4172d4ec7fa9d553a16be12d"
integrity sha512-gqc4x7O9t1I4xWr7x6/jtQWPr4PZK26SmeA0iyTv1WyoECfAGnu5JEOExmMEP+5Fz66AT9OiCBO3GII4wDQHLw==

w3c-xmlserializer@^4.0.0:
version "4.0.0"
Expand Down

0 comments on commit afddf11

Please sign in to comment.