mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2024-10-07 03:23:37 +00:00
Merge pull request #47 from ThibaultNocchi/better_i18n
Localizations fix on nav drawer
This commit is contained in:
commit
9fb919a07f
@ -7,8 +7,9 @@
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item
|
||||
v-for="(item, index) in menuItems"
|
||||
v-for="(item, index) in $i18n.locales"
|
||||
:key="index"
|
||||
:input-value="item.code === $i18n.locale"
|
||||
@click="$i18n.setLocale(item.code)"
|
||||
>
|
||||
<v-list-item-title>{{ item.name }}</v-list-item-title>
|
||||
@ -16,17 +17,3 @@
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
|
||||
export default Vue.extend({
|
||||
computed: {
|
||||
menuItems: {
|
||||
get() {
|
||||
return this.$i18n.locales;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -82,25 +82,32 @@ interface NavigationDrawerItem {
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
items: [
|
||||
clipped: true,
|
||||
drawer: true,
|
||||
libraries: {},
|
||||
miniVariant: false,
|
||||
title: 'Jellyfin'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
items() {
|
||||
return [
|
||||
{
|
||||
icon: 'mdi-home',
|
||||
title: this.$t('home'),
|
||||
to: '/'
|
||||
}
|
||||
],
|
||||
configItems: [
|
||||
];
|
||||
},
|
||||
configItems() {
|
||||
return [
|
||||
{
|
||||
icon: 'mdi-cog',
|
||||
title: this.$t('settings'),
|
||||
to: '/settings'
|
||||
}
|
||||
],
|
||||
clipped: true,
|
||||
drawer: !this.$vuetify.breakpoint.mobile,
|
||||
libraries: {},
|
||||
title: 'Jellyfin'
|
||||
};
|
||||
];
|
||||
}
|
||||
},
|
||||
async beforeMount() {
|
||||
const userViewsRequest = await this.$userViewsApi.getUserViews({
|
||||
|
Loading…
Reference in New Issue
Block a user