main.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * I'll be there, 2. An oversimplified application to register attendees at a conference or event.
  3. *
  4. * Copyright 2016-2017 Davide Alberani <da@erlug.linux.it>, RaspiBO <info@raspibo.org>
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. import Vue from 'vue';
  17. import Vuex from 'vuex';
  18. import VueRouter from 'vue-router';
  19. import VueResource from 'vue-resource';
  20. import VueMaterial from 'vue-material';
  21. import 'vue-material/dist/vue-material.css';
  22. import 'roboto-fontface/css/roboto/roboto-fontface.css';
  23. import 'material-design-icons/iconfont/material-icons.css';
  24. import store_data from './store.js';
  25. import App from './App';
  26. import User from './User';
  27. import Users from './Users';
  28. import GlobalSettings from './GlobalSettings';
  29. import Toolbar from './Toolbar';
  30. import IbtFooter from './IbtFooter';
  31. Vue.use(Vuex);
  32. Vue.use(VueRouter);
  33. Vue.use(VueResource);
  34. Vue.use(VueMaterial);
  35. // disable ink ripple.
  36. Vue.material.inkRipple = false;
  37. var routes = [
  38. {path: '/', name: 'home', component: App},
  39. {path: '/day/', name: 'days', component: App},
  40. {path: '/day/:day', name: 'day', component: App},
  41. {path: '/user/', name: 'users', component: Users},
  42. {path: '/user/:id', name: 'user', component: User},
  43. {path: '/settings/', name: 'settings', component: GlobalSettings},
  44. ];
  45. const store = new Vuex.Store(store_data);
  46. const router = new VueRouter({routes});
  47. var vue = new Vue({
  48. el: '#app',
  49. store: store,
  50. template: '<div id="app"><toolbar /><router-view class="view"></router-view><ibt-footer /></div>',
  51. router: router,
  52. components: { App, Toolbar, IbtFooter, Users, User, GlobalSettings }
  53. });