Files
mixtape/zero.Web/App/app.vue
T

44 lines
912 B
Vue
Raw Normal View History

2020-03-23 20:05:02 +01:00
<template>
<div class="app">
2020-04-09 11:48:34 +02:00
<template v-if="isAuthenticated">
<app-navigation />
<div class="app-main">
<router-view></router-view>
</div>
<app-overlays />
2020-04-09 11:48:34 +02:00
</template>
<app-login v-else />
2020-03-23 20:05:02 +01:00
</div>
</template>
<script>
2020-04-06 20:24:16 +02:00
import '../Sass/app.scss'
import AppNavigation from 'zero/navigation.vue'
import AppLogin from 'zeropages/login.vue'
2020-04-08 23:33:56 +02:00
import AppOverlays from 'zerocomponents/Overlays/overlay-holder.vue'
2020-04-06 00:49:09 +02:00
import Router from '../router.js'
import AuthApi from 'zeroservices/auth.js'
2020-04-09 10:38:27 +02:00
import 'zero/axios.config.js'
2020-03-23 20:05:02 +01:00
export default {
name: 'app',
2020-04-06 00:49:09 +02:00
router: Router,
components: { AppNavigation, AppOverlays, AppLogin },
2020-04-09 11:48:34 +02:00
data: () => ({
2020-04-10 15:47:29 +02:00
isAuthenticated: true
2020-04-09 11:48:34 +02:00
}),
created()
2020-04-09 11:48:34 +02:00
{
AuthApi.$on('authenticated', isAuthenticated =>
{
this.isAuthenticated = isAuthenticated;
});
2020-04-09 11:48:34 +02:00
}
2020-03-23 20:05:02 +01:00
}
</script>