1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-21 15:25:22 +03:00

Fix Vue accessing i18n before loading

This commit is contained in:
Miguel Angel Mulero Martinez 2020-10-30 10:19:22 +01:00
parent 5213ca0602
commit 0d74933c6a

View file

@ -15,22 +15,29 @@ const betaflightModel = {
PortUsage,
};
if (process.env.NODE_ENV === 'development') {
console.log("Development mode enabled, installing Vue tools");
Vue.config.devtools = true;
}
i18next.on('initialized', function() {
console.log("i18n initialized, starting Vue framework");
if (process.env.NODE_ENV === 'development') {
console.log("Development mode enabled, installing Vue tools");
Vue.config.devtools = true;
}
const app = new Vue({
i18n: vueI18n,
data: betaflightModel,
components: {
BatteryLegend,
BetaflightLogo,
StatusBar,
},
el: '#main-wrapper',
});
const app = new Vue({
i18n: vueI18n,
data: betaflightModel,
components: {
BatteryLegend,
BetaflightLogo,
StatusBar,
},
el: '#main-wrapper',
});
// Not strictly necessary here, but if needed
// it's always possible to modify this model in
// jquery land to trigger updates in vue