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>2020-01-24 00:08:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-24 00:08:35 +0300
commit24256212ea84e6fb6509f6fb317a2d2bac3d0d06 (patch)
treee4300d70d8e724179d9de657a68d88462aaaf04a /app/assets/javascripts/mr_notes
parentd933bc5a8738d24898c5a82cc72ee9bd050425e6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/mr_notes')
-rw-r--r--app/assets/javascripts/mr_notes/init_notes.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/assets/javascripts/mr_notes/init_notes.js b/app/assets/javascripts/mr_notes/init_notes.js
index 622db360d1f..a942bcc13da 100644
--- a/app/assets/javascripts/mr_notes/init_notes.js
+++ b/app/assets/javascripts/mr_notes/init_notes.js
@@ -4,6 +4,7 @@ import { mapActions, mapState, mapGetters } from 'vuex';
import store from 'ee_else_ce/mr_notes/stores';
import notesApp from '../notes/components/notes_app.vue';
import discussionKeyboardNavigator from '../notes/components/discussion_keyboard_navigator.vue';
+import initWidget from '../vue_merge_request_widget';
export default () => {
// eslint-disable-next-line no-new
@@ -32,11 +33,22 @@ export default () => {
...mapState({
activeTab: state => state.page.activeTab,
}),
+ isShowTabActive() {
+ return this.activeTab === 'show';
+ },
},
watch: {
discussionTabCounter() {
this.updateDiscussionTabCounter();
},
+ isShowTabActive: {
+ handler(newVal) {
+ if (newVal) {
+ initWidget();
+ }
+ },
+ immediate: true,
+ },
},
created() {
this.setActiveTab(window.mrTabs.getCurrentAction());
@@ -69,7 +81,7 @@ export default () => {
noteableData: this.noteableData,
notesData: this.notesData,
userData: this.currentUserData,
- shouldShow: this.activeTab === 'show',
+ shouldShow: this.isShowTabActive,
helpPagePath: this.helpPagePath,
},
}),