Commit a59f2369 authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: camelCase component names.

parent 0b4a3d84
<script> <script>
/* global Flash */ /* global Flash */
import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
import MarkdownField from '../../vue_shared/components/markdown/field.vue'; import markdownField from '../../vue_shared/components/markdown/field.vue';
import IssueNoteSignedOutWidget from './issue_note_signed_out_widget.vue'; import issueNoteSignedOutWidget from './issue_note_signed_out_widget.vue';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
export default { export default {
...@@ -22,9 +22,9 @@ export default { ...@@ -22,9 +22,9 @@ export default {
}; };
}, },
components: { components: {
UserAvatarLink, userAvatarLink,
MarkdownField, markdownField,
IssueNoteSignedOutWidget, issueNoteSignedOutWidget,
}, },
computed: { computed: {
isLoggedIn() { isLoggedIn() {
......
<script> <script>
/* global Flash */ /* global Flash */
import IssueNote from './issue_note.vue'; import issueNote from './issue_note.vue';
import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
import IssueNoteHeader from './issue_note_header.vue'; import issueNoteHeader from './issue_note_header.vue';
import IssueNoteActions from './issue_note_actions.vue'; import issueNoteActions from './issue_note_actions.vue';
import IssueNoteSignedOutWidget from './issue_note_signed_out_widget.vue'; import issueNoteSignedOutWidget from './issue_note_signed_out_widget.vue';
import IssueNoteEditedText from './issue_note_edited_text.vue'; import issueNoteEditedText from './issue_note_edited_text.vue';
import IssueNoteForm from './issue_note_form.vue'; import issueNoteForm from './issue_note_form.vue';
import PlaceholderNote from './issue_placeholder_note.vue'; import placeholderNote from './issue_placeholder_note.vue';
import PlaceholderSystemNote from './issue_placeholder_system_note.vue'; import placeholderSystemNote from './issue_placeholder_system_note.vue';
export default { export default {
props: { props: {
...@@ -36,26 +36,26 @@ export default { ...@@ -36,26 +36,26 @@ export default {
}, },
}, },
components: { components: {
IssueNote, issueNote,
UserAvatarLink, userAvatarLink,
IssueNoteHeader, issueNoteHeader,
IssueNoteActions, issueNoteActions,
IssueNoteEditedText, issueNoteSignedOutWidget,
IssueNoteSignedOutWidget, issueNoteEditedText,
IssueNoteForm, issueNoteForm,
PlaceholderNote, placeholderNote,
PlaceholderSystemNote, placeholderSystemNote,
}, },
methods: { methods: {
componentName(note) { componentName(note) {
if (note.isPlaceholderNote) { if (note.isPlaceholderNote) {
if (note.placeholderType === 'systemNote') { if (note.placeholderType === 'systemNote') {
return PlaceholderSystemNote; return placeholderSystemNote;
} }
return PlaceholderNote; return placeholderNote;
} }
return IssueNote; return issueNote;
}, },
componentData(note) { componentData(note) {
return note.isPlaceholderNote ? note.notes[0] : note; return note.isPlaceholderNote ? note.notes[0] : note;
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/* global Flash */ /* global Flash */
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
import IssueNoteHeader from './issue_note_header.vue'; import issueNoteHeader from './issue_note_header.vue';
import IssueNoteActions from './issue_note_actions.vue'; import issueNoteActions from './issue_note_actions.vue';
import IssueNoteBody from './issue_note_body.vue'; import issueNoteBody from './issue_note_body.vue';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
export default { export default {
...@@ -22,10 +22,10 @@ export default { ...@@ -22,10 +22,10 @@ export default {
}; };
}, },
components: { components: {
UserAvatarLink, userAvatarLink,
IssueNoteHeader, issueNoteHeader,
IssueNoteActions, issueNoteActions,
IssueNoteBody, issueNoteBody,
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
......
<script> <script>
import IssueNoteEditedText from './issue_note_edited_text.vue'; import issueNoteEditedText from './issue_note_edited_text.vue';
import IssueNoteAwardsList from './issue_note_awards_list.vue'; import issueNoteAwardsList from './issue_note_awards_list.vue';
import IssueNoteForm from './issue_note_form.vue'; import issueNoteForm from './issue_note_form.vue';
import TaskList from '../../task_list'; import TaskList from '../../task_list';
export default { export default {
...@@ -34,9 +34,9 @@ export default { ...@@ -34,9 +34,9 @@ export default {
}, },
}, },
components: { components: {
IssueNoteEditedText, issueNoteEditedText,
IssueNoteAwardsList, issueNoteAwardsList,
IssueNoteForm, issueNoteForm,
}, },
methods: { methods: {
renderGFM() { renderGFM() {
......
<script> <script>
import TimeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue'; import timeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
export default { export default {
props: { props: {
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
}, },
}, },
components: { components: {
TimeAgoTooltip, timeAgoTooltip,
}, },
}; };
</script> </script>
......
<script> <script>
import MarkdownField from '../../vue_shared/components/markdown/field.vue'; import markdownField from '../../vue_shared/components/markdown/field.vue';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
export default { export default {
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
}, },
}, },
components: { components: {
MarkdownField, markdownField,
}, },
methods: { methods: {
handleUpdate() { handleUpdate() {
......
<script> <script>
import TimeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue'; import timeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
export default { export default {
props: { props: {
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
}, },
}, },
components: { components: {
TimeAgoTooltip, timeAgoTooltip,
}, },
data() { data() {
return { return {
......
...@@ -6,12 +6,12 @@ import Vuex from 'vuex'; ...@@ -6,12 +6,12 @@ import Vuex from 'vuex';
import VueResource from 'vue-resource'; import VueResource from 'vue-resource';
import storeOptions from '../stores/issue_notes_store'; import storeOptions from '../stores/issue_notes_store';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import IssueNote from './issue_note.vue'; import issueNote from './issue_note.vue';
import IssueDiscussion from './issue_discussion.vue'; import issueDiscussion from './issue_discussion.vue';
import IssueSystemNote from './issue_system_note.vue'; import issueSystemNote from './issue_system_note.vue';
import IssueCommentForm from './issue_comment_form.vue'; import issueCommentForm from './issue_comment_form.vue';
import PlaceholderNote from './issue_placeholder_note.vue'; import placeholderNote from './issue_placeholder_note.vue';
import PlaceholderSystemNote from './issue_placeholder_system_note.vue'; import placeholderSystemNote from './issue_placeholder_system_note.vue';
Vue.use(Vuex); Vue.use(Vuex);
Vue.use(VueResource); Vue.use(VueResource);
...@@ -26,12 +26,12 @@ export default { ...@@ -26,12 +26,12 @@ export default {
}; };
}, },
components: { components: {
IssueNote, issueNote,
IssueDiscussion, issueDiscussion,
IssueSystemNote, issueSystemNote,
IssueCommentForm, issueCommentForm,
PlaceholderNote, placeholderNote,
PlaceholderSystemNote, placeholderSystemNote,
}, },
computed: { computed: {
...Vuex.mapGetters([ ...Vuex.mapGetters([
...@@ -43,14 +43,14 @@ export default { ...@@ -43,14 +43,14 @@ export default {
componentName(note) { componentName(note) {
if (note.isPlaceholderNote) { if (note.isPlaceholderNote) {
if (note.placeholderType === 'systemNote') { if (note.placeholderType === 'systemNote') {
return PlaceholderSystemNote; return placeholderSystemNote;
} }
return PlaceholderNote; return placeholderNote;
} else if (note.individual_note) { } 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) { componentData(note) {
return note.individual_note ? note.notes[0] : note; return note.individual_note ? note.notes[0] : note;
......
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import iconsMap from './issue_note_icons'; import iconsMap from './issue_note_icons';
import IssueNoteHeader from './issue_note_header.vue'; import issueNoteHeader from './issue_note_header.vue';
export default { export default {
props: { props: {
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
}; };
}, },
components: { components: {
IssueNoteHeader, issueNoteHeader,
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
......
import Vue from 'vue'; import Vue from 'vue';
import IssueNotes from './components/issue_notes.vue'; import issueNotes from './components/issue_notes.vue';
import '../vue_shared/vue_resource_interceptor'; import '../vue_shared/vue_resource_interceptor';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const vm = new Vue({ const vm = new Vue({
el: '#js-notes', el: '#js-notes',
components: { IssueNotes }, components: {
issueNotes
},
template: ` template: `
<issue-notes ref="notes" /> <issue-notes ref="notes" />
`, `,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment