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