summaryrefslogtreecommitdiff
path: root/electron/src/renderer/main.js
blob: 3502ed6a7d802a65798a96aefbfd842b621e7b97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// ES6
import Vue from 'vue'
import axios from 'axios'

import App from './App'
import router from './router'

import {library} from '@fortawesome/fontawesome-svg-core'
import {
  faAlignRight,
  faAngleDoubleLeft,
  faAngleDoubleRight,
  faAngleRight,
  faCircle,
  faCut,
  faExchangeAlt,
  faEye,
  faFrog,
  faHippo,
  faHorse,
  faInfo,
  faMinus,
  faPause,
  faPlay,
  faPlus,
  faShoePrints,
  faSpinner,
  faStepBackward,
  faStepForward,
  faStop
} from '@fortawesome/free-solid-svg-icons'
import {FontAwesomeIcon, FontAwesomeLayers} from '@fortawesome/vue-fontawesome'
import Transitions from 'vue2-transitions'
import GetTextPlugin from 'vue-gettext'
import translations from './assets/translations.json'
import {selectLanguage} from '../lib/i18n'

// We have to add to the library every icon we use anywhere in the UI.
// This avoids the need to bundle the entire font-awesome icon set with
// Ink/Stitch.
library.add(
  faAlignRight,
  faAngleDoubleLeft,
  faAngleDoubleRight,
  faAngleRight,
  faCircle,
  faCut,
  faExchangeAlt,
  faEye,
  faFrog,
  faHippo,
  faHorse,
  faInfo,
  faMinus,
  faPause,
  faPlay,
  faPlus,
  faShoePrints,
  faSpinner,
  faStepBackward,
  faStepForward,
  faStop
)

Vue.component('font-awesome-icon', FontAwesomeIcon)
Vue.component('font-awesome-layers', FontAwesomeLayers)

Vue.use(Transitions)
Vue.use(GetTextPlugin, {
  translations: translations,
  defaultLanguage: selectLanguage(),
  silent: true
})

Vue.http = Vue.prototype.$http = axios
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  components: {App},
  router,
  template: '<App/>'
}).$mount('#app')