main.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 Toolbar from './Toolbar';
  29. import IbtFooter from './IbtFooter';
  30. Vue.use(Vuex);
  31. Vue.use(VueRouter);
  32. Vue.use(VueResource);
  33. Vue.use(VueMaterial);
  34. // disable ink ripple.
  35. Vue.material.inkRipple = false;
  36. var routes = [
  37. {path: '/', name: 'home', component: App},
  38. {path: '/day/', name: 'days', component: App},
  39. {path: '/day/:day', name: 'day', component: App},
  40. {path: '/user/', name: 'users', component: Users},
  41. {path: '/user/:id', name: 'user', component: User}
  42. ];
  43. const store = new Vuex.Store(store_data);
  44. const router = new VueRouter({routes});
  45. var vue = new Vue({
  46. el: '#app',
  47. store: store,
  48. template: '<div id="app"><toolbar /><router-view class="view"></router-view><ibt-footer /></div>',
  49. router: router,
  50. components: { App, Toolbar, IbtFooter, Users, User }
  51. });