|  | 
| 1 |  | -{{$notificationUnreadCount := 0}} | 
| 2 |  | -{{if and .IsSigned .NotificationUnreadCount}} | 
| 3 |  | -	{{$notificationUnreadCount = call .NotificationUnreadCount ctx}} | 
| 4 |  | -{{end}} | 
| 5 |  | -{{$activeStopwatch := NIL}} | 
| 6 |  | -{{if and .IsSigned EnableTimetracking .GetActiveStopwatch}} | 
| 7 |  | -	{{$activeStopwatch = call .GetActiveStopwatch ctx}} | 
| 8 |  | -{{end}} | 
| 9 | 1 | <nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}"> | 
| 10 | 2 | 	<div class="navbar-left"> | 
| 11 | 3 | 		<!-- the logo --> | 
|  | 
| 15 | 7 | 
 | 
| 16 | 8 | 		<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column --> | 
| 17 | 9 | 		<div class="ui secondary menu navbar-mobile-right only-mobile"> | 
| 18 |  | -			{{if $activeStopwatch}} | 
| 19 |  | -			<a id="mobile-stopwatch-icon" class="active-stopwatch item" href="{{$activeStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}" data-seconds="{{$activeStopwatch.Seconds}}"> | 
| 20 |  | -				<div class="tw-relative"> | 
| 21 |  | -					{{svg "octicon-stopwatch"}} | 
| 22 |  | -					<span class="header-stopwatch-dot"></span> | 
| 23 |  | -				</div> | 
| 24 |  | -			</a> | 
| 25 |  | -			{{end}} | 
| 26 |  | -			{{if .IsSigned}} | 
| 27 |  | -			<a id="mobile-notifications-icon" class="item" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}"> | 
| 28 |  | -				<div class="tw-relative"> | 
| 29 |  | -					{{svg "octicon-bell"}} | 
| 30 |  | -					<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span> | 
| 31 |  | -				</div> | 
| 32 |  | -			</a> | 
| 33 |  | -			{{end}} | 
|  | 10 | +			{{template "base/head_navbar_icons" dict "HeadNavbarData" .HeadNavbarData}} | 
| 34 | 11 | 			<button class="item ui icon mini button tw-m-0" id="navbar-expand-toggle" aria-label="{{ctx.Locale.Tr "home.nav_menu"}}">{{svg "octicon-three-bars"}}</button> | 
| 35 | 12 | 		</div> | 
| 36 | 13 | 
 | 
|  | 
| 85 | 62 | 				</div><!-- end content avatar menu --> | 
| 86 | 63 | 			</div><!-- end dropdown avatar menu --> | 
| 87 | 64 | 		{{else if .IsSigned}} | 
| 88 |  | -			{{if $activeStopwatch}} | 
| 89 |  | -			<a class="item not-mobile active-stopwatch" href="{{$activeStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}" data-seconds="{{$activeStopwatch.Seconds}}"> | 
| 90 |  | -				<div class="tw-relative"> | 
| 91 |  | -					{{svg "octicon-stopwatch"}} | 
| 92 |  | -					<span class="header-stopwatch-dot"></span> | 
| 93 |  | -				</div> | 
| 94 |  | -			</a> | 
| 95 |  | -			{{end}} | 
| 96 |  | - | 
| 97 |  | -			<a class="item not-mobile" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}"> | 
| 98 |  | -				<div class="tw-relative"> | 
| 99 |  | -					{{svg "octicon-bell"}} | 
| 100 |  | -					<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span> | 
| 101 |  | -				</div> | 
| 102 |  | -			</a> | 
| 103 |  | - | 
|  | 65 | +			{{template "base/head_navbar_icons" dict "ItemExtraClass" "not-mobile" "HeadNavbarData" .HeadNavbarData}} | 
| 104 | 66 | 			<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}"> | 
| 105 | 67 | 				<span class="text"> | 
| 106 | 68 | 					{{svg "octicon-plus"}} | 
|  | 
| 130 | 92 | 					<span class="only-mobile">{{.SignedUser.Name}}</span> | 
| 131 | 93 | 					<span class="not-mobile">{{svg "octicon-triangle-down"}}</span> | 
| 132 | 94 | 				</span> | 
| 133 |  | -				{{/* do not localize it, here it needs the fixed length (width) to make UI comfortable */}} | 
| 134 |  | -				{{if .IsAdmin}}<span class="navbar-profile-admin">admin</span>{{end}} | 
| 135 | 95 | 				<div class="menu user-menu"> | 
| 136 | 96 | 					<div class="header"> | 
| 137 | 97 | 						{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong> | 
|  | 
| 189 | 149 | 		{{end}} | 
| 190 | 150 | 	</div><!-- end full right menu --> | 
| 191 | 151 | 
 | 
|  | 152 | +	{{$activeStopwatch := call .HeadNavbarData.GetActiveStopwatch}} | 
| 192 | 153 | 	{{if $activeStopwatch}} | 
| 193 | 154 | 		<div class="active-stopwatch-popup tippy-target"> | 
| 194 | 155 | 			<div class="tw-flex tw-items-center tw-gap-2 tw-p-3"> | 
|  | 
0 commit comments