Client side improvements
This commit is contained in:
parent
edc54cd5f6
commit
02420bd4ba
@ -42,7 +42,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getCourseMeta().then(data => this.courseMeta = data)
|
if(lms.store.checkLogin()) this.getCourseMeta().then(data => this.courseMeta = data)
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AButton
|
AButton
|
||||||
|
@ -70,6 +70,5 @@ frappe.ready(() => {
|
|||||||
if(lms.store.isLogin) lms.store.updateState()
|
if(lms.store.isLogin) lms.store.updateState()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
lms.debug = true
|
lms.debug = true
|
||||||
})
|
})
|
@ -6,8 +6,5 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "lmsRoot",
|
name: "lmsRoot",
|
||||||
mounted() {
|
|
||||||
$(document).scrollTop(0)
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
@ -40,7 +40,15 @@ const routes = [
|
|||||||
name: 'profile',
|
name: 'profile',
|
||||||
path: '/Profile',
|
path: '/Profile',
|
||||||
component: ProfilePage,
|
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