From 619d2601f1853a3cb82c398dea60e74de88f26e0 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Fri, 8 Mar 2024 22:00:15 +0100 Subject: [PATCH] Fix lang toggle This is not perfect as the toggle is not set to the right position when the site is reload but as @Wal_ said he would refactor, I just made a working sample good enough imo --- frontend/src/App.vue | 4 ++-- frontend/src/utils.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 7dcf25e..0089e41 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -2,7 +2,7 @@ import 'https://kit.fontawesome.com/fb3bbd0a95.js' import { toast } from 'vue3-toastify'; import { ref } from 'vue' - import i18n from './i18n.js' + import i18n, { setLang } from './i18n.js' import Inscription from "./Inscription.vue" @@ -50,7 +50,7 @@
  • - +
  • diff --git a/frontend/src/utils.js b/frontend/src/utils.js index bb9e61f..d00e306 100644 --- a/frontend/src/utils.js +++ b/frontend/src/utils.js @@ -19,7 +19,7 @@ export function getCookie(key){ * @param key cookie name */ export function setCookie(key, value){ - cookie = key + "=" + value + ";"; + let cookie = key + "=" + value + "; SameSite=Lax"; document.cookie = cookie; // Here we can apreciate the stupidity of Javascript :/ }