2017-11-27 19:21:12 -05:00
|
|
|
import Vue from 'vue'
|
2019-12-19 06:17:21 -05:00
|
|
|
import App from './renderer/App.vue'
|
|
|
|
import router from './renderer/router'
|
2017-11-27 19:21:12 -05:00
|
|
|
import ElementUI from 'element-ui'
|
2018-01-09 22:31:07 -05:00
|
|
|
import { webFrame } from 'electron'
|
2019-12-19 06:17:21 -05:00
|
|
|
import 'element-ui/lib/theme-chalk/index.css'
|
2018-06-26 09:11:04 -04:00
|
|
|
import VueLazyLoad from 'vue-lazyload'
|
2019-12-26 07:15:41 -05:00
|
|
|
import axios from 'axios'
|
|
|
|
import mainMixin from './renderer/utils/mainMixin'
|
2020-02-21 09:25:48 -05:00
|
|
|
import bus from '@/utils/bus'
|
2021-04-10 09:01:55 -04:00
|
|
|
import { initTalkingData } from './renderer/utils/analytics'
|
2021-07-25 11:25:36 -04:00
|
|
|
import db from './renderer/utils/db'
|
2022-08-20 04:44:55 -04:00
|
|
|
// import { T, i18n } from '#/i18n/index'
|
|
|
|
// import { handleURLParams } from '@/utils/beforeOpen'
|
|
|
|
import { i18nManager, T } from './renderer/i18n/index'
|
2018-06-26 09:11:04 -04:00
|
|
|
|
2018-01-09 22:31:07 -05:00
|
|
|
webFrame.setVisualZoomLevelLimits(1, 1)
|
|
|
|
|
2022-02-20 08:30:22 -05:00
|
|
|
// do here before vue init
|
2022-08-20 04:44:55 -04:00
|
|
|
// handleURLParams()
|
2022-02-20 08:30:22 -05:00
|
|
|
|
2019-12-19 06:17:21 -05:00
|
|
|
Vue.config.productionTip = false
|
2018-12-23 10:15:00 -05:00
|
|
|
Vue.prototype.$builtInPicBed = [
|
|
|
|
'smms',
|
|
|
|
'imgur',
|
|
|
|
'qiniu',
|
|
|
|
'tcyun',
|
|
|
|
'upyun',
|
|
|
|
'aliyun',
|
|
|
|
'github'
|
|
|
|
]
|
2021-07-25 11:25:36 -04:00
|
|
|
Vue.prototype.$$db = db
|
2019-12-26 07:15:41 -05:00
|
|
|
Vue.prototype.$http = axios
|
2020-02-21 09:25:48 -05:00
|
|
|
Vue.prototype.$bus = bus
|
2022-01-11 10:57:35 -05:00
|
|
|
Vue.prototype.$T = T
|
2022-08-20 04:44:55 -04:00
|
|
|
Vue.prototype.$i18n = i18nManager
|
2019-12-19 06:17:21 -05:00
|
|
|
|
|
|
|
Vue.use(ElementUI)
|
2022-12-30 22:29:36 -05:00
|
|
|
Vue.use(VueLazyLoad, {
|
|
|
|
error: `file://${__static.replace(/\\/g, '/')}/unknown-file-type.svg`
|
|
|
|
})
|
2019-12-26 07:15:41 -05:00
|
|
|
Vue.mixin(mainMixin)
|
2017-11-27 19:21:12 -05:00
|
|
|
|
|
|
|
new Vue({
|
|
|
|
router,
|
2019-12-19 06:17:21 -05:00
|
|
|
render: h => h(App)
|
2017-11-27 19:21:12 -05:00
|
|
|
}).$mount('#app')
|
2021-04-05 05:47:06 -04:00
|
|
|
|
2021-04-10 09:01:55 -04:00
|
|
|
initTalkingData()
|