You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.1 KiB
57 lines
1.1 KiB
<template>
|
|
<div class="app-topbar">
|
|
<Menubar
|
|
:model="menuItems"
|
|
>
|
|
<template #start>
|
|
<img
|
|
alt="Chamilo LMS"
|
|
:src="headerLogo"
|
|
>
|
|
</template>
|
|
</Menubar>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {ref} from 'vue';
|
|
import Menubar from 'primevue/menubar';
|
|
import headerLogoPath from "../../../../assets/css/themes/chamilo/images/header-logo.svg";
|
|
|
|
function setLanguage(event) {
|
|
const {label} = event.item;
|
|
|
|
const selectorIndex = menuItems.value.findIndex(item => 'language_selector' === item.key);
|
|
|
|
menuItems.value[selectorIndex] ? menuItems.value[selectorIndex].label = label : null;
|
|
}
|
|
|
|
const menuItems = ref([
|
|
{
|
|
label: 'Buy courses',
|
|
},
|
|
{
|
|
label: 'Help',
|
|
},
|
|
{
|
|
key: 'language_selector',
|
|
label: 'English',
|
|
items: [
|
|
{
|
|
label: 'English',
|
|
command: setLanguage,
|
|
},
|
|
{
|
|
label: 'French',
|
|
command: setLanguage,
|
|
},
|
|
{
|
|
label: 'Spanish',
|
|
command: setLanguage,
|
|
},
|
|
],
|
|
}
|
|
]);
|
|
|
|
const headerLogo = headerLogoPath;
|
|
</script>
|
|
|