first commit
This commit is contained in:
@@ -4,8 +4,9 @@
|
||||
<span class="config-panel-label">Welcome </span>
|
||||
<span v-if="user">
|
||||
{{ user.name + " " + user.surname }}
|
||||
</span>
|
||||
<button @click="auth.logout()" class="p-button p-button-danger p-button-outlined">Logout</button>
|
||||
</span>
|
||||
<button @click="redirectProject()" class="p-button p-button-danger p-button-outlined">Projects</button>
|
||||
<button @click="auth.logout()" class="p-button p-button-danger p-button-outlined">Logout</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -14,8 +15,15 @@
|
||||
|
||||
import { useAuth } from '@websanova/vue-auth/src/v3.js';
|
||||
import { computed } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
|
||||
const auth = useAuth();
|
||||
const user = computed(() => auth.user());
|
||||
const router = useRouter();
|
||||
|
||||
function redirectProject() {
|
||||
router.push('/projects'); // Specifica il percorso per la pagina "Projects"
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user