+Vuex +ElementUI +Pug

- Log on now works, storing user profile in vuex state
- Templates in Pug = awesome
This commit is contained in:
Daniel J. Summers
2017-08-05 22:48:09 -05:00
parent 338f11d1ab
commit 196db30cc5
13 changed files with 506 additions and 122 deletions

View File

@@ -1,37 +1,17 @@
<template>
<div id="app">
<navigation :auth="auth" />
<div id="content" class="container">
<router-view :auth="auth"></router-view>
</div>
<footer>
<p class="text-right"><i>myPrayerJournal v0.8.0</i></p>
</footer>
</div>
<template lang="pug">
#app
navigation
#content.container
router-view
footer
p.text-right: i myPrayerJournal v0.8.0
</template>
<script>
import AuthService from './auth/AuthService'
import Navigation from './components/Navigation.vue'
const auth = new AuthService()
const { login, logout, authenticated, authNotifier } = auth
export default {
name: 'app',
data: function () {
authNotifier.on('authChange', authState => {
this.authenticated = authState.authenticated
})
return {
auth,
authenticated
}
},
methods: {
login,
logout
},
components: {
Navigation
}