Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-12 15:12:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-12 15:12:09 +0300
commit07d9675a80861fe84199e4002667f0bd57c160bf (patch)
treee2e8a77a98ba8debf383988860b71b64d86100b3 /app/assets/javascripts/diffs
parentfc52f69f815eecbad9fcfe6b974f0c3e9c553828 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs')
-rw-r--r--app/assets/javascripts/diffs/components/app.vue18
1 files changed, 17 insertions, 1 deletions
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue
index c16a43af1e6..f5c0776ca35 100644
--- a/app/assets/javascripts/diffs/components/app.vue
+++ b/app/assets/javascripts/diffs/components/app.vue
@@ -331,6 +331,8 @@ export default {
mrReviews: this.rehydratedMrReviews,
});
+ this.interfaceWithDOM();
+
if (this.endpointCodequality) {
this.setCodequalityEndpoint(this.endpointCodequality);
}
@@ -445,6 +447,16 @@ export default {
notesEventHub.$off('refetchDiffData', this.refetchDiffData);
notesEventHub.$off('fetchDiffData', this.fetchData);
},
+ interfaceWithDOM() {
+ this.diffsTab = document.querySelector('.js-diffs-tab');
+ },
+ updateChangesTabCount() {
+ const badge = this.diffsTab.querySelector('.gl-badge');
+
+ if (this.diffsTab && badge) {
+ badge.textContent = this.diffFilesLength;
+ }
+ },
navigateToDiffFileNumber(number) {
this.navigateToDiffFileIndex(number - 1);
},
@@ -461,7 +473,11 @@ export default {
this.fetchDiffFilesMeta()
.then(({ real_size }) => {
this.diffFilesLength = parseInt(real_size, 10);
- if (toggleTree) this.setTreeDisplay();
+ if (toggleTree) {
+ this.setTreeDisplay();
+ }
+
+ this.updateChangesTabCount();
})
.catch(() => {
createFlash({