neko/client/src/main.ts

45 lines
1014 B
TypeScript
Raw Normal View History

2020-01-13 21:05:38 +13:00
import './assets/styles/main.scss'
import Vue from 'vue'
2020-01-23 06:16:40 +13:00
2020-01-13 21:05:38 +13:00
import Notifications from 'vue-notification'
2020-01-23 06:16:40 +13:00
import ToolTip from 'v-tooltip'
import Logger from './plugins/log'
2020-01-21 03:36:18 +13:00
import Client from './plugins/neko'
2020-01-23 06:16:40 +13:00
import Axios from './plugins/axios'
import Swal from './plugins/swal'
2020-01-24 04:23:26 +13:00
import Anime from './plugins/anime'
2020-01-23 06:16:40 +13:00
2020-04-05 14:57:22 +12:00
import { i18n } from './plugins/i18n'
2020-01-21 03:36:18 +13:00
import store from './store'
2020-01-23 06:16:40 +13:00
import app from './app.vue'
2020-01-13 21:05:38 +13:00
Vue.config.productionTip = false
2020-01-21 03:36:18 +13:00
Vue.use(Logger)
2020-01-13 21:05:38 +13:00
Vue.use(Notifications)
2020-01-23 06:16:40 +13:00
Vue.use(ToolTip)
Vue.use(Axios)
Vue.use(Swal)
2020-01-24 04:23:26 +13:00
Vue.use(Anime)
2020-01-21 03:36:18 +13:00
Vue.use(Client)
2020-01-13 21:05:38 +13:00
new Vue({
2020-04-05 14:57:22 +12:00
i18n,
2020-01-21 03:36:18 +13:00
store,
2020-04-05 15:17:06 +12:00
render: (h) => h(app),
2020-01-21 03:36:18 +13:00
created() {
2020-02-13 11:41:52 +13:00
const click = () => {
this.$accessor.setActive()
if (this.$accessor.settings.autoplay && this.$accessor.video.playing) {
this.$accessor.video.setMuted(false)
}
window.removeEventListener('click', click, false)
}
window.addEventListener('click', click, false)
2020-01-21 03:36:18 +13:00
this.$client.init(this)
2020-02-02 09:35:48 +13:00
this.$accessor.initialise()
2020-01-21 03:36:18 +13:00
},
2020-01-13 21:05:38 +13:00
}).$mount('#neko')