|
8 | 8 | </div>
|
9 | 9 | </div>
|
10 | 10 |
|
11 |
| - {{if .IsSigned}} |
| 11 | + {{if and .IsSigned .MustChangePassword}} |
| 12 | + {{/* No links */}} |
| 13 | + {{else if .IsSigned}} |
12 | 14 | <a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
|
13 | 15 | {{if not .UnitIssuesGlobalDisabled}}
|
14 | 16 | <a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
|
|
40 | 42 | </div>
|
41 | 43 | */}}
|
42 | 44 |
|
43 |
| - {{if .IsSigned}} |
| 45 | + |
| 46 | + {{if and .IsSigned .MustChangePassword}} |
| 47 | + <div class="right stackable menu"> |
| 48 | + <div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted"> |
| 49 | + <span class="text"> |
| 50 | + <img class="ui tiny avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}"> |
| 51 | + <span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span> |
| 52 | + <span class="mobile-only">{{.SignedUser.Name}}</span> |
| 53 | + <span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down" 16}}</span> |
| 54 | + </span> |
| 55 | + <div class="menu user-menu" tabindex="-1"> |
| 56 | + <div class="ui header"> |
| 57 | + {{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong> |
| 58 | + </div> |
| 59 | + |
| 60 | + <div class="divider"></div> |
| 61 | + <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/"> |
| 62 | + {{svg "octicon-sign-out" 16}} |
| 63 | + {{.i18n.Tr "sign_out"}}<!-- Sign Out --> |
| 64 | + </a> |
| 65 | + </div><!-- end content avatar menu --> |
| 66 | + </div><!-- end dropdown avatar menu --> |
| 67 | + </div> |
| 68 | + {{else if .IsSigned}} |
44 | 69 | <div class="right stackable menu">
|
45 | 70 | <a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
|
46 | 71 | <span class="text">
|
|
121 | 146 | </div><!-- end content avatar menu -->
|
122 | 147 | </div><!-- end dropdown avatar menu -->
|
123 | 148 | </div><!-- end signed user right menu -->
|
124 |
| - |
125 | 149 | {{else}}
|
126 |
| - |
127 | 150 | <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a>
|
128 | 151 | <div class="right stackable menu">
|
129 | 152 | {{if .ShowRegistrationButton}}
|
|
135 | 158 | {{svg "octicon-sign-in" 16}} {{.i18n.Tr "sign_in"}}
|
136 | 159 | </a>
|
137 | 160 | </div><!-- end anonymous right menu -->
|
138 |
| - |
139 | 161 | {{end}}
|
140 | 162 | </div>
|
0 commit comments