2018-07-27 15:31:39 +00:00
|
|
|
import Vue from 'vue';
|
2018-09-06 21:58:16 +00:00
|
|
|
import Vuetify from 'vuetify';
|
2018-07-27 15:31:39 +00:00
|
|
|
import Router from 'vue-router';
|
|
|
|
import '../css/app.css';
|
|
|
|
import App from 'app/main.vue';
|
|
|
|
import routes from 'app/routes';
|
|
|
|
import Api from 'common/api';
|
2018-09-13 08:23:06 +00:00
|
|
|
import Config from 'common/config';
|
2019-05-07 00:05:01 +00:00
|
|
|
import Components from 'component/components';
|
2018-07-27 15:31:39 +00:00
|
|
|
import Alert from 'common/alert';
|
2019-05-08 02:37:45 +00:00
|
|
|
import Gallery from 'common/gallery';
|
2018-07-27 15:31:39 +00:00
|
|
|
import Session from 'common/session';
|
|
|
|
import Event from 'pubsub-js';
|
2018-08-07 18:17:14 +00:00
|
|
|
import Moment from 'vue-moment';
|
2018-09-18 21:24:19 +00:00
|
|
|
import InfiniteScroll from 'vue-infinite-scroll';
|
2018-09-19 18:15:46 +00:00
|
|
|
import VueTruncate from 'vue-truncate-filter';
|
2018-09-25 07:45:06 +00:00
|
|
|
import VueFullscreen from 'vue-fullscreen';
|
2018-07-27 15:31:39 +00:00
|
|
|
|
2019-05-07 00:05:01 +00:00
|
|
|
// Initialize client-side session
|
2018-07-27 15:31:39 +00:00
|
|
|
const session = new Session(window.localStorage);
|
2018-09-13 08:23:06 +00:00
|
|
|
const config = new Config(window.localStorage, window.appConfig);
|
2018-07-27 15:31:39 +00:00
|
|
|
|
2019-05-07 00:05:01 +00:00
|
|
|
// Set global helpers
|
2018-07-27 15:31:39 +00:00
|
|
|
Vue.prototype.$event = Event;
|
|
|
|
Vue.prototype.$alert = Alert;
|
2019-05-08 02:37:45 +00:00
|
|
|
Vue.prototype.$gallery = new Gallery;
|
2018-07-27 15:31:39 +00:00
|
|
|
Vue.prototype.$session = session;
|
|
|
|
Vue.prototype.$api = Api;
|
2018-09-13 08:23:06 +00:00
|
|
|
Vue.prototype.$config = config;
|
2018-07-27 15:31:39 +00:00
|
|
|
|
2019-05-07 00:05:01 +00:00
|
|
|
// Register Vuetify
|
2018-09-06 21:58:16 +00:00
|
|
|
Vue.use(Vuetify, {
|
|
|
|
theme: {
|
2018-09-13 18:54:34 +00:00
|
|
|
primary: '#FFD600',
|
2018-09-06 21:58:16 +00:00
|
|
|
secondary: '#b0bec5',
|
2018-09-19 07:07:50 +00:00
|
|
|
accent: '#00B8D4',
|
2018-09-13 18:54:34 +00:00
|
|
|
error: '#E57373',
|
2018-09-13 05:05:13 +00:00
|
|
|
info: '#00B8D4',
|
|
|
|
success: '#00BFA5',
|
|
|
|
warning: '#FFD600',
|
2018-09-13 18:54:34 +00:00
|
|
|
delete: '#E57373',
|
2018-09-24 17:07:43 +00:00
|
|
|
love: '#EF5350',
|
2018-09-06 21:58:16 +00:00
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2019-05-07 00:05:01 +00:00
|
|
|
// Register other VueJS plugins
|
2018-08-07 18:17:14 +00:00
|
|
|
Vue.use(Moment);
|
2018-09-18 21:24:19 +00:00
|
|
|
Vue.use(InfiniteScroll);
|
2018-09-19 18:15:46 +00:00
|
|
|
Vue.use(VueTruncate);
|
2018-09-25 07:45:06 +00:00
|
|
|
Vue.use(VueFullscreen);
|
2019-05-07 00:05:01 +00:00
|
|
|
Vue.use(Components);
|
2018-07-27 15:31:39 +00:00
|
|
|
Vue.use(Router);
|
|
|
|
|
2019-05-07 00:05:01 +00:00
|
|
|
// Configure client-side routing
|
2018-07-27 15:31:39 +00:00
|
|
|
const router = new Router({
|
|
|
|
routes,
|
|
|
|
mode: 'history',
|
|
|
|
saveScrollPosition: true,
|
|
|
|
});
|
|
|
|
|
2019-05-07 00:05:01 +00:00
|
|
|
// Run app
|
2018-07-27 15:31:39 +00:00
|
|
|
/* eslint-disable no-unused-vars */
|
|
|
|
const app = new Vue({
|
|
|
|
el: '#app',
|
|
|
|
router,
|
|
|
|
render: h => h(App),
|
2019-05-07 00:05:01 +00:00
|
|
|
});
|