select dashboard icon
parent
4b96a53108
commit
3acc1b8ba9
|
@ -1,7 +1,13 @@
|
|||
NavigationBarDirective = (currentUserService) ->
|
||||
NavigationBarDirective = (currentUserService, $location) ->
|
||||
link = (scope, el, attrs, ctrl) ->
|
||||
scope.vm = {}
|
||||
|
||||
scope.$on "$routeChangeSuccess", () ->
|
||||
if $location.path() == "/"
|
||||
scope.vm.active = true
|
||||
else
|
||||
scope.vm.active = false
|
||||
|
||||
taiga.defineImmutableProperty(scope.vm, "projects", () -> currentUserService.projects.get("recents"))
|
||||
taiga.defineImmutableProperty(scope.vm, "isAuthenticated", () -> currentUserService.isAuthenticated())
|
||||
|
||||
|
@ -14,7 +20,8 @@ NavigationBarDirective = (currentUserService) ->
|
|||
return directive
|
||||
|
||||
NavigationBarDirective.$inject = [
|
||||
"tgCurrentUserService"
|
||||
"tgCurrentUserService",
|
||||
"$location"
|
||||
]
|
||||
|
||||
angular.module("taigaNavigationBar").directive("tgNavigationBar", NavigationBarDirective)
|
||||
|
|
|
@ -19,10 +19,9 @@ nav.navbar(ng-if="vm.isAuthenticated")
|
|||
translate="PROJECT.NAVIGATION.HELP")
|
||||
|
||||
div.nav-right
|
||||
a(
|
||||
href="#",
|
||||
tg-nav="home",
|
||||
title="{{'PROJECT.NAVIGATION.DASHBOARD_TITLE' | translate}}")
|
||||
a(tg-nav="home",
|
||||
ng-class="{active: vm.active}",
|
||||
title="{{'PROJECT.NAVIGATION.DASHBOARD_TITLE' | translate}}")
|
||||
|
||||
include ../../svg/dashboard.svg
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
color: $white;
|
||||
display: inline-block;
|
||||
transition: all .2s linear;
|
||||
&.active,
|
||||
&:hover {
|
||||
background: rgba($black, .2);
|
||||
color: $fresh-taiga;
|
||||
|
|
Loading…
Reference in New Issue