Merge pull request 'Fix lang toggle' (#72) from tonitch/front/fix/langSwitch into master
Reviewed-on: PGL/Clyde#72 Reviewed-by: Wal <karpinskiwal@gmail.com>
This commit is contained in:
		| @ -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 @@ | ||||
|             </a></li> | ||||
|  | ||||
|         <li style="float:right; margin-top:7.5px;" title="Language"> | ||||
|             <input type="checkbox" v-model="toggle" true-value="FR" false-value="EN" class="theme-checkbox"> | ||||
|             <input type="checkbox" @:click="setLang( toggle? 'fr' : 'en' )" v-model="toggle" class="theme-checkbox"> | ||||
|         </li> | ||||
|       </ul> | ||||
|     </div> | ||||
|  | ||||
| @ -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 :/ | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user