2017-06-08 18:50:11 -04:00
|
|
|
import Vue from 'vue';
|
2017-07-27 16:24:05 -04:00
|
|
|
import issueNotesApp from './components/issue_notes_app.vue';
|
2017-06-08 18:50:11 -04:00
|
|
|
|
2017-08-10 07:49:08 -04:00
|
|
|
document.addEventListener('DOMContentLoaded', () => new Vue({
|
|
|
|
el: '#js-vue-notes',
|
|
|
|
components: {
|
|
|
|
issueNotesApp,
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
const notesDataset = document.getElementById('js-vue-notes').dataset;
|
2017-07-27 16:24:05 -04:00
|
|
|
|
2017-08-10 07:49:08 -04:00
|
|
|
return {
|
|
|
|
issueData: JSON.parse(notesDataset.issueData),
|
|
|
|
currentUserData: JSON.parse(notesDataset.currentUserData),
|
|
|
|
notesData: {
|
|
|
|
lastFetchedAt: notesDataset.lastFetchedAt,
|
|
|
|
discussionsPath: notesDataset.discussionsPath,
|
|
|
|
newSessionPath: notesDataset.newSessionPath,
|
|
|
|
registerPath: notesDataset.registerPath,
|
|
|
|
notesPath: notesDataset.notesPath,
|
2017-08-17 13:25:56 -04:00
|
|
|
markdownDocsPath: notesDataset.markdownDocsPath,
|
|
|
|
quickActionsDocsPath: notesDataset.quickActionsDocsPath,
|
2017-08-10 07:49:08 -04:00
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
render(createElement) {
|
|
|
|
return createElement('issue-notes-app', {
|
|
|
|
props: {
|
|
|
|
issueData: this.issueData,
|
|
|
|
notesData: this.notesData,
|
|
|
|
userData: this.currentUserData,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
}));
|