diff options
Diffstat (limited to 'app/assets/javascripts/notes/components/comment_form.vue')
-rw-r--r-- | app/assets/javascripts/notes/components/comment_form.vue | 70 |
1 files changed, 28 insertions, 42 deletions
diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 10e80883c00..884ccca7bde 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -308,13 +308,8 @@ Please check your network connection and try again.`; <template> <div> <note-signed-out-widget v-if="!isLoggedIn" /> - <discussion-locked-widget - v-else-if="!canCreateNote" - :issuable-type="issuableTypeTitle" - /> - <div - v-else-if="canCreateNote" - class="notes notes-form timeline"> + <discussion-locked-widget v-else-if="!canCreateNote" :issuable-type="issuableTypeTitle" /> + <div v-else-if="canCreateNote" class="notes notes-form timeline"> <div class="timeline-entry note-form"> <div class="timeline-entry-inner"> <div class="flash-container error-alert timeline-content"></div> @@ -328,11 +323,7 @@ Please check your network connection and try again.`; /> </div> <div class="timeline-content timeline-content-form"> - <form - ref="commentForm" - class="new-note common-note-form gfm-form js-main-target-form" - > - + <form ref="commentForm" class="new-note common-note-form gfm-form js-main-target-form"> <div class="error-alert"></div> <issue-warning @@ -347,7 +338,8 @@ Please check your network connection and try again.`; :markdown-docs-path="markdownDocsPath" :quick-actions-docs-path="quickActionsDocsPath" :markdown-version="markdownVersion" - :add-spacing-classes="false"> + :add-spacing-classes="false" + > <textarea id="note-body" ref="textarea" @@ -360,21 +352,24 @@ js-gfm-input js-autosize markdown-area js-vue-textarea qa-comment-input" data-supports-quick-actions="true" aria-label="Description" placeholder="Write a comment or drag your files hereā¦" - @keydown.up="editCurrentUserLastNote()" - @keydown.meta.enter="handleSave()" - @keydown.ctrl.enter="handleSave()"> + @keydown.up="editCurrentUserLastNote();" + @keydown.meta.enter="handleSave();" + @keydown.ctrl.enter="handleSave();" + > </textarea> </markdown-field> <div class="note-form-actions"> <div class="float-left btn-group -append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"> +append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" + > <button :disabled="isSubmitButtonDisabled" class="btn btn-create comment-btn js-comment-button js-comment-submit-button qa-comment-button" type="submit" - @click.prevent="handleSave()"> + @click.prevent="handleSave();" + > {{ __(commentButtonTitle) }} </button> <button @@ -384,11 +379,9 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" class="btn comment-btn note-type-toggle js-note-new-discussion dropdown-toggle qa-note-dropdown" data-display="static" data-toggle="dropdown" - aria-label="Open comment type dropdown"> - <i - aria-hidden="true" - class="fa fa-caret-down toggle-icon"> - </i> + aria-label="Open comment type dropdown" + > + <i aria-hidden="true" class="fa fa-caret-down toggle-icon"> </i> </button> <ul class="note-type-dropdown dropdown-open-top dropdown-menu"> @@ -396,16 +389,12 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" <button type="button" class="btn btn-transparent" - @click.prevent="setNoteType('comment')"> - <i - aria-hidden="true" - class="fa fa-check icon"> - </i> + @click.prevent="setNoteType('comment');" + > + <i aria-hidden="true" class="fa fa-check icon"> </i> <div class="description"> <strong>Comment</strong> - <p> - Add a general comment to this {{ noteableDisplayName }}. - </p> + <p>Add a general comment to this {{ noteableDisplayName }}.</p> </div> </button> </li> @@ -414,16 +403,12 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" <button type="button" class="btn btn-transparent qa-discussion-option" - @click.prevent="setNoteType('discussion')"> - <i - aria-hidden="true" - class="fa fa-check icon"> - </i> + @click.prevent="setNoteType('discussion');" + > + <i aria-hidden="true" class="fa fa-check icon"> </i> <div class="description"> <strong>Start discussion</strong> - <p> - {{ startDiscussionDescription }} - </p> + <p>{{ startDiscussionDescription }}</p> </div> </button> </li> @@ -435,18 +420,19 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" :loading="isToggleStateButtonLoading" :container-class="[ actionButtonClassNames, - 'btn btn-comment btn-comment-and-close js-action-button' + 'btn btn-comment btn-comment-and-close js-action-button', ]" :disabled="isToggleStateButtonLoading || isSubmitting" :label="issueActionButtonTitle" - @click="handleSave(true)" + @click="handleSave(true);" /> <button v-if="note.length" type="button" class="btn btn-cancel js-note-discard" - @click="discard"> + @click="discard" + > Discard draft </button> </div> |