Closed RomainTweaks closed 5 years ago
Hey, thanks. I added the fix 54ae6357e09a7a209c6f0bbce8b5063b724af67c, will publish a new version in the week.
Nice thank you!
By the way, can i ask you to make a little addition to the Notice component? :)
Or would you prefer if I created a new Issue?
Please make another issue ;)
Ok
This should now be fixed in version 1.1.0, thanks.
I have an issue with the modal and the notice. When the user click on the decline btn, or decline all, apps required are set to false.
In the callback of my app i have this log : "User consent for app myapp: consent=false", and in the cookie set by Orejime my app is also set to false.
But visually in the modal the orejime-AppItem-slider is on position activate.
We can reproduce this issue on the demo page : https://orejime.netlify.com/
Can you fix this please?
[Edit] After investigation I found where the bug is located. In ConsentManager inside the declineAll function you have to add an if statement before the call of updateConsent to check if the app is required or not and then update to false only if it isn't required.
this.config.apps.map((app) => { if (!app.required) { this.updateConsent(app.name, false); } });
[Edit 2] For the button decline all in the modal this is the function toggle that needs to be changed in /components/apps.js like this :
const toggle = (apps, value) => { apps.map((app)=>{ if (!app.required) { manager.updateConsent(app.name, value); } }) }
Can you put this fix in the repo please? @Leimi