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-05-06 18:09:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-06 18:09:42 +0300
commita7beadc83470bd9ce23757a019795f49f95a6fff (patch)
treecb9ddaa8ea3eaf03b75184e682aef520ff46fc3f /app/assets/javascripts/mr_notes
parent4279f24a19836d3e74e4aae8bea7acc2dd8222cc (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.js31
1 files changed, 14 insertions, 17 deletions
diff --git a/app/assets/javascripts/mr_notes/init_notes.js b/app/assets/javascripts/mr_notes/init_notes.js
index 2580f8e86b1..ec9c800b7a2 100644
--- a/app/assets/javascripts/mr_notes/init_notes.js
+++ b/app/assets/javascripts/mr_notes/init_notes.js
@@ -15,19 +15,6 @@ export default () => {
notesApp,
},
store,
- data() {
- const notesDataset = document.getElementById('js-vue-mr-discussions').dataset;
- const noteableData = JSON.parse(notesDataset.noteableData);
- noteableData.noteableType = notesDataset.noteableType;
- noteableData.targetType = notesDataset.targetType;
-
- return {
- noteableData,
- currentUserData: JSON.parse(notesDataset.currentUserData),
- notesData: JSON.parse(notesDataset.notesData),
- helpPagePath: notesDataset.helpPagePath,
- };
- },
computed: {
...mapGetters(['discussionTabCounter']),
...mapState({
@@ -67,6 +54,19 @@ export default () => {
updateDiscussionTabCounter() {
this.notesCountBadge.text(this.discussionTabCounter);
},
+ dataset() {
+ const data = this.$el.dataset;
+ const noteableData = JSON.parse(data.noteableData);
+ noteableData.noteableType = data.noteableType;
+ noteableData.targetType = data.targetType;
+
+ return {
+ noteableData,
+ notesData: JSON.parse(data.notesData),
+ userData: JSON.parse(data.currentUserData),
+ helpPagePath: data.helpPagePath,
+ };
+ },
},
render(createElement) {
// NOTE: Even though `discussionKeyboardNavigator` is added to the `notes-app`,
@@ -76,11 +76,8 @@ export default () => {
return createElement(discussionKeyboardNavigator, [
createElement('notes-app', {
props: {
- noteableData: this.noteableData,
- notesData: this.notesData,
- userData: this.currentUserData,
+ ...this.dataset(),
shouldShow: this.isShowTabActive,
- helpPagePath: this.helpPagePath,
},
}),
]);