diff --git a/package.json b/package.json index 5f81417..5a78a14 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "pilou": "^0.1.4", "tether": "^1.3.7", "vue": "^2.0.1", + "vue-router": "^2.0.0", "vuex": "^2.0.0" }, "devDependencies": { diff --git a/src/App.vue b/src/App.vue index 958f56b..aeb00fa 100644 --- a/src/App.vue +++ b/src/App.vue @@ -93,32 +93,7 @@ - diff --git a/src/main.js b/src/main.js index 43f04bd..0fed95a 100644 --- a/src/main.js +++ b/src/main.js @@ -7,6 +7,7 @@ import LessPass from './App.vue' import 'bootstrap/dist/js/bootstrap.min'; import Store from './store' import Storage from './api/storage'; +import router from './routes'; const storage = new Storage(); const store = Store(storage.json()); @@ -14,5 +15,6 @@ const store = Store(storage.json()); new Vue({ el: '#app', store, + router, render: h => h(LessPass) }); diff --git a/src/routes.js b/src/routes.js new file mode 100644 index 0000000..261b433 --- /dev/null +++ b/src/routes.js @@ -0,0 +1,20 @@ +import Vue from 'vue'; +import VueRouter from 'vue-router'; + +import PasswordGenerator from './components/PasswordGenerator'; +import Login from './components/Login'; +import Register from './components/Register'; +import ForgotPassword from './components/ForgotPassword'; +import Passwords from './components/Passwords'; + +Vue.use(VueRouter); + +const routes = [ + {path: '/', component: PasswordGenerator}, +]; + +const router = new VueRouter({ + routes +}); + +export default router; \ No newline at end of file