IssueNotesRefactor: camelCase component names.
This commit is contained in:
parent
0b4a3d8483
commit
a59f23695b
|
@ -1,9 +1,9 @@
|
|||
<script>
|
||||
/* global Flash */
|
||||
|
||||
import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
|
||||
import MarkdownField from '../../vue_shared/components/markdown/field.vue';
|
||||
import IssueNoteSignedOutWidget from './issue_note_signed_out_widget.vue';
|
||||
import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
|
||||
import markdownField from '../../vue_shared/components/markdown/field.vue';
|
||||
import issueNoteSignedOutWidget from './issue_note_signed_out_widget.vue';
|
||||
import eventHub from '../event_hub';
|
||||
|
||||
export default {
|
||||
|
@ -22,9 +22,9 @@ export default {
|
|||
};
|
||||
},
|
||||
components: {
|
||||
UserAvatarLink,
|
||||
MarkdownField,
|
||||
IssueNoteSignedOutWidget,
|
||||
userAvatarLink,
|
||||
markdownField,
|
||||
issueNoteSignedOutWidget,
|
||||
},
|
||||
computed: {
|
||||
isLoggedIn() {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<script>
|
||||
/* global Flash */
|
||||
|
||||
import IssueNote from './issue_note.vue';
|
||||
import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
|
||||
import IssueNoteHeader from './issue_note_header.vue';
|
||||
import IssueNoteActions from './issue_note_actions.vue';
|
||||
import IssueNoteSignedOutWidget from './issue_note_signed_out_widget.vue';
|
||||
import IssueNoteEditedText from './issue_note_edited_text.vue';
|
||||
import IssueNoteForm from './issue_note_form.vue';
|
||||
import PlaceholderNote from './issue_placeholder_note.vue';
|
||||
import PlaceholderSystemNote from './issue_placeholder_system_note.vue';
|
||||
import issueNote from './issue_note.vue';
|
||||
import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
|
||||
import issueNoteHeader from './issue_note_header.vue';
|
||||
import issueNoteActions from './issue_note_actions.vue';
|
||||
import issueNoteSignedOutWidget from './issue_note_signed_out_widget.vue';
|
||||
import issueNoteEditedText from './issue_note_edited_text.vue';
|
||||
import issueNoteForm from './issue_note_form.vue';
|
||||
import placeholderNote from './issue_placeholder_note.vue';
|
||||
import placeholderSystemNote from './issue_placeholder_system_note.vue';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
@ -36,26 +36,26 @@ export default {
|
|||
},
|
||||
},
|
||||
components: {
|
||||
IssueNote,
|
||||
UserAvatarLink,
|
||||
IssueNoteHeader,
|
||||
IssueNoteActions,
|
||||
IssueNoteEditedText,
|
||||
IssueNoteSignedOutWidget,
|
||||
IssueNoteForm,
|
||||
PlaceholderNote,
|
||||
PlaceholderSystemNote,
|
||||
issueNote,
|
||||
userAvatarLink,
|
||||
issueNoteHeader,
|
||||
issueNoteActions,
|
||||
issueNoteSignedOutWidget,
|
||||
issueNoteEditedText,
|
||||
issueNoteForm,
|
||||
placeholderNote,
|
||||
placeholderSystemNote,
|
||||
},
|
||||
methods: {
|
||||
componentName(note) {
|
||||
if (note.isPlaceholderNote) {
|
||||
if (note.placeholderType === 'systemNote') {
|
||||
return PlaceholderSystemNote;
|
||||
return placeholderSystemNote;
|
||||
}
|
||||
return PlaceholderNote;
|
||||
return placeholderNote;
|
||||
}
|
||||
|
||||
return IssueNote;
|
||||
return issueNote;
|
||||
},
|
||||
componentData(note) {
|
||||
return note.isPlaceholderNote ? note.notes[0] : note;
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
/* global Flash */
|
||||
|
||||
import { mapGetters } from 'vuex';
|
||||
import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
|
||||
import IssueNoteHeader from './issue_note_header.vue';
|
||||
import IssueNoteActions from './issue_note_actions.vue';
|
||||
import IssueNoteBody from './issue_note_body.vue';
|
||||
import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
|
||||
import issueNoteHeader from './issue_note_header.vue';
|
||||
import issueNoteActions from './issue_note_actions.vue';
|
||||
import issueNoteBody from './issue_note_body.vue';
|
||||
import eventHub from '../event_hub';
|
||||
|
||||
export default {
|
||||
|
@ -22,10 +22,10 @@ export default {
|
|||
};
|
||||
},
|
||||
components: {
|
||||
UserAvatarLink,
|
||||
IssueNoteHeader,
|
||||
IssueNoteActions,
|
||||
IssueNoteBody,
|
||||
userAvatarLink,
|
||||
issueNoteHeader,
|
||||
issueNoteActions,
|
||||
issueNoteBody,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import IssueNoteEditedText from './issue_note_edited_text.vue';
|
||||
import IssueNoteAwardsList from './issue_note_awards_list.vue';
|
||||
import IssueNoteForm from './issue_note_form.vue';
|
||||
import issueNoteEditedText from './issue_note_edited_text.vue';
|
||||
import issueNoteAwardsList from './issue_note_awards_list.vue';
|
||||
import issueNoteForm from './issue_note_form.vue';
|
||||
import TaskList from '../../task_list';
|
||||
|
||||
export default {
|
||||
|
@ -34,9 +34,9 @@ export default {
|
|||
},
|
||||
},
|
||||
components: {
|
||||
IssueNoteEditedText,
|
||||
IssueNoteAwardsList,
|
||||
IssueNoteForm,
|
||||
issueNoteEditedText,
|
||||
issueNoteAwardsList,
|
||||
issueNoteForm,
|
||||
},
|
||||
methods: {
|
||||
renderGFM() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import TimeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
|
||||
import timeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
@ -22,7 +22,7 @@ export default {
|
|||
},
|
||||
},
|
||||
components: {
|
||||
TimeAgoTooltip,
|
||||
timeAgoTooltip,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import MarkdownField from '../../vue_shared/components/markdown/field.vue';
|
||||
import markdownField from '../../vue_shared/components/markdown/field.vue';
|
||||
import eventHub from '../event_hub';
|
||||
|
||||
export default {
|
||||
|
@ -46,7 +46,7 @@ export default {
|
|||
},
|
||||
},
|
||||
components: {
|
||||
MarkdownField,
|
||||
markdownField,
|
||||
},
|
||||
methods: {
|
||||
handleUpdate() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import TimeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
|
||||
import timeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
@ -36,7 +36,7 @@ export default {
|
|||
},
|
||||
},
|
||||
components: {
|
||||
TimeAgoTooltip,
|
||||
timeAgoTooltip,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -6,12 +6,12 @@ import Vuex from 'vuex';
|
|||
import VueResource from 'vue-resource';
|
||||
import storeOptions from '../stores/issue_notes_store';
|
||||
import eventHub from '../event_hub';
|
||||
import IssueNote from './issue_note.vue';
|
||||
import IssueDiscussion from './issue_discussion.vue';
|
||||
import IssueSystemNote from './issue_system_note.vue';
|
||||
import IssueCommentForm from './issue_comment_form.vue';
|
||||
import PlaceholderNote from './issue_placeholder_note.vue';
|
||||
import PlaceholderSystemNote from './issue_placeholder_system_note.vue';
|
||||
import issueNote from './issue_note.vue';
|
||||
import issueDiscussion from './issue_discussion.vue';
|
||||
import issueSystemNote from './issue_system_note.vue';
|
||||
import issueCommentForm from './issue_comment_form.vue';
|
||||
import placeholderNote from './issue_placeholder_note.vue';
|
||||
import placeholderSystemNote from './issue_placeholder_system_note.vue';
|
||||
|
||||
Vue.use(Vuex);
|
||||
Vue.use(VueResource);
|
||||
|
@ -26,12 +26,12 @@ export default {
|
|||
};
|
||||
},
|
||||
components: {
|
||||
IssueNote,
|
||||
IssueDiscussion,
|
||||
IssueSystemNote,
|
||||
IssueCommentForm,
|
||||
PlaceholderNote,
|
||||
PlaceholderSystemNote,
|
||||
issueNote,
|
||||
issueDiscussion,
|
||||
issueSystemNote,
|
||||
issueCommentForm,
|
||||
placeholderNote,
|
||||
placeholderSystemNote,
|
||||
},
|
||||
computed: {
|
||||
...Vuex.mapGetters([
|
||||
|
@ -43,14 +43,14 @@ export default {
|
|||
componentName(note) {
|
||||
if (note.isPlaceholderNote) {
|
||||
if (note.placeholderType === 'systemNote') {
|
||||
return PlaceholderSystemNote;
|
||||
return placeholderSystemNote;
|
||||
}
|
||||
return PlaceholderNote;
|
||||
return placeholderNote;
|
||||
} else if (note.individual_note) {
|
||||
return note.notes[0].system ? IssueSystemNote : IssueNote;
|
||||
return note.notes[0].system ? issueSystemNote : issueNote;
|
||||
}
|
||||
|
||||
return IssueDiscussion;
|
||||
return issueDiscussion;
|
||||
},
|
||||
componentData(note) {
|
||||
return note.individual_note ? note.notes[0] : note;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import iconsMap from './issue_note_icons';
|
||||
import IssueNoteHeader from './issue_note_header.vue';
|
||||
import issueNoteHeader from './issue_note_header.vue';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
@ -16,7 +16,7 @@ export default {
|
|||
};
|
||||
},
|
||||
components: {
|
||||
IssueNoteHeader,
|
||||
issueNoteHeader,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
import Vue from 'vue';
|
||||
import IssueNotes from './components/issue_notes.vue';
|
||||
import issueNotes from './components/issue_notes.vue';
|
||||
import '../vue_shared/vue_resource_interceptor';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const vm = new Vue({
|
||||
el: '#js-notes',
|
||||
components: { IssueNotes },
|
||||
components: {
|
||||
issueNotes
|
||||
},
|
||||
template: `
|
||||
<issue-notes ref="notes" />
|
||||
`,
|
||||
|
|
Loading…
Reference in New Issue