Indicated that you are logged by coloring the icon in orange and disconnect if clicked on it
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
import { toast } from 'vue3-toastify';
|
||||
import { ref, computed } from 'vue'
|
||||
import i18n, { setLang } from './i18n.js'
|
||||
import { isLogged } from '@/rest/Users.js'
|
||||
|
||||
|
||||
// Liste des apps
|
||||
@ -19,6 +20,7 @@
|
||||
const currentPath = ref(window.location.hash)
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
Logged.value = isLogged();
|
||||
currentPath.value = window.location.hash
|
||||
})
|
||||
|
||||
@ -31,7 +33,9 @@
|
||||
const settings=ref(i18n("app.settings"))
|
||||
const login=ref(i18n("app.login"))
|
||||
const active=ref(false)
|
||||
|
||||
|
||||
const Logged = ref(isLogged());
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -45,11 +49,11 @@
|
||||
</a></li>
|
||||
<li title=home>
|
||||
<a class="icon" href="#home">
|
||||
<div class=" fa-solid fa-house" style="margin-top: 7px; margin-bottom: 3px;"></div>
|
||||
<div class=" fa-solid fa-house" style="margin-top: 7px; margin-bottom: 3px;"></div>
|
||||
</a></li>
|
||||
<li style="float: right;" title=login>
|
||||
<a class="icon" href="#/login">
|
||||
<div class="fa-solid fa-user" style="margin-top: 7px; margin-bottom: 3px;"></div>
|
||||
<div class="fa-solid fa-user" :style="Logged ? 'color: orange' : 'haha'" style="margin-top: 7px; margin-bottom: 3px; "></div>
|
||||
</a></li>
|
||||
<li style="float: right;" title=notifications>
|
||||
<a class="icon" href="#Notifications">
|
||||
|
Reference in New Issue
Block a user