mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
feat(nav): clicking "Group" goes to first group
This commit is contained in:
@@ -224,7 +224,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<router-link
|
<router-link
|
||||||
class="nav-link"
|
class="nav-link"
|
||||||
:to="{name: 'groupPlan'}"
|
:to="groupPlanTopLink"
|
||||||
>
|
>
|
||||||
{{ $t('group') }}
|
{{ $t('group') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
@@ -780,6 +780,13 @@ export default {
|
|||||||
groupPlans: 'groupPlans.data',
|
groupPlans: 'groupPlans.data',
|
||||||
modalStack: 'modalStack',
|
modalStack: 'modalStack',
|
||||||
}),
|
}),
|
||||||
|
groupPlanTopLink () {
|
||||||
|
if (!this.groupPlans || this.groupPlans.length === 0) return { name: 'groupPlan' };
|
||||||
|
return {
|
||||||
|
name: 'groupPlanDetailTaskInformation',
|
||||||
|
params: { groupId: this.groupPlans[0]._id },
|
||||||
|
};
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getUserGroupPlans();
|
this.getUserGroupPlans();
|
||||||
@@ -839,7 +846,6 @@ export default {
|
|||||||
element.classList.add('down');
|
element.classList.add('down');
|
||||||
element.lastChild.style.maxHeight = `${element.lastChild.scrollHeight}px`;
|
element.lastChild.style.maxHeight = `${element.lastChild.scrollHeight}px`;
|
||||||
},
|
},
|
||||||
|
|
||||||
closeMenu () {
|
closeMenu () {
|
||||||
Array.from(document.getElementsByClassName('droppable')).forEach(droppableElement => {
|
Array.from(document.getElementsByClassName('droppable')).forEach(droppableElement => {
|
||||||
this.closeDropdown(droppableElement);
|
this.closeDropdown(droppableElement);
|
||||||
|
|||||||
Reference in New Issue
Block a user