Client side improvements
This commit is contained in:
parent
edc54cd5f6
commit
02420bd4ba
@ -42,7 +42,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getCourseMeta().then(data => this.courseMeta = data)
|
||||
if(lms.store.checkLogin()) this.getCourseMeta().then(data => this.courseMeta = data)
|
||||
},
|
||||
components: {
|
||||
AButton
|
||||
|
@ -70,6 +70,5 @@ frappe.ready(() => {
|
||||
if(lms.store.isLogin) lms.store.updateState()
|
||||
}
|
||||
});
|
||||
|
||||
lms.debug = true
|
||||
})
|
@ -6,8 +6,5 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "lmsRoot",
|
||||
mounted() {
|
||||
$(document).scrollTop(0)
|
||||
}
|
||||
};
|
||||
</script>
|
@ -40,7 +40,15 @@ const routes = [
|
||||
name: 'profile',
|
||||
path: '/Profile',
|
||||
component: ProfilePage,
|
||||
props: true
|
||||
props: true,
|
||||
beforeEnter: (to, from, next) => {
|
||||
if(!lms.store.checkLogin()){
|
||||
next({name: 'home'})
|
||||
}
|
||||
else {
|
||||
next()
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user