|
|
|
@ -15,6 +15,7 @@ import { useI18n } from "vue-i18n" |
|
|
|
|
import { useRouter } from "vue-router" |
|
|
|
|
import { useLocale } from "../../composables/locale" |
|
|
|
|
import PlatformLogo from "./PlatformLogo.vue" |
|
|
|
|
import {usePlatformConfig} from "../../store/platformConfig" |
|
|
|
|
|
|
|
|
|
const { t } = useI18n() |
|
|
|
|
const router = useRouter() |
|
|
|
@ -27,31 +28,42 @@ const languageItems = languageList.map((language) => ({ |
|
|
|
|
command: (event) => reloadWithLocale(event.item.isoCode), |
|
|
|
|
})) |
|
|
|
|
|
|
|
|
|
const menuItems = computed(() => [ |
|
|
|
|
{ |
|
|
|
|
label: t("Home"), |
|
|
|
|
url: router.resolve({ name: "Index" }).href, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: t("FAQ"), |
|
|
|
|
url: router.resolve({ name: "Faq" }).href, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: t("Registration"), |
|
|
|
|
url: "/main/auth/inscription.php", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: t("Demo"), |
|
|
|
|
url: router.resolve({ name: "Demo" }).href, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: t("Contact"), |
|
|
|
|
url: "/contact", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: "language_selector", |
|
|
|
|
label: currentLanguageFromList.originalName, |
|
|
|
|
items: languageItems, |
|
|
|
|
}, |
|
|
|
|
]) |
|
|
|
|
const platformConfigStore = usePlatformConfig() |
|
|
|
|
const allowRegistration = computed(() => "false" !== platformConfigStore.getSetting("registration.allow_registration")) |
|
|
|
|
|
|
|
|
|
const menuItems = computed(() => { |
|
|
|
|
const items = [ |
|
|
|
|
{ |
|
|
|
|
label: t("Home"), |
|
|
|
|
url: router.resolve({ name: "Index" }).href, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: t("FAQ"), |
|
|
|
|
url: router.resolve({ name: "Faq" }).href, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: t("Demo"), |
|
|
|
|
url: router.resolve({ name: "Demo" }).href, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: t("Contact"), |
|
|
|
|
url: "/contact", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
key: "language_selector", |
|
|
|
|
label: currentLanguageFromList.originalName, |
|
|
|
|
items: languageItems, |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
if (allowRegistration.value) { |
|
|
|
|
items.splice(2, 0, { |
|
|
|
|
label: t("Registration"), |
|
|
|
|
url: "/main/auth/inscription.php", |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log("Menu Items:", items) |
|
|
|
|
return items |
|
|
|
|
}) |
|
|
|
|
</script> |
|
|
|
|