debianize-mobilizon/js/src/main.ts
Thomas Citharel 27f2597b07
Add admin dashboard, event reporting, moderation report screens, moderation log
Close #156 and #158

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-09-09 20:53:16 +02:00

38 lines
936 B
TypeScript

// 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 Buefy from 'buefy';
import GetTextPlugin from 'vue-gettext';
import App from '@/App.vue';
import router from '@/router';
import { apolloProvider } from './vue-apollo';
import { NotifierPlugin } from '@/plugins/notifier';
import filters from '@/filters';
const translations = require('@/i18n/translations.json');
Vue.config.productionTip = false;
Vue.use(Buefy);
Vue.use(NotifierPlugin);
Vue.use(filters);
const language = (window.navigator as any).userLanguage || window.navigator.language;
Vue.use(GetTextPlugin, {
translations,
defaultLanguage: 'en_US',
silent: true,
});
Vue.config.language = language.replace('-', '_');
/* eslint-disable no-new */
new Vue({
router,
apolloProvider,
el: '#app',
template: '<App/>',
components: { App },
});