feat: langpacks for /mods/startup

This commit is contained in:
Kenny 2022-05-06 07:56:32 -04:00
parent ad65af7203
commit fae8bddd51
1 changed files with 44 additions and 41 deletions

View File

@ -1,59 +1,62 @@
<template>
<div class="mainContainer pt-1">
<v-card
flat
class="pb-5 background"
:class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'"
:style="{borderRadius: `${roundTweak / 2}rem`}"
>
<v-card flat class="pb-5 background" :class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'" :style="{borderRadius: `${roundTweak / 2}rem`}">
<v-card-title>Default Page</v-card-title>
<v-card-text>
<v-select
v-model="page"
background-color="background"
:items="pages"
label="Default Page"
solo
></v-select>
<v-select v-model="page" background-color="background" :items="pages" label="Default Page" solo></v-select>
</v-card-text>
</v-card>
</div>
</template>
<script>
export default {
export default {
computed: {
roundTweak() {
return this.$store.state.tweaks.roundTweak;
}
},
data() {
return {
page: "home",
pages: ["home", "subscriptions", "library"],
};
},
watch: {
page: function (newVal) {
localStorage.setItem("startPage", newVal);
computed: {
roundTweak() {
return this.$store.state.tweaks.roundTweak;
}
},
},
mounted() {
this.page = localStorage.getItem("startPage") || "home";
},
};
data() {
return {
page: "home",
pages: [],
};
},
watch: {
page: function (newVal) {
localStorage.setItem("startPage", newVal);
},
},
mounted() {
this.page = localStorage.getItem("startPage") || "home";
const langPack = this.$lang('global');
this.pages = [{
value: "home",
text: langPack.home
}, {
value: "subscriptions",
text: langPack.subscriptions
}, {
value: "library",
text: langPack.library
}];
}
};
</script>
<style scoped>
.v-card {
margin: 1em;
}
.v-card {
margin: 1em;
}
section {
padding: 0 1em 1em 1em;
}
section {
padding: 0 1em 1em 1em;
}
</style>