mirror of
https://github.com/directus/directus.git
synced 2026-01-28 14:28:02 -05:00
Don't show language selector when it's not needed (#14244)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="translations" :class="{ split: splitViewEnabled }">
|
||||
<div class="primary" :class="splitViewEnabled ? 'half' : 'full'">
|
||||
<language-select v-model="firstLang" :items="languageOptions">
|
||||
<language-select v-if="showLanguageSelect" v-model="firstLang" :items="languageOptions">
|
||||
<template #append>
|
||||
<v-icon
|
||||
v-if="splitViewAvailable && !splitViewEnabled"
|
||||
@@ -185,6 +185,10 @@ const splitViewEnabled = computed(() => {
|
||||
return splitViewAvailable.value && splitView.value;
|
||||
});
|
||||
|
||||
const showLanguageSelect = computed(() => {
|
||||
return languageOptions.value.length > 1;
|
||||
});
|
||||
|
||||
function useLanguages() {
|
||||
const languages = ref<Record<string, any>[]>([]);
|
||||
const loading = ref(false);
|
||||
|
||||
Reference in New Issue
Block a user