|
|
@@ -4,11 +4,11 @@ |
|
|
|
<side-bar :role="user.status" :active="active"> |
|
|
|
</side-bar> |
|
|
|
|
|
|
|
<div v-if="loading" class="page"> |
|
|
|
<div v-if="loading" class="page loading"> |
|
|
|
<spinner></spinner> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-else-if="!loading"></div> |
|
|
|
<home :user="user" v-else-if="active == 1" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
@@ -16,6 +16,7 @@ |
|
|
|
<script> |
|
|
|
import SideBar from "./sidebar.vue" |
|
|
|
import Spinner from "./spinner.vue" |
|
|
|
import Home from "./home.vue" |
|
|
|
|
|
|
|
const user = { |
|
|
|
firstName: "test", |
|
|
@@ -24,6 +25,8 @@ const user = { |
|
|
|
status: 1, |
|
|
|
} |
|
|
|
|
|
|
|
// Used to check the current section of the app generally without a regex match |
|
|
|
// each time. |
|
|
|
function active() { |
|
|
|
if (this.hash == '' || this.hash == '#') { |
|
|
|
return 1 |
|
|
@@ -41,11 +44,11 @@ function active() { |
|
|
|
} |
|
|
|
|
|
|
|
export default { |
|
|
|
components: {SideBar, Spinner}, |
|
|
|
computed: {active}, |
|
|
|
components: { SideBar, Spinner, Home }, |
|
|
|
computed: { active }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
loading: true, user: user, hash: '' |
|
|
|
loading: false, user: user, hash: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|