Skip to content

Legal 0.1.3: An install task, a translated banner and no banner for signed-in users

Legal 0.1.3 makes the module easier to install, lets the cookie banner speak the visitor’s language, and hides it from signed-in users by default.

Install task and migration

mix phoenix_kit_legal.install patches your endpoint.ex, assets/css/app.css and assets/js/app.js for the module’s static files, styles and banner script. It is safe to run twice. The consent log migration now runs through mix phoenix_kit.update.

A translated banner

The banner, its preferences dialog and its categories now get their texts from the server, in the current language, with English as the fallback. Legal page titles are translated when the pages are generated.

Signed-in users

Hide for authenticated users is now decided on the server, so the banner no longer flashes up and disappears. It is now on by default. The banner is also no longer hidden by Tailwind’s hidden class and starts outside LiveView pages too.

Upgrading

Run mix phoenix_kit_legal.install and mix phoenix_kit.update. If signed-in users should keep seeing the banner, turn Hide for authenticated users off in the Legal settings. For the setting to work at all, pass phoenix_kit_current_scope={@phoenix_kit_current_scope} to your <.cookie_consent> call; without it the banner shows to everyone.

 

 


Legal 0.1.3. Install or update: {:phoenix_kit_legal, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.