mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Fix Workspaces at All Boards to have correct count of remaining etc, while starred also at Starred/Favorites.
Thanks to xet7 !
This commit is contained in:
parent
46866dac85
commit
6244657ca5
2 changed files with 14 additions and 6 deletions
|
|
@ -373,6 +373,12 @@
|
||||||
.board-list li.starred .is-star-active,
|
.board-list li.starred .is-star-active,
|
||||||
.board-list li.starred .is-not-star-active {
|
.board-list li.starred .is-not-star-active {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
color: #ffd700;
|
||||||
|
}
|
||||||
|
/* Show star icon on hover even for non-starred boards */
|
||||||
|
.board-list li:hover .is-star-active,
|
||||||
|
.board-list li:hover .is-not-star-active {
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
.board-list .board-list-item {
|
.board-list .board-list-item {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
@ -436,7 +442,7 @@
|
||||||
}
|
}
|
||||||
.board-list .is-star-active,
|
.board-list .is-star-active,
|
||||||
.board-list .is-not-star-active {
|
.board-list .is-not-star-active {
|
||||||
bottom: 0;
|
top: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
|
|
@ -444,7 +450,6 @@
|
||||||
padding: 9px 9px;
|
padding: 9px 9px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
|
||||||
transition-duration: 0.15s;
|
transition-duration: 0.15s;
|
||||||
transition-property: color, font-size, background;
|
transition-property: color, font-size, background;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -293,13 +293,15 @@ BlazeComponent.extendComponent({
|
||||||
} else if (sel === 'templates') {
|
} else if (sel === 'templates') {
|
||||||
list = list.filter(b => b.type === 'template-container');
|
list = list.filter(b => b.type === 'template-container');
|
||||||
} else if (sel === 'remaining') {
|
} else if (sel === 'remaining') {
|
||||||
|
// Show boards not in any workspace AND not templates
|
||||||
|
// Keep starred boards visible in Remaining too
|
||||||
list = list.filter(b =>
|
list = list.filter(b =>
|
||||||
!assignments[b._id] &&
|
!assignments[b._id] &&
|
||||||
b.type !== 'template-container' &&
|
b.type !== 'template-container'
|
||||||
!(currentUser && currentUser.hasStarred(b._id))
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// assume sel is a workspaceId
|
// assume sel is a workspaceId
|
||||||
|
// Keep starred boards visible in their workspace too
|
||||||
list = list.filter(b => assignments[b._id] === sel);
|
list = list.filter(b => assignments[b._id] === sel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -803,10 +805,11 @@ BlazeComponent.extendComponent({
|
||||||
} else if (type === 'templates') {
|
} else if (type === 'templates') {
|
||||||
return allBoards.filter(b => b.type === 'template-container').length;
|
return allBoards.filter(b => b.type === 'template-container').length;
|
||||||
} else if (type === 'remaining') {
|
} else if (type === 'remaining') {
|
||||||
|
// Count boards not in any workspace AND not templates
|
||||||
|
// Include starred boards (they appear in both Starred and Remaining)
|
||||||
return allBoards.filter(b =>
|
return allBoards.filter(b =>
|
||||||
!assignments[b._id] &&
|
!assignments[b._id] &&
|
||||||
b.type !== 'template-container' &&
|
b.type !== 'template-container'
|
||||||
!(currentUser && currentUser.hasStarred(b._id))
|
|
||||||
).length;
|
).length;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue