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>2021-05-08 09:10:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-08 09:10:29 +0300
commit835d006431c9769a17472cce25e05719ac580dd7 (patch)
treeb22d71af8e51405f786ffb621fccc36211166052 /app/assets/javascripts/whats_new
parent3be5f2409a03faccb554483ff01509d5f630f10a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/whats_new')
-rw-r--r--app/assets/javascripts/whats_new/components/app.vue9
-rw-r--r--app/assets/javascripts/whats_new/store/actions.js4
2 files changed, 10 insertions, 3 deletions
diff --git a/app/assets/javascripts/whats_new/components/app.vue b/app/assets/javascripts/whats_new/components/app.vue
index 4a387edbe3f..0bfb6a36dd8 100644
--- a/app/assets/javascripts/whats_new/components/app.vue
+++ b/app/assets/javascripts/whats_new/components/app.vue
@@ -30,7 +30,7 @@ export default {
},
mounted() {
this.openDrawer(this.versionDigest);
- this.fetchItems();
+ this.fetchFreshItems();
const body = document.querySelector('body');
const namespaceId = body.getAttribute('data-namespace-id');
@@ -42,13 +42,18 @@ export default {
bottomReached() {
const page = this.pageInfo.nextPage;
if (page) {
- this.fetchItems({ page });
+ this.fetchFreshItems(page);
}
},
handleResize() {
const height = getDrawerBodyHeight(this.$refs.drawer.$el);
this.setDrawerBodyHeight(height);
},
+ fetchFreshItems(page) {
+ const { versionDigest } = this;
+
+ this.fetchItems({ page, versionDigest });
+ },
},
};
</script>
diff --git a/app/assets/javascripts/whats_new/store/actions.js b/app/assets/javascripts/whats_new/store/actions.js
index 1dc92ea2606..f209f145884 100644
--- a/app/assets/javascripts/whats_new/store/actions.js
+++ b/app/assets/javascripts/whats_new/store/actions.js
@@ -14,17 +14,19 @@ export default {
localStorage.setItem(STORAGE_KEY, versionDigest);
}
},
- fetchItems({ commit, state }, { page } = { page: null }) {
+ fetchItems({ commit, state }, { page, versionDigest } = { page: null, versionDigest: null }) {
if (state.fetching) {
return false;
}
commit(types.SET_FETCHING, true);
+ const v = versionDigest;
return axios
.get('/-/whats_new', {
params: {
page,
+ v,
},
})
.then(({ data, headers }) => {