From 8accfa6ebee0fa1f3f1799eb95aba420f1bbe931 Mon Sep 17 00:00:00 2001 From: Tyrone Yeh Date: Thu, 23 Jun 2022 22:51:17 +0800 Subject: [PATCH 1/7] Adjust template for #20069 smallbell --- templates/base/head_navbar.tmpl | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index fab1d2d0b11e4..d504d2da58592 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -1,11 +1,23 @@ - + {{svg "octicon-bell"}} - {{.i18n.Tr "notifications"}} {{$notificationUnreadCount := 0}} {{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}} From 368fb00a092ae22ae64a1c00b925b4b8e1437dcd Mon Sep 17 00:00:00 2001 From: Tyrone Yeh Date: Fri, 24 Jun 2022 07:58:18 +0800 Subject: [PATCH 2/7] Adjust notification Unread Count variable to global and count bell position with mobile --- templates/base/head_navbar.tmpl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index d504d2da58592..d520b2fba9fc8 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -6,15 +6,15 @@ + {{$notificationUnreadCount := 0}} {{if .IsSigned}} - - {{svg "octicon-bell"}} - {{$notificationUnreadCount := 0}} + {{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}} - + {{$notificationUnreadCount}} + {{svg "octicon-bell"}} {{end}} @@ -115,9 +115,7 @@ {{svg "octicon-bell"}} - {{$notificationUnreadCount := 0}} - {{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}} - + {{$notificationUnreadCount}} From ebf10810c7a09012236284d6434d2f000e7d7993 Mon Sep 17 00:00:00 2001 From: Tyrone Yeh Date: Fri, 24 Jun 2022 08:22:41 +0800 Subject: [PATCH 3/7] Adjust bell icon style --- templates/base/head_navbar.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index d520b2fba9fc8..5f68354d3f1ce 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -9,12 +9,12 @@ {{$notificationUnreadCount := 0}} {{if .IsSigned}} - + {{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}} {{$notificationUnreadCount}} - {{svg "octicon-bell"}} + {{svg "octicon-bell"}} {{end}} From 9849c912217c5f39ac54a5d66fcc55b2c2dd0239 Mon Sep 17 00:00:00 2001 From: Tyrone Yeh Date: Fri, 24 Jun 2022 12:11:28 +0800 Subject: [PATCH 4/7] Adjust smallbell to middle --- templates/base/head_navbar.tmpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 5f68354d3f1ce..a3e3e4ba65e20 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -1,8 +1,5 @@ - + {{svg "octicon-bell"}} From 20d91951f32949290d86a4aa38724ea02c96b29f Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 25 Jun 2022 19:42:24 +0800 Subject: [PATCH 6/7] move notificationUnreadCount to a general code block, reduce changed lines --- templates/base/head_navbar.tmpl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 2077d5cee13ff..58988efd599d4 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -1,14 +1,17 @@ - + {{svg "octicon-bell"}} - + {{$notificationUnreadCount}} From 6fc1ede6bec4a04639ba2fb67979539721b0085a Mon Sep 17 00:00:00 2001 From: Tyrone Yeh Date: Mon, 4 Jul 2022 18:06:50 +0800 Subject: [PATCH 7/7] Solved conflicts --- templates/base/head_navbar.tmpl | 69 ++++++++++++++++----------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 58988efd599d4..91529dc163ac5 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -3,10 +3,9 @@ {{if .IsSigned}} {{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}} {{end}} -
- - + + {{if .IsSigned}} @@ -27,19 +26,19 @@ {{/* No links */}} {{else if .IsSigned}} {{if not .UnitIssuesGlobalDisabled}} - {{.i18n.Tr "issues"}} + {{.locale.Tr "issues"}} {{end}} {{if not .UnitPullsGlobalDisabled}} - {{.i18n.Tr "pull_requests"}} + {{.locale.Tr "pull_requests"}} {{end}} {{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}} - {{if .ShowMilestonesDashboardPage}}{{.i18n.Tr "milestones"}}{{end}} + {{if .ShowMilestonesDashboardPage}}{{.locale.Tr "milestones"}}{{end}} {{end}} - {{.i18n.Tr "explore"}} + {{.locale.Tr "explore"}} {{else if .IsLandingPageOrganizations}} - {{.i18n.Tr "explore"}} + {{.locale.Tr "explore"}} {{else}} - {{.i18n.Tr "explore"}} + {{.locale.Tr "explore"}} {{end}} {{template "custom/extra_links" .}} @@ -47,7 +46,7 @@ {{/* TODO
- + {{svg "octicon-search" 16}}
@@ -56,22 +55,22 @@ {{if and .IsSigned .MustChangePassword}}