mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-21 07:15:15 +03:00
Fix Vue accessing i18n before loading
This commit is contained in:
parent
5213ca0602
commit
0d74933c6a
1 changed files with 20 additions and 13 deletions
|
@ -15,22 +15,29 @@ const betaflightModel = {
|
||||||
PortUsage,
|
PortUsage,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development') {
|
i18next.on('initialized', function() {
|
||||||
console.log("Development mode enabled, installing Vue tools");
|
|
||||||
Vue.config.devtools = true;
|
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
|
// Not strictly necessary here, but if needed
|
||||||
// it's always possible to modify this model in
|
// it's always possible to modify this model in
|
||||||
// jquery land to trigger updates in vue
|
// jquery land to trigger updates in vue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue