2020-02-16 18:30:00 +00:00
|
|
|
// import the styles
|
|
|
|
import Vue from 'vue'
|
|
|
|
import App from './App.vue'
|
|
|
|
import router from './router/index'
|
|
|
|
import store from './store/index'
|
2021-06-20 01:40:40 +00:00
|
|
|
import i18n from './i18n/index'
|
2020-02-16 18:30:00 +00:00
|
|
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
|
|
|
import { fas } from '@fortawesome/free-solid-svg-icons'
|
2021-01-15 16:14:45 +00:00
|
|
|
import { faGithub } from '@fortawesome/free-brands-svg-icons/faGithub'
|
|
|
|
import { faBitcoin } from '@fortawesome/free-brands-svg-icons/faBitcoin'
|
|
|
|
import { faMonero } from '@fortawesome/free-brands-svg-icons/faMonero'
|
|
|
|
import { faMastodon } from '@fortawesome/free-brands-svg-icons/faMastodon'
|
2020-02-16 18:30:00 +00:00
|
|
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
|
|
|
|
|
|
|
const isDev = process.env.NODE_ENV === 'development'
|
|
|
|
|
|
|
|
Vue.config.devtools = isDev
|
|
|
|
Vue.config.performance = isDev
|
|
|
|
Vue.config.productionTip = isDev
|
|
|
|
|
2021-01-15 16:14:45 +00:00
|
|
|
library.add(fas, faGithub, faBitcoin, faMonero, faMastodon)
|
2020-02-16 18:30:00 +00:00
|
|
|
|
2020-10-04 18:30:54 +00:00
|
|
|
Vue.component('FontAwesomeIcon', FontAwesomeIcon)
|
2020-02-16 18:30:00 +00:00
|
|
|
|
|
|
|
/* eslint-disable-next-line */
|
|
|
|
new Vue({
|
|
|
|
el: '#app',
|
|
|
|
router,
|
|
|
|
store,
|
2020-08-06 03:39:00 +00:00
|
|
|
i18n,
|
2020-02-16 18:30:00 +00:00
|
|
|
render: h => h(App)
|
|
|
|
})
|
|
|
|
|
2022-05-26 22:08:20 +00:00
|
|
|
// to avoid accesing electron api from web app build
|
2020-03-24 13:22:29 +00:00
|
|
|
if (window && window.process && window.process.type === 'renderer') {
|
|
|
|
const { ipcRenderer } = require('electron')
|
|
|
|
|
|
|
|
// handle menu event updates from main script
|
|
|
|
ipcRenderer.on('change-view', (event, data) => {
|
|
|
|
if (data.route) {
|
|
|
|
router.push(data.route)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|