From a2d7999e933c9da6e73624aaeb3840fe2d39dda6 Mon Sep 17 00:00:00 2001 From: wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf <61180606+wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf@users.noreply.github.com> Date: Tue, 19 May 2020 22:24:14 +0200 Subject: [PATCH] Insert ui divider directly in templates instead of from inside heatmap vue component (#11508) * ui: remove the divider between heatmap and feeds in the dashboard view * this commit reverses 6ccd19ef86b3b729a3b6dc35076639db5531550a Signed-off-by: surtur <a_mirre@utb.cz> * add a divider to the default user dashboard view * another one-line change, this time as a direct complement of 2bfc71614c0c5470162825a21c13838e15ccf5a6 to implement a divider of sorts (as per 6ccd19ef86b3b729a3b6dc35076639db5531550a originally) Signed-off-by: surtur <a_mirre@utb.cz> * removed the divider in heatmap.tmpl * the separator is added by partial templates as needed Signed-off-by: surtur <a_mirre@utb.cz> * load proper dashboard template code in profile.tmpl * as discussed in Discord * includes a divider of its own Signed-off-by: surtur <a_mirre@utb.cz> --- templates/user/dashboard/dashboard.tmpl | 1 + templates/user/dashboard/heatmap.tmpl | 1 - templates/user/profile.tmpl | 14 ++++---------- web_src/js/components/ActivityHeatmap.vue | 1 - 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl index f5b0e3f377..7a4968ebe6 100644 --- a/templates/user/dashboard/dashboard.tmpl +++ b/templates/user/dashboard/dashboard.tmpl @@ -7,6 +7,7 @@ <div class="ui container ten wide column"> {{if .EnableHeatmap}} {{template "user/dashboard/heatmap" .}} + <div class="ui divider"></div> {{end}} {{template "user/dashboard/feeds" .}} </div> diff --git a/templates/user/dashboard/heatmap.tmpl b/templates/user/dashboard/heatmap.tmpl index e1a3ca7d3a..626c70dd8d 100644 --- a/templates/user/dashboard/heatmap.tmpl +++ b/templates/user/dashboard/heatmap.tmpl @@ -4,5 +4,4 @@ <div class="ui active centered inline indeterminate text loader" id="loading-heatmap">{{.i18n.Tr "user.heatmap.loading"}}</div> </div> </activity-heatmap> - <div class="ui divider"></div> </div> diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index f3cac7befb..e07b4b0dd8 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -104,16 +104,10 @@ </div> {{if eq .TabName "activity"}} - {{if .EnableHeatmap}} - <div id="user-heatmap" style="padding-right: 40px"> - <activity-heatmap :locale="locale" :suburl="suburl" :user="heatmapUser"> - <div slot="loading"> - <div class="ui active centered inline indeterminate text loader" id="loading-heatmap">{{.i18n.Tr "user.heatmap.loading"}}</div> - </div> - </activity-heatmap> - </div> - <div class="ui divider"></div> - {{end}} + {{if .EnableHeatmap}} + {{template "user/dashboard/heatmap" .}} + <div class="ui divider"></div> + {{end}} <div class="feeds"> {{template "user/dashboard/feeds" .}} </div> diff --git a/web_src/js/components/ActivityHeatmap.vue b/web_src/js/components/ActivityHeatmap.vue index 3c46748816..ec241b64fa 100644 --- a/web_src/js/components/ActivityHeatmap.vue +++ b/web_src/js/components/ActivityHeatmap.vue @@ -7,7 +7,6 @@ {{ totalContributions }} total contributions in the last 12 months </h4> <calendar-heatmap v-show="!isLoading" :locale="locale" :no-data-text="locale.no_contributions" :tooltip-unit="locale.contributions" :end-date="endDate" :values="values" :range-color="colorRange"/> - <div class="ui divider"></div> </div> </template>