mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-30 15:44:37 -05:00
* migration redesign init * new color picker * changelog * added UI language selection * fix layout issue on recipe editor * remove git as dependency * added UI editor for original URL * CI/CD Tests * test: fixed migration routes Co-authored-by: Hayden <hay-kot@pm.me>
45 lines
628 B
JavaScript
45 lines
628 B
JavaScript
import VueI18n from "../../i18n";
|
|
|
|
const state = {
|
|
lang: "en",
|
|
allLangs: [
|
|
{
|
|
name: "English",
|
|
value: "en",
|
|
},
|
|
{
|
|
name: "Dutch",
|
|
value: "da",
|
|
},
|
|
{
|
|
name: "French",
|
|
value: "fr",
|
|
},
|
|
],
|
|
};
|
|
|
|
const mutations = {
|
|
setLang(state, payload) {
|
|
VueI18n.locale = payload;
|
|
state.lang = payload;
|
|
},
|
|
};
|
|
|
|
const actions = {
|
|
initLang({ getters }) {
|
|
VueI18n.locale = getters.getActiveLang;
|
|
},
|
|
};
|
|
|
|
const getters = {
|
|
getActiveLang: (state) => state.lang,
|
|
getAllLangs: (state) => state.allLangs,
|
|
};
|
|
|
|
export default {
|
|
state,
|
|
mutations,
|
|
actions,
|
|
getters,
|
|
};
|