mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Add untagged projects counter.
This commit is contained in:
parent
2d4c5f012a
commit
6e40284099
2 changed files with 11 additions and 2 deletions
|
@ -83,7 +83,11 @@
|
|||
ng-if="tags.length",
|
||||
ng-cloak,
|
||||
ng-click="selectUntagged()"
|
||||
) uncategorized
|
||||
ng-class="{active: filter === 'untagged'}",
|
||||
)
|
||||
a.tag-untagged(href)
|
||||
| #{translate("uncategorized")}
|
||||
span.subdued ({{ nUntagged }})
|
||||
li(ng-cloak)
|
||||
a.tag(href, ng-click="openNewTagModal()")
|
||||
i.fa.fa-fw.fa-plus
|
||||
|
|
|
@ -10,6 +10,7 @@ define [
|
|||
$scope.selectedProjects = []
|
||||
$scope.filter = "all"
|
||||
$scope.predicate = "lastUpdated"
|
||||
$scope.nUntagged = 0
|
||||
$scope.reverse = true
|
||||
$scope.searchText =
|
||||
value : ""
|
||||
|
@ -18,6 +19,10 @@ define [
|
|||
recalculateProjectListHeight()
|
||||
, 10
|
||||
|
||||
$scope.$watch((
|
||||
() -> $scope.projects.filter((project) -> !project.tags? or project.tags.length == 0).length
|
||||
), (newVal) -> $scope.nUntagged = newVal)
|
||||
|
||||
storedUIOpts = JSON.parse(localStorage("project_list"))
|
||||
|
||||
recalculateProjectListHeight = () ->
|
||||
|
@ -114,7 +119,7 @@ define [
|
|||
visible = false
|
||||
|
||||
# Hide tagged projects if we only want to see the uncategorized ones
|
||||
if $scope.filter == "untagged" and project.tags?
|
||||
if $scope.filter == "untagged" and project.tags?.length > 0
|
||||
visible = false
|
||||
|
||||
# Hide projects we own if we only want to see shared projects
|
||||
|
|
Loading…
Reference in a new issue