feat(profiles): load modal instead of page?
This commit is contained in:
@@ -319,11 +319,19 @@ router.beforeEach(async (to, from, next) => {
|
||||
});
|
||||
}
|
||||
|
||||
if ((to.name === 'userProfile' || to.name === 'userProfilePage') && from.name !== null) {
|
||||
if ((to.name === 'userProfile' || to.name === 'userProfilePage')) {
|
||||
let startingPage = 'profile';
|
||||
if (to.params.startingPage !== undefined) {
|
||||
startingPage = to.params.startingPage;
|
||||
}
|
||||
if (from.name === null) {
|
||||
setTimeout(() => router.app.$emit('habitica:show-profile', {
|
||||
userId: to.params.userId,
|
||||
startingPage,
|
||||
path: to.path,
|
||||
}), 500);
|
||||
return next({ name: 'tasks' });
|
||||
}
|
||||
router.app.$emit('habitica:show-profile', {
|
||||
userId: to.params.userId,
|
||||
startingPage,
|
||||
|
||||
Reference in New Issue
Block a user