Skip to content
Snippets Groups Projects
Commit 787616d4 authored by Fatih Acet's avatar Fatih Acet
Browse files

IssueNotesRefactor: Update order of Vue properties to match docs.

parent cd5599a5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -24,17 +24,6 @@ export default {
isReplying: false,
};
},
computed: {
discussion() {
return this.note.notes[0];
},
author() {
return this.discussion.author;
},
canReply() {
return window.gl.issueData.current_user.can_create_note;
},
},
components: {
issueNote,
userAvatarLink,
Loading
Loading
@@ -46,6 +35,17 @@ export default {
placeholderNote,
placeholderSystemNote,
},
computed: {
discussion() {
return this.note.notes[0];
},
author() {
return this.discussion.author;
},
canReply() {
return window.gl.issueData.current_user.can_create_note;
},
},
methods: {
componentName(note) {
if (note.isPlaceholderNote) {
Loading
Loading
Loading
Loading
@@ -28,16 +28,16 @@ export default {
required: true,
},
},
computed: {
noteBody() {
return this.note.note;
},
},
components: {
issueNoteEditedText,
issueNoteAwardsList,
issueNoteForm,
},
computed: {
noteBody() {
return this.note.note;
},
},
methods: {
renderGFM() {
$(this.$refs['note-body']).renderGFM();
Loading
Loading
Loading
Loading
@@ -36,18 +36,17 @@ export default {
conflictWhileEditing: false,
};
},
watch: {
noteBody() {
if (this.note === this.initialNote) {
this.note = this.noteBody;
} else {
this.conflictWhileEditing = true;
}
},
},
components: {
markdownField,
},
computed: {
isDirty() {
return this.initialNote !== this.note;
},
noteHash() {
return `#note_${this.noteId}`;
},
},
methods: {
handleUpdate() {
this.updateHandler({
Loading
Loading
@@ -67,14 +66,6 @@ export default {
}
},
},
computed: {
isDirty() {
return this.initialNote !== this.note;
},
noteHash() {
return `#note_${this.noteId}`;
},
},
mounted() {
const issuableDataEl = document.getElementById('js-issuable-app-initial-data');
const issueData = JSON.parse(issuableDataEl.innerHTML.replace(/"/g, '"'));
Loading
Loading
@@ -84,6 +75,15 @@ export default {
this.markdownPreviewUrl = markdownPreviewUrl;
this.$refs.textarea.focus();
},
watch: {
noteBody() {
if (this.note === this.initialNote) {
this.note = this.noteBody;
} else {
this.conflictWhileEditing = true;
}
},
},
};
</script>
 
Loading
Loading
Loading
Loading
@@ -35,14 +35,14 @@ export default {
required: false,
},
},
components: {
timeAgoTooltip,
},
data() {
return {
isExpanded: true,
};
},
components: {
timeAgoTooltip,
},
computed: {
toggleChevronClass() {
return this.isExpanded ? 'fa-chevron-up' : 'fa-chevron-down';
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment