2018-01-09 17:52:26 +01:00
|
|
|
// The Vue build version to load with the `import` command
|
|
|
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
|
|
|
import Vue from 'vue';
|
|
|
|
// import * as VueGoogleMaps from 'vue2-google-maps';
|
2019-02-25 17:20:06 +01:00
|
|
|
import VueSimpleMarkdown from 'vue-simple-markdown';
|
2019-01-21 15:08:22 +01:00
|
|
|
import Buefy from 'buefy'
|
|
|
|
import 'buefy/dist/buefy.css';
|
2018-11-06 10:30:27 +01:00
|
|
|
import GetTextPlugin from 'vue-gettext';
|
|
|
|
import App from '@/App.vue';
|
|
|
|
import router from '@/router';
|
2019-01-18 14:47:10 +01:00
|
|
|
import { apolloProvider } from './vue-apollo';
|
2018-01-09 17:52:26 +01:00
|
|
|
|
2018-12-21 15:41:34 +01:00
|
|
|
const translations = require('@/i18n/translations.json');
|
|
|
|
|
2018-01-09 17:52:26 +01:00
|
|
|
Vue.config.productionTip = false;
|
|
|
|
|
2019-02-25 17:20:06 +01:00
|
|
|
Vue.use(VueSimpleMarkdown);
|
2019-01-21 15:08:22 +01:00
|
|
|
Vue.use(Buefy, {
|
|
|
|
defaultContainerElement: '#mobilizon'
|
|
|
|
});
|
2018-12-21 15:41:34 +01:00
|
|
|
|
|
|
|
const language = (window.navigator as any).userLanguage || window.navigator.language;
|
2018-01-09 17:52:26 +01:00
|
|
|
|
2019-01-11 15:55:55 +01:00
|
|
|
Vue.filter('formatDate', value => value ? new Date(value).toLocaleString() : null);
|
|
|
|
Vue.filter('formatDay', value => value ? new Date(value).toLocaleDateString() : null);
|
2018-01-09 17:52:26 +01:00
|
|
|
|
2018-11-06 10:30:27 +01:00
|
|
|
Vue.use(GetTextPlugin, {
|
|
|
|
translations,
|
|
|
|
defaultLanguage: 'en_US',
|
2018-07-10 10:00:07 +02:00
|
|
|
});
|
|
|
|
|
2018-11-06 10:30:27 +01:00
|
|
|
Vue.config.language = language.replace('-', '_');
|
2018-01-13 23:33:03 +01:00
|
|
|
|
2018-01-09 17:52:26 +01:00
|
|
|
/* eslint-disable no-new */
|
|
|
|
new Vue({
|
|
|
|
router,
|
2018-12-21 15:41:34 +01:00
|
|
|
el: '#app',
|
2018-01-09 17:52:26 +01:00
|
|
|
template: '<App/>',
|
2019-01-18 14:47:10 +01:00
|
|
|
apolloProvider,
|
2018-01-09 17:52:26 +01:00
|
|
|
components: { App },
|
|
|
|
});
|